Skip to content

forcedotcom/sf-skills / plugins/builder/consumer-goods/skills/consumer-goods-rtr-datacloud-export-configure

consumer-goods-rtr-datacloud-export-configure

Verified

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.

FileKindSize
SKILL.mdskill md7.8 KB
references/inputs-and-namespace.mdmarkdown5.3 KB
references/procedure.mdmarkdown16.8 KB
scripts/detect-namespace.jsexecutablescript2.3 KB
scripts/render-apex.jsexecutablescript2.0 KB
scripts/resolve-id-by-name.jsexecutablescript1.5 KB
scripts/sf-rest.jsexecutablescript5.7 KB
scripts/soql-escape.jsexecutablescript882 B
scripts/upsert-report-config.apexother2.3 KB
scripts/upsert-system-setting.apexother722 B

scripts/render-apex.js

View on GitHub
#!/usr/bin/env node
/**
 * Render one of this skill's `scripts/*.apex` templates by substituting
 * `%TOKEN%` placeholders, writing the result to a temp file, and printing
 * that file's path on stdout (so a caller can pipe it straight into
 * `sf apex run -f <path>`).
 *
 * Usage:
 *   node render-apex.js <template-path> --var NS=cgcloud_dev__ --var NAME="My Set"
 *
 * Every `%TOKEN%` in the template must have a matching --var — this script
 * fails loudly on any leftover `%TOKEN%` after substitution rather than
 * silently sending unrendered Apex to the org.
 *
 * Every --var value is escaped (see soql-escape.js) before substitution, so
 * callers must pass raw values — never pre-escape a value before handing it
 * to this script, that would double-escape it.
 */

const fs = require('fs');
const os = require('os');
const path = require('path');
const { escapeSoqlLiteral } = require('./soql-escape');

function parseArgs(argv) {
  const templatePath = argv[0];
  const vars = {};
  for (let i = 1; i < argv.length; i += 1) {
    if (argv[i] !== '--var') continue;
    const pair = argv[i + 1];
    const eq = pair.indexOf('=');
    vars[pair.slice(0, eq)] = pair.slice(eq + 1);
    i += 1;
  }
  return { templatePath, vars };
}

function main() {
  const { templatePath, vars } = parseArgs(process.argv.slice(2));
  if (!templatePath) {
    console.error('Missing required <template-path>');
    process.exit(2);
  }

  let rendered = fs.readFileSync(templatePath, 'utf8');
  for (const [key, value] of Object.entries(vars)) {
    rendered = rendered.split(`%${key}%`).join(escapeSoqlLiteral(value));
  }

  const leftover = rendered.match(/%[A-Z_]+%/g);
  if (leftover) {
    console.error(`render-apex: unresolved placeholder(s): ${leftover.join(', ')}`);
    process.exit(2);
  }

  const outPath = path.join(
    os.tmpdir(),
    `rtr-datacloud-${path.basename(templatePath, '.apex')}-${process.pid}.apex`
  );
  fs.writeFileSync(outPath, rendered, 'utf8');
  console.log(outPath);
}

main();
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall