Loading...
Loading...
Enable the Agentforce for IT Service Salesforce Go feature toggles (Agentforce Studio, Einstein Generative AI, the parent umbrella, and the Fulfiller/Employee agent templates) using the Salesforce CLI (sf). Turns ON org prefs via the Setup Discovery feature/{apiName}/enable Connect API route. Write-capable, idempotent, dependency-ordered, confirm-to-write required. Use when asked to enable Agentforce Studio, turn on Agentforce for IT Service, enable Einstein generative AI, or configure the org-level Agentforce for IT Service prerequisites. Triggers: enable agentforce studio, turn on agentforce for it service, enable einstein generative ai, configure agentforce org prefs. DO NOT TRIGGER: read-only prerequisite check (service-itsm-agentic-setup-agentforce-studio-validate), create/activate an agent (service-itsm-agentic-setup-fulfiller-agent-configure), or assigning permission sets.
npx skill4agent add forcedotcom/sf-skills service-itsm-agentic-setup-agentforce-studio-configuresfPOST /connect/setup/discovery/feature/{apiName}/enableENABLED| Step | Skill | What it does |
|---|---|---|
| 1. Validate | | Read the toggles → READY / NOT-READY (no writes) |
| 2. Configure (this skill) | | Turn the disabled toggles ON |
| 3. Create agent | | Create + activate the Fulfiller agent |
scripts/classify-enable-plan.mjs/features/statusclassify-readiness.mjssales-cloud-einstein-generative-aisales-cloud-agent-studioservice-cloud-agentforce-for-itsmservice-cloud-it-fulfiller-agentservice-cloud-requestor-agentservice-cloud-it-service-employee-agentPOST .../feature/{apiName}/enable/features/statusENABLEDservice-itsm-agentic-setup-fulfiller-agent-configureservice-itsm-agentic-setup-agentforce-studio-validateAskUserQuestionsales-cloud-einstein-generative-aisales-cloud-agent-studioservice-cloud-agentforce-for-itsmservice-cloud-it-fulfiller-agentsales-cloud-einstein-generative-aisales-cloud-agent-studioservice-cloud-agentforce-for-itsmservice-cloud-requestor-agentservice-cloud-it-service-employee-agentsf401403404sfsf org display -o <alias>--target-org <alias>connect/setup/discoverynodeaccessCheck403enableBlockedReasons| Operation | Command | Returns |
|---|---|---|
| Read feature toggles | | |
| Enable one toggle | | |
sf api request restreferences/cli-invocation.mdNever extract the access token. Usedirectly — it uses the CLI's stored session for the target org. Do not pull thesf api request restout ofaccessTokenand hand-build an HTTP request with it.sf org display
CRITICAL: DO NOT use IPCManagementto flip agent prefs. That controller's write allow-list rejects the agent prefNames (updateOrgPref, 500). The Setup DiscoveryInvalid prefNameendpoint is the only correct write path for these toggles.POST /feature/{apiName}/enable
| Step | What happens | Tool used |
|---|---|---|
| Pick path | Determine fulfiller vs employee (ask if unclear) | |
| Read current state | POST the feature-status batch for the path's toggles, capture to a file | |
| Plan | Run | |
| Confirm-to-write | Present the exact | |
| Enable | Re-read + reclassify before each | |
| Verify | Re-read | |
| Report | Run | |
<alias><agentType>fulfilleremployee--json--body "$(cat ...)"[...]cat > /tmp/feature-status-body.json <<'EOF'
{"featureApiNames":["sales-cloud-einstein-generative-ai","sales-cloud-agent-studio","service-cloud-agentforce-for-itsm","service-cloud-it-fulfiller-agent","service-cloud-requestor-agent","service-cloud-it-service-employee-agent"]}
EOF
sf api request rest "/services/data/v67.0/connect/setup/discovery/features/status" \
--method POST \
--body "$(cat /tmp/feature-status-body.json)" \
--target-org <alias> > /tmp/enable-status-before.json 2>/tmp/enable-status-before.err
echo $? > /tmp/enable-status-before.exit|| true/features/statusnode "<skill_dir>/scripts/classify-enable-plan.mjs" /tmp/enable-status-before.json <agentType> "$(cat /tmp/enable-status-before.exit)" > /tmp/enable-plan-before.json{ agentType, readState, features, order, alreadyEnabled, pending, blocked, unconfirmed, verdict, reasons, rawError }verdict: "ALL-ENABLED"verdict: "NEEDS-ENABLE"pendingorderblockedpendingenableBlockedReasonsorderunconfirmedverdict: "CANNOT-CONFIRM""ALL-ENABLED"unconfirmedpendingreadState: "error"rawErrorreadState: "not-wired"pendingblockedAskUserQuestionorder<apiName>blockedsf api request rest "/services/data/v67.0/connect/setup/discovery/features/status" \
--method POST \
--body "$(cat /tmp/feature-status-body.json)" \
--target-org <alias> > /tmp/enable-status-loop.json 2>/tmp/enable-status-loop.err
echo $? > /tmp/enable-status-loop.exit
node "<skill_dir>/scripts/classify-enable-plan.mjs" /tmp/enable-status-loop.json <agentType> "$(cat /tmp/enable-status-loop.exit)"features["<apiName>"].signalPASSENABLEDapiNameorderFAILenableBlockedReasonssf api request rest "/services/data/v67.0/connect/setup/discovery/feature/<apiName>/enable" \
--method POST \
--body '{}' \
--target-org <alias> > /tmp/enable-<apiName>.json 2>/tmp/enable-<apiName>.err
node "<skill_dir>/scripts/record-enable-result.mjs" /tmp/enable-<apiName>.json <apiName> /tmp/enable-results.json/enablesf api request rest --method POST--bodyError (SfError): No 'mode' found in 'body' entry--body '{}'record-enable-result.mjs/tmp/enable-results.jsonapiNameFAILenableBlockedReasonsapiNameorderCANNOT-CONFIRMERRORapiName/tmp/feature-status-body.jsonsf api request rest "/services/data/v67.0/connect/setup/discovery/features/status" \
--method POST \
--body "$(cat /tmp/feature-status-body.json)" \
--target-org <alias> > /tmp/enable-status-after.json 2>/tmp/enable-status-after.err
echo $? > /tmp/enable-status-after.exit
node "<skill_dir>/scripts/classify-enable-plan.mjs" /tmp/enable-status-after.json <agentType> "$(cat /tmp/enable-status-after.exit)" > /tmp/enable-plan-after.jsonverdict: "ALL-ENABLED"orderENABLEDpendingblockedunconfirmed/tmp/enable-plan-before.json/features/status-ALL-ENABLEDCANNOT-CONFIRMERROR/tmp/enable-plan-after.jsonnode "<skill_dir>/scripts/classify-final-report.mjs" /tmp/enable-plan-before.json /tmp/enable-results.json /tmp/enable-plan-after.json{ features: { <apiName>: { finalStatus, reason } }, order, overall, reasons }finalStatusALREADY-ENABLED | ENABLED | FAILED | CANNOT-CONFIRM | ERRORoverallSUCCESS | PARTIAL | FAILED | CANNOT-CONFIRM | ERRORoverall: "SUCCESS"service-itsm-agentic-setup-fulfiller-agent-configureservice-itsm-agentic-setup-employee-agent-configure| Constraint | Rationale |
|---|---|
Enable via | The IPCManagement |
Read live per-feature state from | Only |
Enable dependencies before children, in the classifier's | Enabling a child before Einstein GenAI / Studio surfaces unmet-dependency blockers |
| Re-read and reclassify immediately before each toggle in the Phase-4 loop, not once at the top of the loop | A child |
Idempotent: skip | The classifier's |
REQUIRED confirm-to-write checkpoint before any | Enabling org prefs mutates org state; the user must explicitly approve the exact |
Never attempt to enable a toggle whose current (re-checked) | Non-empty |
| A required toggle missing from the response, or with an unrecognized status, must not be reported as ALL-ENABLED just because nothing is left in |
Classification and per-toggle result recording live in | Deterministic decision tables and aggregation over fixed feature statuses (authoring standard A9) |
The read/write goes through | |
Do not pass | Unsupported on some Connect endpoints; the raw stdout body is already JSON |
| These are Connect API features — use SF CLI, not Headless360 | A Connect/Tooling equivalent exists, so SF CLI is preferred (avoids the Headless360HostedMcpServer org-perm gate) |
| Issue | Resolution |
|---|---|
| The |
| Feature API name unavailable / unlicensed on the org | No catalog endpoint enumerates valid names — the Phase-1 |
| Enable the listed dependency first (Einstein GenAI before Studio, Studio before the parent/child toggles) |
| Wrong write path — use the Setup Discovery |
Auth error from | The target org's session needs re-authentication ( |
| Treating an auth/permission/empty-body read failure as "not wired" | Pass the captured |
Trusting the Phase-2 | It is a snapshot before any write — re-read + reclassify before each toggle attempt instead, or a dependency-blocked child gets reported FAILED even after its blocker was just cleared |
Reporting | Also check |
| Re-deriving the per-feature / overall verdict in prose from the before/after JSON | Run |
| Setting the feature-status request body in a shell variable in Phase 1 and expecting it in Phase 4/5 | Each |
/features/statussf api request restscripts/classify-enable-plan.mjspendingblockedunconfirmedpending/enable/enablescripts/record-enable-result.mjs/features/statusscripts/classify-final-report.mjsAgentforce for IT Service — Enable Prerequisites (via service-itsm-agentic-setup-agentforce-studio-configure)
Org: <org-alias> (API v67.0)
Agent path: fulfiller | employee
[1] Einstein Generative AI ................. ENABLED | ALREADY-ENABLED | FAILED | CANNOT-CONFIRM
[2] Agentforce Studio ...................... ENABLED | ALREADY-ENABLED | FAILED | CANNOT-CONFIRM
[3] Agentforce for IT Service (parent) ..... ENABLED | ALREADY-ENABLED | FAILED | CANNOT-CONFIRM
[4] <path-specific template(s)> ............ ENABLED | ALREADY-ENABLED | FAILED | CANNOT-CONFIRM
Verdict: SUCCESS | PARTIAL | FAILED | CANNOT-CONFIRM | ERROR
Next steps:
- <If SUCCESS: "Org satisfies the prerequisites for the <path> agent. Create it via service-itsm-agentic-setup-fulfiller-agent-configure (fulfiller) / the employee-agent skill.">
- <If PARTIAL/FAILED/CANNOT-CONFIRM/ERROR: list the affected toggle(s) + reason (enableBlockedReasons, unconfirmed status, or read error) + remediation steps>overallfinalStatusscripts/classify-final-report.mjs| File | When to read |
|---|---|
| Every phase — exact |