@salesforce/afv-skills 1.40.0 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/package.json +1 -1
  2. package/skills/automation-flow-generate/SKILL.md +32 -43
  3. package/skills/experience-portal-create/SKILL.md +497 -0
  4. package/skills/experience-portal-create/assets/report-template.md +30 -0
  5. package/skills/experience-portal-create/references/mcp-invocation.md +288 -0
  6. package/skills/experience-portal-create/references/post-creation-activate-publish.md +165 -0
  7. package/skills/experience-portal-create/references/templates.md +253 -0
  8. package/skills/experience-ui-bundle-features-generate/SKILL.md +5 -1
  9. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -0
  10. package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -0
  11. package/skills/platform-datamask-run/SKILL.md +345 -0
  12. package/skills/platform-datamask-run/references/api-surface.md +130 -0
  13. package/skills/platform-datamask-run/references/policy-authoring.md +185 -0
  14. package/skills/platform-datamask-run/references/run-and-abort.md +116 -0
  15. package/skills/platform-datamask-run/scripts/poll-job.sh +115 -0
  16. package/skills/platform-dataspace-access-configure/SKILL.md +51 -3
  17. package/skills/platform-dataspace-access-configure/scripts/inspect-dataspace-scopes.sh +56 -0
  18. package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +1 -0
  19. package/skills/platform-sandbox-configure/SKILL.md +17 -2
  20. package/skills/platform-trial-org-create/SKILL.md +175 -0
  21. package/skills/platform-trial-org-create/examples/create_request.json +9 -0
  22. package/skills/platform-trial-org-create/examples/error_response.json +41 -0
  23. package/skills/platform-trial-org-create/examples/success_response.json +27 -0
  24. package/skills/platform-trial-org-create/references/error_codes.md +42 -0
  25. package/skills/platform-trial-org-create/references/signup_request_fields.md +69 -0
  26. package/skills/platform-trial-org-create/scripts/create_signup_request.sh +175 -0
  27. package/skills/platform-trial-org-create/scripts/get_signup_request.sh +155 -0
  28. package/skills/platform-widget-generate/SKILL.md +47 -6
  29. package/skills/platform-widget-generate/examples/conditional.json +3 -3
  30. package/skills/platform-widget-generate/examples/list-with-foreach.json +2 -2
  31. package/skills/platform-widget-generate/examples/single-object.json +2 -2
  32. package/skills/platform-widget-generate/references/widget-bundle-layout.md +1 -1
  33. package/skills/service-agentforce-channel-configure/SKILL.md +271 -0
  34. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +97 -0
  35. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +145 -0
  36. package/skills/service-agentforce-channel-configure/references/channel-branch-voice.md +69 -0
  37. package/skills/service-agentforce-channel-configure/references/channel-types.md +61 -0
  38. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +86 -0
  39. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +135 -0
  40. package/skills/service-agentforce-channel-configure/references/routing-flow.md +384 -0
  41. package/skills/service-catalog-template-deploy/SKILL.md +310 -0
  42. package/skills/service-catalog-template-deploy/references/cli-invocation.md +258 -0
  43. package/skills/service-catalog-template-deploy/scripts/activate-verify.mjs +164 -0
  44. package/skills/service-catalog-template-deploy/scripts/build-deploy-payload.mjs +94 -0
  45. package/skills/service-catalog-template-deploy/scripts/resolve-template.mjs +331 -0
  46. package/skills/service-catalog-template-search/SKILL.md +212 -0
  47. package/skills/service-catalog-template-search/references/cli-invocation.md +128 -0
  48. package/skills/service-catalog-template-search/scripts/classify-catalog.mjs +205 -0
  49. package/skills/service-concierge-portal-generate/SKILL.md +126 -0
  50. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1428 -0
  51. package/skills/service-digital-engagement-channel-configure/SKILL.md +46 -6
  52. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -1
  53. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +4 -1
  54. package/skills/service-helpagent-coordinate/README.md +8 -2
  55. package/skills/service-helpagent-coordinate/SKILL.md +126 -130
  56. package/skills/service-helpagent-coordinate/assets/help-agent-spec.md +70 -53
  57. package/skills/service-helpagent-coordinate/references/agent-script.md +571 -457
  58. package/skills/service-helpagent-coordinate/references/channel-voice.md +38 -9
  59. package/skills/service-helpagent-coordinate/references/channel-web-chat.md +173 -49
  60. package/skills/service-helpagent-coordinate/references/output-report-format.md +126 -0
  61. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +153 -0
  62. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +79 -0
  63. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +35 -0
  64. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +271 -0
  65. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/references/cli-invocation.md +265 -0
  66. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-enable-plan.mjs +220 -0
  67. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/classify-final-report.mjs +102 -0
  68. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/scripts/record-enable-result.mjs +73 -0
  69. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +206 -0
  70. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/references/cli-invocation.md +194 -0
  71. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/scripts/classify-readiness.mjs +223 -0
  72. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +45 -7
  73. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +45 -5
  74. package/skills/service-itsm-agentic-setup-configure/SKILL.md +116 -0
  75. package/skills/service-itsm-agentic-setup-configure/examples/output-templates.md +64 -0
  76. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +158 -0
  77. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/cli-invocation.md +361 -0
  78. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/error-taxonomy.md +44 -0
  79. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/reactivation.md +66 -0
  80. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +66 -0
  81. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/specialized-templates.md +148 -0
  82. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +169 -0
  83. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/build-create-body.mjs +116 -0
  84. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-agent-existence.mjs +185 -0
  85. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/classify-preflight.mjs +168 -0
  86. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/create-scratch-dir.mjs +58 -0
  87. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +197 -0
  88. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +186 -0
  89. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/action-availability.md +51 -0
  90. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/cli-invocation.md +345 -0
  91. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/error-taxonomy.md +44 -0
  92. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/reactivation.md +63 -0
  93. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +44 -0
  94. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +149 -0
  95. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/build-create-body.mjs +110 -0
  96. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-action-availability.mjs +201 -0
  97. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-activate-result.mjs +135 -0
  98. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-agent-existence.mjs +194 -0
  99. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/classify-preflight.mjs +158 -0
  100. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/create-scratch-dir.mjs +58 -0
  101. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +191 -0
  102. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +133 -0
  103. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +71 -0
  104. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +308 -0
  105. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +23 -0
  106. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +193 -0
  107. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +57 -0
  108. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +394 -0
  109. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +266 -0
  110. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/cli-invocation.md +106 -0
  111. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/helper-contracts.md +142 -0
  112. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/references/permset-topology.md +82 -0
  113. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-action-surface.mjs +137 -0
  114. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-assignment-state.mjs +99 -0
  115. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/classify-permset-availability.mjs +120 -0
  116. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/scripts/resolve-target-user.mjs +86 -0
  117. package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +284 -0
  118. package/skills/service-itsm-agentic-setup-uel-user-create/references/mcp-invocation.md +302 -0
  119. package/skills/service-itsm-channels-coordinate/SKILL.md +472 -0
  120. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +212 -0
  121. package/skills/service-itsm-incident-mgmt-configure/references/mcp-invocation.md +225 -0
  122. package/skills/service-itsm-incident-priority-configure/SKILL.md +53 -12
  123. package/skills/service-itsm-swarming-configure/SKILL.md +212 -0
  124. package/skills/service-itsm-teams-configure/SKILL.md +395 -0
  125. package/skills/service-itsm-teams-configure/references/azure-credential-population.md +213 -0
  126. package/skills/service-itsm-teams-configure/references/gotchas.md +23 -0
  127. package/skills/service-itsm-teams-coordinate/SKILL.md +175 -0
  128. package/skills/service-itsm-teams-coordinate/examples/output-templates.md +85 -0
  129. package/skills/service-itsm-teams-debug/SKILL.md +144 -0
  130. package/skills/service-itsm-teams-debug/references/configuration-checklists.md +277 -0
  131. package/skills/service-itsm-teams-debug/references/report-generation.md +95 -0
  132. package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +139 -0
  133. package/skills/service-itsm-teams-employee-agent-configure/assets/Teams_AgentForce.EmbeddedServiceConfig-meta.xml +43 -0
  134. package/skills/service-itsm-teams-employee-agent-configure/references/teams-embedded-employee-agent.md +480 -0
  135. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +232 -0
  136. package/skills/service-itsm-teams-itservice-configure/SKILL.md +391 -0
