Command Palette

Search for a command to run...

Назад к скиллам
скилл № 72102

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…

БесплатноЗапускает вложенные скрипты
forcedotcomот forcedotcom★ 1 200 звёзд на GitHub

Установить consumer-goods-accruals-datakit-deploy в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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

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 CGCloudAddons). Tell the user the package must be installed before proceeding. Write the Phase 6 report now with Phase 1 blocked: CGCloudAddons not found. Do NOT attempt to download, deploy, or schedule anything after this failure.

1.5 Sales org validation

sf data query --target-org <alias> -
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • scripts/setup.js
  • scripts/steps/00-check-prerequisites.js
  • scripts/steps/01-download-static-resource.js
  • scripts/steps/02-replace-org-id.js
  • scripts/steps/03-deploy-metadata.js
  • scripts/steps/04-deploy-engine.js
  • scripts/steps/05-deploy-tpm-accruals.js
  • scripts/steps/06-create-dataspace.js
  • scripts/steps/07-deploy-accruals-reports.js
  • scripts/steps/08-deploy-ui.js
  • scripts/steps/09-completion.js
  • scripts/steps/utils.js

FAQ

Что делает скилл 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 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).

Как установить скилл consumer-goods-accruals-datakit-deploy?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл consumer-goods-accruals-datakit-deploy запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить consumer-goods-accruals-datakit-deploy с