Skills

Consumer Goods Accruals Datakit Deploy

Use this skill to deploy the TPM Liability Accruals data kit end to end to a Salesforce...

Install

npx skills add forcedotcom/sf-skills --skill consumer-goods-accruals-datakit-deploy -g -a claude-code -y
Repository
forcedotcom/sf-skills1.1k
Category
DevOps
Updated
5d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
Yes, review before use

What it does

Use this skill to deploy the TPM Liability Accruals data kit end to end to a Salesforce org. Invoke when a customer or teammate wants to install the accrual engine, verify the Data Cloud connection, deploy the Data Kit components, and schedule the export and accrual calculation chain. Trigger phrases include: 'deploy the accrual data kit', 'set up liability accruals', 'install TPM accruals', 'headless accruals setup', 'configure the Data Cloud export connector', 'schedule the accrual chain'. Do NOT use for creating a Data Space alone (use platform-dataspace-access-configure), for generic Salesforce metadata deployment (use platform-metadata-deploy), for querying org data only (use platform-soql-query), or when setting up the data kit for the Trade Promotion Effectiveness (TPE) feature (use consumer-goods-tpe-datakit-deploy instead).

MANDATORY: Always write the Phase 6 report

After completing all phases, including early stops, blocked phases, or error conditions, you MUST write the Phase 6 report to disk. Failure to write the report is always a test failure, regardless of how well you handled the scenario.

This applies to ALL exit paths without exception:

  • Normal completion (all phases ran)
  • Phase 1 stop (preflight failed, sales org not found, CGCloudAddons missing, Data Cloud not enabled)
  • Phase 3 error (setup script non-zero exit)
  • Phase 4 failure detection (DataKitDeploymentLog failures)
  • Schedule conflict (Phase 5 guard triggered)
  • Any other blocking condition (missing inputs, org unreachable, etc.)

Write the report to ${outputDir}/report.md (the path from the generatedFileLocationDirective in the task). Do not print it as a chat message only, it must exist as a file on disk. If you handled a scenario correctly but never wrote the file, the eval will record no_output and score zero.


Deploy the Accrual Data Kit

Installs the TPM Liability Accruals solution into a Salesforce org end to end. Runs the full setup toolchain bundled in scripts/: checks the org is ready, verifies the Data Cloud connection, downloads the CGCloudAddons static resource, deploys the data kit, confirms the deployment, and schedules the Data Cloud export and accrual calculation chain.

Designed for headless delivery: point it at an org and it runs the full install.

The namespace differs per build: cgcloud (released), cgcloud_dev (dev/beta), or no prefix (source-only). The setup script auto-detects the prefix at runtime via the DataCloudExportScheduler Apex class query. Never hardcode cgcloud. or cgcloud_dev..

Reference: TPM Accrual Engine concept

Run the setup script from the skill root directory:

node scripts/setup.js --org <alias> [options]

Inputs to collect

Read the whole SKILL.md on GitHub

More in DevOps