# Consumer Goods Accruals Datakit Deploy

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

- Repository: https://github.com/forcedotcom/sf-skills (1134 stars)
- Category: DevOps
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add forcedotcom/sf-skills --skill consumer-goods-accruals-datakit-deploy -g -a claude-code -y`
Codex: `npx skills add forcedotcom/sf-skills --skill consumer-goods-accruals-datakit-deploy -g -a codex -y`
Cursor: `npx skills add forcedotcom/sf-skills --skill consumer-goods-accruals-datakit-deploy -g -a cursor -y`
Gemini CLI: `npx skills add forcedotcom/sf-skills --skill consumer-goods-accruals-datakit-deploy -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add forcedotcom/sf-skills`

## Description

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).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

## 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](https://help.salesforce.com/s/articleView?id=ind.tpm_concept_accruals.htm&type=5)

Run the setup script from the skill root directory:
```bash
node scripts/setup.js --org <alias> [options]
```

---

## Inputs to collect

The rest: https://github.com/forcedotcom/sf-skills/blob/HEAD/plugins/builder/consumer-goods/skills/consumer-goods-accruals-datakit-deploy/SKILL.md
