forcedotcom/sf-skills / plugins/builder/consumer-goods/skills/consumer-goods-rtr-datacloud-export-configure
consumer-goods-rtr-datacloud-export-configure
VerifiedConfigure 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.8 KB |
| references/inputs-and-namespace.md | markdown | 5.3 KB |
| references/procedure.md | markdown | 16.8 KB |
| scripts/detect-namespace.jsexecutable | script | 2.3 KB |
| scripts/render-apex.jsexecutable | script | 2.0 KB |
| scripts/resolve-id-by-name.jsexecutable | script | 1.5 KB |
| scripts/sf-rest.jsexecutable | script | 5.7 KB |
| scripts/soql-escape.jsexecutable | script | 882 B |
| scripts/upsert-report-config.apex | other | 2.3 KB |
| scripts/upsert-system-setting.apex | other | 722 B |
scripts/upsert-report-config.apex
View on GitHub// Idempotent upsert of an RTR_Report_Configuration__c row by
// (Usage__c, Internal_Name__c, Sales_Organization__c). Usage is restricted to
// the two Data-Cloud-targeted values this skill supports:
// 'datacloudpromotionmeasuresmeta' or 'datacloudaccountplanmeasuresmeta'
// (distinct from the CSV-export 'integrationmeta'/'reportmeta' pair used by
// the sibling setup-rtr-export skill). JSON__c is assembled off-Salesforce as
// {"measurecodes":[...],"datefrom":"YYYY-MM-DD","object":"promotionmeasures"
// |"accountplanmeasures"} and passed in as %JSON_LITERAL%. Each placeholder
// below is substituted exactly once, into a String variable declaration —
// the only place a raw value is embedded as an Apex literal, and
// render-apex.js escapes it there (see soql-escape.js). The SOQL WHERE
// clause and every field assignment then use the resulting Apex variables as
// SOQL bind variables (:usage, :internalName, ...) or plain assignments —
// never a second literal substitution of the same placeholder. Pass raw,
// unescaped values for every placeholder below.
//
// %NS% -> namespace field prefix e.g. "cgcloud_dev__"
// %USAGE% -> 'datacloudpromotionmeasuresmeta' or
// 'datacloudaccountplanmeasuresmeta'
// %INTERNAL_NAME% -> free-text admin-supplied name (e.g. "O'Brien Foods")
// %SALES_ORG_ID% -> 15/18-char Sales_Organization__c Id
// %KPI_SET_ID% -> 15/18-char KPI_Set__c Id
// %JSON_LITERAL% -> the full JSON body, raw (not pre-escaped)
String usage = '%USAGE%';
String internalName = '%INTERNAL_NAME%';
String salesOrgId = '%SALES_ORG_ID%';
String kpiSetId = '%KPI_SET_ID%';
String jsonLiteral = '%JSON_LITERAL%';
List<%NS%RTR_Report_Configuration__c> existing = [
SELECT Id
FROM %NS%RTR_Report_Configuration__c
WHERE %NS%Usage__c = :usage
AND %NS%Internal_Name__c = :internalName
AND %NS%Sales_Organization__c = :salesOrgId
WITH USER_MODE
LIMIT 1
];
%NS%RTR_Report_Configuration__c row;
if (existing.isEmpty()) {
row = new %NS%RTR_Report_Configuration__c();
row.%NS%Usage__c = usage;
row.%NS%Internal_Name__c = internalName;
row.%NS%Sales_Organization__c = salesOrgId;
} else {
row = existing[0];
}
row.%NS%Reporting_KPI_Set__c = kpiSetId;
row.%NS%JSON__c = jsonLiteral;
upsert as user row;
System.debug(LoggingLevel.INFO, 'RTR_DATACLOUD_CONFIG_ID=' + row.Id);
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |