forcedotcom/sf-skills / plugins/builder/consumer-goods/skills/consumer-goods-tpe-dashboard-configure
consumer-goods-tpe-dashboard-configure
VerifiedEnd-to-end headless setup of Trade Promotion Effectiveness (TPE) dashboards for a Trade Promotion Management (TPM) Cloud org, covering tenant pairing checks, permission sets, SSOT and Tableau Next enablement, C360 SDM verification, the TPM Accruals data kit install, business-period export, RTR Data Cloud export configuration, the TPM_PROMOTION_MEASURE Data Transform, TPE Analytics app install, and optional KPI dashboard customization. Use when a customer or admin wants to set up TPE dashboards, enable Trade Promotion Effectiveness, install the TPE analytics app, or set up and customize TPE dashboards with their own KPIs.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.7 KB |
| references/phases-1-6.md | markdown | 9.3 KB |
| references/phases-7-12.md | markdown | 21.4 KB |
| scripts/find-failure-reason.jsexecutable | script | 4.8 KB |
| scripts/poll-status.jsexecutable | script | 3.5 KB |
| scripts/render-apex.jsexecutable | script | 2.0 KB |
| scripts/run-data-transform.jsexecutable | script | 4.2 KB |
| scripts/schedule-business-period-export.apex | other | 1.7 KB |
| scripts/sf-rest.jsexecutable | script | 5.7 KB |
| scripts/soql-escape.jsexecutable | script | 755 B |
scripts/schedule-business-period-export.apex
View on GitHub// Triggers SCHEDULE_RTR_EXPORT for the tpmbusinessperiod object, across every
// Sales Org ("salesorg":"*" in the JSON body — a business-level "export for
// every sales org" instruction, not a platform-level wildcard).
//
// This must stay anonymous Apex, not a direct REST call to
// ScheduleRTRExportService (/measures/export/schedule): that REST resource
// reads a single "salesorg" field out of its JSON body and uses that same
// value for BOTH tenant/substrate routing (SalesOrgSubstrate mode —
// SalesOrganizationServiceWOSharing.getTenantSubstrateEnum(salesorg)) and the
// forwarded payload. "*" doesn't resolve to a real Sales_Organization__c, so
// it can't be used for routing. This template decouples the two: %SALES_ORG%
// (a real Hyperforce-substrate Sales Org Name) drives routing via the
// OffPlatformCallout constructor; the JSON body's "salesorg" stays "*".
//
// Placeholders (each substituted exactly once, into a String variable
// declaration below — render-apex.js escapes it there; see soql-escape.js):
// %NS_APEX% -> Apex class-reference prefix, e.g. "cgcloud_dev." (empty for unnamespaced)
// %SALES_ORG% -> Name of a real Hyperforce-substrate Sales_Organization__c, resolved by the caller (step 1's `sf data query`)
String salesOrg = '%SALES_ORG%';
Map<String, Object> data = new Map<String, Object>();
data.put('salesorg', '*');
data.put('object', 'tpmbusinessperiod');
%NS_APEX%OffPlatformCallout request = new %NS_APEX%OffPlatformCallout('SCHEDULE_RTR_EXPORT', salesOrg);
%NS_APEX%OffPlatformCalloutResponse response = request.execute(
%NS_APEX%TransactionHandler.getTransactionIdentifier(), null, JSON.serialize(data, true)
);
System.debug(LoggingLevel.INFO, 'SCHEDULE_RTR_EXPORT_RESPONSE=' + response);
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |