service-itsm-agentic-setup-agentforce-studio-configure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEnable Agentforce for IT Service Prerequisites
启用Agentforce for IT Service前置条件
Enable the Agentforce for IT Service Salesforce Go feature toggles — Einstein Generative AI, Agentforce Studio, the parent umbrella, and the path-specific agent template (Fulfiller or Employee) — entirely through the Salesforce CLI (). This is the write-capable step in a three-skill flow; every write goes through the Setup Discovery Connect API route — the only correct write path for these toggles. Each toggle is enabled idempotently (skipped if already ), dependencies are enabled first, and explicit confirmation is required before any write.
sfPOST /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 |
This skill is typically reached via hand-off from the validate skill's NOT-READY report, but can also be run directly.
A helper script — — reads the batched response and deterministically computes the dependency-ordered enable plan (before writing) and the final per-feature verdict (after writing). This mirrors the validate skill's contract (authoring standard A9): the decision logic lives in a script, not in prose.
scripts/classify-enable-plan.mjs/features/statusclassify-readiness.mjs完全通过Salesforce CLI()启用Agentforce for IT Service Salesforce Go功能开关——包括Einstein Generative AI、Agentforce Studio、父级总开关以及路径特定的代理模板(Fulfiller或Employee)。这是三步技能流程中的支持写入步骤;所有写入操作均通过Setup Discovery的 Connect API路由执行——这是操作这些开关的唯一正确写入路径。每个开关的启用都具备幂等性(若已处于状态则跳过),依赖项会优先启用,且在执行任何写入操作前需要明确确认。
sfPOST /connect/setup/discovery/feature/{apiName}/enableENABLED| 步骤 | 技能 | 功能 |
|---|---|---|
| 1. 验证 | | 读取开关状态 → 就绪/未就绪(无写入操作) |
| 2. 配置(本技能) | | 开启未启用的开关 |
| 3. 创建代理 | | 创建并激活Fulfiller代理 |
本技能通常由验证技能的未就绪报告触发,但也可直接运行。
辅助脚本会读取批量的响应,确定性地计算按依赖顺序排列的启用计划(写入前)和每个功能的最终判定结果(写入后)。这与验证技能的规范一致(创作标准A9):决策逻辑存在于脚本中,而非文字描述。
scripts/classify-enable-plan.mjs/features/statusclassify-readiness.mjsScope
范围
- In scope: Enabling Einstein Generative AI (), Agentforce Studio (
sales-cloud-einstein-generative-ai), the parent umbrella (sales-cloud-agent-studio), and the path-specific template (service-cloud-agentforce-for-itsmfor fulfiller;service-cloud-it-fulfiller-agent+service-cloud-requestor-agentfor employee) viaservice-cloud-it-service-employee-agent; reading live per-org state fromPOST .../feature/{apiName}/enablebefore and after each write; enabling dependencies first; confirming enablement stuck via re-query; surfacing an ENABLED / ALREADY-ENABLED / FAILED verdict per feature. Writes are idempotent — skip if already/features/status.ENABLED - Out of scope: Provisioning Agentforce licenses (Setup > Company Information > Permission Set Licenses); assigning permission sets to users; creating, configuring, or activating an agent (); read-only prerequisite validation without writes (
service-itsm-agentic-setup-fulfiller-agent-configure); the org-wide multi-agent orchestration toggle (a Headless360-only pref, not a Connect feature).service-itsm-agentic-setup-agentforce-studio-validate
- 纳入范围:通过启用Einstein Generative AI(
POST .../feature/{apiName}/enable)、Agentforce Studio(sales-cloud-einstein-generative-ai)、父级总开关(sales-cloud-agent-studio)以及路径特定模板(Fulfiller对应service-cloud-agentforce-for-itsm;Employee对应service-cloud-it-fulfiller-agent+service-cloud-requestor-agent);在每次写入前后从service-cloud-it-service-employee-agent读取组织实时状态;优先启用依赖项;通过重新查询确认启用状态;为每个功能显示ENABLED/ALREADY-ENABLED/FAILED判定结果。写入操作具备幂等性——若已处于/features/status状态则跳过。ENABLED - 排除范围:配置Agentforce许可证(设置 > 公司信息 > 权限集许可证);为用户分配权限集;创建、配置或激活代理();仅读取前置条件验证而无写入操作(
service-itsm-agentic-setup-fulfiller-agent-configure);组织级多代理编排开关(仅Headless360可用的偏好设置,非Connect功能)。service-itsm-agentic-setup-agentforce-studio-validate
Which path?
选择哪条路径?
Determine whether the user is enabling prerequisites for the fulfiller agent or an employee agent. If unclear, ask () — same path selection the validate skill uses:
AskUserQuestion- fulfiller → →
sales-cloud-einstein-generative-ai→sales-cloud-agent-studio→service-cloud-agentforce-for-itsmservice-cloud-it-fulfiller-agent - employee → →
sales-cloud-einstein-generative-ai→sales-cloud-agent-studio→service-cloud-agentforce-for-itsm→service-cloud-requestor-agentservice-cloud-it-service-employee-agent
Einstein Generative AI is a dependency of Agentforce Studio and is not one of the toggles the validate skill reports on directly, but it must be enabled first if it is off — the classifier includes it in the enable plan for both paths.
确定用户是为Fulfiller代理还是Employee代理启用前置条件。若不确定,请询问用户()——与验证技能使用的路径选择逻辑一致:
AskUserQuestion- Fulfiller → →
sales-cloud-einstein-generative-ai→sales-cloud-agent-studio→service-cloud-agentforce-for-itsmservice-cloud-it-fulfiller-agent - Employee → →
sales-cloud-einstein-generative-ai→sales-cloud-agent-studio→service-cloud-agentforce-for-itsm→service-cloud-requestor-agentservice-cloud-it-service-employee-agent
Einstein Generative AI是Agentforce Studio的依赖项,验证技能不会直接报告该开关状态,但如果它处于关闭状态,则必须优先启用——分类器会将其纳入两条路径的启用计划中。
Preconditions
前置条件
Same as the validate skill (they share the target org and API surface). If unmet, surfaces an auth error or a //; do not fabricate state — surface the raw error and stop.
sf401403404- CLI installed and authenticated to the target org (
sfshows Connected). All calls usesf org display -o <alias>; never extract or pass the access token by hand.--target-org <alias> - API v67.0+: the feature APIs are available at v67.0. The version is pinned in the URL path; do not hand-edit it below the minimum.
connect/setup/discovery - ≥ 18 on PATH (runs the classifier script).
node - Agentforce license on the org () — a missing license surfaces as
accessCheckor as403on the read.enableBlockedReasons
与验证技能相同(两者共享目标组织和API接口)。若未满足,会显示认证错误或//;请勿伪造状态——直接显示原始错误并停止操作。
sf401403404- 已安装CLI并已认证到目标组织(
sf显示已连接)。所有调用均使用sf org display -o <alias>;切勿手动提取或传递访问令牌。--target-org <alias> - API v67.0+:功能API在v67.0版本可用。URL路径中已固定版本号,请勿手动修改为低于最低要求的版本。
connect/setup/discovery - PATH中存在≥ 18(用于运行分类器脚本)。
node - 组织已拥有Agentforce许可证()——缺失许可证会显示为
accessCheck错误或在读取时显示403。enableBlockedReasons
Operations at a glance
操作概览
| Operation | Command | Returns |
|---|---|---|
| Read feature toggles | | |
| Enable one toggle | | |
Both are Connect API routes reachable via — no Headless360 dispatcher required. Full command shapes, the response envelope, and the error taxonomy live in .
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
| 操作 | 命令 | 返回结果 |
|---|---|---|
| 读取功能开关 | | |
| 启用单个开关 | | |
两者均为可通过访问的Connect API路由——无需Headless360调度器。完整命令格式、响应包和错误分类请参考。
sf api request restreferences/cli-invocation.md切勿提取访问令牌。直接使用——它会使用CLI为目标组织存储的会话信息。请勿从sf api request rest中提取sf org display并手动构建HTTP请求。accessToken
重要提示:请勿使用IPCManagement的来切换代理偏好设置。该控制器的写入白名单会拒绝代理偏好名称(updateOrgPref,500错误)。Setup Discovery的Invalid prefName端点是操作这些开关的唯一正确写入路径。POST /feature/{apiName}/enable
Architecture — How enablement works
架构——启用流程原理
| 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 | |
| 步骤 | 操作内容 | 使用工具 |
|---|---|---|
| 选择路径 | 确定是Fulfiller还是Employee路径(若不确定则询问) | |
| 读取当前状态 | 批量POST路径所需开关的状态,将结果捕获到文件中 | |
| 生成计划 | 运行 | |
| 确认写入 | 显示确切的 | |
| 启用开关 | 在启用 | |
| 验证 | 重新读取 | |
| 生成报告 | 运行 | |
Workflow
工作流程
Substitute with the target org alias. is or .
<alias><agentType>fulfilleremployee将替换为目标组织别名。为或。
<alias><agentType>fulfilleremployeePhase 1 — Read Current State
阶段1 — 读取当前状态
-
POST the feature-status batch for every toggle the chosen path needs, capturing stdout to a file. Do not add. Write the request body once to a temp file and reuse it verbatim in Phases 1, 4, and 5 via
--json— never retype it, substitute a placeholder like--body "$(cat ...)", or rely on a shell variable, since each Bash invocation may run in a fresh shell where a plain variable would be unset:[...]bashcat > /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.exitCapture the exit status — do not swallow it with.|| true
-
POST所选路径所需所有开关的状态,将标准输出捕获到文件中。请勿添加。将请求体一次性写入临时文件,并在阶段1、4、5中通过
--json重复使用——切勿重新输入、替换为--body "$(cat ...)"之类的占位符或依赖shell变量,因为每个Bash调用可能在全新的shell中运行,普通变量可能未设置:[...]bashcat > /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
Phase 2 — Plan (helper script)
阶段2 — 生成计划(辅助脚本)
-
Run the classifier over the captured file to compute the dependency-ordered enable plan, saving its output — Phase 6 consumes this file, not the rawresponse:
/features/statusbashnode "<skill_dir>/scripts/classify-enable-plan.mjs" /tmp/enable-status-before.json <agentType> "$(cat /tmp/enable-status-before.exit)" > /tmp/enable-plan-before.jsonIt prints.{ agentType, readState, features, order, alreadyEnabled, pending, blocked, unconfirmed, verdict, reasons, rawError }means nothing to do — skip to Phase 6.verdict: "ALL-ENABLED"meansverdict: "NEEDS-ENABLE"(inpending) lists what to enable.orderlists anyblockedtoggle whosependingis non-empty as of this read — a toggle blocked only on an earlier dependency inenableBlockedReasonsbecomes enable-able once that dependency is on, so Phase 4 re-checks each toggle immediately before attempting it rather than trusting this snapshot for the whole loop.orderlists any required toggle missing from the response or carrying a status this classifier doesn't recognize —unconfirmed(notverdict: "CANNOT-CONFIRM") when"ALL-ENABLED"is non-empty andunconfirmedis empty.pending⇒ surfacereadState: "error"and stop;rawError⇒ report CANNOT-CONFIRM and stop.readState: "not-wired"
-
对捕获的文件运行分类器,计算按依赖顺序排列的启用计划,保存输出结果——阶段6会使用此文件,而非原始的响应:
/features/statusbashnode "<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 }则无需执行任何操作——直接跳至阶段6。若verdict: "ALL-ENABLED"则verdict: "NEEDS-ENABLE"(位于pending中)列出需要启用的开关。order列出当前读取状态下blocked非空的enableBlockedReasons开关——仅因pending中更早的依赖项未启用而被阻止的开关,在依赖项启用后即可变为可启用状态,因此阶段4会在尝试启用每个开关前立即重新检查,而非依赖阶段2的快照。order列出响应中缺失或状态无法被分类器识别的必需开关——当unconfirmed非空且unconfirmed为空时,pending(而非verdict: "CANNOT-CONFIRM")。若"ALL-ENABLED"则显示readState: "error"并停止操作;若rawError则报告CANNOT-CONFIRM并停止操作。readState: "not-wired"
Phase 3 — Confirm-to-Write Checkpoint (REQUIRED)
阶段3 — 确认写入检查点(必需)
- Present the exact list (excluding anything in
pending) and require an explicit "yes" from the user viablockedbefore proceeding. Enabling org prefs mutates org state. Proceed to Phase 4 ONLY on an explicit "yes". On "no", stop and report the current state without any writes.AskUserQuestion
- 显示确切的列表(排除
pending中的内容),并通过blocked要求用户明确回复"yes"后再继续。启用组织偏好设置会修改组织状态。仅在用户明确回复"yes"时才进入阶段4。若回复"no",则停止操作并报告当前状态,不执行任何写入。AskUserQuestion
Phase 4 — Enable (Dependencies First, Re-Checked Before Each Toggle)
阶段4 — 启用开关(优先处理依赖项,每个开关前重新检查)
-
Iteratein sequence (Einstein GenAI → Studio → parent → child template(s)). Before attempting to enable each
order, re-read and reclassify — this is what lets a child that was<apiName>in Phase 2 (only because Studio/parent was still off) become enable-able once that dependency's own enable has landed, instead of being permanently written off from the Phase-2 snapshot:blockedbashsf 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)"Inspectfrom that output:features["<apiName>"].signal-
→ already
PASS; nothing to do, move to the nextENABLEDinapiName.order -
with an empty
FAIL→ enable it now:enableBlockedReasonsbashsf 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.jsonTheendpoint itself takes no meaningful body, but/enablewith nosf api request rest --method POSTflag at all fails with--body— always passError (SfError): No 'mode' found in 'body' entryexplicitly.--body '{}'reads the response, classifies it ENABLED/FAILED, and accumulates it intorecord-enable-result.mjskeyed by/tmp/enable-results.json— the deterministic per-toggle bookkeeping Phase 6 consumes.apiName -
with a non-empty
FAIL→ still blocked even after this iteration's re-check (a real, not merely-sequential, blocker — e.g. unlicensed) — do not POST; move to the nextenableBlockedReasonsinapiNameand let Phase 6 report the blocker verbatim.order -
/
CANNOT-CONFIRMon this specificERROR's read → stop the loop and surface the read failure; do not guess at remaining toggles.apiName
One failed toggle does not block the rest of the plan — continue the loop. -
-
按顺序遍历(Einstein GenAI → Studio → 父级开关 → 子模板)。在尝试启用每个
order前,重新读取并重新分类——这样阶段2中因依赖项未启用而被<apiName>的子开关,在依赖项启用后即可变为可启用状态,而非因阶段2的快照而被判定为FAILED:blockedbashsf 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>"].signal-
→ 已处于
PASS状态;无需操作,继续处理ENABLED中的下一个order。apiName -
且
FAIL为空 → 立即启用:enableBlockedReasonsbashsf 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端点本身不接受有效请求体,但/enable若未传递sf api request rest --method POST标志会报错--body——必须始终显式传递Error (SfError): No 'mode' found in 'body' entry。--body '{}'会读取响应,将其分类为ENABLED/FAILED,并将结果累积到record-enable-result.mjs中(以/tmp/enable-results.json为键)——阶段6会使用此确定性的每个开关记录信息。apiName -
且
FAIL非空 → 即使本次重新检查后仍被阻止(真实的、非顺序性的阻止因素,例如无许可证)——请勿执行POST;继续处理enableBlockedReasons中的下一个order,由阶段6直接报告阻止原因。apiName -
读取此特定时出现
apiName/CANNOT-CONFIRM→ 停止循环并显示读取失败;请勿猜测剩余开关的状态。ERROR
单个开关启用失败不会阻止计划的其余部分——继续执行循环。 -
Phase 5 — Verify Enablement
阶段5 — 验证启用状态
-
Re-run the Phase 1 read (same) into a fresh file, and re-run the classifier over it, saving its output for Phase 6:
/tmp/feature-status-body.jsonbashsf 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.json⇒ every toggle inverdict: "ALL-ENABLED"is confirmedorder— success. Anything still inENABLED/pending/blockedneeds Phase 6 to classify it precisely (FAILED vs CANNOT-CONFIRM).unconfirmed
-
重新执行阶段1的读取操作(使用相同的)并保存到新文件中,然后对其重新运行分类器,保存输出结果供阶段6使用:
/tmp/feature-status-body.jsonbashsf 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.json若则verdict: "ALL-ENABLED"中的所有开关均已确认处于order状态——操作成功。若仍有开关处于ENABLED/pending/blocked状态,则需要阶段6进行精确分类(FAILED vs CANNOT-CONFIRM)。unconfirmed
Phase 6 — Aggregate Verdict (helper script)
阶段6 — 汇总判定结果(辅助脚本)
-
Run the final aggregator over the Phase-2 classifier output (, not the raw
/tmp/enable-plan-before.jsonresponse), the Phase-4 accumulated results (or/features/statusif Phase 2 was already-/ALL-ENABLED/CANNOT-CONFIRMand Phase 4 never ran), and the Phase-5 classifier output (ERROR):/tmp/enable-plan-after.jsonbashnode "<skill_dir>/scripts/classify-final-report.mjs" /tmp/enable-plan-before.json /tmp/enable-results.json /tmp/enable-plan-after.jsonIt printswhere{ features: { <apiName>: { finalStatus, reason } }, order, overall, reasons }isfinalStatusandALREADY-ENABLED | ENABLED | FAILED | CANNOT-CONFIRM | ERRORisoverall. Render this directly into the Output Format — do not re-derive the per-feature verdict or the overall summary in prose (authoring standard A9). OnSUCCESS | PARTIAL | FAILED | CANNOT-CONFIRM | ERROR, point the user atoverall: "SUCCESS"(fulfiller) orservice-itsm-agentic-setup-fulfiller-agent-configure(employee) to proceed.service-itsm-agentic-setup-employee-agent-configure
-
运行最终汇总脚本,处理阶段2的分类器输出(,而非原始的
/tmp/enable-plan-before.json响应)、阶段4的累积结果(若阶段2已为/features/status/ALL-ENABLED/CANNOT-CONFIRM且未执行阶段4,则传递ERROR)以及阶段5的分类器输出(-):/tmp/enable-plan-after.jsonbashnode "<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 }为finalStatus,ALREADY-ENABLED | ENABLED | FAILED | CANNOT-CONFIRM | ERROR为overall。直接将此结果渲染为输出格式——请勿通过文字描述重新推导每个开关的判定结果或总体摘要(创作标准A9)。若SUCCESS | PARTIAL | FAILED | CANNOT-CONFIRM | ERROR,请引导用户使用overall: "SUCCESS"(Fulfiller)或service-itsm-agentic-setup-fulfiller-agent-configure(Employee)继续操作。service-itsm-agentic-setup-employee-agent-configure
Rules / Constraints
规则/约束
| 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) |
| 约束 | 理由 |
|---|---|
仅通过 | IPCManagement的 |
从 | 只有 |
按分类器的 | 在Einstein GenAI/Studio启用前启用子项会显示未满足依赖的阻止信息 |
| 在阶段4循环中,每个开关启用前立即重新读取并重新分类,而非仅在循环开始时读取一次 | 仅因早期依赖项未启用而被阻止的子开关,在依赖项启用后立即变为可启用状态——仅阶段2的单次快照会错误地将其报告为FAILED,即使它从未真正被阻止 |
幂等性:跳过已处于 | 分类器的 |
必需的确认写入检查点,在执行任何 | 启用组织偏好设置会修改组织状态;用户必须明确批准确切的 |
切勿尝试启用当前(重新检查后) | |
当 | 响应中缺失或状态无法识别的必需开关,既不能被确认为ENABLED,也不能被确认为NOT_ENABLED |
分类和每个开关的结果记录逻辑位于 | 基于固定功能状态的确定性决策表和汇总逻辑(创作标准A9) |
读取/写入操作通过 | |
请勿向 | 部分Connect端点不支持该参数;原始标准输出已为JSON格式 |
| 这些是Connect API功能——使用SF CLI,而非Headless360 | 存在对应的Connect/Tooling等效接口,因此优先使用SF CLI(避免Headless360HostedMcpServer组织权限限制) |
Gotchas
注意事项
| 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 |
| 问题 | 解决方案 |
|---|---|
| |
| 组织中不存在功能API名称/无对应许可证 | 无目录端点枚举有效名称——阶段1的 |
| 优先启用列出的依赖项(Einstein GenAI在Studio之前,Studio在父级/子级开关之前) |
| 写入路径错误——使用Setup Discovery的 |
| 目标组织的会话需要重新认证( |
| 将认证/权限/空请求体读取错误视为"not wired" | 将捕获的 |
依赖阶段2的 | 该列表是写入前的快照——在尝试启用每个开关前重新读取并重新分类,否则依赖项已启用后不再被阻止的子开关仍会被报告为FAILED |
因 | 同时检查 |
| 通过文字描述从写入前/后JSON重新推导每个开关/总体判定结果 | 运行 |
| 在阶段1将功能状态请求体设置为shell变量,并期望在阶段4/5中使用 | 每个Bash调用可能在全新的shell中运行,变量可能未设置,导致静默发送空请求体——将请求体一次性保存到 |
Verification Checklist
验证检查清单
- The agent path (fulfiller / employee) was determined (asked if unclear).
- Phase 1 read via
/features/status, captured to a file, with its exit status captured.sf api request rest - computed the
scripts/classify-enable-plan.mjs(dependency-ordered),pending, andblockedlists before any write.unconfirmed - The user explicitly confirmed the exact list at the Phase-3 checkpoint before any
pendingPOST./enable - Phase 4 re-read and reclassified before each toggle, not once for the whole loop — so a child unblocked by an earlier dependency's enable was still attempted.
- Each attempted POST's response was recorded via
/enable, accumulated across the loop.scripts/record-enable-result.mjs - was re-read after enablement and the classifier re-run to confirm the final per-feature verdict.
/features/status - (not prose) computed the final per-feature status and overall summary from the before/results/after files; the access token was never extracted.
scripts/classify-final-report.mjs
- 已确定代理路径(Fulfiller/Employee)(若不确定则已询问用户)。
- 阶段1通过读取
sf api request rest,并将结果捕获到文件中,同时捕获了退出状态。/features/status - 在写入前计算了
scripts/classify-enable-plan.mjs(按依赖顺序)、pending和blocked列表。unconfirmed - 在阶段3检查点,用户已明确确认确切的列表,之后才执行任何
pendingPOST。/enable - 阶段4在每个开关启用前重新读取并重新分类,而非仅在循环开始时读取一次——因此依赖项启用后不再被阻止的子开关仍会被尝试启用。
- 每个尝试的POST响应均通过
/enable记录,并在循环中累积。scripts/record-enable-result.mjs - 启用后重新读取并重新运行分类器,以确认每个功能的最终判定结果。
/features/status - (而非文字描述)根据写入前/结果/写入后的文件计算了每个功能的最终状态和总体摘要;从未提取访问令牌。
scripts/classify-final-report.mjs
Output Format
输出格式
Present the enablement report as:
text
Agentforce 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>Render and each feature's from verbatim — do not recompute them. No files are produced beyond the temporary response captures used by the classifiers.
overallfinalStatusscripts/classify-final-report.mjs按以下格式呈现启用报告:
text
Agentforce for IT Service — 启用前置条件(通过service-itsm-agentic-setup-agentforce-studio-configure)
组织: <org-alias> (API v67.0)
代理路径: 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 (父级) ..... ENABLED | ALREADY-ENABLED | FAILED | CANNOT-CONFIRM
[4] <路径特定模板> ............ ENABLED | ALREADY-ENABLED | FAILED | CANNOT-CONFIRM
判定结果: SUCCESS | PARTIAL | FAILED | CANNOT-CONFIRM | ERROR
下一步操作:
- <若SUCCESS: "组织已满足<路径>代理的前置条件。通过service-itsm-agentic-setup-fulfiller-agent-configure(Fulfiller)/员工代理技能创建代理。">
- <若PARTIAL/FAILED/CANNOT-CONFIRM/ERROR: 列出受影响的开关 + 原因(enableBlockedReasons、未确认状态或读取错误) + 修复步骤>直接渲染返回的和每个功能的——请勿重新计算。除分类器使用的临时响应捕获文件外,不生成其他文件。
scripts/classify-final-report.mjsoverallfinalStatusReference File Index
参考文件索引
| File | When to read |
|---|---|
| Every phase — exact |
| 文件 | 阅读时机 |
|---|---|
| 每个阶段——确切的 |