@salesforce/afv-skills 1.48.0 → 1.50.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 (31) hide show
  1. package/package.json +1 -1
  2. package/skills/education-cloud-multi-campus-configure/SKILL.md +0 -5
  3. package/skills/field-service-data-capture-form-deployer-configure/SKILL.md +180 -0
  4. package/skills/field-service-data-capture-form-deployer-configure/examples/inventory-transfer-spec.json +135 -0
  5. package/skills/field-service-data-capture-form-deployer-configure/examples/sample-spec.json +140 -0
  6. package/skills/field-service-data-capture-form-deployer-configure/examples/sectioned-spec.json +64 -0
  7. package/skills/field-service-data-capture-form-deployer-configure/references/field-types.md +297 -0
  8. package/skills/field-service-data-capture-form-deployer-configure/references/flow-metadata-json.md +243 -0
  9. package/skills/field-service-data-capture-form-deployer-configure/references/post-screen-automation.md +127 -0
  10. package/skills/field-service-data-capture-form-designer-configure/SKILL.md +110 -0
  11. package/skills/field-service-data-capture-form-designer-configure/references/extraction-from-image.md +244 -0
  12. package/skills/field-service-data-capture-form-designer-configure/references/extraction-from-prompt.md +222 -0
  13. package/skills/field-service-data-capture-form-editor-configure/SKILL.md +134 -0
  14. package/skills/field-service-data-capture-reference-configure/SKILL.md +762 -0
  15. package/skills/field-service-data-capture-reference-configure/examples/DataCapture_Showcase.flow-meta.xml +2022 -0
  16. package/skills/field-service-data-capture-reference-configure/examples/Data_Capture_All_Components.flow-meta.xml +2170 -0
  17. package/skills/field-service-data-capture-reference-configure/examples/Repeater_with_prepopulation.flow-meta.xml +231 -0
  18. package/skills/field-service-foundation-setup-designer-get/SKILL.md +135 -0
  19. package/skills/field-service-mobile-branding-configure/SKILL.md +133 -0
  20. package/skills/field-service-mobile-branding-configure/examples/dark-blue-scheme.json +16 -0
  21. package/skills/field-service-mobile-branding-configure/examples/salesforce-default-scheme.json +16 -0
  22. package/skills/field-service-mobile-branding-configure/references/color-fields.md +66 -0
  23. package/skills/field-service-mobile-branding-configure/references/contrast-validation.md +55 -0
  24. package/skills/field-service-mobile-branding-configure/references/derivation-methodology.md +83 -0
  25. package/skills/field-service-objective-designer-configure/SKILL.md +342 -0
  26. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +83 -0
  27. package/skills/field-service-scheduling-policy-designer-query/SKILL.md +121 -0
  28. package/skills/field-service-setup-orchestrator-get/SKILL.md +48 -0
  29. package/skills/field-service-sobject-create-configure/SKILL.md +56 -0
  30. package/skills/field-service-voice-to-form-configure/SKILL.md +650 -0
  31. package/skills/field-service-work-rule-designer-configure/SKILL.md +303 -0
