@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,116 @@
1
+ # Deploy Commands Reference
2
+
3
+ Exact CLI commands for each foundation deployment step. All commands use `--target-org <org>` where `<org>` is the user-provided org alias or username.
4
+
5
+ > **Working directory (required):** Run every `sf project deploy start` command from **inside the `.lsc-starter-config/LSStarterConfig/` project root** (the directory containing `sfdx-project.json`). `sf` searches the current directory and its ancestors — never its descendants — for `sfdx-project.json`, which pins `sourceApiVersion: 65.0`. If you run from a parent directory (or an unrelated repo), `sf` cannot find the project file, silently falls back to **API 60.0**, and profile deploys fail with `Property 'viewAllFields' not valid in version 60.0` (LSC profiles use 65.0-only permissions). The `.lsc-starter-config/LSStarterConfig/...` paths shown below are for readability — `cd` into `.lsc-starter-config/LSStarterConfig/` first and use paths relative to it (e.g. `PackageComponents/objects`).
6
+
7
+ ## Step 1: StandardValueSets
8
+
9
+ ```bash
10
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/standardValueSets --target-org <org>
11
+ ```
12
+
13
+ Expected files deployed:
14
+ - AccountRating.standardValueSet-meta.xml
15
+ - CPSSocialPlatformProvider.standardValueSet-meta.xml
16
+ - CareSpecialtySpecialtyType.standardValueSet-meta.xml
17
+ - CasePriority.standardValueSet-meta.xml
18
+ - CaseStatus.standardValueSet-meta.xml
19
+ - HProviderProviderClass.standardValueSet-meta.xml
20
+ - HProviderProviderType.standardValueSet-meta.xml
21
+ - HealthcareProviderStatus.standardValueSet-meta.xml
22
+ - InquiryTypeEnum.standardValueSet-meta.xml
23
+ - PAAffiliationRole.standardValueSet-meta.xml
24
+
25
+ ## Step 2: Objects
26
+
27
+ ```bash
28
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/objects --target-org <org>
29
+ ```
30
+
31
+ Deploys objects and their sub-components (recordTypes, compactLayouts, fieldSets, webLinks, businessProcesses):
32
+ - Account (recordTypes: Business, Business_Account, Health_Care_Organization; compactLayouts, fieldSets, webLinks)
33
+ - BusinessLicense (fieldSets)
34
+ - Case (recordTypes: Medical_Info_Request, Medical_Inquiry, Question; businessProcesses)
35
+ - HealthcareProvider (recordTypes: Health_Care_Organization, Health_Care_Provider)
36
+ - HealthcareProviderSpecialty (fieldSets)
37
+ - Inquiry (recordTypes: Adverse_Event, LSC_General, Medical_Inquiry; compactLayouts, fieldSets)
38
+ - InquiryQuestion (compactLayouts)
39
+ - InquiryQuestionAnswer (compactLayouts, fieldSets)
40
+ - PersonAccount (recordTypes: Health_Care_Provider, PersonAccount; compactLayouts)
41
+ - Product2 (recordTypes: LSC_Marketing_Item, LSC_Sample)
42
+ - ProviderAcctTerritoryInfo (recordTypes: Health_Care_Organization, Health_Care_Provider)
43
+ - ProviderVisitProdDiscussion (recordTypes: Patient_Tracking, Product_Feedback)
44
+ - User (fieldSets)
45
+ - Visit (compactLayouts, fieldSets)
46
+
47
+ ## Step 3: Product Specification Types
48
+
49
+ ```bash
50
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/productSpecificationTypes --target-org <org>
51
+ ```
52
+
53
+ Files:
54
+ - LSPromotionalItem.productSpecificationType-meta.xml
55
+ - LSSampleProduct.productSpecificationType-meta.xml
56
+
57
+ ## Step 4: Product Specification Record Types
58
+
59
+ ```bash
60
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/productSpecificationRecTypes --target-org <org>
61
+ ```
62
+
63
+ Files:
64
+ - LSC_Sample_LSSampleProduct.productSpecificationRecType-meta.xml
65
+ - LS_MarketingItem_LSPromotionalItem.productSpecificationRecType-meta.xml
66
+
67
+ ## Step 5: Quick Actions
68
+
69
+ ```bash
70
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/quickActions --target-org <org>
71
+ ```
72
+
73
+ Files:
74
+ - Account.LogAVisit.quickAction-meta.xml
75
+ - Visit.Inquiry.quickAction-meta.xml
76
+
77
+ ## Step 6: LSC Custom Profile (Skeleton)
78
+
79
+ ```bash
80
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/profiles/SkeletonProfile --target-org <org>
81
+ ```
82
+
83
+ Deploys both skeleton profiles:
84
+ - LSC Custom Profile.profile-meta.xml
85
+ - Admin.profile-meta.xml
86
+
87
+ These are minimal profiles with field permissions and application visibility. Layout assignments and flexipage overrides are added later in Steps 11 and 13.
88
+
89
+ ## Verifying Deployment Success
90
+
91
+ After each deploy command, check the output. A successful deployment shows:
92
+ ```text
93
+ Deploy Succeeded.
94
+ ```
95
+
96
+ If deployment fails, the output shows:
97
+ ```text
98
+ Deploy Failed.
99
+ ```
100
+
101
+ Capture the error message and component name for the recovery flow.
102
+
103
+ ## Temporary Directory Pattern
104
+
105
+ For selective deploys (layouts, flexipages), create a temp directory structure **inside the SFDX project** (a `.lsc-deploy-tmp/` under the project root — never `/tmp` or any path outside the project), then remove it when done:
106
+ ```bash
107
+ mkdir -p .lsc-deploy-tmp/<metadata-type>
108
+ cp <selected-files> .lsc-deploy-tmp/<metadata-type>/
109
+ sf project deploy start --source-dir .lsc-deploy-tmp --target-org <org>
110
+ rm -rf .lsc-deploy-tmp
111
+ ```
112
+
113
+ Alternatively, use `--metadata` flag with specific component names:
114
+ ```bash
115
+ sf project deploy start --metadata "Layout:Account-HCO Account Layout" --metadata "Layout:Visit-LSC Visit Layout" --target-org <org>
116
+ ```
@@ -0,0 +1,111 @@
1
+ # LifeSci Metadata Deploy Reference
2
+
3
+ ## LifeSciConfigRecords (Step 7)
4
+
5
+ LifeSciConfigCategories and LifeSciConfigRecords use standard Salesforce Metadata API deployment. The folder `.lsc-starter-config/LSStarterConfig/LSConfig/lifeSciConfigRecord/` contains a `package.xml` that declares both types.
6
+
7
+ ```bash
8
+ sf project deploy start -d .lsc-starter-config/LSStarterConfig/LSConfig/lifeSciConfigRecord --target-org <org>
9
+ ```
10
+
11
+ This deploys:
12
+ - 52 LifeSciConfigCategory files from `lifeSciConfigCategories/`
13
+ - 249 LifeSciConfigRecord files from `lifeSciConfigRecords/`
14
+
15
+ The `package.xml` at `.lsc-starter-config/LSStarterConfig/LSConfig/lifeSciConfigRecord/package.xml` contains:
16
+ ```xml
17
+ <?xml version="1.0" encoding="UTF-8"?>
18
+ <Package xmlns="http://soap.sforce.com/2006/04/metadata">
19
+ <types>
20
+ <members>*</members>
21
+ <name>LifeSciConfigCategory</name>
22
+ </types>
23
+ <types>
24
+ <members>*</members>
25
+ <name>LifeSciConfigRecord</name>
26
+ </types>
27
+ <version>65.0</version>
28
+ </Package>
29
+ ```
30
+
31
+ ### Troubleshooting LifeSciConfigRecords
32
+
33
+ | Error | Cause | Fix |
34
+ |-------|-------|-----|
35
+ | "Enter an assignment level and an assignment ID" | Profile referenced in assignments doesn't exist | Ensure Step 6 (skeleton profile) deployed successfully |
36
+ | "Unable to find an enum or id that matches the value provided for: ObjectValue" | Entity referenced in a DbSchema record is not available | Check which entity the failing record references and ensure it's enabled on the org |
37
+
38
+ ---
39
+
40
+ ## LifeSciMetadataRecords (Step 8)
41
+
42
+ LifeSciMetadataRecords are stored as JSON files and deployed via the Composite Tree REST API (not metadata deploy). The files are at `.lsc-starter-config/LSStarterConfig/LSConfig/lifeSciMetadataRecord/`.
43
+
44
+ ### Deploy Order (MUST follow this sequence)
45
+
46
+ 1. **LifeSciMetadataCategory.json** — Creates category records first
47
+ 2. **LifeSciMetadataRecord.json** — Records reference categories via `LifeScienceMetadataCategoryId`
48
+ 3. **LifeSciMetadataFieldValue.json** — Field values reference records
49
+
50
+ ### Deploy Command — USE THE PLAN FILE (required)
51
+
52
+ The three JSON files use cross-file `@references`: `LifeSciMetadataRecord.json` references categories via `"LifeScienceMetadataCategoryId": "@<categoryRefId>"`, and `LifeSciMetadataFieldValue.json` references records. Importing the files individually with `--files` does **not** resolve these references and will fail. The `LifeSciMetadataCategory-plan.json` plan file sequences all three sobjects with `saveRefs`/`resolveRefs` set correctly, so a single `--plan` import resolves everything.
53
+
54
+ Run from inside the `lifeSciMetadataRecord/` directory (plan file paths are relative to it):
55
+
56
+ ```bash
57
+ cd .lsc-starter-config/LSStarterConfig/LSConfig/lifeSciMetadataRecord
58
+ sf data import tree --plan LifeSciMetadataCategory-plan.json --target-org <org> --json
59
+ ```
60
+
61
+ Verified result: 101 records imported (10 LifeSciMetadataCategory + 10 LifeSciMetadataRecord + 81 LifeSciMetadataFieldValue).
62
+
63
+ The plan file contents:
64
+ ```json
65
+ [
66
+ { "sobject": "LifeSciMetadataCategory", "saveRefs": true, "resolveRefs": false, "files": ["LifeSciMetadataCategory.json"] },
67
+ { "sobject": "LifeSciMetadataRecord", "saveRefs": true, "resolveRefs": true, "files": ["LifeSciMetadataRecord.json"] },
68
+ { "sobject": "LifeSciMetadataFieldValue", "saveRefs": true, "resolveRefs": true, "files": ["LifeSciMetadataFieldValue.json"] }
69
+ ]
70
+ ```
71
+
72
+ ### If the plan import fails
73
+
74
+ The command uses the Composite Tree API. On a reference-resolution error:
75
+ 1. Confirm you ran from inside the `lifeSciMetadataRecord/` directory (the plan uses relative file paths)
76
+ 2. Confirm the `@<refId>` values in Records/FieldValues match `referenceId`s declared earlier in the plan sequence
77
+ 3. Do NOT fall back to per-file `--files` imports — they cannot resolve the cross-file references
78
+
79
+ ### Data Structure
80
+
81
+ **LifeSciMetadataCategory.json** structure:
82
+ ```json
83
+ {
84
+ "records": [
85
+ {
86
+ "attributes": { "type": "LifeSciMetadataCategory", "referenceId": "..." },
87
+ "Name": "...",
88
+ "CategoryLabel": "...",
89
+ "Category": "...",
90
+ "Type": "Hierarchical|List"
91
+ }
92
+ ]
93
+ }
94
+ ```
95
+
96
+ **LifeSciMetadataRecord.json** structure:
97
+ ```json
98
+ {
99
+ "records": [
100
+ {
101
+ "attributes": { "type": "LifeSciMetadataRecord", "referenceId": "..." },
102
+ "LifeScienceMetadataCategoryId": "@<categoryRefId>",
103
+ "IsActive": true,
104
+ "IsOrgLevel": true,
105
+ "Name": "...",
106
+ "RecordApiName": "...",
107
+ "Type": null
108
+ }
109
+ ]
110
+ }
111
+ ```
@@ -0,0 +1,312 @@
1
+ # Stage 2 — Starter Config Deploy
2
+
3
+ Deploys the full Life Sciences Cloud Starter Configuration to a target org in a sequenced, recoverable workflow with interactive component selection. This is Stage 2 of the `life-sciences-fieldsalesrep-coordinate` workflow; the coordinator invokes it after prerequisites (Stage 1) pass.
4
+
5
+ ## Stage Scope
6
+
7
+ - **In scope**: Deploying all starter config components (StandardValueSets, objects, productSpecificationTypes, productSpecificationRecTypes, quickActions, profiles, LifeSciConfigRecords, LifeSciMetadataRecords, trigger handlers, page layouts, flexipages, application file updates)
8
+ - **Out of scope**: Territory setup (Stage 3), user assignment (Stage 4), prerequisite validation (Stage 1), package installation
9
+
10
+ ---
11
+
12
+ ## Required Inputs
13
+
14
+ Gather before proceeding:
15
+
16
+ - **Target org**: The org alias or username to deploy to (from `sf config get target-org` or user-specified)
17
+
18
+ ---
19
+
20
+ ## Source Components (must be present in the CWD)
21
+
22
+ All components and data deployed in this stage come from the `.lsc-starter-config/LSStarterConfig/` subtree of the public repo <https://github.com/SalesforceLabs/LSStarterConfig.git>. **This stage does NOT download or delete that folder** — it expects `.lsc-starter-config/LSStarterConfig/` to already be present in the current working directory. The coordinator (`life-sciences-fieldsalesrep-coordinate`) downloads it once at the start of the run and deletes it once at the end. This stage uses these subfolders:
23
+
24
+ | Subfolder | Used by |
25
+ |---|---|
26
+ | `.lsc-starter-config/LSStarterConfig/PackageComponents/` | Steps 1–6, 9–13 (metadata: standardValueSets, objects, product specs, quick actions, profiles, layouts, flexipages, application) |
27
+ | `.lsc-starter-config/LSStarterConfig/LSConfig/lifeSciConfigRecord/` | Step 7 (LifeSciConfigCategories + LifeSciConfigRecords) |
28
+ | `.lsc-starter-config/LSStarterConfig/LSConfig/lifeSciMetadataRecord/` | Step 8 (LifeSciMetadataRecords via plan file) |
29
+
30
+ The deploy paths below (`.lsc-starter-config/LSStarterConfig/...`) resolve relative to the CWD. **`.lsc-starter-config/LSStarterConfig/` contains its own `sfdx-project.json`** (it pins `sourceApiVersion: 65.0`) — that is the project root all deploy steps must run from (see the working-directory note in Phase 1).
31
+
32
+ > **If `.lsc-starter-config/LSStarterConfig/` is not present, stop — do NOT download it here.** This embedded stage is a pure consumer of the shared folder; the coordinator (`life-sciences-fieldsalesrep-coordinate`) is the sole owner of the single download (at the start of the run) and the single delete (at the end). Report that the shared config folder is missing and must be provisioned by the coordinator before this stage runs, then halt.
33
+
34
+ ---
35
+
36
+ ## Deployment Order (MANDATORY — do not reorder)
37
+
38
+ **This order is required. Each step depends on artifacts created by earlier steps — running out of order causes deploy failures that are hard to diagnose.** Always execute steps 1 → 13 in sequence. Do not skip a dependency step, and do not run a later step until the step it depends on has verified success.
39
+
40
+ The critical dependency chain (proven in practice):
41
+
42
+ ```text
43
+ Objects + RecordTypes (Step 2)
44
+ └── LSC Custom Profile (Step 6) # profile references RecordTypes; fails if objects not deployed first
45
+ └── LifeSciConfigRecords (Step 7) # 177 of 301 records assign config to the profile; fail if profile absent
46
+ ```
47
+
48
+ | Order | Step | Depends on | Verification gate before proceeding |
49
+ |-------|------|-----------|--------------------------------------|
50
+ | 1 | StandardValueSets | — | Deploy succeeded |
51
+ | 2 | Objects (incl. RecordTypes) | — | Deploy succeeded; RecordTypes queryable |
52
+ | 3 | ProductSpecificationTypes | Objects | Deploy succeeded |
53
+ | 4 | ProductSpecificationRecTypes | ProductSpecificationTypes | Deploy succeeded |
54
+ | 5 | QuickActions | Objects | Deploy succeeded |
55
+ | 6 | LSC Custom Profile (skeleton) | Objects/RecordTypes | **Query the org to confirm the profile exists** |
56
+ | 7 | LifeSciConfigRecords | **Profile (Step 6)** | **Profile confirmed present before running** |
57
+ | 8 | LifeSciMetadataRecords | LifeSciConfigRecords | Categories → Records → FieldValues in order |
58
+ | 9 | TriggerHandlers | Objects | Handlers exist |
59
+ | 10 | PageLayouts | Objects | Deploy succeeded |
60
+ | 11 | ProfileLayoutAssignments | PageLayouts + Profile | Only assign deployed layouts |
61
+ | 12 | FlexiPages | Objects | Deploy succeeded |
62
+ | 13 | ApplicationUpdate | FlexiPages | Only reference deployed flexipages |
63
+
64
+ > **Why the skeleton profile first (Step 6), not the full profile:** the full `LSC Custom Profile` references RecordTypes and layouts. Deploying it standalone before objects fails with `no RecordType named Account.Business found`. The skeleton profile has no layout assignments, so it deploys cleanly after objects (Step 2); layout assignments are added later in Step 11. Deploying the config records (Step 7) before the profile exists fails every profile-assigned record with `Enter an assignment level and an assignment ID.`
65
+
66
+ ---
67
+
68
+ ## State Tracking
69
+
70
+ Maintain a deployment state object throughout the workflow to enable pause/resume and partial-deploy recovery. Read `references/stage-2-starter-config-state-tracking.md` for the full state-object schema, the failure/recovery prompt, and the progress-display formats. On failure at any step, present the recovery options from that reference and wait for the user's choice before continuing.
71
+
72
+ ---
73
+
74
+ ## Workflow
75
+
76
+ ### Phase 1 — Deploy Foundation Components (Steps 1–6)
77
+
78
+ Read `references/stage-2-starter-config-deploy-commands.md` for exact CLI commands for each step.
79
+
80
+ > **Working directory (required for ALL deploy steps 1–13):** Run every `sf project deploy start` command from **inside the `.lsc-starter-config/LSStarterConfig/` project root** (the directory holding `sfdx-project.json`). `sf` only searches the current directory and its ancestors for `sfdx-project.json`, which pins `sourceApiVersion: 65.0`. Run from anywhere else and `sf` silently falls back to API 60.0, and the profile deploys (Steps 6 and 11) fail with `Property 'viewAllFields' not valid in version 60.0`. `cd .lsc-starter-config/LSStarterConfig` first; the `.lsc-starter-config/LSStarterConfig/...` paths in the commands below are shown from the CWD for readability — once you are inside `.lsc-starter-config/LSStarterConfig`, drop that prefix from `--source-dir` (e.g. `--source-dir PackageComponents/objects`).
81
+
82
+ **Step 1: Deploy StandardValueSets**
83
+ ```bash
84
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/standardValueSets --target-org <org>
85
+ ```
86
+
87
+ **Step 2: Deploy Objects**
88
+ ```bash
89
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/objects --target-org <org>
90
+ ```
91
+
92
+ **Step 3: Deploy Product Specification Types**
93
+ ```bash
94
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/productSpecificationTypes --target-org <org>
95
+ ```
96
+
97
+ **Step 4: Deploy Product Specification Record Types**
98
+ ```bash
99
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/productSpecificationRecTypes --target-org <org>
100
+ ```
101
+
102
+ **Step 5: Deploy Quick Actions**
103
+ ```bash
104
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/quickActions --target-org <org>
105
+ ```
106
+
107
+ **Step 6: Deploy LSC Custom Profile (Skeleton)**
108
+ ```bash
109
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/profiles/SkeletonProfile --target-org <org>
110
+ ```
111
+
112
+ > Deploy the **skeleton** profiles (`profiles/SkeletonProfile/`), not the full `profiles/*.profile-meta.xml`. The full profile carries layout assignments that don't exist yet and will fail. Do NOT deploy the profile before Step 2 (Objects) — it references RecordTypes and will fail with `no RecordType named Account.Business found`.
113
+
114
+ **Verification gate (required before Step 7):** confirm the profile landed in the org:
115
+ ```bash
116
+ sf data query --query "SELECT Id, Name FROM Profile WHERE Name = 'LSC Custom Profile'" --target-org <org> --json
117
+ ```
118
+ The query must return exactly one record. If it returns zero, do NOT proceed to Step 7 — the config records will fail. Re-run Step 6 (and confirm Step 2 succeeded) first.
119
+
120
+ After each step, verify deployment success. If a step fails, pause and present recovery options.
121
+
122
+ ### Phase 2 — Deploy Config Records (Steps 7–8)
123
+
124
+ **Step 7: Deploy LifeSciConfigCategories and LifeSciConfigRecords**
125
+
126
+ > **Prerequisite gate:** the `LSC Custom Profile` MUST exist in the org (verified at end of Step 6). About 177 of the ~301 config records assign config to `Custom-LSC Custom Profile`; if the profile is absent every one of those fails with `Enter an assignment level and an assignment ID.` while the ~124 org-level records still succeed — a confusing partial deploy. Deployment is an upsert, so re-running after the profile exists is safe.
127
+
128
+ ```bash
129
+ sf project deploy start -d .lsc-starter-config/LSStarterConfig/LSConfig/lifeSciConfigRecord --target-org <org>
130
+ ```
131
+
132
+ > **STOP-GATE (deploy result).** `sf project deploy start` reports per-component pass/fail. Confirm **zero component failures** in the deploy result — do NOT eyeball "mostly succeeded." If any components failed with `Enter an assignment level and an assignment ID.`, the `LSC Custom Profile` was absent when the ~177 profile-scoped records deployed (the confusing partial deploy this Step warns about). Fix the profile (Step 6), then re-run this Step (upsert-safe) until the deploy reports **0 failures**. A partial config deploy leaves the org subtly misconfigured.
133
+
134
+ **Step 8: Deploy LifeSciMetadataRecords**
135
+
136
+ Deploy the JSON data files via the Composite Tree API using the **plan file** (the files use cross-file `@references` that only resolve through the plan). Run from inside the metadata-record directory:
137
+ ```bash
138
+ cd .lsc-starter-config/LSStarterConfig/LSConfig/lifeSciMetadataRecord
139
+ sf data import tree --plan LifeSciMetadataCategory-plan.json --target-org <org> --json
140
+ ```
141
+ The plan sequences LifeSciMetadataCategory → LifeSciMetadataRecord → LifeSciMetadataFieldValue with refs resolved. Do NOT import the files individually with `--files` — the references won't resolve. Expected: 101 records (10 + 10 + 81). Read `references/stage-2-starter-config-lifesci-metadata-deploy.md` for details.
142
+
143
+ > **STOP-GATE (import count).** `sf data import tree` returns one result row per created record. Count them — the total MUST be **101** (10 LifeSciMetadataCategory + 10 LifeSciMetadataRecord + 81 LifeSciMetadataFieldValue). If fewer, a `@reference` failed to resolve (usually because the import ran outside the metadata-record directory, or a category/record row failed and orphaned its children). Do NOT proceed to Phase 3 with a short count — re-run the plan from inside `.lsc-starter-config/LSStarterConfig/LSConfig/lifeSciMetadataRecord` until the import reports 101 created.
144
+
145
+ ### Phase 3 — Activate Trigger Handlers (Step 9)
146
+
147
+ **Step 9: Activate Trigger Handlers**
148
+
149
+ Handlers are `LifeScienceTriggerHandler` records — a **Tooling API** entity (not a managed custom object). Read `references/stage-2-starter-config-trigger-handlers.md` for the full list of 28 handler `DeveloperName`s and the **safe batch-activation loop** — use one of the safe-loop patterns there (`jq` over the JSON, or an **unquoted** `for id in $IDS`); do NOT hand-roll a `while read` over an echoed ID list. The per-record update is:
150
+ ```bash
151
+ sf data update record --sobject LifeScienceTriggerHandler --record-id <Id> --values "IsActive=true" --target-org <org> --use-tooling-api
152
+ ```
153
+
154
+ Do NOT use `lsc4ce__TriggerHandler__c` — that sobject does not exist. All queries/updates require `--use-tooling-api`. Activating all 28 with sequential per-handler `sf` calls can exceed 2 minutes; query all inactive IDs at once and skip handlers already `IsActive=true`.
155
+
156
+ > **STOP-GATE (activation count).** After the loop, re-query and count active handlers **scoped to the 28** (a bare `WHERE IsActive = true` counts every active handler in the org, not just these):
157
+ > ```bash
158
+ > sf data query --query "SELECT COUNT(Id) active FROM LifeScienceTriggerHandler WHERE IsActive = true AND DeveloperName IN (<the 28 names>)" --target-org <org> --use-tooling-api --json
159
+ > ```
160
+ > The `active` count MUST equal the full handler count (28). If it is fewer, the activation is INCOMPLETE — the most common cause is a `while read`/newline-split loop dropping the final record when the ID list has no trailing newline (the "27 of 28" bug). Identify the straggler(s) by name (query the same 28 with `IsActive = false`), activate each missing one individually, and re-run this count until it equals 28. Do NOT proceed to Phase 4 while any handler is inactive — a missing handler silently breaks the automation it backs.
161
+
162
+ ### Phase 4 — Interactive Layout Deployment (Step 10–11)
163
+
164
+ **Step 10: Deploy Page Layouts**
165
+
166
+ > **Interaction gate (required):** Do NOT deploy layouts until the user has selected which ones. Never default to "all" without an explicit user choice — present the list and wait for a response before proceeding.
167
+
168
+ 1. List all available layouts from `.lsc-starter-config/LSStarterConfig/PackageComponents/layouts/`:
169
+
170
+ ```markdown
171
+ Available Page Layouts:
172
+ 1. Account - HCO Account Layout
173
+ 2. ActivityPlanTerritory - Activity Plan Territory Layout
174
+ 3. Case - LSC Case Layout
175
+ 4. CommSubscription - Communication Subscription Layout
176
+ 5. CommSubscriptionChannelType - Communication Subscription Channel Type Layout
177
+ 6. CommSubscriptionConsent - Communication Subscription Consent Layout
178
+ 7. HealthcareProvider - Healthcare Provider Layout
179
+ 8. Inquiry - LSC Inquiry Layout
180
+ 9. InquiryQuestion - LSC Inquiry Question Layout
181
+ 10. InquiryQuestionAnswer - LSC Inquiry Question Answer Layout
182
+ 11. PersonAccount - Person Account HCP Layout
183
+ 12. ProviderVisit - LSC Provider Visit Layout
184
+ 13. ProviderVisitProdDiscussion - Product Feedback
185
+ 14. Visit - LSC Visit Layout
186
+ ```
187
+
188
+ 2. Ask the user which layouts to deploy (accept numbers, ranges, or "all"). Present the list **neutrally** — do NOT recommend, rank, or single out layouts as "most relevant for field sales rep" (or for any persona). The selection is entirely the user's. Just list the layouts and the reply format, then wait.
189
+ 3. Deploy only the selected layouts by copying them to a temporary directory and deploying:
190
+ ```bash
191
+ sf project deploy start --source-dir <temp-dir-with-selected-layouts> --target-org <org>
192
+ ```
193
+
194
+ **Step 11: Update Profile Layout Assignments**
195
+
196
+ After layouts are deployed, update the layout assignments in both profile files under `.lsc-starter-config/LSStarterConfig/PackageComponents/profiles/SkeletonProfile/`:
197
+ - `LSC Custom Profile.profile-meta.xml`
198
+ - `Admin.profile-meta.xml`
199
+
200
+ Add `<layoutAssignments>` entries for each deployed layout. Read `references/stage-2-starter-config-profile-layout-assignments.md` for the mapping of layouts to objects/record types.
201
+
202
+ > **No confirmation for this edit.** Updating the profile files is a mechanical consequence of the layout selection already made in Step 10 — the user has already chosen the layouts, and these `<layoutAssignments>` entries are the required mapping for that choice. Do NOT print the assignment block for review, and do NOT ask the user to confirm editing the profiles. Insert the entries directly (before `</Profile>` in each file) and proceed to deploy. The only interaction gate in this Step is the layout selection in Step 10; there is no separate approval for writing the profiles. `references/stage-2-starter-config-profile-layout-assignments.md` lists the full set of `<layoutAssignments>` blocks (one per layout + record-type combination). Before deploying, confirm **every** mapping for the layouts you deployed is present in BOTH profile files (`LSC Custom Profile.profile-meta.xml` and `Admin.profile-meta.xml`) — count the `<layoutAssignments>` blocks in each file against the reference. A missing assignment does not fail the deploy; it silently leaves that object rendering the wrong (or default) layout for the profile. Do NOT deploy a profile with fewer assignment blocks than the reference specifies for the deployed layout set.
203
+
204
+ Deploy the updated profiles:
205
+ ```bash
206
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/profiles/SkeletonProfile --target-org <org>
207
+ ```
208
+
209
+ ### Phase 5 — Interactive FlexiPage Deployment (Steps 12–13)
210
+
211
+ **Step 12: Deploy FlexiPages**
212
+
213
+ > **Interaction gate (required):** Do NOT deploy flexipages until the user has selected which ones. Never default to "all" without an explicit user choice — present the list and wait for a response before proceeding.
214
+
215
+ 1. List all available flexipages from `.lsc-starter-config/LSStarterConfig/PackageComponents/flexipages/`:
216
+
217
+ ```markdown
218
+ Available FlexiPages:
219
+ 1. Account_Plan3
220
+ 2. Account_Plan_Objective_Record_Page3
221
+ 3. CPVisitLandingPage
222
+ 4. Contact_Point_Address_Record_Page
223
+ 5. Goal_Definition1
224
+ 6. Home_Page_LSC_Default
225
+ 7. LSCAccountHCP
226
+ 8. LSC_Inquiry
227
+ ```
228
+
229
+ 2. Ask the user which flexipages to deploy (accept numbers, ranges, or "all"). Present the list **neutrally** — do NOT recommend, rank, or single out pages as "most relevant for field sales rep" (or for any persona). The selection is entirely the user's; suggesting a subset biases the choice and misrepresents which pages a workflow needs. Just list the pages and the reply format, then wait.
230
+ 3. Deploy only the selected flexipages:
231
+ ```bash
232
+ sf project deploy start --source-dir <temp-dir-with-selected-flexipages> --target-org <org>
233
+ ```
234
+
235
+ **Step 13: Update and Deploy Application File**
236
+
237
+ After flexipages are deployed, update `.lsc-starter-config/LSStarterConfig/PackageComponents/applications/lsc4ce__lifeSciencesCommercial.app-meta.xml`:
238
+
239
+ 1. Keep only `<actionOverrides>` whose `<content>` matches a selected flexipage (or its `lsc4ce__` prefixed equivalent).
240
+ 2. Keep only `<profileActionOverrides>` for **LSC Custom Profile** and **Admin** profiles whose `<content>` matches a selected flexipage.
241
+ 3. Read `references/stage-2-starter-config-application-flexipage-mapping.md` for the full content-to-flexipage mapping.
242
+
243
+ Deploy the updated application file:
244
+ ```bash
245
+ sf project deploy start --source-dir .lsc-starter-config/LSStarterConfig/PackageComponents/applications --target-org <org>
246
+ ```
247
+
248
+ > **Do not delete the `.lsc-starter-config/LSStarterConfig/` folder** — this stage neither downloads nor removes it. The coordinator (`life-sciences-fieldsalesrep-coordinate`) owns the single download (at start) and single delete (at end) of the shared folder.
249
+
250
+ ---
251
+
252
+ ## Progress Display
253
+
254
+ After each step completes, display step progress; at the end show a final summary. See `references/stage-2-starter-config-state-tracking.md` for the exact progress and summary formats.
255
+
256
+ ---
257
+
258
+ ## Rules / Constraints
259
+
260
+ | Constraint | Rationale |
261
+ |-----------|-----------|
262
+ | Require `.lsc-starter-config/LSStarterConfig/` to already be present in the CWD; do NOT download or delete it | All components/data come from the repo, but the shared folder's download/cleanup is owned by `life-sciences-fieldsalesrep-coordinate` (one download at start, one delete at end) |
263
+ | Run deploys from inside `.lsc-starter-config/LSStarterConfig/` (the `sfdx-project.json` root, API 65.0) | `sf` finds the project file only in the CWD/ancestors; running elsewhere falls back to API 60.0 and profile deploys fail |
264
+ | Deploy strictly in order 1→13; never reorder or skip a dependency step | Later steps consume artifacts from earlier ones. Key chain: Objects (2) → Profile (6) → Config Records (7). See "Deployment Order (MANDATORY)". |
265
+ | Confirm the profile exists (query the org) before deploying config records (Step 7) | 177 config records assign to the profile and fail silently-per-record if it is absent |
266
+ | Always ask before deploying layouts and flexipages | User may not need all components |
267
+ | Show progress after each step | Long workflow needs visibility |
268
+ | Pause on failure with recovery options | Partial deployments should be recoverable |
269
+ | Update application file only for selected flexipages | Avoid deploying references to undeployed pages |
270
+ | Update profile layout assignments only for deployed layouts | Profile must reference only existing layouts |
271
+ | Use --target-org for every CLI command | Explicit org targeting avoids accidental deployments |
272
+
273
+ ---
274
+
275
+ ## Gotchas
276
+
277
+ | Issue | Resolution |
278
+ |-------|------------|
279
+ | LifeSciConfigRecord deploy fails with `Enter an assignment level and an assignment ID.` (often ~177 records) | The `LSC Custom Profile` is not in the org. Ensure Step 6 succeeded and the verification query returns 1 record, then re-run Step 7 (upsert-safe) |
280
+ | Standalone profile deploy fails with `no RecordType named Account.Business found` | The profile references RecordTypes. Deploy Objects (Step 2) first; use the skeleton profile at Step 6 |
281
+ | Profile deploy fails with `Property 'viewAllFields' not valid in version 60.0` | The command was run outside the `.lsc-starter-config/LSStarterConfig/` root, so `sf` didn't find `sfdx-project.json` and fell back to API 60.0. `cd .lsc-starter-config/LSStarterConfig` and re-run — the project pins API 65.0 (required for LSC profile permissions) |
282
+ | `sObject type 'lsc4ce__TriggerHandler__c' is not supported` | Handlers are the Tooling entity `LifeScienceTriggerHandler` (fields `DeveloperName`/`IsActive`); query and update with `--use-tooling-api` |
283
+ | Metadata records fail with reference-resolution error | Use the `--plan LifeSciMetadataCategory-plan.json` import, not per-file `--files`; the plan resolves cross-file `@references` |
284
+ | Application deploy fails with "flexipage not found" | Ensure selected flexipages were deployed in Step 12 before Step 13 |
285
+ | Layout deploy fails with "object/field not found" | Ensure Step 2 (objects) completed successfully |
286
+ | LifeSciMetadataRecord deploy order matters | Categories must be deployed before Records, Records before FieldValues |
287
+ | JSON data deploy uses Composite Tree API, not metadata deploy | Use `sf data import tree` for JSON files, not `sf project deploy start` |
288
+
289
+ ---
290
+
291
+ ## Output Expectations
292
+
293
+ Deliverables:
294
+ - All foundation metadata deployed (StandardValueSets, objects, product specs, quick actions, profile)
295
+ - LifeSciConfigRecords and LifeSciMetadataRecords deployed
296
+ - Trigger handlers activated
297
+ - User-selected page layouts deployed with profile assignments updated
298
+ - User-selected flexipages deployed with application file updated
299
+ - Progress summary showing all steps completed
300
+
301
+ ---
302
+
303
+ ## Reference File Index
304
+
305
+ | File | When to read |
306
+ |------|-------------|
307
+ | `references/stage-2-starter-config-state-tracking.md` | Throughout — deployment state schema, failure/recovery prompt, and progress-display formats |
308
+ | `references/stage-2-starter-config-deploy-commands.md` | During Phase 1 — exact CLI commands and expected outputs |
309
+ | `references/stage-2-starter-config-lifesci-metadata-deploy.md` | During Phase 2 — JSON deploy sequence and commands |
310
+ | `references/stage-2-starter-config-trigger-handlers.md` | During Phase 3 — handler names and activation method |
311
+ | `references/stage-2-starter-config-profile-layout-assignments.md` | During Phase 4 — layout-to-object/recordType mapping for profile updates |
312
+ | `references/stage-2-starter-config-application-flexipage-mapping.md` | During Phase 5 — flexipage content mapping for actionOverrides |