@@ -0,0 +1,193 @@
1
+ # Milestone Strategy Patterns — Incident SLA
2
+
3
+ Phase 1.4 of the SLA workflow either infers the milestone strategy from the user's prompt (see
4
+ "Phase 1.4 skip conditions" below) or asks the user to pick one. This file lists each option with
5
+ its default configuration, MilestoneType-reuse rules, and the exact `Attach Milestone` payloads
6
+ that Phase 2 step 10 dispatches. Every `filterItems.operator` value here uses the exact enum the
7
+ server accepts — `Equals`, `NotEqual` — never `!=` or `Equal`.
8
+
9
+ ---
10
+
11
+ ## Phase 1.4 skip conditions (do NOT dispatch `AskUserQuestion` when any hold)
12
+
13
+ Every SLA policy needs at least one milestone, but the strategy question is skipped when the
14
+ milestone shape is already determined by the request:
15
+
16
+ - **(a) The prompt / conversation already describes a concrete milestone shape** — e.g. "60-minute
17
+ first-response trigger", "Response + Resolution defaults", "per-priority tiers". Extract the
18
+ described milestone(s) verbatim (time, criteria, name) and use the pattern defaults below. Do
19
+ NOT re-ask.
20
+ - **(b) The eventual branch is an idempotent no-op** — Phase 1 step 6 established `noOp=true`
21
+ (every requested artifact already exists with matching configuration). Skip Phase 1.4, skip
22
+ Phase 2, and report the no-op verbatim citing the read evidence.
23
+ - **(c) Explicit up-front authorization** — a phrase that unambiguously waives the confirm gate
24
+ (`"you have my explicit authorization to create"`, `"do not re-ask me to confirm"`,
25
+ `"proceed without asking"`) **and** a concrete milestone shape is derivable per (a). A passing
26
+ mention ("build it", "go ahead") is NOT sufficient by itself. Waives the interactive confirm;
27
+ does NOT waive Phase 1.5 plan-narration — dispatch only after SLA Policy name, Account,
28
+ Entitlement date range, and per-milestone list have been written to the response.
29
+
30
+ **Only when none of (a)/(b)/(c) apply** (generic "set up an SLA on Incidents" with no shape),
31
+ dispatch `AskUserQuestion` with the five options below. Priority-tiered requires the
32
+ `Incident.Priority` picklist — validate before offering.
33
+
34
+ All strategies share these defaults unless overridden:
35
+
36
+ - `businessHoursId`: the default BusinessHours resolved in Phase 1 step 4
37
+ - `startTimeBasedOn`: `SlaProcessCreatedDate`
38
+ - `milestoneState`: `Active`
39
+ - `milestoneAgreementType`: `Warning`
40
+ - `filterType`: `RuleFilter`
41
+ - Base filter row: `Incident.Status NotEqual Closed` (keeps every milestone alive until the
42
+ Incident closes; ANDs with pattern-specific criteria below)
43
+
44
+ ---
45
+
46
+ ## AskUserQuestion prompt (Phase 1.4, only when no skip condition applies)
47
+
48
+ ```text
49
+ Question: How many milestones do you want on this SLA policy?
50
+
51
+ 1. Single milestone — one 60-min First Response timer (simplest)
52
+ 2. Response + Resolution — 30-min response + 8-hour resolution (classic)
53
+ 3. Priority-tiered response — one timer per Priority (Critical/P1 15 / High/P2 60 / Moderate (a.k.a. Medium)/P3 240 / Low/P4 1440 min)
54
+ 4. Escalation ladder — Response (30) → Manager Escalation (120) → Executive Escalation (480 min)
55
+ 5. Custom / mixed — walk through each milestone individually (name, time, criteria)
56
+ ```
57
+
58
+ For options 3 and 4, the concrete numbers are the defaults the skill uses if the user picks the
59
+ option without customizing. Option 5 dispatches follow-up `AskUserQuestion` prompts.
60
+
61
+ Before rendering options 3 and 5, confirm the live `Incident.Priority` picklist values (fetched in
62
+ Phase 1 via the Incident describe) — if any value used in a default row is missing from the org's
63
+ picklist, drop that milestone from the pattern and note it in the Phase-1.5 confirmation.
64
+
65
+ ---
66
+
67
+ ## Canonical Attach-Milestone payload
68
+
69
+ Dispatch every pattern below via `mcp__headless-360__dispatch` with `method: "POST"` and
70
+ `url: "/services/data/v67.0/connect/sla-management/sla-policies/<slaId>/milestones"` (substitute
71
+ the SLA policy id captured in Phase 2 step 9). The reusable request-body template lives at
72
+ `assets/attach-milestone.json` — load and populate it rather than reconstructing the JSON.
73
+
74
+ Substitute per-pattern: `milestoneTypeId` is the id returned when you created the MilestoneType,
75
+ `businessHoursId` is the id resolved in Phase 1, and `timeTrigger` + `order` come from the
76
+ pattern's row. `filterItems` in the template carries the base "Status != Closed" row that every
77
+ pattern shares; each pattern's table lists **additional** row objects to append to `filterItems`
78
+ (same schema: `table`, `column`, `operator`, `order`, `value`) — do not replace the base row, add
79
+ to it.
80
+
81
+ ---
82
+
83
+ ## Pattern 1 — Single milestone (default)
84
+
85
+ **MilestoneTypes to create:** 1 — `Incident First Response`
86
+ **Milestones to attach:** 1
87
+
88
+ | # | MilestoneType | timeTrigger | Extra filter items |
89
+ |---|---------------|-------------|--------------------|
90
+ | 1 | Incident First Response | 60 | *(none — Status != Closed only)* |
91
+
92
+ ---
93
+
94
+ ## Pattern 2 — Response + Resolution
95
+
96
+ **MilestoneTypes to create:** 2 — `Incident First Response`, `Incident Resolution`
97
+ **Milestones to attach:** 2
98
+
99
+ | # | MilestoneType | timeTrigger | Extra filter items |
100
+ |---|---------------|-------------|--------------------|
101
+ | 1 | Incident First Response | 30 | *(none)* |
102
+ | 2 | Incident Resolution | 480 (8 hours) | *(none)* |
103
+
104
+ Both milestones only enforce `Status != Closed`. Response fires first (30 min); Resolution runs
105
+ concurrently on its own 8-hour timer.
106
+
107
+ ---
108
+
109
+ ## Pattern 3 — Priority-tiered response
110
+
111
+ **MilestoneTypes to create:** 1 — `Incident First Response` (reused across all four milestones)
112
+ **Milestones to attach:** up to 4 (one per active Priority value)
113
+
114
+ | # | Priority | timeTrigger | Extra filter items |
115
+ |---|----------|-------------|--------------------|
116
+ | 1 | Critical | 15 | `Incident.Priority Equals Critical` |
117
+ | 2 | High | 60 | `Incident.Priority Equals High` |
118
+ | 3 | Moderate | 240 | `Incident.Priority Equals Moderate` |
119
+ | 4 | Low | 1440 | `Incident.Priority Equals Low` |
120
+
121
+ Assumes the standard `Critical / High / Moderate / Low` picklist (some orgs and prompts label the
122
+ mid tier `Medium` instead of `Moderate` — same P3 tier, different label). If the org has renamed /
123
+ removed / added values (checked against the Phase-1 Incident describe), drop or rename milestones
124
+ to match — do not send `Priority Equals <value>` for a value that is not in the live picklist (the
125
+ server accepts it silently and the milestone never engages).
126
+
127
+ The multi-item `filterItems` array combines with `AND` by default — both `Status != Closed` AND
128
+ `Priority == Critical` must hold for the milestone to remain active. If Priority flips after
129
+ Incident create (e.g. via the Priority Matrix), the milestone re-evaluates on the next server pass.
130
+
131
+ ---
132
+
133
+ ## Pattern 4 — Escalation ladder
134
+
135
+ **MilestoneTypes to create:** 3 — `Incident First Response`, `Incident Manager Escalation`,
136
+ `Incident Executive Escalation`
137
+ **Milestones to attach:** 3
138
+
139
+ | # | MilestoneType | timeTrigger | Extra filter items |
140
+ |---|---------------|-------------|--------------------|
141
+ | 1 | Incident First Response | 30 | *(none)* |
142
+ | 2 | Incident Manager Escalation | 120 | *(none)* |
143
+ | 3 | Incident Executive Escalation | 480 | *(none)* |
144
+
145
+ All three run concurrently from `SlaProcessCreatedDate` — the "ladder" is enforced by the timers,
146
+ not by chaining. Strictly sequential escalation requires workflow SLA actions
147
+ (`POST /connect/workflow-sla-actions/execute-actions`), which is out of scope for this skill.
148
+
149
+ ---
150
+
151
+ ## Pattern 5 — Custom / mixed
152
+
153
+ For genuinely custom setups, the skill walks the user through each milestone one at a time with
154
+ `AskUserQuestion`.
155
+
156
+ For each milestone `i` from 1 to N (where N is confirmed up front):
157
+
158
+ 1. **Milestone name** — used as the MilestoneType label. Reuse an existing MilestoneType if the
159
+ name matches one already created in this run; otherwise create a new one.
160
+ 2. **Time trigger (minutes)** — integer, business-hours-aware.
161
+ 3. **Criteria field** — the `Incident.*` field to filter on (default `Status`). For custom
162
+ fields, use the `Incident.<Field>__c` API name.
163
+ 4. **Criteria operator** — one of `Equals`, `NotEqual`, `LessThan`, `GreaterThan`, `Contains`,
164
+ `StartsWith`, `Includes` (server enum — no `!=`, no `Equal`).
165
+ 5. **Criteria value** — validated against the live picklist for picklist fields; free-form
166
+ otherwise.
167
+
168
+ After collecting all N milestones, render the full list in Phase 1.5 confirmation and require an
169
+ explicit "yes" before dispatching the create loop.
170
+
171
+ **Custom-mixed example** (Response for all + per-category resolution):
172
+
173
+ | # | Name | timeTrigger | Filter items |
174
+ |---|-----------------------------|-------------|--------------|
175
+ | 1 | Incident First Response | 30 | `Status NotEqual Closed` |
176
+ | 2 | Outage Resolution | 240 | `Status NotEqual Closed`, `Category Equals Availability` |
177
+ | 3 | Request Resolution | 1440 | `Status NotEqual Closed`, `Category Equals Request` |
178
+
179
+ For rows 2 and 3, first confirm `Category` is present on the org's Incident picklist and that the
180
+ values are active — if not, ask the user which category values they actually want to filter on
181
+ before creating the MilestoneType or attaching the milestone.
182
+
183
+ ---
184
+
185
+ ## Gotchas across all patterns
186
+
187
+ | Issue | Detail |
188
+ |-------|--------|
189
+ | MilestoneType reuse vs. create | Priority-tiered = 1 MilestoneType reused 4 times. Response + Resolution = 2 types. Escalation ladder = 3 types. |
190
+ | Priority-tiered needs a Priority | The test Incident in Phase 3 must have a `Priority` value matching one of the milestones — otherwise no EntityMilestone spawns. Set the Priority explicitly, or create one test Incident per Priority. |
191
+ | Multi-milestone partial-failure | If milestone #2 of N fails to attach, halt and surface the raw error. Do NOT continue attaching #3..N — the policy will be half-configured. |
192
+ | `order` field | Numeric 1..N. Not load-bearing for runtime evaluation (all milestones fire independently), but controls display order in the UI. |
193
+ | Priority-tiered + Priority Matrix skill | If the Priority Matrix skill is also running, its Impact × Urgency grid decides `Incident.Priority`. Enable the matrix first if you want new Incidents to derive Priority from the matrix. |
@@ -0,0 +1,57 @@
1
+ # Output Templates — Incident SLA Setup
2
+
3
+ Canonical result-report strings for the SLA setup skill. Fill in the placeholders — do **not** substitute Salesforce record IDs into the user-facing output.
4
+
5
+ ## Failure
6
+
7
+ Display the error from the `dispatch` response (`{status_code, body}`) exactly as returned, name the step that failed, and refer to `references/mcp-invocation.md` for known workarounds.
8
+
9
+ ## Success — single milestone
10
+
11
+ ```text
12
+ Incident SLA Setup Complete (via service-itsm-agentic-setup-incident-sla-configure)
13
+
14
+ Artifacts created:
15
+ Milestone Type: <name> (OneTime)
16
+ SLA Policy: <name> (Active, Incident)
17
+ Milestone: <time> min, criteria: <criteria summary>
18
+ Entitlement: <name> -> Account: <account name>
19
+
20
+ Verification:
21
+ Incident: <IncidentNumber> — "<Subject>"
22
+ SLA Start: <timestamp>
23
+ Milestone: <MilestoneType name>
24
+ Target: <TargetDate> (Start + <timeTrigger> min)
25
+ Status: EntityMilestone auto-created — SLA is active
26
+
27
+ Chain: MilestoneType > SLA Policy > Milestone > Entitlement > Incident > EntityMilestone
28
+ ```
29
+
30
+ ## Success — multi-milestone (list every attached milestone)
31
+
32
+ ```text
33
+ Incident SLA Setup Complete (via service-itsm-agentic-setup-incident-sla-configure)
34
+
35
+ Strategy: <Response + Resolution | Priority-tiered | Escalation ladder | Custom>
36
+
37
+ Artifacts created:
38
+ Milestone Types: <name1>, <name2>, ... (OneTime)
39
+ SLA Policy: <name> (Active, Incident)
40
+ Milestones:
41
+ #1 <MilestoneType name> <time> min criteria: <summary>
42
+ #2 <MilestoneType name> <time> min criteria: <summary>
43
+ ...
44
+ Entitlement: <name> -> Account: <account name>
45
+
46
+ Verification:
47
+ Incident: <IncidentNumber> — "<Subject>" (Priority=<value>)
48
+ SLA Start: <timestamp>
49
+ EntityMilestones fired:
50
+ - <MilestoneType name> Target: <TargetDate> (Start + <timeTrigger> min)
51
+ - ...
52
+ Status: <N> EntityMilestone(s) auto-created — SLA is active
53
+
54
+ Chain: MilestoneTypes > SLA Policy > Milestones > Entitlement > Incident > EntityMilestones
55
+ ```
56
+
57
+ No record IDs in user-facing output. No files are produced — the skill mutates org configuration in place through headless-360 MCP dispatch.
@@ -0,0 +1,394 @@
1
+ # MCP Invocation Reference — Incident SLA
2
+
3
+ Every operation dispatches through the **Salesforce-hosted `headless-360`** MCP server, which
4
+ exposes four meta-tools:
5
+
6
+ - `mcp__headless-360__discover(query)` — semantic search over the indexed operation catalog
7
+ - `mcp__headless-360__describe(id)` — pulls the schema and canonical route for one operation
8
+ - `mcp__headless-360__dispatch_readonly({url, method, query_params?, body?})` — GET / read-only HTTP
9
+ - `mcp__headless-360__dispatch({url, method, body?, query_params?})` — POST / PATCH / DELETE HTTP
10
+
11
+ **Dispatch takes raw HTTP**, not `{operation_id, arguments}`. Give it the full `url`
12
+ (`/services/data/v67.0/...`), `method`, optional `body`, and optional `query_params` — the server
13
+ signs the request with the JWT bound to the current MCP session and forwards it to the org. The
14
+ skill never handles credentials or an org alias — everything is derived from the session.
15
+
16
+ ## Response envelope
17
+
18
+ The SLA Management Connect API, `/sobjects/…` REST endpoints, and `/query` are **standard REST** —
19
+ singly wrapped:
20
+
21
+ ```json
22
+ { "status_code": 200, "body": <REST/Connect response> }
23
+ ```
24
+
25
+ Read `body`. (Only `/headless/invoke/…` Aura-controller routes are doubly wrapped as `body.body`;
26
+ this skill uses none.)
27
+
28
+ ---
29
+
30
+ ## Routes
31
+
32
+ | Method + path | Purpose |
33
+ |---------------|---------|
34
+ | `GET /services/data/v67.0/connect/setup/discovery/feature/service-cloud-itsm-manage-sla-policies/status` | Phase 0.5 — read the SLA Management for IT Service feature status |
35
+ | `POST /services/data/v67.0/connect/setup/discovery/feature/service-cloud-itsm-manage-sla-policies/enable` | Phase 0.5 — enable the feature (flips Simplified SLA Setup) |
36
+ | `GET /services/data/v67.0/tooling/query` | Phase 0.5 — read SLA Versioning (`EntitlementSettings.IsEntitlementVersioningEnabled`) via `query_params.q` |
37
+ | `PATCH /services/data/v67.0/tooling/sobjects/EntitlementSettings/000000000000000AAA` | Phase 0.5 — turn on SLA Versioning if off |
38
+ | `GET /services/data/v67.0/sobjects/Incident/describe` | Preflight — Incident Management on + SLA fields present |
39
+ | `GET /services/data/v67.0/query` | SOQL reads (BusinessHours, SlaProcess, EntityMilestone) via `query_params.q` |
40
+ | `POST /services/data/v67.0/connect/sla-management/milestone-types` | Create MilestoneType |
41
+ | `POST /services/data/v67.0/connect/sla-management/sla-policies` | Create SLA Policy (SlaProcess) |
42
+ | `POST /services/data/v67.0/connect/sla-management/sla-policies/<slaId>/milestones` | Attach Milestone |
43
+ | `POST /services/data/v67.0/sobjects/Entitlement` | Create Entitlement (standard sObject) |
44
+ | `POST /services/data/v67.0/sobjects/Incident` | Create a test Incident |
45
+
46
+ Minimum API version is **67.0** — `headless-360` currently only routes `v67.0+`.
47
+
48
+ ---
49
+
50
+ ## Phase 0.5 — SLA Management for IT Service prerequisite gate
51
+
52
+ "SLA Management for IT Service" is a Salesforce Go Setup Discovery feature — verified apiName
53
+ `service-cloud-itsm-manage-sla-policies`. **Do not guess other apiNames for this** — every other
54
+ guess returns `400 NOT_FOUND`; this exact string is the correct one. If it ever needs re-confirming
55
+ for a different org/release, the list-all route `GET /services/data/v67.0/connect/setup/discovery/features`
56
+ returns every feature's apiName + status in one call.
57
+
58
+ Enabling this feature flips `EntitlementSettings.IsEntitlementsEnabled` and **Simplified SLA
59
+ Setup** together — Simplified SLA Setup has **no Tooling/Metadata API exposure**, so a Tooling
60
+ PATCH to `EntitlementSettings` alone can never complete it.
61
+
62
+ **SLA Versioning is separate and NOT touched by the feature enable call.** It maps to
63
+ `EntitlementSettings.IsEntitlementVersioningEnabled` (Tooling object, singleton, fixed Id
64
+ `000000000000000AAA`, keyPrefix `0HE`, one row per org) and must be checked/enabled independently.
65
+
66
+ ### Read — feature status
67
+
68
+ ```json
69
+ mcp__headless-360__dispatch_readonly({
70
+ "url": "/services/data/v67.0/connect/setup/discovery/feature/service-cloud-itsm-manage-sla-policies/status",
71
+ "method": "GET"
72
+ })
73
+ ```
74
+
75
+ ```json
76
+ {
77
+ "apiName": "service-cloud-itsm-manage-sla-policies",
78
+ "status": "NOT_ENABLED",
79
+ "enableBlockedReasons": [],
80
+ "disableBlockedReasons": [],
81
+ "blockedByApexLock": false,
82
+ "dependencyStatuses": []
83
+ }
84
+ ```
85
+
86
+ - `status == "ENABLED"` → the feature (and Simplified SLA Setup) is on — move to the SLA Versioning
87
+ read below.
88
+ - `status == "NOT_ENABLED"` with non-empty `enableBlockedReasons` → **stop**, relay the reasons, do
89
+ not attempt to enable.
90
+ - `status == "NOT_ENABLED"` with empty `enableBlockedReasons` → confirm with the user, then enable.
91
+
92
+ ### Read — SLA Versioning
93
+
94
+ ```json
95
+ mcp__headless-360__dispatch_readonly({
96
+ "url": "/services/data/v67.0/tooling/query",
97
+ "method": "GET",
98
+ "query_params": { "q": "SELECT IsEntitlementVersioningEnabled FROM EntitlementSettings" }
99
+ })
100
+ ```
101
+
102
+ ```json
103
+ {
104
+ "size": 1, "totalSize": 1, "done": true,
105
+ "records": [{ "IsEntitlementVersioningEnabled": true }]
106
+ }
107
+ ```
108
+
109
+ **SLA Versioning is a one-way switch.** Once `IsEntitlementVersioningEnabled` is `true`, Salesforce
110
+ does not support flipping it back — even if SLA Management is later turned off. Always surface this
111
+ to the user before enabling it — never enable silently.
112
+
113
+ ### Enable — feature (only after explicit user confirmation)
114
+
115
+ ```json
116
+ mcp__headless-360__dispatch({
117
+ "url": "/services/data/v67.0/connect/setup/discovery/feature/service-cloud-itsm-manage-sla-policies/enable",
118
+ "method": "POST",
119
+ "body": {}
120
+ })
121
+ → 201 { "success": true }
122
+ ```
123
+
124
+ Do not trust `success: true` alone — re-run the status GET above and require `"status": "ENABLED"`
125
+ before moving on.
126
+
127
+ ### Enable — SLA Versioning (only after explicit user confirmation, separately)
128
+
129
+ ```json
130
+ mcp__headless-360__dispatch({
131
+ "url": "/services/data/v67.0/tooling/sobjects/EntitlementSettings/000000000000000AAA",
132
+ "method": "PATCH",
133
+ "body": {
134
+ "FullName": "EntitlementSettings",
135
+ "Metadata": { "enableEntitlementVersioning": true }
136
+ }
137
+ })
138
+ → 204 No Content (empty body)
139
+ ```
140
+
141
+ `FullName` is mandatory — the PATCH is rejected without it. The PATCH response body is empty on
142
+ success — **re-run the Tooling query above and require `IsEntitlementVersioningEnabled: true`**
143
+ before moving on, same rule as the SLA Policy create response later in this flow (never trust a
144
+ write response alone).
145
+
146
+ ---
147
+
148
+ ## Discovery — always run first
149
+
150
+ ```text
151
+ mcp__headless-360__discover(query="sla-management milestone")
152
+ ```
153
+
154
+ `discover` returns matching operation ids. Pipe each id into `describe` to pull its input schema
155
+ and canonical HTTP route:
156
+
157
+ ```text
158
+ mcp__headless-360__describe(id="<operation_id_from_discover>")
159
+ ```
160
+
161
+ | Operation | Method | Purpose |
162
+ |-----------|--------|---------|
163
+ | `…connect.sla-management.milestone-types` (create) | POST | Create MilestoneType |
164
+ | `…connect.sla-management.sla-policies` (create) | POST | Create SLA Policy |
165
+ | `…connect.sla-management.sla-policies.{id}.milestones` (create) | POST | Attach Milestone |
166
+
167
+ **Corpus ≠ registry**: `discover` may only surface adjacent SLA endpoints (e.g. workflow-fields /
168
+ workflow-sla-actions) because the SLA Management POST routes are documented but not always ranked
169
+ first. The routes are known-good — `describe` on the `milestone-types` / `sla-policies` operations
170
+ still returns the schema, and `dispatch` still works even if `discover` didn't rank them at the top.
171
+ If `discover` returns nothing at all after rewording the query, the org's `headless-360` corpus
172
+ does not index this surface — direct the user to Setup and stop.
173
+
174
+ ---
175
+
176
+ ## Preflight A — Master Incident Management pref (direct read)
177
+
178
+ The master ITSM Incident Management pref is exposed on the **Setup Discovery Connect API**
179
+ under `apiName = service-cloud-itsm-incident`. The setup-org-preferences endpoint does not
180
+ expose the master (`IncidentMgmtEnabled` / `ITSMIncidentMgmtEnabled` both 404) — read via
181
+ Setup Discovery instead.
182
+
183
+ ```json
184
+ mcp__headless-360__dispatch_readonly({
185
+ "url": "/services/data/v67.0/connect/setup/discovery/features",
186
+ "method": "GET"
187
+ })
188
+ ```
189
+
190
+ The endpoint returns the full feature catalog (~763 entries, ~1.1 MB) and does not honor
191
+ `?apiName=` server-side. Filter `body.features[]` client-side to the element where
192
+ `apiName == "service-cloud-itsm-incident"` and read its `status` (`ENABLED` / `NOT_ENABLED`).
193
+
194
+ **Auto-delegate rule**: if `status != "ENABLED"`, delegate to
195
+ `service-itsm-incident-mgmt-configure` inline before continuing — that skill runs its own
196
+ confirm-to-write against the enable route (`POST .../setup/discovery/feature/service-cloud-itsm-incident/enable`)
197
+ and returns after the flip. Re-read this step to verify `status == "ENABLED"` before
198
+ continuing. If the user declines the delegation, halt — every downstream SLA artifact
199
+ depends on the master being on.
200
+
201
+ ## Preflight B — SLA fields on the Incident sObject
202
+
203
+ ```json
204
+ mcp__headless-360__dispatch_readonly({
205
+ "url": "/services/data/v67.0/sobjects/Incident/describe",
206
+ "method": "GET"
207
+ })
208
+ ```
209
+
210
+ Confirm `body.fields[]` includes `EntitlementId`, `SlaStartDate`, and `SlaExitDate`. If the
211
+ describe 404s or the fields are missing, Entitlement Management is not enabled for Incident —
212
+ stop and direct the user to **Setup → Incident Management / Entitlement Settings**. This is
213
+ a **secondary sanity check on the SLA-field surface**, not the master-pref state signal;
214
+ Preflight A above is the master-state signal.
215
+
216
+ The response is large (~86 KB). If your host truncates it, filter with a grep-style search rather
217
+ than reading the whole body — you only need to confirm those three field names exist.
218
+
219
+ ---
220
+
221
+ ## Default BusinessHours
222
+
223
+ ```json
224
+ mcp__headless-360__dispatch_readonly({
225
+ "url": "/services/data/v67.0/query",
226
+ "method": "GET",
227
+ "query_params": { "q": "SELECT Id, Name FROM BusinessHours WHERE IsActive = true AND IsDefault = true" }
228
+ })
229
+ ```
230
+
231
+ `body.records[0].Id` is the `BusinessHoursId` used on the SLA Policy, Milestone, and Entitlement.
232
+ If `body.records` is empty, stop — the user must create default Business Hours in Setup.
233
+
234
+ ---
235
+
236
+ ## Create MilestoneType
237
+
238
+ ```json
239
+ mcp__headless-360__dispatch({
240
+ "url": "/services/data/v67.0/connect/sla-management/milestone-types",
241
+ "method": "POST",
242
+ "body": {
243
+ "name": "Incident First Response",
244
+ "description": "Incident First Response",
245
+ "recurrenceType": "OneTime"
246
+ }
247
+ })
248
+ ```
249
+
250
+ `recurrenceType` = `OneTime` | `Recurring`. Success: `body.id` is the new MilestoneType Id. If
251
+ absent, the create failed — surface `body`.
252
+
253
+ ---
254
+
255
+ ## Create SLA Policy (SlaProcess)
256
+
257
+ ```json
258
+ mcp__headless-360__dispatch({
259
+ "url": "/services/data/v67.0/connect/sla-management/sla-policies",
260
+ "method": "POST",
261
+ "body": {
262
+ "name": "Incident SLA Policy",
263
+ "description": "Incident SLA Policy",
264
+ "processType": "Incident",
265
+ "businessHourId": "<BusinessHoursId>",
266
+ "createdDateEntryCriteria": true,
267
+ "closedExitCriteria": true,
268
+ "active": true,
269
+ "versionDefault": true
270
+ }
271
+ })
272
+ ```
273
+
274
+ **The response body echoes most fields as `null`.** Do not trust it — capture `body.id` and
275
+ verify state via SOQL:
276
+
277
+ ```json
278
+ mcp__headless-360__dispatch_readonly({
279
+ "url": "/services/data/v67.0/query",
280
+ "method": "GET",
281
+ "query_params": { "q": "SELECT Id, Name, SObjectType, IsActive, BusinessHoursId FROM SlaProcess WHERE Id = '<slaId>'" }
282
+ })
283
+ ```
284
+
285
+ ---
286
+
287
+ ## Attach Milestone
288
+
289
+ `slaProcessId` is carried by the URL path — **omit it from the body** (the server returns
290
+ `JSON_PARSER_ERROR: Unrecognized field "slaProcessId"`).
291
+
292
+ ```json
293
+ mcp__headless-360__dispatch({
294
+ "url": "/services/data/v67.0/connect/sla-management/sla-policies/<slaId>/milestones",
295
+ "method": "POST",
296
+ "body": {
297
+ "milestoneTypeId": "<MilestoneTypeId>",
298
+ "businessHoursId": "<BusinessHoursId>",
299
+ "timeTrigger": 60,
300
+ "order": 1,
301
+ "startTimeBasedOn": "SlaProcessCreatedDate",
302
+ "milestoneCriteria": [
303
+ {
304
+ "milestoneState": "Active",
305
+ "milestoneAgreementType": "Warning",
306
+ "filterType": "RuleFilter",
307
+ "filterItems": [
308
+ { "table": "Incident", "column": "Status", "operator": "NotEqual", "order": 1, "value": "Closed" }
309
+ ]
310
+ }
311
+ ]
312
+ }
313
+ })
314
+ ```
315
+
316
+ `milestoneCriteria` is mandatory. Success: `body.id` is the new Milestone Id.
317
+
318
+ ---
319
+
320
+ ## Create Entitlement (standard sObject)
321
+
322
+ Entitlement is NOT part of the `/connect/sla-management/` surface — create it via the sObject
323
+ endpoint.
324
+
325
+ ```json
326
+ mcp__headless-360__dispatch({
327
+ "url": "/services/data/v67.0/sobjects/Entitlement",
328
+ "method": "POST",
329
+ "body": {
330
+ "Name": "Incident SLA Entitlement",
331
+ "AccountId": "<AccountId>",
332
+ "SlaProcessId": "<slaId>",
333
+ "BusinessHoursId": "<BusinessHoursId>",
334
+ "StartDate": "<YYYY-MM-DD>",
335
+ "EndDate": "<YYYY-MM-DD + 1 year>"
336
+ }
337
+ })
338
+ ```
339
+
340
+ `Entitlement.Status` is date-computed: `StartDate` in the future → `Inactive`; `StartDate` ≤ today
341
+ AND `EndDate` ≥ today → `Active`. For immediate SLA engagement, backdate `StartDate` to yesterday.
342
+ Success: `body.id`.
343
+
344
+ ---
345
+
346
+ ## Verify SLA engagement
347
+
348
+ Create a test Incident:
349
+
350
+ ```json
351
+ mcp__headless-360__dispatch({
352
+ "url": "/services/data/v67.0/sobjects/Incident",
353
+ "method": "POST",
354
+ "body": { "Subject": "SLA test incident", "EntitlementId": "<EntitlementId>" }
355
+ })
356
+ ```
357
+
358
+ Then confirm the Incident stamped an SLA start and an EntityMilestone:
359
+
360
+ ```json
361
+ mcp__headless-360__dispatch_readonly({
362
+ "url": "/services/data/v67.0/query",
363
+ "method": "GET",
364
+ "query_params": { "q": "SELECT Id, IncidentNumber, Subject, Status, SlaStartDate FROM Incident WHERE Id = '<incidentId>'" }
365
+ })
366
+ ```
367
+
368
+ ```json
369
+ mcp__headless-360__dispatch_readonly({
370
+ "url": "/services/data/v67.0/query",
371
+ "method": "GET",
372
+ "query_params": { "q": "SELECT Id, MilestoneType.Name, TargetDate, IsCompleted, IsViolated FROM EntityMilestone WHERE ParentEntityId = '<incidentId>'" }
373
+ })
374
+ ```
375
+
376
+ `SlaStartDate` populated + at least one `EntityMilestone` row with a `TargetDate` = SLA engaged.
377
+ `TargetDate` should equal `SlaStartDate + timeTrigger minutes` (business-hours-adjusted).
378
+
379
+ ---
380
+
381
+ ## Gotchas
382
+
383
+ | Issue | Detail |
384
+ |-------|--------|
385
+ | `dispatch` shape is raw HTTP | Pass `{url, method, body?, query_params?}` — NOT `{operation_id, arguments}`. |
386
+ | Response wrapper | Connect/`/sobjects`/`/query` are singly wrapped — read `body`. Aura `/headless/invoke/…` routes (not used here) are doubly wrapped. |
387
+ | Corpus vs. registry drift | `discover` may not rank the SLA POST routes at the top — the routes are still known-good; `describe` + `dispatch` on the canonical path works either way. |
388
+ | SLA Policy create response is null | `POST /sla-policies` echoes most fields as `null` — always verify via SOQL on `SlaProcess`. |
389
+ | Milestone criteria mandatory | Omitting `milestoneCriteria` returns `400: Criteria details cannot be empty`. |
390
+ | Formula filter → 500 | `filterType: "Formula"` triggers an internal server error. Use `filterType: "RuleFilter"` with concrete `filterItems[]`. |
391
+ | Filter operator enum | Use `Equals` (not `Equal`), `NotEqual` (not `NotEquals`/`NotEqualTo`/`!=`). Wrong shape → `POST_BODY_PARSE_ERROR: Invalid value for Filter Operation Enum`. |
392
+ | `slaProcessId` rejected in body | The server returns `JSON_PARSER_ERROR: Unrecognized field "slaProcessId"` — the id is in the path only. |
393
+ | Entitlement status date-computed | Future `StartDate` → `Inactive`. Backdate `StartDate` to yesterday for immediate SLA engagement in testing. |
394
+ | Entitlement is standard sObject | Create via `POST /sobjects/Entitlement`, not the Connect surface. |