Skip to content
Development
Skill

/consumer-goods-accruals-datakit-deploy

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

From plugin
sf-skills
1.1k200 skills6 agents15 commands4 MCP

Claude Code

$ npx -y skills add forcedotcom/sf-skills --skill consumer-goods-accruals-datakit-deploy --agent claude-code

SKILL.md

consumer-goods-accruals-datakit-deploy.SKILL.md
name: consumer-goods-accruals-datakit-deploy
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)."
metadata:
  version: "1.0"
  domains: ["Consumer Goods"]
  relatedSkills:
    - "consumer-goods-tpe-datakit-deploy"
    - "platform-dataspace-access-configure"
    - "platform-metadata-deploy"
    - "platform-soql-query"
  minApiVersion: "62.0"
  cliTools:
    - tool: ["node"]
      semver: ">=22.0.0"
    - tool: ["sf"]
      semver: ">=2.0.0"
    - tool: ["sfdx"]
      semver: ">=7.0.0"

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:

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

---

Inputs to collect

**Collect and validate ALL required inputs before running any Phase 1 checks.** Do not start Phase 1 until org alias and sales org name are both confirmed. If either is missing after asking, stop immediately and write the Phase 6 report.

Ask before starting — do not guess.

| Input | Default | Notes | |---|---|---| | **Org alias / username** | — | `sf` alias of the target org. Required. | | **Sales org name** | — | Used to name the Data Space (`DataSpace_<salesOrg>`), its prefix (`DS<lastChar>_`), and the UI controller map key. **Required. Must be exactly 4 alphanumeric characters (e.g. `0001`, `AB12`). If the user has not provided it and cannot provide it, do NOT guess or use any default value — stop immediately, write the Phase 6 report with Phase 1 blocked ("sales org name not provided"), and end the session. Do not run any Phase 1 checks without it.** | | **Skip Data Space?** | no | Yes only if the org has no Data Spaces (some demo orgs). | | **Dry run?** | no | Prepares files; skips all deploys and scheduling. Offer this first. | | **Namespace override** | auto-detected | Pass only if auto-detection would fail. Value WITHOUT trailing `__`. | | **Export cron** | `0 0 2 * * ?` | Only prompt if user requests a different schedule. | | **Accrual chain cron** | `0 0 3 * * ?` | Only prompt if user requests a different schedule. |

The dry-run flag is collected once here and honored through all phases — do not re-prompt.

---

Phase 1 — Preflight

Stop on first failure. Do not continue past a failed check.

1.1 Local tooling

1. **Salesforce CLI present:** `sf --version` 2. **Node 22:** `node --version`

1.2 Org reachable

sf org display --target-org <alias> --json

Confirm `status` is `Active`. Capture `id` (org id), `instanceUrl`, `apiVersion`. Non-zero exit or inactive status → stop, ask user to log in.

1.3 Data Cloud Data Kit framework present

sf data query --target-org <alias> \
  --query "SELECT Id FROM DataKitDeploymentLog LIMIT 1"

`INVALID_TYPE` or `NOT_FOUND` → **stop immediately**: the Data Cloud Data Kit framework is not enabled in this org. Tell the user they must enable Data Cloud and the Data Kit feature before this skill can proceed. Write the Phase 6 report now with Phase 1 blocked and the exact query error. Do NOT run any further queries, downloads, or deploys. Zero rows is fine — the framework is present, continue to Phase 1.4.

1.4 CGCloudAddons static resource present

sf data query --target-org <alias> \
  --query "SELECT Id FROM StaticResource WHERE Name='CGCloudAddons'"

Zero rows → **stop immediately**: the managed package is not installed (or this version does not ship `CGCl

Read more
@forcedotcom
Ships withsf-skills

This repository provides Salesforce agent skills, plugins, and sample apps for building applications.

1.1k200 skills6 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of forcedotcom/sf-skills on GitHub, a chart by star-history.com

Other skills on sf-skills.

agentforce-observe

agentforce-observe

Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about consumer-goods-accruals-datakit-deploy.

Which coding agents can use consumer-goods-accruals-datakit-deploy?
consumer-goods-accruals-datakit-deploy installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.