
Consumer Goods Rtr Datacloud Export Configure
Configure a Trade Promotion Management (TPM) org's RTR (Real Time Reporting) export...
Install
npx skills add forcedotcom/sf-skills --skill consumer-goods-rtr-datacloud-export-configure -g -a claude-code -y- Repository
- forcedotcom/sf-skills1.1k
- Category
- Engineering
- Updated
- 5d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 1,820 tokens
- Runs scripts
- Yes, review before use
What it does
Configure a Trade Promotion Management (TPM) org's RTR (Real Time Reporting) export pipeline to push promotion measures into Data Cloud (Data 360) for Trade Promotion Effectiveness (TPE) dashboards. Use when a customer or admin wants to set up the RTR export for Data Cloud measures, configure the RTR report for TPE, or as a delegated step from consumer-goods-tpe-dashboard-configure.
Setup RTR Data Cloud Export
Configures the Data-Cloud-targeted RTR exports: the Data_Cloud_Enabled system setting, a scoped SF Data Sync, an RTR_Report_Configuration__c record (with its KPI_Set__c) for Data Cloud export, and the export trigger/status/abort REST calls. Standalone and self-contained, runs on its own, or as a delegated step invoked by consumer-goods-tpe-dashboard-configure, which passes through its own already-collected username, dry-run flag, and GenieAdmin confirmation result.
Distinct from a sibling CSV-export RTR skill (if present in this org's checkout): that skill targets Usage__c IN ('integrationmeta','reportmeta') for CSV export to the CGCloud Processing Services host. This skill targets Data Cloud export. Same underlying RTR_Report_Configuration__c object and KPI_Set__c Apex patterns, different Usage__c values and JSON__c shape, this skill does not invoke or depend on that sibling.
For now, this skill only supports Usage__c = 'datacloudpromotionmeasuresmeta' (JSON__c.object = "promotionmeasures"), it is hardcoded, never asked as an input. datacloudaccountplanmeasuresmeta (account-plan measures) is not yet wired up.
Inputs and namespace detection
Read references/inputs-and-namespace.md before starting. It covers:
- The username/dry-run/GenieAdmin/TPM-Admin/namespace inputs that must be collected (or passed through by a calling skill) before Phase 1.
- The Sales Org / KPI Set / measure-codes / date-from inputs that Phase 6 collects lazily, per Sales Org, only once its existing-config check comes back empty.
- The namespace-detection procedure (
scripts/detect-namespace.js) and the fourNS/NS_SEGMENT/NS_APEX/NS_FIELDderivations used throughout every phase below. scripts/render-apex.js(Apex template rendering) andscripts/resolve-id-by-name.js(name-to-id lookups) both loadscripts/soql-escape.jsto escape substituted/queried literals for safe SOQL/Apex interpolation.
