@salesforce/afv-skills 1.45.0 → 1.47.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 (171) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-observe/SKILL.md +32 -4
  3. package/skills/agentforce-observe/references/ahm-alerts.md +719 -0
  4. package/skills/automation-flow-generate/SKILL.md +11 -5
  5. package/skills/consumer-goods-promotion-bo-api-deploy/SKILL.md +275 -0
  6. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/README.md +32 -0
  7. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/SetCommentValue.cls +75 -0
  8. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/SetCommentValue.cls-meta.xml +5 -0
  9. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/interview-answers.json +13 -0
  10. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/payloads/copy.json +10 -0
  11. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/payloads/create.json +20 -0
  12. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/payloads/update.json +16 -0
  13. package/skills/consumer-goods-promotion-bo-api-deploy/references/conventions-and-payload-rules.md +273 -0
  14. package/skills/consumer-goods-promotion-bo-api-deploy/references/generate-and-wire.md +236 -0
  15. package/skills/consumer-goods-promotion-bo-api-deploy/references/reference-example-set-comment-value.md +132 -0
  16. package/skills/consumer-goods-promotion-bo-api-deploy/references/smoke-and-verify.md +211 -0
  17. package/skills/dx-code-analyzer-configure/scripts/validate-config.sh +14 -10
  18. package/skills/dx-code-analyzer-run/scripts/apply-fixes.js +45 -4
  19. package/skills/dx-code-analyzer-run/scripts/describe-rule.js +52 -32
  20. package/skills/dx-devops-project-manage/SKILL.md +197 -0
  21. package/skills/dx-devops-project-manage/examples/common-workflows.md +197 -0
  22. package/skills/dx-devops-project-manage/references/cli-commands.md +295 -0
  23. package/skills/dx-devops-project-manage/scripts/create-project.sh +48 -0
  24. package/skills/dx-devops-project-manage/scripts/list-projects.sh +51 -0
  25. package/skills/dx-devops-project-manage/scripts/update-project.sh +96 -0
  26. package/skills/education-cloud-academic-calendar-generate/SKILL.md +225 -0
  27. package/skills/education-cloud-academic-calendar-generate/examples/quarter-calendar.json +47 -0
  28. package/skills/education-cloud-academic-calendar-generate/examples/sample-output.md +57 -0
  29. package/skills/education-cloud-academic-calendar-generate/examples/semester-calendar.json +54 -0
  30. package/skills/education-cloud-academic-calendar-generate/references/calendar-systems.md +127 -0
  31. package/skills/education-cloud-academic-calendar-generate/references/date-validation.md +222 -0
  32. package/skills/education-cloud-academic-calendar-generate/references/foundation_prerequisites.md +40 -0
  33. package/skills/education-cloud-academic-calendar-generate/scripts/validate_calendar_dates.py +143 -0
  34. package/skills/education-cloud-course-catalog-migrate/SKILL.md +321 -0
  35. package/skills/education-cloud-course-catalog-migrate/references/gotchas-detail.md +16 -0
  36. package/skills/education-cloud-course-catalog-migrate/references/gotchas.md +16 -0
  37. package/skills/education-cloud-course-catalog-migrate/references/large-catalog-handling.md +42 -0
  38. package/skills/education-cloud-course-catalog-migrate/scripts/batch_courses.py +36 -0
  39. package/skills/education-cloud-course-catalog-migrate/scripts/detect_linked_courses.py +51 -0
  40. package/skills/education-cloud-course-catalog-migrate/scripts/detect_modality_variants.py +48 -0
  41. package/skills/education-cloud-course-catalog-migrate/scripts/resolve_api_version.py +43 -0
  42. package/skills/education-cloud-course-catalog-migrate/scripts/split_course_code.py +39 -0
  43. package/skills/education-cloud-course-catalog-migrate/scripts/validate_completeness.py +54 -0
  44. package/skills/education-cloud-multi-campus-configure/references/foundation_prerequisites.md +3 -5
  45. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +177 -0
  46. package/skills/education-cloud-student-recruitment-agent-configure/references/agent-and-subagents.md +151 -0
  47. package/skills/education-cloud-student-recruitment-agent-configure/references/customer-narration.md +34 -0
  48. package/skills/education-cloud-student-recruitment-agent-configure/references/execution-model.md +54 -0
  49. package/skills/education-cloud-student-recruitment-agent-configure/references/flows.md +82 -0
  50. package/skills/education-cloud-student-recruitment-agent-configure/references/grounding.md +199 -0
  51. package/skills/education-cloud-student-recruitment-agent-configure/references/permissions.md +183 -0
  52. package/skills/education-cloud-student-recruitment-agent-configure/references/platform-enablement.md +82 -0
  53. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +158 -0
  54. package/skills/education-cloud-student-recruitment-agent-configure/references/routing.md +141 -0
  55. package/skills/experience-cms-brand-apply/SKILL.md +5 -5
  56. package/skills/experience-cms-brand-create/SKILL.md +2 -2
  57. package/skills/experience-cms-content-generate/SKILL.md +1 -0
  58. package/skills/experience-cms-content-render/SKILL.md +173 -0
  59. package/skills/experience-cms-content-render/assets/angular/DetailPage.component.ts +25 -0
  60. package/skills/experience-cms-content-render/assets/angular/MediaRenderer.component.ts +133 -0
  61. package/skills/experience-cms-content-render/assets/angular/TypeList.component.ts +38 -0
  62. package/skills/experience-cms-content-render/assets/angular/TypeRenderer.component.ts +90 -0
  63. package/skills/experience-cms-content-render/assets/angular/cms-content.component.ts +248 -0
  64. package/skills/experience-cms-content-render/assets/angular/cms-item.service.ts +100 -0
  65. package/skills/experience-cms-content-render/assets/react/DetailPage.tsx +20 -0
  66. package/skills/experience-cms-content-render/assets/react/MediaRenderer.tsx +129 -0
  67. package/skills/experience-cms-content-render/assets/react/TypeList.tsx +40 -0
  68. package/skills/experience-cms-content-render/assets/react/TypeRenderer.tsx +64 -0
  69. package/skills/experience-cms-content-render/assets/react/heuristicRenderer.tsx +310 -0
  70. package/skills/experience-cms-content-render/assets/react/useCmsItem.ts +129 -0
  71. package/skills/experience-cms-content-render/assets/shared/cmsContentType.ts +49 -0
  72. package/skills/experience-cms-content-render/assets/shared/cmsCore.types.ts +96 -0
  73. package/skills/experience-cms-content-render/assets/shared/externalRefs.ts +55 -0
  74. package/skills/experience-cms-content-render/references/bulk-loading.md +60 -0
  75. package/skills/experience-cms-content-render/references/codegen-guardrails.md +111 -0
  76. package/skills/experience-cms-content-render/references/detail-pages.md +87 -0
  77. package/skills/experience-cms-content-render/references/embed-recipes.md +127 -0
  78. package/skills/experience-cms-content-render/references/failure-modes.md +96 -0
  79. package/skills/experience-cms-content-render/references/heuristic-render-rules.md +131 -0
  80. package/skills/experience-cms-content-render/references/init-scaffold.md +122 -0
  81. package/skills/experience-cms-content-render/references/interaction-model.md +173 -0
  82. package/skills/experience-cms-content-render/references/package-api.md +106 -0
  83. package/skills/experience-cms-content-render/references/schema-sync.md +114 -0
  84. package/skills/experience-cms-content-render/references/styling-scopes.md +65 -0
  85. package/skills/experience-cms-content-render/references/verify.md +49 -0
  86. package/skills/experience-cms-content-type-generate/SKILL.md +2 -2
  87. package/skills/experience-content-media-stock-image-search/SKILL.md +5 -4
  88. package/skills/experience-search-coordinate/SKILL.md +198 -0
  89. package/skills/experience-search-coordinate/assets/search-payload-template.json +25 -0
  90. package/skills/experience-search-coordinate/references/content-route.md +313 -0
  91. package/skills/experience-search-coordinate/references/content-type-discovery.md +57 -0
  92. package/skills/experience-search-coordinate/references/media-route.md +172 -0
  93. package/skills/experience-search-coordinate/references/scope-resolution.md +14 -0
  94. package/skills/experience-ui-bundle-localize/SKILL.md +1 -1
  95. package/skills/experience-ui-bundle-localize/references/i18n-setup.md +5 -3
  96. package/skills/experience-ui-bundle-project-generate/SKILL.md +18 -14
  97. package/skills/experience-ui-bundle-project-generate/references/angular-project-generate.md +22 -0
  98. package/skills/experience-ui-bundle-project-generate/references/react-project-generate.md +20 -0
  99. package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +58 -54
  100. package/skills/experience-ui-bundle-salesforce-data-access/references/caching.md +6 -0
  101. package/skills/experience-ui-bundle-salesforce-data-access/references/graphiti-cli.md +2 -2
  102. package/skills/experience-ui-bundle-salesforce-data-access/references/migration.md +6 -0
  103. package/skills/experience-ui-bundle-salesforce-data-access/references/rest-and-integration.md +2 -1
  104. package/skills/experience-ui-bundle-salesforce-data-access/references/sdk-api.md +6 -0
  105. package/skills/experience-ui-bundle-site-generate/SKILL.md +59 -8
  106. package/skills/experience-ui-bundle-site-generate/references/configure-metadata-digital-experience.md +8 -3
  107. package/skills/experience-ui-bundle-site-generate/references/configure-metadata-language-settings.md +120 -0
  108. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +336 -0
  109. package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +143 -0
  110. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-application-flexipage-mapping.md +127 -0
  111. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-deploy-commands.md +116 -0
  112. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-lifesci-metadata-deploy.md +111 -0
  113. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-overview.md +312 -0
  114. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-profile-layout-assignments.md +171 -0
  115. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-state-tracking.md +64 -0
  116. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-2-starter-config-trigger-handlers.md +122 -0
  117. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-4-user-provisioning-overview.md +335 -0
  118. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-4-user-provisioning-user-provisioning-details.md +140 -0
  119. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-execution-state-and-recovery.md +196 -0
  120. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-metadata-cache-generation.md +155 -0
  121. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-overview.md +307 -0
  122. package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-visit-creation-data.md +211 -0
  123. package/skills/life-sciences-fieldsalesrep-coordinate/references/state-machine-and-changes.md +108 -0
  124. package/skills/life-sciences-kam-coordinate/SKILL.md +241 -0
  125. package/skills/life-sciences-kam-coordinate/references/orchestration-flow.md +152 -0
  126. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-application-flexipage-mapping.md +79 -0
  127. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-deploy-commands.md +131 -0
  128. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-kam-config-records.md +85 -0
  129. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-lifesci-metadata-deploy.md +112 -0
  130. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-overview.md +202 -0
  131. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-profile-layout-assignments.md +67 -0
  132. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-state-tracking.md +65 -0
  133. package/skills/life-sciences-kam-coordinate/references/stage-2-starter-config-trigger-handlers.md +123 -0
  134. package/skills/life-sciences-kam-coordinate/references/stage-4-participant-role-and-sprint.md +89 -0
  135. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +337 -0
  136. package/skills/life-sciences-kam-coordinate/references/stage-5-data-creation-data.md +248 -0
  137. package/skills/life-sciences-kam-coordinate/references/stage-6-ipad-validation-script.md +35 -0
  138. package/skills/life-sciences-kam-coordinate/references/stage-6-metadata-cache-generation.md +155 -0
  139. package/skills/life-sciences-kam-coordinate/references/stage-6-user-provisioning-details.md +146 -0
  140. package/skills/life-sciences-kam-coordinate/references/stage-6-user-provisioning-overview.md +89 -0
  141. package/skills/life-sciences-kam-coordinate/references/state-machine-and-changes.md +114 -0
  142. package/skills/life-sciences-prerequisites-validate/SKILL.md +138 -0
  143. package/skills/life-sciences-prerequisites-validate/references/checks-org-settings.md +190 -0
  144. package/skills/life-sciences-prerequisites-validate/references/checks-user-and-package.md +211 -0
  145. package/skills/life-sciences-territory-configure/SKILL.md +217 -0
  146. package/skills/life-sciences-territory-configure/references/territory-metadata.md +262 -0
  147. package/skills/platform-apex-logs-debug/SKILL.md +7 -7
  148. package/skills/platform-custom-application-generate/SKILL.md +4 -4
  149. package/skills/platform-custom-object-generate/SKILL.md +7 -7
  150. package/skills/platform-custom-tab-generate/SKILL.md +1 -1
  151. package/skills/platform-dsar-policy-manage/SKILL.md +272 -0
  152. package/skills/platform-dsar-policy-manage/references/configure.md +106 -0
  153. package/skills/platform-dsar-policy-manage/references/export-and-history.md +123 -0
  154. package/skills/platform-dsar-policy-manage/references/gap-analysis-guide.md +150 -0
  155. package/skills/platform-dsar-policy-manage/references/gap-scan.md +129 -0
  156. package/skills/platform-dsar-policy-manage/references/headless-sor.md +59 -0
  157. package/skills/platform-dsar-policy-manage/references/report-format.md +59 -0
  158. package/skills/platform-dsar-policy-manage/scripts/tests/__init__.py +0 -0
  159. package/skills/platform-dsar-policy-manage/scripts/tests/test_validate_policy_tree.py +76 -0
  160. package/skills/platform-dsar-policy-manage/scripts/validate-policy-tree.py +130 -0
  161. package/skills/platform-flexipage-generate/SKILL.md +4 -0
  162. package/skills/platform-list-view-generate/SKILL.md +1 -0
  163. package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +359 -0
  164. package/skills/platform-salesforce-connect-adapter-generate/references/official-examples.md +69 -0
  165. package/skills/platform-salesforce-connect-adapter-generate/references/scenarios.md +187 -0
  166. package/skills/platform-soql-query/SKILL.md +8 -8
  167. package/skills/platform-value-set-generate/SKILL.md +2 -2
  168. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +20 -27
  169. package/skills/service-native-voice-recording-transcription-configure/SKILL.md +47 -27
  170. package/skills/service-native-voice-recording-transcription-configure/references/thunderbird-voice-settings.md +13 -9
  171. package/skills/service-native-voice-recording-transcription-configure/scripts/enable-recording-transcription.sh +104 -45