@@ -0,0 +1,121 @@
1
+ ---
2
+ name: field-service-scheduling-policy-designer-query
3
+ description: "Designs the four policy-level settings for a Salesforce Field Service scheduling policy — name, optimization mode (In-Day vs Global), commit mode, and description — and delegates to work rule design when complete. Use this skill when a user wants to design, configure, or set up a Field Service scheduling policy's policy-level settings."
4
+ user-invocable: false
5
+ metadata:
6
+ version: "1.0"
7
+ domains: ["Field Service"]
8
+ ---
9
+
10
+ # Salesforce Field Service – Scheduling Policy Designer
11
+
12
+ **Entry point for the scheduling policy design flow.** This skill collects the four policy-level settings that define the scheduling policy itself, then hands off to the work rule design phase.
13
+
14
+ **Interview sequence (REQUIRED):** Complete each step fully before moving to the next — do not skip ahead:
15
+ 1. **Scheduling Policy** — collect name, optimization mode, commit mode, description
16
+ 2. **Work Rule Design** (`sfs-work-rule-designer`) — define eligibility filters, one question at a time
17
+ 3. **Service Objective Design** (`sfs-service-objective-designer`) — define scoring weights via trade-off interview
18
+ 4. **Record creation** (`sfs-sobject-create`) — creates all Salesforce records from the finalized design
19
+
20
+ This skill covers step 1 only. It does not configure work rules, service objectives, or create any Salesforce records.
21
+
22
+ ---
23
+
24
+ ## Entry point
25
+
26
+ Run the full interview in order: name, optimization mode, commit mode, description.
27
+
28
+ Never expose internal skill names, SOR IDs, or tool references to the user.
29
+
30
+ ---
31
+
32
+ ## What is a scheduling policy?
33
+
34
+ A **scheduling policy** is the rulebook and scoring guide the Field Service optimizer uses to schedule appointments. Every policy bundles two things together:
35
+
36
+ - **Work rules** — hard filters that eliminate candidates who don't qualify (wrong skills, unavailable, outside territory). Designed in step 2.
37
+ - **Service objectives** — soft scoring that ranks qualified candidates (minimize travel, schedule ASAP, prefer a specific technician). Designed in step 3.
38
+
39
+ The four settings collected here define the policy container itself: its name, how the optimizer runs, and what happens when a conflict occurs mid-run.
40
+
41
+ **Starting points:** Salesforce ships four standard starter policies — Customer First, High Intensity, Soft Boundaries, Emergency. This is background knowledge only — never offer or suggest these to the user. Every policy this skill designs is built fresh from the user's own requirements.
42
+
43
+ ---
44
+
45
+ ## When to use
46
+
47
+ - Starting a new scheduling policy from scratch
48
+ - When a user mentions a scheduling policy, optimization mode, In-Day Optimization, or Commit Mode
49
+ - As the first step in the full scheduling policy design flow before work rules or objectives are discussed
50
+
51
+ ---
52
+
53
+ ## Design principles
54
+
55
+ 1. **Ask one setting at a time** — wait for the user's answer before moving to the next. Do not bundle questions.
56
+
57
+ 2. **Lead with a recommendation when context supports it** — for Optimization Mode and Commit Mode, suggest the best-fit option based on what the user has described. A ranked steer, not a flat menu. Omit when confidence is low.
58
+
59
+ 3. **Question format** (two or three parts):
60
+ ```markdown
61
+ **Recommendation:** [Only for Optimization Mode and Commit Mode, when context is sufficient. Omit otherwise.]
62
+
63
+ **Question:** [The actual question]
64
+
65
+ **Why it matters:** [1–2 sentences on why this setting exists and how it affects scheduling]
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Core settings
71
+
72
+ Ask about each setting **in this order**:
73
+
74
+ - **Scheduling Policy Name** — the display name for the policy. Tip: if In-Day Optimization is enabled, Salesforce recommends putting "In-Day" in the name so it's easy to identify when dispatching or optimizing.
75
+
76
+ - **In-Day Optimization** (boolean) — when true, the policy uses **in-day** optimization instead of **global** optimization. Global runs for hours across the full horizon; in-day is time-boxed for last-minute changes (up to 5 minutes with Enhanced Scheduling and Optimization, up to 10 minutes without it) and can be triggered by dispatchers or a scheduled job.
77
+
78
+ - **Commit Mode** — governs what happens when a dispatcher (or a scheduling operation) changes the schedule while a global/in-day/resource optimization is already running and the two conflict. Two values:
79
+ - **Always Commit** — apply the change even if it conflicts with the in-progress optimization.
80
+ - **Rollback** — reject/undo the conflicting change to protect the optimization run.
81
+
82
+ - **Description** — a free-text description of the policy's intent. After the first three settings are answered, generate a suggested description from those answers and ask the user to confirm or adjust it. Good place to record the "Policy at a Glance" summary this design flow generates in step 3.
83
+
84
+ ---
85
+
86
+ ## Output
87
+
88
+ Once all four settings are confirmed, show a plain-English summary:
89
+
90
+ > **Policy settings confirmed:**
91
+ > - **Name:** [name]
92
+ > - **Mode:** [In-Day Optimization (up to 5 min) | Global Optimization (runs for hours)]
93
+ > - **Commit Mode:** [Always Commit | Rollback]
94
+ > - **Description:** [description]
95
+ >
96
+ > Ready to move on to work rule design?
97
+
98
+ The `policy` block carried forward to the next step:
99
+
100
+ ```json
101
+ {
102
+ "policy": {
103
+ "name": "<policy name>",
104
+ "inDayOptimization": true | false,
105
+ "commitMode": "Always Commit" | "Rollback",
106
+ "description": "<description>"
107
+ }
108
+ }
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Handoff
114
+
115
+ When the user confirms, delegate to `sfs-work-rule-designer`. Pass the `policy` block as context — the work rule designer needs the policy name to correctly name each rule.
116
+
117
+ Do not start the work rule interview here. Transition message:
118
+
119
+ > "Policy settings are set. Next: work rules — the filters that determine which resources and time slots are eligible for an appointment. I'll walk through this one question at a time."
120
+
121
+ **Note:** The work rule designer always includes exactly one **Service Resource Availability** rule (mandatory for every policy). No need to ask about it here.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: field-service-setup-orchestrator-get
3
+ description: "Use this skill to set up Salesforce Field Service — Work Types, Skills, Service Territories, Operating Hours, Scheduling Policy, Work Rules, Service Objectives, Data Capture Forms, FSL mobile forms, Pre-Work Brief, Mobile Branding, or any FSL setup, enablement, or configuration request. Entry point that identifies what the user wants to configure and routes to the right sub-workflow: Foundation Setup, Scheduling Policy, Data Capture Forms, Pre-Work Brief, or Mobile Branding."
4
+ user-invocable: false
5
+ owning_team: sfs-setup-experience
6
+ metadata:
7
+ version: "1.0"
8
+ domains: ["Field Service"]
9
+ ---
10
+
11
+ ## How It Works
12
+
13
+ This skill is the entry point for all Field Service setup. It identifies what the user wants to configure and routes to the correct sub-skill. It does not perform setup work itself.
14
+
15
+ ## Phase 1 — Identify and Confirm
16
+
17
+ If the intent is unclear or generic, first establish what the user wants to set up before going further.
18
+
19
+ Before routing to any workflow, always ask a brief confirmation question — never skip this step, even when intent is obvious or the user has already provided data. Adapt the question naturally to context:
20
+
21
+ - For workflows with a design stage (Foundation Setup, Scheduling Policy, Data Capture Forms): the question should establish whether the user wants a guided design conversation or to proceed directly with data they already have.
22
+ - For workflows without a design stage (Pre-Work Brief, Mobile Branding): confirm the user is ready before proceeding.
23
+
24
+ One short question. Wait for the answer before delegating.
25
+
26
+ ## Phase 2 — Route
27
+
28
+ Match the user's intent semantically to a workflow and delegate to the sub-skill.
29
+
30
+ | Workflow | Sub-skill | Note |
31
+ |---|---|---|
32
+ | **Foundation Setup** *(default)* | `sfs-setup-experience/sfs-foundation-setup-designer` → deploys via `sfs-sobject-create` | Always first; covers Work Types, Skills, Service Territories, Operating Hours |
33
+ | Scheduling Policy | `sfs-setup-experience/sfs-scheduling-policy-designer` → deploys via `sfs-sobject-create` | Ask if Foundation is done; if not, offer it first |
34
+ | Data Capture Forms | `sfs-mobile-core-experience/fs-data-capture-form-designer` → `fs-data-capture-form-deployer` | Ask if Foundation is done; if not, offer it first |
35
+ | Pre-Work Brief | `sfs-frontline-ai/fs-prework-brief-deployer` | Ask if Foundation is done; if not, offer it first |
36
+ | Mobile Branding | `sfs-mobile-core-experience/fs-mobile-branding` | Ask if Foundation is done; if not, offer it first |
37
+
38
+ ## Conversational Tone
39
+
40
+ - Announce each phase in one plain sentence before it begins — what's about to happen and why.
41
+ - Never expose skill names, SOR IDs, or tool references to the user (no "sfs-foundation-setup-designer", "sfs-sobject-create", "dispatch"). Use plain labels: "Foundation Setup", "design interview", "creating your records".
42
+
43
+ ## Key Principles
44
+
45
+ - This skill routes — it never does setup work itself.
46
+ - One workflow at a time; wait for explicit confirmation before the next.
47
+ - If a requested area has no sub-skill yet, say so and ask if the user wants to proceed manually.
48
+ - Never delegate to `sfs-sobject-create` directly — Foundation records must always go through `sfs-foundation-setup-designer` first.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: field-service-sobject-create-configure
3
+ description: "Headless 360 REST API deployment step for creating sObject records. Handles describe-based field discovery, required-field derivation, entity-relationship ordering, and composite graph transactions. Use this skill when a designer skill (or a user directly) needs to create sObject records after design confirmation, including non-setup sObject creation."
4
+ user-invocable: false
5
+ metadata:
6
+ version: "1.0"
7
+ domains: ["Field Service"]
8
+ ---
9
+
10
+ # Create an sObject record via headless-360
11
+
12
+ **Be helpful** — understand business context before creating records. Consider the business domain of the sObject being created and iterate through short, structured questions (ask/why/impact) until no ambiguities remain that would change what gets created. Skip questions when answers are already obvious from context or existing data.
13
+
14
+ ## Flow
15
+
16
+ 1. **Describe** — `dispatch_readonly` GET `/services/data/v67.0/sobjects/<SObject>/describe`
17
+ 2. **Query existing records** — learn the org's shape before writing.
18
+ `dispatch_readonly` GET `/services/data/v67.0/query`,
19
+ `queryParams.q = "SELECT <required + picklist fields> FROM <SObject> ORDER BY CreatedDate DESC LIMIT 20"`.
20
+ Use it to: match naming/value conventions, see which optional fields are actually populated,
21
+ catch duplicates, and confirm write access before spending a create.
22
+ 3. **Create** — `dispatch` POST to create records. Single record → `/services/data/v67.0/sobjects/<SObject>` with body. Multiple related records (DAG) → `/services/data/v67.0/composite/graph` to batch-create with dependency references in one transaction. Success → `201` with id(s). Failure → non-2xx with `errorCode` + `message` — act on that.
23
+
24
+ ## Data model DAG
25
+
26
+ These examples show Field Service relationship patterns, but the same approach applies to any sObject based on its data shape:
27
+
28
+ ```text
29
+ Skill + WorkType → SkillRequirement WorkType + Product2 → ProductRequired
30
+ OperatingHours → ServiceTerritory + TimeSlot
31
+ ```
32
+
33
+ ## Fields and insertion order
34
+ Scan describe `fields[]` for `createable:true` (skip the rest — describe is large). Such a
35
+ field is **required** when also `nillable:false` and `defaultedOnCreate:false` (defaulted ones
36
+ the platform fills — omit). Two kinds:
37
+
38
+ - **Scalar** → put its value in the create body.
39
+ - **`type:"reference"`** → foreign key. If `nillable:false` (hard edge), create parent in `referenceTo[]` first. Polymorphic refs list many — pick one. Topo-sort: roots first, pass each `id` to dependents. `nillable:true` refs → optional, PATCH later.
40
+
41
+ Pitfalls:
42
+ - Base sObject CRUD is NOT in the `discover` corpus — skip discover, go straight to describe → dispatch.
43
+ - `CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY` on write → that sObject blocks sObject-REST writes
44
+ (e.g. `ExternalDataSource`, `CustomPermission`); use Tooling/Metadata API instead.
45
+ - `400`/`403` → likely a CRUD/FLS/sharing gap for the gateway user, not a payload bug — don't blindly retry the body.
46
+
47
+ ## Example — WorkType
48
+
49
+ Describe `WorkType`, apply the rule to `fields[]`. The fields that come back
50
+ `createable:true`, `nillable:false`, `defaultedOnCreate:false` are the required ones —
51
+ build the body from *those*, don't assume field names. Then query a few existing WorkTypes
52
+ to see conventions and dupes. Then create with the derived body, e.g.
53
+ ```json
54
+ { "url": "/services/data/v67.0/sobjects/WorkType", "method": "POST",
55
+ "body": { "Name": "Standard Repair", "EstimatedDuration": 2 } }
56
+ ```