consumer-goods-promotion-bo-api-deploy
Use to enable the Consumer Goods Cloud TPM Promotion Business Object (BO) API framework in a Salesforce org, interview the user for the custom Workflow Step…
от forcedotcom★ 1 200 звёзд на GitHub
Установить consumer-goods-promotion-bo-api-deploy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Deploy the Promotion BO API
What this does
Turns on the Consumer Goods Cloud TPM Promotion Business Object (BO) API in a
Salesforce org, interviews the user for one custom Workflow Step to add to
the promotion pipeline, generates and deploys that Apex class, registers it
against a BO API entity, wires it into the customer's chosen subset of
{create, update, copy} workflows, then proves the whole path end-to-end via
three REST endpoints:
POST /services/apexrest/<prefix>/promotions/initializePOST /services/apexrest/<prefix>/promotions/ingestGET /services/apexrest/<prefix>/promotions/status?importId=...
It is meant for headless delivery: point it at an org, answer the interview, the skill installs and verifies the step. The Promotion BO API ships in the CGCloud managed package (cgcloud released, cgcloud_dev dev/beta). Every Apex identifier, object/field API name, and REST URL is derived from the detected package prefix at runtime.
derive is out of scope here (a follow-up skill covers it). Detailed runbooks
for the write and smoke phases live under references/:
references/preflight-and-seed-queries.md— Phase 1/2/3 SOQL (TPM entitlement, permset gate, framework-state verification, static-resource retrieve recipe, batch-chain polling).references/conventions-and-payload-rules.md— sales-org partitioning, schema-first contract derivation, and the nine cross-workflow payload rules R1–R9.references/generate-and-wire.md— Phase 5a (generate + deploy the class) and Phase 5b (register + wire the step), with the fullregister-step.apex.references/smoke-and-verify.md— Phase 6 (contract derivation, payload materialization, create/update/copy legs + verification).references/reference-example-set-comment-value.md— the shippedSetCommentValuepreset (assets atassets/set-comment-value/).
Inputs to collect first
Ask before starting; do not guess.
- Org alias — the
sfalias of the target org. Required. - Sales org — required pre-parameter, default
0001. Must be 4 chars, uppercase (mirrorsTPMSetupData.validateSalesOrg). Every downstream lookup (promotion template, tactic template, anchor account, product filter criteria, SKUs) is scoped to this sales org — seereferences/conventions-and-payload-rules.md("Sales-org partitioning"). - Yes to seeding? — Phase 3a fetches the packaged BO API seed and asks for confirmation before inserting ~232 rows across 8 objects. Offer
--yesfor CI callers. - Dry run? —
--dry-runruns Phases 1, 2, 3a-preview, the Phase 5 interview, and a validate-only deploy. Writes nothing.
What the customization is gets collected in Phase 5's interview, once the framework state is known.
Find the namespace first
The prefix depends on the installed build — detect it, do not guess. Released
package → cgcloud; dev/beta → cgcloud_dev; source-deployed → no prefix.
sf data query --target-org <alias> \
--query "SELECT NamespacePrefix FROM ApexClass WHERE Name = 'TPMSetupData'" --json
Read records[0].NamespacePrefix and bind three variables used everywhere below:
PREFIX_DOT— Apex references:cgcloud./cgcloud_dev./ empty.PREFIX_UNDER— object/field API names:cgcloud__/cgcloud_dev__/ empty.URL_NS— REST paths:/cgcloud//cgcloud_dev/ empty.
Every Apex call is ${PREFIX_DOT}ClassName.method(...); every SOQL object/field is
${PREFIX_UNDER}Object__c; every REST URL is
/services/apexrest${URL_NS}/promotions/<endpoint>. Substitute at run time.
Phase 1 — Preflight
Run these and stop on the first failure.
sf --version;node --version(only if running shipped scripts). Alsoexport SF_SKIP_NEW_VERSION_CHECK=trueonce at session start so a stale CLI's update banner cannot leak onto stdout and break anysf … --json | jq …pipe downstream (seereferences/smoke-and-verify.md"parse caveat" for the alternatesedstrip).sf org display --target-org <alias> --json— confirm reachable; captureinstanceUrl+ org id (display/logging only). REST calls usesf api request reston the CLI's stored session — the skill never extracts the access token.- Validate sales org locally: length 4, uppercase, non-blank (mirrors
TPMSetupData.validateSalesOrg). Fail fast. - TPM entitlement (Permission Set License) — the
CGCRetailAndTPMMgmtPslPSL assignment on the running user. SOQL + warn/stop routing inreferences/preflight-and-seed-queries.mdStep 4. - Running-user permission set (TPM Admin persona) — the running user must hold
TPM_Master_Data_Admin(or a clone matching%TPM%Master Data Admin%); if missing, offersf org assign permset --name TPM_Master_Data_Admin --target-org <alias>and wait. SOQL inreferences/preflight-and-seed-queries.mdStep 5. Proceed only once admin access is confirmed. - Namespace discovery (above).
- Running user's
${PREFIX_UNDER}Sales_Org__cequals<salesOrg>. Blank thr
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- assets/set-comment-value/README.md
- assets/set-comment-value/SetCommentValue.cls
- assets/set-comment-value/SetCommentValue.cls-meta.xml
- assets/set-comment-value/interview-answers.json
- assets/set-comment-value/payloads/copy.json
- assets/set-comment-value/payloads/create.json
- assets/set-comment-value/payloads/update.json
- references/conventions-and-payload-rules.md
- references/generate-and-wire.md
- references/preflight-and-seed-queries.md
- references/reference-example-set-comment-value.md
- references/smoke-and-verify.md
FAQ
Что делает скилл consumer-goods-promotion-bo-api-deploy?
Use to enable the Consumer Goods Cloud TPM Promotion Business Object (BO) API framework in a Salesforce org, interview the user for the custom Workflow Step they want to add, generate and deploy that Apex class, wire it into the create/update/copy workflows, and prove it end-to-end via headless REST ingest. Ships a worked reference example (SetCommentValue) but the customization is user-supplied per org. Triggers on "deploy the promotion BO API", "set up promotion BO API", "headless promotion create", "add a BO API workflow step".
Как установить скилл consumer-goods-promotion-bo-api-deploy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл consumer-goods-promotion-bo-api-deploy запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…