@@ -0,0 +1,336 @@
1
+ ---
2
+ name: life-sciences-fieldsalesrep-coordinate
3
+ description: "Use this skill to run the full end-to-end Life Sciences Cloud setup workflow for field sales rep in sequence. Trigger when the user says 'set up Life Sciences Cloud end to end', 'run the full LSC setup', 'orchestrate Life Sciences Cloud configuration', 'complete LSC setup', 'Life Sciences Cloud full install', 'set up Life Sciences Cloud end to end for field sales rep', 'run the full LSC setup for field sales rep', 'orchestrate Life Sciences Cloud configuration for field sales rep', 'complete LSC setup for field sales rep', or 'Life Sciences Cloud full install for field sales rep'. Executes five stages in order: prerequisites validation, starter config deployment, territory configuration, user provisioning, and sample visit creation — gating each stage on the success of the previous one. DO NOT TRIGGER when: user wants to run only one specific stage (prerequisites, config deploy, territory setup, user provisioning, or visit creation individually)."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "65.0"
7
+ domains: ["Life Sciences"]
8
+ relatedSkills:
9
+ - life-sciences-prerequisites-validate
10
+ - life-sciences-territory-configure
11
+ cliTools:
12
+ - tool: ["git"]
13
+ semver: ">=2.25.0"
14
+ - tool: ["jq"]
15
+ semver: ">=1.6"
16
+ - tool: ["sf"]
17
+ semver: ">=2.0.0"
18
+ ---
19
+
20
+ # Life Sciences Cloud End-to-End Orchestrator
21
+
22
+ Runs the complete Life Sciences Cloud setup workflow as five **stages** in strict sequence, gating each on the success of the previous stage. Each stage delegates to a child skill or a reference workflow, organized internally into **phases** and **steps** (defined under Execution Order below).
23
+
24
+ ## Scope Guard (evaluate FIRST)
25
+
26
+ Serve **only** requests for the full end-to-end LSC setup. A single stage/phase/step is **never** invokable here — never silently expand a partial ask into the whole flow. Before any work:
27
+
28
+ - **Unrelated** to LSC setup (at start or mid-run) → do not attempt it. Tell the user you did not understand the request and show what you can help with (full end-to-end LSC setup, or standalone `life-sciences-prerequisites-validate` / `life-sciences-territory-configure`); stop.
29
+ - Stage with its **own standalone skill** — prerequisites (Stage 1) or territory config (Stage 3) → redirect to `life-sciences-prerequisites-validate` / `life-sciences-territory-configure`; stop.
30
+ - Stage with **no standalone skill** — config deploy (2), user provisioning (4), visit creation (5) → explain these run only as part of the full flow, not on their own; stop. Do **not** launch the full flow unless the user then asks for it.
31
+
32
+ Continue only for the complete end-to-end setup: orchestrating the full flow (prerequisites → config deploy → territory → user provisioning → visit creation) in order with gates. Each stage's actual work is delegated to child skills / reference files.
33
+
34
+ ---
35
+
36
+ ## Required Inputs
37
+
38
+ Gather before proceeding:
39
+
40
+ - **Target org**: The org to deploy to — selected by the user from the list of connected orgs, or a freshly authenticated org (see Phase 0). Never assume a default org silently; always have the user confirm or select the target org before any stage runs.
41
+
42
+ ---
43
+
44
+ ## Execution Order (MANDATORY)
45
+
46
+ > **Terminology:** **Stage** = one of the 5 units of work (1–5), each delegated to a child skill or a reference workflow; **Phase** = a named group of work inside a stage; **Step** = an atomic action inside a phase. So "Stage 2 › Phase 1 › Step 3" reads top-to-bottom.
47
+
48
+ Run in this order, each gated on the previous (see the full dependency diagram in `references/orchestration-flow.md`):
49
+
50
+ | # | Stage | Runs | Gate (must pass to advance) | Output |
51
+ |---|-------|------|------------------------------|--------|
52
+ | — | **Setup**: download `.lsc-starter-config/LSStarterConfig` | — | Folder present (MANDATORY — hard stop) | Shared source folder in CWD |
53
+ | 1 | Prerequisites Validation | `life-sciences-prerequisites-validate` skill | All prerequisites PASS | Org confirmed ready |
54
+ | 2 | Starter Config Deploy | `references/stage-2-starter-config-overview.md` | All 13 deploy steps succeed | LSC Custom Profile exists |
55
+ | 3 | Territory Configuration | `life-sciences-territory-configure` skill | Territory model Active + L3 territory | Level-3 territory ID + name |
56
+ | 4 | User Provisioning | `references/stage-4-user-provisioning-overview.md` | User created, permsets + territory assigned | Rep username |
57
+ | 5 | Sample Visit Creation | `references/stage-5-visit-creation-overview.md` | Visit + supporting records created; metadata cache generated | — |
58
+
59
+ ---
60
+
61
+ ## Workflow
62
+
63
+ ### Phase 0 — Org Selection (MANDATORY, runs first)
64
+
65
+ Before presenting the workflow, establish which org to use. Do this **every time** the user asks to set up Life Sciences Cloud — do not silently reuse the current default org.
66
+
67
+ 1. **List connected orgs**:
68
+
69
+ ```bash
70
+ sf org list --json
71
+ ```
72
+
73
+ Parse the result and present the authenticated orgs (non-expired) to the user as a numbered list — include alias, username, org type (Dev Hub / Sandbox / Scratch / Production), and the default marker if any:
74
+
75
+ ```text
76
+ Connected Orgs — select the target for Life Sciences Cloud setup
77
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
78
+ 1. ls-dev alice@example.com (Dev Hub) [default]
79
+ 2. ls-sandbox alice@example.com.sandbox (Sandbox)
80
+ 3. partial-scr test-xyz@example.com (Scratch)
81
+
82
+ N. Log in to a fresh org (opens a browser to authenticate a new org)
83
+ ```
84
+
85
+ 2. **Ask the user to choose**: "Which org would you like to use? Enter a number, or choose **N** to log in to a fresh org."
86
+
87
+ 3. **Handle the selection**:
88
+ - **Existing org chosen** → capture its username/alias as the target org for all subsequent steps.
89
+ - **Fresh org chosen (option N)** → authenticate a new org interactively: ask for the login URL (My Domain / instance URL, e.g. `https://mydomain.my.salesforce.com`; `https://login.salesforce.com` for production, `https://test.salesforce.com` for a sandbox) and an alias (e.g. `ls-setup`), then **run the login command yourself**:
90
+
91
+ ```bash
92
+ sf org login web --instance-url <user-supplied-url> --alias <user-supplied-alias> --set-default
93
+ ```
94
+
95
+ Do not hand the command to the user to run — execute it directly. It opens a browser on the user's machine for them to complete the web login interactively; the command then returns. After it finishes, re-run `sf org list --json` to confirm the new org, then use it as the target org.
96
+
97
+ 4. **Confirm the target org** back to the user before proceeding: "Using **<alias>** (<username>) as the target org for Life Sciences Cloud setup." Store this in `OrchestrationState.targetOrg`.
98
+
99
+ > If `sf org list` returns no authenticated orgs, go straight to the fresh-org login flow (option N) — there is nothing to select from.
100
+
101
+ ### Phase 1 — Introduction and Confirmation
102
+
103
+ 1. **Present the workflow** to the user:
104
+
105
+ ```text
106
+ Life Sciences Cloud — Full Setup Workflow
107
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
108
+
109
+ This will execute 5 stages in sequence. Each stage is internally
110
+ organized into phases and steps.
111
+
112
+ Stage 1: Validate Prerequisites
113
+ Checks org settings, permissions, and features
114
+
115
+ Stage 2: Deploy Starter Configuration
116
+ Deploys objects, profiles, config records, layouts, flexipages
117
+
118
+ Stage 3: Configure Territories
119
+ Creates territory type, model, and 3-level hierarchy
120
+
121
+ Stage 4: Provision Field Sales Rep User
122
+ Creates user, assigns profile/permsets, assigns to territory
123
+
124
+ Stage 5: Create Sample Visit
125
+ Logs in as the rep, creates account/provider/visit records,
126
+ generates the mobile metadata cache
127
+
128
+ Target org: <org>
129
+ ```
130
+
131
+ 2. **Ask for confirmation**: "Ready to begin the full Life Sciences Cloud setup? (yes/no)"
132
+
133
+ 3. **Download the shared source folder ONCE (MANDATORY — hard gate, before any stage).** Both Stage 2 (Starter Config Deploy — metadata + config records) and Stage 5 (Sample Visit Creation — Data CSVs) read from `.lsc-starter-config/LSStarterConfig/`; those stages do NOT download or delete it — the orchestrator owns a single download here and a single delete in Phase 8. Sparse-checkout only that subtree (the repo is large) into the CWD:
134
+
135
+ ```bash
136
+ git clone --no-checkout --depth 1 --filter=blob:none \
137
+ https://github.com/SalesforceLabs/LSStarterConfig.git lsstarter-tmp
138
+ cd lsstarter-tmp && git sparse-checkout init --cone \
139
+ && git sparse-checkout set Codey/LSStarterConfig && git checkout && cd ..
140
+ mv lsstarter-tmp/Codey ./.lsc-starter-config && rm -rf lsstarter-tmp
141
+ ```
142
+
143
+ > `.lsc-starter-config/LSStarterConfig/` contains its own `sfdx-project.json` (pins `sourceApiVersion: 65.0`) — the deploy step (Phase 3) must run from inside it. If the folder already exists in the CWD (from a prior run), reuse it (skip the download).
144
+
145
+ 4. **Download gate — verify the folder exists before proceeding.** Confirm the download succeeded by checking that `.lsc-starter-config/LSStarterConfig/sfdx-project.json` and `.lsc-starter-config/LSStarterConfig/Data/` are present (e.g. `ls .lsc-starter-config/LSStarterConfig/sfdx-project.json .lsc-starter-config/LSStarterConfig/Data`).
146
+ - If present → set `sourceFolderDownloaded: true` in `OrchestrationState` and proceed to Phase 2.
147
+ - If the download failed or the folder/contents are missing → **STOP. Do NOT proceed to any stage** — every stage depends on this folder. Report the failure and stop:
148
+
149
+ ```text
150
+ STOP: Setup cannot start — source download failed
151
+
152
+ Could not download .lsc-starter-config/LSStarterConfig from
153
+ https://github.com/SalesforceLabs/LSStarterConfig.git
154
+ Likely: no network / GitHub unreachable, git < 2.25 (no sparse-checkout),
155
+ or insufficient disk space / write permission in the CWD.
156
+
157
+ Mandatory prerequisite — no stage can run without it. Fix the cause and
158
+ re-run, or download the folder manually into the CWD, then re-run.
159
+ ```
160
+
161
+ Leave `sourceFolderDownloaded: false` and do not advance the workflow.
162
+
163
+ ### Phase 2 — Execute Stage 1: Prerequisites Validation
164
+
165
+ 5. **Run the prerequisites validation** following the `life-sciences-prerequisites-validate` skill workflow exactly.
166
+
167
+ 6. **Gate check**: Review the results.
168
+ - If ALL prerequisites pass → proceed to Stage 2
169
+ - If ANY prerequisite fails → **stop** and present the failure report
170
+
171
+ ```text
172
+ STOP: Stage 1 FAILED — Prerequisites not met
173
+
174
+ <show the prerequisite failure table>
175
+
176
+ Please resolve the failed prerequisites and re-run this workflow.
177
+ ```
178
+
179
+ Ask the user: "Would you like to continue anyway (skip failed prerequisites), or stop and fix them first?"
180
+ - If user says stop → end the workflow
181
+ - If user says continue → proceed with a warning that later stages may fail
182
+
183
+ ### Phase 3 — Execute Stage 2: Starter Config Deploy
184
+
185
+ 7. **Run the starter config deployment** following `references/stage-2-starter-config-overview.md` exactly (all 13 steps in order); read its own reference files as directed.
186
+
187
+ 8. **Gate check**: Verify the LSC Custom Profile exists:
188
+ ```bash
189
+ sf data query --query "SELECT Id, Name FROM Profile WHERE Name = 'LSC Custom Profile'" --target-org <org> --json
190
+ ```
191
+ - If profile exists → proceed to Stage 3
192
+ - If profile not found → **stop** and report deployment failure
193
+
194
+ ### Phase 4 — Execute Stage 3: Territory Configuration
195
+
196
+ 9. **Run the territory configuration** following the `life-sciences-territory-configure` skill workflow exactly.
197
+
198
+ 10. **Gate check**: Verify the territory model is Active and level-3 territory exists:
199
+ ```bash
200
+ sf data query --query "SELECT Id, Name, DeveloperName, Territory2Model.State FROM Territory2 WHERE ParentTerritory2.ParentTerritory2Id != null AND Territory2Model.State = 'Active'" --target-org <org> --json
201
+ ```
202
+ - If level-3 territory found with Active model → capture the territory ID and name, proceed to Stage 4
203
+ - If not found → **stop** and report the issue
204
+
205
+ ### Phase 5 — Execute Stage 4: User Provisioning
206
+
207
+ 11. **Run the user provisioning** following `references/stage-4-user-provisioning-overview.md` exactly; read its own reference file as directed. Pass the territory information captured from Stage 3.
208
+
209
+ 12. **Gate check**: Verify the user exists, has the correct profile, **all 4** permission sets, and territory assignment. Capture the **rep username** — Stage 5 logs in as this user.
210
+
211
+ > **STOP-GATE (Stage 4 completeness).** Do NOT accept "user created" as passing this gate — verify all four facets and STOP if any is short:
212
+ > ```bash
213
+ > sf data query --query "SELECT COUNT(Id) c FROM PermissionSetAssignment WHERE AssigneeId = '<newUserId>' AND PermissionSet.IsOwnedByProfile = false" --target-org <org> --json
214
+ > ```
215
+ > The permset count MUST be **4** ({LifeSciencesCore, LifeSciencesFieldSalesRepresentative, HealthCloudStarter, LifeSciencesKeyAccountManager}); the user MUST be `IsActive=true` on the `LSC Custom Profile`; and a `UserTerritory2Association` to the level-3 territory MUST exist. If the permset count is < 4 or any facet is missing, Stage 4 did not fully complete — re-run the missing part of `references/stage-4-user-provisioning-overview.md` (its own Phase 4/5 stop-gates cover this) before advancing to Stage 5. A rep missing a permset silently fails visit creation downstream with confusing permission errors.
216
+
217
+ ### Phase 6 — Execute Stage 5: Sample Visit Creation
218
+
219
+ 13. **Run the visit creation** following `references/stage-5-visit-creation-overview.md` exactly; read its own reference files as directed. Pass the rep username captured from Stage 4. This stage:
220
+ - Logs in as the rep user (`sf org login web`) and creates account, healthcare provider, and visit records (rep-owned), plus territory associations and product master data (admin-owned).
221
+ - Generates the mobile metadata cache via the Connect API (admin-owned).
222
+
223
+ > This stage uses **two identities** — the rep user (from Stage 4) for visit records and the admin for product master data and metadata cache generation. Follow the child skill's rep/admin split exactly.
224
+
225
+ 14. **Gate check**: Verify at least one Visit record was created:
226
+ ```bash
227
+ sf data query --query "SELECT Id, Name, AccountId FROM Visit ORDER BY CreatedDate DESC LIMIT 1" --target-org <org> --json
228
+ ```
229
+ - If a Visit exists → proceed to the final summary
230
+ - If no Visit found → **stop** and report the visit-creation failure
231
+
232
+ ### Phase 7 — Final Summary
233
+
234
+ 15. **Display the complete workflow summary** — a "Life Sciences Cloud Setup Complete" header followed by one block per stage (substitute actual values from the run):
235
+ - **Stage 1**: all org prerequisites confirmed.
236
+ - **Stage 2**: objects/profiles/config records deployed, `<N>` layouts + `<N>` flexipages deployed, 28 trigger handlers activated.
237
+ - **Stage 3**: Territory Model `<model name>` (Active); Level-3 Territory `<territory name>`.
238
+ - **Stage 4**: User `<firstName> <lastName>` (`<username>`); Profile `LSC Custom Profile`; permission sets Life Sciences Core, Life Sciences Field Sales Representative, Health Cloud Starter, Life Sciences Key Account Management; Territory `<territory name>`; admin also assigned to the territory.
239
+ - **Stage 5**: Account + Healthcare Provider created; Visit `<subject>` (Territory `<territory name>`); product detailing/discussion records; mobile metadata cache generated (Connect API).
240
+
241
+ Close with: "The org is ready for Life Sciences Cloud field sales workflows."
242
+
243
+ ### Phase 8 — Cleanup (delete the shared source folder ONCE)
244
+
245
+ 16. **After the final summary** (all 5 stages complete), delete the `.lsc-starter-config` folder downloaded in Phase 1 to leave the working directory clean. Run from the CWD (the parent of `.lsc-starter-config/`):
246
+
247
+ ```bash
248
+ rm -rf .lsc-starter-config
249
+ ```
250
+
251
+ Do this **silently** — do NOT print a cleanup line or mention the folder deletion in the final output. **Skip if the workflow stopped on a failure and the user may resume** — keep the folder until the flow completes so a resumed stage can still read it. This is the single deletion for the whole flow; the child skills never delete it.
252
+
253
+ ---
254
+
255
+ ## State Tracking
256
+
257
+ Maintain overall orchestration state:
258
+
259
+ ```text
260
+ OrchestrationState = {
261
+ targetOrg: string,
262
+ sourceFolderDownloaded: boolean, // .lsc-starter-config/LSStarterConfig downloaded in Phase 1, deleted in Phase 8
263
+ stages: [
264
+ { name: "Prerequisites", status: "pending|running|passed|failed|skipped" },
265
+ { name: "StarterConfig", status: "pending|running|passed|failed" },
266
+ { name: "TerritorySetup", status: "pending|running|passed|failed", territoryId?: string, territoryName?: string },
267
+ { name: "UserProvisioning", status: "pending|running|passed|failed", userId?: string, username?: string },
268
+ { name: "VisitCreation", status: "pending|running|passed|failed", visitId?: string }
269
+ ]
270
+ }
271
+ ```
272
+
273
+ ---
274
+
275
+ ## Idempotent Stage Transitions & Mid-Flow Changes
276
+
277
+ Stages are **not re-entrant**. Before executing any stage, check its `status` in `OrchestrationState`: `running` → reply "Stage N is already in progress" and take no action; `passed` → ask for explicit confirmation before re-running; `failed` → re-run (intentional recovery); `pending` → advance. Transition status to `running` at execution **start** (not on user input) so accidental double-confirms never run a stage twice.
278
+
279
+ If the user requests a change to an earlier stage's inputs **while a later stage is in progress or pending**, run an impact assessment first: acknowledge without applying, identify affected vs. unaffected stages, present options (re-run affected / apply going forward only / cancel), and wait for the decision. Surface destructive-change warnings (an activated territory model can't be deleted; an existing user/records remain).
280
+
281
+ The full behavior matrix, impact-assessment template, per-change impact mapping, and destructive-change warnings are in `references/state-machine-and-changes.md`.
282
+
283
+ ---
284
+
285
+ ## Rules / Constraints
286
+
287
+ | Constraint | Rationale |
288
+ |-----------|-----------|
289
+ | Always run Phase 0 org selection first; list connected orgs and let the user pick or log in to a fresh org | User must explicitly choose the target org; never silently reuse the default |
290
+ | Download `.lsc-starter-config/LSStarterConfig` exactly once (Phase 1, MANDATORY hard gate) and delete it exactly once (Phase 8); child skills never download or delete it | Both child skills read from the shared folder — proceeding without it guarantees downstream failures |
291
+ | Execute stages strictly in order 1→5, gating each on prior success | Each stage depends on outputs from previous stages; prevents cascading failures |
292
+ | Never skip Stages 2 or 3, or Stage 4 before Stage 5 | User provisioning depends on profile + territory; visit creation logs in as the Stage-4 rep |
293
+ | Follow each child skill's workflow exactly; capture outputs (IDs, names) for later stages | Child skills have their own confirmations; avoids redundant re-queries |
294
+ | Never re-execute a `running`/`passed` stage without explicit confirmation; transition status to `running` at execution start, not on user input | Race-free idempotency against duplicate "Proceed" messages |
295
+ | Perform impact assessment before applying mid-flow changes | User must see what will break/redo before committing to a change |
296
+
297
+ ---
298
+
299
+ ## Gotchas
300
+
301
+ | Issue | Resolution |
302
+ |-------|------------|
303
+ | Source download fails in Phase 1 (network/git/disk) | Hard stop — do NOT run any stage. Report the failure (see Phase 1 download gate); fix the cause or download `.lsc-starter-config/LSStarterConfig` manually into the CWD, then re-run |
304
+ | No connected orgs found | `sf org list` returns none — go straight to the fresh-org login (`sf org login web`) in Phase 0 |
305
+ | Fresh-org / rep login needs a browser | Run `sf org login web` yourself (Phase 0 org auth, Stage 5 rep login) — don't hand it to the user. It opens a browser on the user's machine; they complete the web login there and the command returns |
306
+ | Artifacts exist from a prior run (profile, territory, user, config) | The child skills are idempotent/upsert-safe and detect existing records — query the org to confirm, then skip or re-run safely |
307
+ | Visit creation uses two identities (rep + admin) | Product master data and metadata cache are admin-owned; follow the child skill's rep/admin split |
308
+ | Stage re-triggered, or user changes an earlier input mid-flow | See the transition matrix and impact assessment in `references/state-machine-and-changes.md` |
309
+
310
+ ---
311
+
312
+ ## Resume / Partial Re-run
313
+
314
+ If the user may have already completed some stages (e.g. from a prior session), ask which, then **verify each claimed-complete stage by querying the org** (Stage 1 = ask; 2 = `LSC Custom Profile`; 3 = active model + L3 territory; 4 = user with correct profile/permsets; 5 = a `Visit` record). Skip verified stages and resume from the first incomplete one. Exact detection queries per stage are in `references/orchestration-flow.md` → Resume Logic.
315
+
316
+ ---
317
+
318
+ ## Output Expectations
319
+
320
+ Deliverables:
321
+ - `.lsc-starter-config/LSStarterConfig` folder downloaded once (Phase 1) and removed once (Phase 8) — both done silently; not reported in the final summary
322
+ - All 5 stages executed successfully (or user-acknowledged skips)
323
+ - Full summary of what was created/configured
324
+ - Org ready for Life Sciences Cloud field sales workflows
325
+
326
+ ---
327
+
328
+ ## Reference File Index
329
+
330
+ | File | When to read |
331
+ |------|-------------|
332
+ | `references/orchestration-flow.md` | At start — the dependency diagram, per-stage gate verification queries, resume-detection queries, and timing expectations |
333
+ | `references/state-machine-and-changes.md` | When a stage is re-triggered or the user changes an earlier input mid-flow — the full transition behavior matrix, impact-assessment template + mapping, and destructive-change warnings |
334
+ | `references/stage-2-starter-config-overview.md` | During Stage 2 (Phase 3) — the full 13-step starter-config deploy workflow; it points to its own sibling references as needed |
335
+ | `references/stage-4-user-provisioning-overview.md` | During Stage 4 (Phase 5) — the full field-sales-rep user provisioning workflow; it points to its own sibling reference as needed |
336
+ | `references/stage-5-visit-creation-overview.md` | During Stage 5 (Phase 6) — the full sample-visit creation workflow; it points to its own sibling references as needed |
@@ -0,0 +1,143 @@
1
+ # Orchestration Flow
2
+
3
+ ## Dependency Diagram
4
+
5
+ ```text
6
+ ┌───────────────────────────────────────────────────────────────────┐
7
+ │ LIFE SCIENCES CLOUD SETUP │
8
+ └───────────────────────────────────────────────────────────────────┘
9
+
10
+ Stage 1: life-sciences-prerequisites-validate
11
+ ├── Validates: org settings, permissions, OWD, features
12
+ ├── Gate: All 13 checks pass (or user explicitly skips)
13
+ └── Outputs: Confirmation that org is ready
14
+
15
+ │
16
+ ▼
17
+
18
+ Stage 2: Starter Config Deploy (references/stage-2-starter-config-overview.md)
19
+ ├── Deploys: StandardValueSets, objects, profiles, config records,
20
+ │ trigger handlers, layouts, flexipages, application
21
+ ├── Gate: LSC Custom Profile exists in org (query confirms)
22
+ └── Outputs: Profile ID for user provisioning
23
+
24
+ │
25
+ ▼
26
+
27
+ Stage 3: life-sciences-territory-configure
28
+ ├── Creates: Territory Type, Territory Model, 3-level hierarchy
29
+ ├── Activates: Territory Model (Planning → Active)
30
+ ├── Gate: Model state = Active, Level-3 territory queryable
31
+ └── Outputs: Territory2 ID and DeveloperName for user assignment
32
+
33
+ │
34
+ ▼
35
+
36
+ Stage 4: User Provisioning (references/stage-4-user-provisioning-overview.md)
37
+ ├── Creates: Active user with LSC Custom Profile
38
+ ├── Assigns: 4 permission sets
39
+ ├── Assigns: New user + admin to level-3 territory
40
+ ├── Gate: All assignments verified
41
+ └── Outputs: User ID, rep username for visit login
42
+
43
+ │
44
+ ▼
45
+
46
+ Stage 5: Visit Creation (references/stage-5-visit-creation-overview.md)
47
+ ├── Logs in: as the rep user from Stage 4 (sf org login web)
48
+ ├── Creates (rep): Account, HealthcareProvider, Visit, ProviderVisit,
49
+ │ product detailing/discussion
50
+ ├── Creates (admin): territory associations, product master data
51
+ ├── Generates: mobile metadata cache (Connect API, admin)
52
+ ├── Gate: at least one Visit record exists
53
+ └── Outputs: Visit ID, confirmation of records + metadata cache
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Gate Verification Queries
59
+
60
+ ### After Stage 1 — Prerequisites
61
+
62
+ No automated query — the prerequisites skill produces a pass/fail table. Gate on all PASS or explicit user override.
63
+
64
+ ### After Stage 2 — Starter Config
65
+
66
+ ```bash
67
+ sf data query --query "SELECT Id, Name FROM Profile WHERE Name = 'LSC Custom Profile'" --target-org <org> --json
68
+ ```
69
+
70
+ Expected: exactly 1 record returned.
71
+
72
+ ### After Stage 3 — Territory
73
+
74
+ ```bash
75
+ sf data query --query "SELECT Id, Name, DeveloperName, Territory2Model.DeveloperName, Territory2Model.State FROM Territory2 WHERE ParentTerritory2.ParentTerritory2Id != null AND Territory2Model.State = 'Active'" --target-org <org> --json
76
+ ```
77
+
78
+ Expected: at least 1 record (the level-3 territory in an Active model).
79
+
80
+ ### After Stage 4 — User Provisioning
81
+
82
+ ```bash
83
+ sf data query --query "SELECT Id, Name, Username, Profile.Name, IsActive FROM User WHERE Username = '<username>'" --target-org <org> --json
84
+ ```
85
+
86
+ Expected: 1 record with `Profile.Name = 'LSC Custom Profile'` and `IsActive = true`.
87
+
88
+ ```bash
89
+ sf data query --query "SELECT PermissionSet.Label FROM PermissionSetAssignment WHERE AssigneeId = '<userId>' AND PermissionSet.Label IN ('Life Sciences Core', 'Life Sciences Field Sales Representative', 'Health Cloud Starter')" --target-org <org> --json
90
+ ```
91
+
92
+ Expected: 3 records.
93
+
94
+ ```bash
95
+ sf data query --query "SELECT User.Name FROM UserTerritory2Association WHERE Territory2Id = '<territoryId>'" --target-org <org> --json
96
+ ```
97
+
98
+ Expected: at least 2 records (new user + admin).
99
+
100
+ ### After Stage 5 — Visit Creation
101
+
102
+ ```bash
103
+ sf data query --query "SELECT Id, Subject, TerritoryId FROM Visit ORDER BY CreatedDate DESC LIMIT 1" --target-org <org> --json
104
+ ```
105
+
106
+ Expected: at least 1 Visit record (created against the level-3 territory).
107
+
108
+ Optionally confirm the metadata cache job ran:
109
+
110
+ ```bash
111
+ sf data query --query "SELECT Id, Status, LastModifiedDate FROM LifeSciMobileMetadataRecord ORDER BY LastModifiedDate DESC LIMIT 1" --target-org <org> --json
112
+ ```
113
+
114
+ Expected: a record whose `Status` has transitioned from `ValidationCompleted` to **`Active`** after the async job runs — `Active` is the success state (verified against the org). A transition to `Inactive`, or records stuck at `ValidationCompleted`, means the job failed or never ran — check `IntegrationErrorMessage` and Setup → Apex Jobs.
115
+
116
+ ---
117
+
118
+ ## Resume Logic
119
+
120
+ When the user re-runs the orchestrator after a partial completion:
121
+
122
+ | Stage | How to detect completion | Query |
123
+ |------|------------------------|-------|
124
+ | 1 | Cannot detect programmatically | Ask user |
125
+ | 2 | Profile exists | `SELECT Id FROM Profile WHERE Name = 'LSC Custom Profile'` |
126
+ | 3 | Active model + L3 territory | `SELECT Id FROM Territory2 WHERE ParentTerritory2.ParentTerritory2Id != null AND Territory2Model.State = 'Active'` |
127
+ | 4 | User exists with correct profile | `SELECT Id FROM User WHERE Username = '<username>' AND Profile.Name = 'LSC Custom Profile'` |
128
+ | 5 | A Visit record exists | `SELECT Id FROM Visit LIMIT 1` |
129
+
130
+ If a stage is detected as complete, show the user what was found and ask: "Stage N appears complete (<evidence>). Skip it? (yes/no)"
131
+
132
+ ---
133
+
134
+ ## Timing Expectations
135
+
136
+ | Stage | Typical Duration | Notes |
137
+ |------|-----------------|-------|
138
+ | 1 - Prerequisites | 1-2 minutes | Read-only queries |
139
+ | 2 - Starter Config | 5-15 minutes | 13 deploy steps, interactive layout/flexipage selection |
140
+ | 3 - Territory Setup | 2-5 minutes | Interactive name confirmation + deploy + activation |
141
+ | 4 - User Provisioning | 2-3 minutes | Interactive user detail collection + creates |
142
+ | 5 - Visit Creation | 3-6 minutes | Interactive rep login + record creation + async metadata cache |
143
+ | **Total** | **13-31 minutes** | Depends on user interaction speed |
@@ -0,0 +1,127 @@
1
+ # Application FlexiPage Mapping Reference
2
+
3
+ ## Overview
4
+
5
+ The application file at `.lsc-starter-config/LSStarterConfig/PackageComponents/applications/lsc4ce__lifeSciencesCommercial.app-meta.xml` contains both `<actionOverrides>` and `<profileActionOverrides>` that reference flexipages. After selective flexipage deployment, the application file must be updated to include only overrides for deployed pages.
6
+
7
+ ## FlexiPage-to-ActionOverride Mapping
8
+
9
+ The `<actionOverrides>` section uses **managed package prefixed** content names (`lsc4ce__`). These are package-level overrides that reference flexipages from the managed package. They should be **retained as-is** since they reference package flexipages that already exist.
10
+
11
+ | actionOverrides content | pageOrSobjectType | Corresponding Deployable FlexiPage |
12
+ |------------------------|-------------------|-------------------------------------|
13
+ | lsc4ce__AccountHCP | Account | LSCAccountHCP |
14
+ | lsc4ce__Account_Plan | AccountPlan | Account_Plan3 |
15
+ | lsc4ce__Account_Plan_Objective_Record_Page | AccountPlanObjective | Account_Plan_Objective_Record_Page3 |
16
+ | lsc4ce__Goal_Definition | GoalDefinition | Goal_Definition1 |
17
+ | lsc4ce__Provider_Visit | ProviderVisit | CPVisitLandingPage (Visit-level override) |
18
+ | lsc4ce__Sprint | Sprint | (no direct deployable equivalent) |
19
+ | lsc4ce__TerritoryBusinessPlanRecordPage | TerritoryBusinessPlan | (no direct deployable equivalent) |
20
+
21
+ ## FlexiPage-to-ProfileActionOverride Mapping
22
+
23
+ The `<profileActionOverrides>` section uses **unmanaged** content names that directly correspond to deployable flexipages. These must be filtered based on user selection.
24
+
25
+ | profileActionOverrides content | pageOrSobjectType | Record Types | FlexiPage File |
26
+ |-------------------------------|-------------------|--------------|----------------|
27
+ | CPVisitLandingPage | Visit | — | CPVisitLandingPage.flexipage-meta.xml |
28
+ | LSC_Inquiry | Inquiry | Adverse_Event, LSC_General, Medical_Inquiry, (none) | LSC_Inquiry.flexipage-meta.xml |
29
+ | Goal_Definition1 | GoalDefinition | — | Goal_Definition1.flexipage-meta.xml |
30
+ | Account_Plan3 | AccountPlan | — | Account_Plan3.flexipage-meta.xml |
31
+ | Account_Plan_Objective_Record_Page3 | AccountPlanObjective | — | Account_Plan_Objective_Record_Page3.flexipage-meta.xml |
32
+ | LSCAccountHCP | Account | Business, Business_Account, Health_Care_Organization, PersonAccount.Health_Care_Provider, PersonAccount.PersonAccount, (none) | LSCAccountHCP.flexipage-meta.xml |
33
+ | Contact_Point_Address_Record_Page | ContactPointAddress | — | Contact_Point_Address_Record_Page.flexipage-meta.xml |
34
+ | Home_Page_LSC_Default | standard-home | — | Home_Page_LSC_Default.flexipage-meta.xml |
35
+
36
+ ## Update Rules
37
+
38
+ ### actionOverrides
39
+
40
+ The `<actionOverrides>` entries (lines 3–128 of the app file) reference managed package flexipages (`lsc4ce__*`). These should be **kept as-is** regardless of user selection — they reference pre-existing package pages.
41
+
42
+ ### profileActionOverrides
43
+
44
+ For `<profileActionOverrides>` (lines 138–665), apply these rules:
45
+
46
+ 1. **Keep** overrides where `<content>` matches a SELECTED flexipage name
47
+ 2. **Remove** overrides where `<content>` matches an UNSELECTED flexipage name
48
+ 3. Each selected flexipage generates overrides for BOTH profiles (LSC Custom Profile and Admin) and BOTH form factors (Small and Large)
49
+ 4. Some flexipages have multiple record-type-specific overrides (e.g., LSC_Inquiry has entries for Adverse_Event, LSC_General, Medical_Inquiry, and a default with no recordType)
50
+
51
+ ### Example: User selects only CPVisitLandingPage and LSC_Inquiry
52
+
53
+ Keep only these `<profileActionOverrides>` blocks:
54
+
55
+ ```xml
56
+ <!-- CPVisitLandingPage overrides (4 entries: 2 profiles x 2 form factors) -->
57
+ <profileActionOverrides>
58
+ <actionName>View</actionName>
59
+ <content>CPVisitLandingPage</content>
60
+ <formFactor>Small</formFactor>
61
+ <pageOrSobjectType>Visit</pageOrSobjectType>
62
+ <type>Flexipage</type>
63
+ <profile>LSC Custom Profile</profile>
64
+ </profileActionOverrides>
65
+ <profileActionOverrides>
66
+ <actionName>View</actionName>
67
+ <content>CPVisitLandingPage</content>
68
+ <formFactor>Large</formFactor>
69
+ <pageOrSobjectType>Visit</pageOrSobjectType>
70
+ <type>Flexipage</type>
71
+ <profile>LSC Custom Profile</profile>
72
+ </profileActionOverrides>
73
+ <profileActionOverrides>
74
+ <actionName>View</actionName>
75
+ <content>CPVisitLandingPage</content>
76
+ <formFactor>Small</formFactor>
77
+ <pageOrSobjectType>Visit</pageOrSobjectType>
78
+ <type>Flexipage</type>
79
+ <profile>Admin</profile>
80
+ </profileActionOverrides>
81
+ <profileActionOverrides>
82
+ <actionName>View</actionName>
83
+ <content>CPVisitLandingPage</content>
84
+ <formFactor>Large</formFactor>
85
+ <pageOrSobjectType>Visit</pageOrSobjectType>
86
+ <type>Flexipage</type>
87
+ <profile>Admin</profile>
88
+ </profileActionOverrides>
89
+
90
+ <!-- LSC_Inquiry overrides (many entries: per record type x 2 profiles x 2 form factors) -->
91
+ <!-- Include ALL LSC_Inquiry entries (Adverse_Event, LSC_General, Medical_Inquiry, and default) -->
92
+ ```
93
+
94
+ ### Home_Page_LSC_Default Special Case
95
+
96
+ The Home Page flexipage uses `actionName=Tab` (not `View`) and `pageOrSobjectType=standard-home`:
97
+ ```xml
98
+ <profileActionOverrides>
99
+ <actionName>Tab</actionName>
100
+ <content>Home_Page_LSC_Default</content>
101
+ <formFactor>Large</formFactor>
102
+ <pageOrSobjectType>standard-home</pageOrSobjectType>
103
+ <type>Flexipage</type>
104
+ <profile>Admin</profile>
105
+ </profileActionOverrides>
106
+ ```
107
+
108
+ ## Static Elements to Always Keep
109
+
110
+ These elements in the application file are NOT related to flexipages and must always be preserved:
111
+ - `<description>`
112
+ - `<formFactors>`
113
+ - `<isNav*>` settings
114
+ - `<isOmniPinnedViewEnabled>`
115
+ - `<label>`
116
+ - `<navType>`
117
+ - `<subscriberTabs>`
118
+ - `<tabs>`
119
+ - `<uiType>`
120
+ - `<utilityBar>`
121
+
122
+ ## Deploy Command
123
+
124
+ After updating the application file:
125
+ ```bash
126
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/applications --target-org <org>
127
+ ```