consumer-goods-tpe-datakit-deploy
Deploy the TPM Accruals Data Kit components specifically required for Trade Promotion Effectiveness (TPE) dashboards. Use when a customer or admin wants to…
by forcedotcom★ 1,200 GitHub stars
Install consumer-goods-tpe-datakit-deploy in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
TPE Data Kit Deploy
Deploys the TPM Accruals Data Kit and its DMO mappings into a Salesforce org. Standalone and self-contained — runs on its own, or as a delegated step invoked by consumer-goods-tpe-dashboard-configure (Step 7), which passes through its own already-collected username and dry-run flag rather than this skill re-deriving them.
Inputs to collect first
Ask before starting, unless already supplied by a calling skill. Do not guess.
- TPM System Admin username — already authenticated via
sfCLI. Verify via the sibling script, neversf org display --jsondirectly — that command's raw output includesaccessToken(a live credential), which this script strips before printing:
Printsnode ./scripts/sf-rest.js org-status --target-org <username>{"username","alias","connectedStatus","orgId"}. Non-zero exit orconnectedStatus != "Connected"⇒ stop, ask the user to log in themselves. - Dry-run? — offer by default. In dry-run, Phase 1 (preflight) and Phase 2's read/diff steps still run; Phase 2's
FieldPermissionswrites and Phases 3-5 (deploy) are skipped and recorded aspending — not run (dry-run). - TPM Data Connector installed and active — cannot be verified programmatically. Ask the user, spelling out the exact navigation steps rather than just naming the setting: "Can you confirm the TPM Data Connector is Active? 1) Go to Setup → Data Cloud Setup. 2) In the left nav, under EXTERNAL INTEGRATIONS, click Other Connectors. 3) Find 'TPM Data Connector' in the list and check its status." Wait for an explicit yes. If missing or inactive, stop — tell the user we cannot proceed without the TPM Data Connector being active, and explain the two different paths depending on org type:
- Production orgs — it's typically auto-installed within ~24h of Processing Service pairing, provided the org has a Data Cloud license. If both prerequisites are met, ask the user to wait and retry; if either isn't met (no pairing yet, or no Data Cloud license), that's the real blocker to resolve first.
- Sandbox orgs — auto-install commonly does not happen; it typically needs to be activated manually under EXTERNAL INTEGRATIONS → Other Connectors. Tell the user this is expected in sandboxes and ask them to activate it there, then confirm before continuing. Re-run this check once the user confirms it's Active.
- Salesforce CRM Home org connection — cannot be verified programmatically. Ask the user, spelling out the exact navigation steps: "Can you confirm the Salesforce CRM Home org connection is Active? 1) Go to Setup → Data Cloud Setup. 2) In the left nav, under SALESFORCE INTEGRATIONS, click Salesforce CRM. 3) Check that the Home org connection status is Active." Wait for an explicit yes. If missing/inactive, stop — tell the user we cannot proceed without this connection being active (Phase 2's field-permission grants require the
Data Cloud Salesforce Connectorpermission set, which won't exist until this connection is configured) — ask them to activate/configure it first, then re-run this check. - Permission set(s) for the TPM Admin persona + GenieAdmin permission set confirmed assigned — when invoked as a delegated step from
consumer-goods-tpe-dashboard-configure, it passes through both results already confirmed in its own earlier phases; reuse them, don't re-ask or re-query. When invoked standalone, confirm each directly:- Permission set(s) for the TPM Admin persona — "TPM Admin persona" is a role, not an actual permission set name; the org-specific permission set backing that persona (name/assignment) cannot be verified programmatically. Ask the user to confirm: "Is the permission set(s) required for the TPM Admin persona assigned to <username>?" Wait for an explicit yes.
- GenieAdmin — resolve its Label first (never show the API
Nameto the user), then check the assignment:
Missing ⇒ tell the user the Label from the first query (e.g. "User <username> is missing the <Label> permission set. Assign it now?") and ask permission to assign before continuing:sf data query --target-org <username> --query "SELECT Label FROM PermissionSet WHERE Name = 'GenieAdmin'" sf data query --target-org <username> \ --query "SELECT PermissionSet.Name FROM PermissionSetAssignment WHERE Assignee.Username = '<username>' AND PermissionSet.Name = 'GenieAdmin'"
If declined, skip and note it in the report.sf data create record --sobject PermissionSetAssignment \ --values "AssigneeId=<userId> PermissionSetId=<psId>" --target-org <username>
- Namespace (
NS) — when invoked as a delegated step,consumer-goods-tpe-dashboard-configurepasses through its already-detectedNS(raw namespace string); reuse it, don't re-detect. When invoked standalone, detect it once yourself, before Phase 1, with the sibling script:
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- scripts/detect-namespace.js
- scripts/download-static-resource.js
- scripts/extract-crm-field-permissions.js
- scripts/sf-rest.js
- scripts/update-field-permissions.js
FAQ
What does the consumer-goods-tpe-datakit-deploy skill do?
Deploy the TPM Accruals Data Kit components specifically required for Trade Promotion Effectiveness (TPE) dashboards. Use when a customer or admin wants to install or deploy the TPM data kit for TPE dashboards, or as a delegated step from consumer-goods-tpe-dashboard-configure. Do not use this skill if the customer wants to deploy the TPM Accruals Data Kit for the Accruals feature.
How do I install the consumer-goods-tpe-datakit-deploy skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the consumer-goods-tpe-datakit-deploy skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…