@salesforce/afv-skills 1.59.0 → 1.60.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.
- package/package.json +1 -1
- package/skills/agentforce-architecture-analyze/SKILL.md +66 -17
- package/skills/agentforce-architecture-analyze/assets/cli/show_access_token.yaml +4 -7
- package/skills/agentforce-architecture-analyze/references/contract.json +1 -1
- package/skills/agentforce-architecture-analyze/scripts/emit_env.py +2 -2
- package/skills/agentforce-architecture-analyze/scripts/main.py +40 -44
- package/skills/agentforce-architecture-analyze/scripts/rest_client.py +11 -3
- package/skills/agentforce-architecture-analyze/scripts/sf_cli.py +77 -10
- package/skills/agentforce-architecture-analyze/scripts/tests/test_end_to_end_fixture.py +1 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_flow_children_inflation.py +1 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_main_pipeline.py +53 -2
- package/skills/agentforce-architecture-analyze/scripts/tests/test_resolve_creds.py +184 -36
- package/skills/agentforce-architecture-analyze/scripts/tests/test_rest_client.py +17 -0
- package/skills/agentforce-architecture-analyze/scripts/tests/test_sf_cli.py +165 -11
- package/skills/agentforce-architecture-analyze/scripts/tests/test_skill_md_pipeline_block.py +319 -0
- package/skills/agentforce-d360-analyze/SKILL.md +28 -10
- package/skills/agentforce-d360-analyze/scripts/dc.py +200 -50
- package/skills/agentforce-d360-analyze/scripts/discover_sessions.py +10 -6
- package/skills/agentforce-d360-analyze/scripts/fetch_dc.py +22 -6
- package/skills/agentforce-d360-analyze/scripts/resolve_session.py +21 -13
- package/skills/agentforce-d360-analyze/scripts/tests/test_dc_and_resolve_session.py +298 -76
- package/skills/agentforce-d360-analyze/scripts/tests/test_default_target_org.py +432 -0
- package/skills/agentforce-d360-analyze/scripts/tests/test_discover_sessions.py +1 -1
- package/skills/agentforce-d360-analyze/scripts/tests/test_resolve_session_main.py +9 -3
- package/skills/agentforce-d360-analyze/scripts/tests/test_skill_md_prefix_block.py +176 -0
- package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +17 -27
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +7 -17
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +47 -63
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +10 -13
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -46
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +4 -21
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +58 -82
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +16 -315
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +9 -24
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -44
- package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +11 -63
- package/skills/consumer-goods-rtr-datacloud-export-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-dashboard-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-dashboard-custom-kpi-configure/SKILL.md +2 -1
- package/skills/consumer-goods-tpe-datakit-deploy/SKILL.md +2 -1
- package/skills/data360-schema-get/SKILL.md +3 -3
- package/skills/design-systems-slds-validate/references/report-format.md +1 -1
- package/skills/dx-org-manage/SKILL.md +1 -0
- package/skills/dx-org-shape-manage/SKILL.md +1 -0
- package/skills/dx-org-snapshot-manage/SKILL.md +172 -0
- package/skills/dx-org-snapshot-manage/examples/create_error_output.json +16 -0
- package/skills/dx-org-snapshot-manage/examples/create_success_output.json +19 -0
- package/skills/dx-org-snapshot-manage/examples/delete_output.json +9 -0
- package/skills/dx-org-snapshot-manage/examples/get_output.json +19 -0
- package/skills/dx-org-snapshot-manage/examples/list_output.json +36 -0
- package/skills/dx-org-snapshot-manage/references/cli_flags.md +179 -0
- package/skills/dx-org-snapshot-manage/references/snapshot_usage.md +55 -0
- package/skills/dx-org-trial-expiration-check/SKILL.md +1 -1
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +2 -2
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +7 -5
- package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +11 -11
- package/skills/experience-content-media-image-generate/SKILL.md +83 -0
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +84 -0
- package/skills/external-diagram-mermaid-generate/SKILL.md +12 -12
- package/skills/field-service-data-capture-migrate/references/component-mapping.md +1 -1
- package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +1 -2
- package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +1 -0
- package/skills/field-service-data-capture-migrate/references/transformer-rules.md +1 -1
- package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +12 -1
- package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +4 -1
- package/skills/field-service-setup-orchestrator-get/SKILL.md +0 -1
- package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +233 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/accounting-setup.md +117 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/billing-rules-config.md +237 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/billing-settings.md +271 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/demo-policy-config.md +138 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/org-defaults.md +64 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/permissions-config.md +226 -0
- package/skills/insurance-brokerage-agency-billing-configure/references/prerequisites.md +142 -0
- package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +3 -2
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-execution-state-and-recovery.md +3 -3
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-overview.md +68 -45
- package/skills/life-sciences-fieldsalesrep-coordinate/references/stage-5-visit-creation-visit-creation-data.md +17 -18
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +16 -3
- package/skills/life-sciences-kam-coordinate/references/stage-5-data-creation-data.md +16 -13
- package/skills/marketing-message-test/SKILL.md +194 -0
- package/skills/marketing-message-test/references/api-contract.md +333 -0
- package/skills/omnistudio-callable-apex-generate/SKILL.md +3 -3
- package/skills/omnistudio-datamapper-generate/SKILL.md +6 -6
- package/skills/omnistudio-datapacks-deploy/SKILL.md +11 -11
- package/skills/omnistudio-dependencies-analyze/SKILL.md +5 -5
- package/skills/omnistudio-epc-catalog-generate/SKILL.md +6 -6
- package/skills/omnistudio-flexcard-generate/SKILL.md +6 -6
- package/skills/omnistudio-integration-procedure-generate/SKILL.md +6 -6
- package/skills/omnistudio-omniscript-generate/SKILL.md +6 -5
- package/skills/platform-apex-logs-debug/SKILL.md +1 -0
- package/skills/platform-metadata-deploy/SKILL.md +1 -0
- package/skills/platform-models-api-configure/SKILL.md +5 -5
- package/skills/platform-soql-query/SKILL.md +1 -0
- package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +17 -6
- package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +107 -192
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone-action.json +6 -6
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +49 -20
- package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +4 -4
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +224 -290
- package/skills/service-itsm-agentic-setup-incident-sla-configure/references/workflow.md +295 -0
- package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -1
- package/skills/service-itsm-slack-itservice-configure/SKILL.md +2 -1
- package/skills/service-itsm-slack-itservice-configure/references/manage-slack-connection.md +2 -2
- package/skills/service-omni-channel-setup-coordinate/SKILL.md +20 -13
- package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +5 -55
- package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +0 -38
- package/skills/service-omni-command-center-analyze/SKILL.md +2 -3
- package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
- package/skills/tableau-next-asset-create/README.md +65 -0
- package/skills/tableau-next-asset-create/SKILL.md +409 -0
- package/skills/tableau-next-asset-create/references/admin-users.md +149 -0
- package/skills/tableau-next-asset-create/references/ai-readiness.md +355 -0
- package/skills/tableau-next-asset-create/references/alerts.md +111 -0
- package/skills/tableau-next-asset-create/references/build-workflow.md +819 -0
- package/skills/tableau-next-asset-create/references/dashboard-authoring.md +302 -0
- package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +352 -0
- package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +210 -0
- package/skills/tableau-next-asset-create/references/data-understanding.md +387 -0
- package/skills/tableau-next-asset-create/references/deep-reference-index.md +74 -0
- package/skills/tableau-next-asset-create/references/destructive-operations.md +62 -0
- package/skills/tableau-next-asset-create/references/edit-dashboard.md +273 -0
- package/skills/tableau-next-asset-create/references/edit-visualization.md +529 -0
- package/skills/tableau-next-asset-create/references/empty-source-handling.md +104 -0
- package/skills/tableau-next-asset-create/references/ingest-and-metric-gotchas.md +638 -0
- package/skills/tableau-next-asset-create/references/insight-bundle.md +69 -0
- package/skills/tableau-next-asset-create/references/large-flat-file-handling.md +331 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_envelope.json +54 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/_shared-widget-fields.json +122 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/add_page.json +29 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/delete_page.json +27 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/discard_dashboard.json +11 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/move_widget_to_page.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/place_widget_on_page.json +30 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_dashboard.json +16 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/remove_widget_from_page.json +26 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/rename_page.json +28 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/save_dashboard.json +18 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/undo.json +11 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_button_widget.json +69 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_container_widget.json +88 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_filter_widget.json +146 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_metric_widget.json +78 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_navigation_widget.json +80 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_parameter_widget.json +160 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_text_widget.json +103 -0
- package/skills/tableau-next-asset-create/references/schemas/edit-dashboard/upsert_visualization_widget.json +68 -0
- package/skills/tableau-next-asset-create/references/sdm-tool-reference.md +721 -0
- package/skills/tableau-next-asset-create/references/semantic-query-and-enrichment.md +355 -0
- package/skills/tableau-next-asset-create/references/shared-gates.md +322 -0
- package/skills/tableau-next-asset-create/references/sharing-and-promotion.md +306 -0
- package/skills/tableau-next-asset-create/references/tasks/ai-readiness-audit.md +51 -0
- package/skills/tableau-next-asset-create/references/tasks/analyze-data.md +48 -0
- package/skills/tableau-next-asset-create/references/tasks/build-dashboard.md +66 -0
- package/skills/tableau-next-asset-create/references/tasks/build-end-to-end.md +73 -0
- package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +51 -0
- package/skills/tableau-next-asset-create/references/tasks/create-viz.md +58 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-dashboard.md +80 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-sdm.md +106 -0
- package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +40 -0
- package/skills/tableau-next-asset-create/references/tasks/enrich-model.md +68 -0
- package/skills/tableau-next-asset-create/references/tasks/ingest-flat-file.md +68 -0
- package/skills/tableau-next-asset-create/references/tasks/manage-alert.md +35 -0
- package/skills/tableau-next-asset-create/references/tasks/profile-dataset.md +47 -0
- package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +46 -0
- package/skills/tableau-next-asset-create/references/tasks/provision-user.md +39 -0
- package/skills/tableau-next-asset-create/references/tasks/query-model.md +92 -0
- package/skills/tableau-next-asset-create/references/tasks/review-verified-questions.md +42 -0
- package/skills/tableau-next-asset-create/references/tasks/share-asset.md +37 -0
- package/skills/tableau-next-asset-create/references/verified-questions.md +125 -0
- package/skills/tableau-next-asset-create/references/viz-authoring.md +992 -0
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +0 -102
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Phase 4: Org Defaults
|
|
2
|
+
|
|
3
|
+
All five org defaults are set via dedicated headless routes on `BillingGettingStartedController` — no Tooling API required.
|
|
4
|
+
|
|
5
|
+
> **Run after Phase 3.** You need the record IDs for Legal Entity, Billing Treatment, and Tax Treatment from Phase 3.
|
|
6
|
+
|
|
7
|
+
> **Note:** `BillingSettings` is a standard platform Metadata type accessible via Metadata API deploy/retrieve, but `SELECT Id,Metadata FROM BillingSettings` via Tooling API SOQL is not supported on all org types (returns INVALID_TYPE on orgfarm). Use the headless routes below instead — they write the same underlying OrgValues and are the correct headless path.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Step 1: Default Legal Entity
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
dispatch PATCH /headless/invoke/platform/billing-invoice-configurations/set-default-legal-entity-org-value
|
|
15
|
+
{"defaultLegalEntity": "<LEGAL_ENTITY_ID>"}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 2: Default Billing Treatment
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
dispatch PATCH /headless/invoke/platform/currency-conversion-guided-setup/set-default-billing-treatment-org-value
|
|
24
|
+
{"defaultBillingTreatment": "<ADVANCE_BT_ID>"}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 3: Default Tax Treatment
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-default-tax-treatment-org-value
|
|
33
|
+
{"defaultTaxTreatment": "<TAX_TREATMENT_ID>"}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Step 4: DPE Template — GL Account Period Summary
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
dispatch PATCH /headless/invoke/platform/billing-prerequisites/set-default-leap-sum-dpetemplate-name-org-value
|
|
42
|
+
{"defaultLeapSumDPETemplate": "CreateGLAccountingPeriodSummaryRecord"}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Step 5: DPE Template — Accounting Period Closure/Reopen
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
dispatch PATCH /headless/invoke/platform/billing-prerequisites/set-default-leap-reop-dpetemplate-name-org-value
|
|
51
|
+
{"defaultLeapReopDPETemplate": "LegalEntityAccountingPeriodClosureBillingSuite"}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Field Reference
|
|
57
|
+
|
|
58
|
+
| Setting | Route segment | Field | Value source |
|
|
59
|
+
|---------|--------------|-------|--------------|
|
|
60
|
+
| Default Legal Entity | `billing-invoice-configurations/set-default-legal-entity-org-value` | `defaultLegalEntity` | LegalEntity record Id from Phase 3 |
|
|
61
|
+
| Default Billing Treatment | `currency-conversion-guided-setup/set-default-billing-treatment-org-value` | `defaultBillingTreatment` | Advance BT record Id from Phase 3 |
|
|
62
|
+
| Default Tax Treatment | `billing-settings/set-default-tax-treatment-org-value` | `defaultTaxTreatment` | TaxTreatment record Id from Phase 3 |
|
|
63
|
+
| DPE: GL Period Summary | `billing-prerequisites/set-default-leap-sum-dpetemplate-name-org-value` | `defaultLeapSumDPETemplate` | `CreateGLAccountingPeriodSummaryRecord` |
|
|
64
|
+
| DPE: AP Closure/Reopen | `billing-prerequisites/set-default-leap-reop-dpetemplate-name-org-value` | `defaultLeapReopDPETemplate` | `LegalEntityAccountingPeriodClosureBillingSuite` |
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Phase 6: Permissions & FLS
|
|
2
|
+
|
|
3
|
+
## Permission Sets (15 total)
|
|
4
|
+
|
|
5
|
+
| # | Label | API Name |
|
|
6
|
+
|---|-------|----------|
|
|
7
|
+
| 1 | Billing Admin | RevenueLifecycleManagementBillingAdmin |
|
|
8
|
+
| 2 | Basic CSV Data Import | SimpleCsvDataImport |
|
|
9
|
+
| 3 | Context Service Admin | ContextServiceAdminPsl |
|
|
10
|
+
| 4 | Insurance Billing Integration | InsuranceBillingIntegration |
|
|
11
|
+
| 5 | Billing Operations User | RevenueLifecycleManagementBillingOperations |
|
|
12
|
+
| 6 | Collections and Recovery Admin | CollectionsAndRecoveryAdmin |
|
|
13
|
+
| 7 | Generate Invoices From Billing Schedule API | RevenueLifecycleManagementBillingCreateInvoiceFromBillingScheduleApi |
|
|
14
|
+
| 8 | Data Pipelines Base User | AnalyticsStoreUser |
|
|
15
|
+
| 9 | Payment Admin | BillingAdvancedPaymentAdministrator |
|
|
16
|
+
| 10 | DocGen Designer | DocGenDesigner |
|
|
17
|
+
| 11 | Payment Operations User | BillingAdvancedPaymentOperations |
|
|
18
|
+
| 12 | Tax Admin | RevenueLifecycleManagementBillingTaxAdmin |
|
|
19
|
+
| 13 | DocGen User | DocGenUser |
|
|
20
|
+
| 14 | Accounts Receivables Admin | RevenueLifecycleManagementAccountingAdmin |
|
|
21
|
+
| 15 | FSC Insurance | FSCInsurance |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Check Existing Assignments
|
|
26
|
+
|
|
27
|
+
Use the target user ID captured in Phase 1 (`<TARGET_USER_ID>`).
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
dispatch GET /query?q=SELECT+PermissionSet.Name,PermissionSet.Label+FROM+PermissionSetAssignment+WHERE+AssigneeId='<TARGET_USER_ID>'+AND+PermissionSet.Name+IN+('RevenueLifecycleManagementBillingAdmin','SimpleCsvDataImport','ContextServiceAdminPsl','InsuranceBillingIntegration','RevenueLifecycleManagementBillingOperations','CollectionsAndRecoveryAdmin','RevenueLifecycleManagementBillingCreateInvoiceFromBillingScheduleApi','AnalyticsStoreUser','BillingAdvancedPaymentAdministrator','DocGenDesigner','BillingAdvancedPaymentOperations','RevenueLifecycleManagementBillingTaxAdmin','DocGenUser','RevenueLifecycleManagementAccountingAdmin','FSCInsurance')
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Assign Missing Permission Sets
|
|
36
|
+
|
|
37
|
+
For each missing permission set, first resolve its Id by name, then create the assignment.
|
|
38
|
+
|
|
39
|
+
**Step 1 — Resolve PermissionSet Id:**
|
|
40
|
+
```text
|
|
41
|
+
dispatch GET /query?q=SELECT+Id+FROM+PermissionSet+WHERE+Name='<apiName>'+AND+IsOwnedByProfile=false
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Step 2 — Create assignment:**
|
|
45
|
+
```text
|
|
46
|
+
dispatch POST /sobjects/PermissionSetAssignment
|
|
47
|
+
{"AssigneeId": "<TARGET_USER_ID>", "PermissionSetId": "<PS_ID>"}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If assignment fails (e.g., missing license), log the error and continue with remaining sets.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Field-Level Security for InsPolicyBillingInfo
|
|
55
|
+
|
|
56
|
+
**MANDATORY STEP — CANNOT BE SKIPPED.** The 6 billing lookup fields on InsPolicyBillingInfo require Field-Level Security to be visible. Without this, Phase 7 will fail with INVALID_FIELD when creating InsPolicyBillingInfo records.
|
|
57
|
+
|
|
58
|
+
**CRITICAL: The permission set creation is UNCONDITIONALLY MANDATORY.** Even if FLS is already granted via another permission set, you MUST attempt to create the `Insurance_Billing_Field_Access` permission set. The creation may return a DUPLICATE error (which is acceptable and means it already exists), but you MUST NOT skip the creation attempt based on the FLS query results alone.
|
|
59
|
+
|
|
60
|
+
### Verify FLS Exists (For Diagnostic Purposes Only)
|
|
61
|
+
|
|
62
|
+
Query FieldPermissions to confirm FLS status (this is for verification, NOT a gate for creation):
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
dispatch GET /query?q=SELECT+Field+FROM+FieldPermissions+WHERE+SobjectType='InsPolicyBillingInfo'+AND+Field+IN+('InsPolicyBillingInfo.BillingTreatmentId','InsPolicyBillingInfo.TaxTreatmentId','InsPolicyBillingInfo.ProrationPolicyId','InsPolicyBillingInfo.PaymentTermId','InsPolicyBillingInfo.ProductSellingModelId','InsPolicyBillingInfo.LegalEntityId')+AND+PermissionsRead=true+AND+PermissionsEdit=true
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**DO NOT** use this query to decide whether to skip creation. Proceed to creation regardless of the result.
|
|
69
|
+
|
|
70
|
+
### Create Custom Permission Set with FLS (ALWAYS — NO EXCEPTIONS)
|
|
71
|
+
|
|
72
|
+
**UNCONDITIONALLY create the permission set.** Do NOT skip based on FLS query results. If the permission set already exists, the API will return a DUPLICATE error — treat this as success and continue to the assignment step.
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
dispatch POST /services/data/v66.0/headless/metadata
|
|
76
|
+
{
|
|
77
|
+
"type": "PermissionSet",
|
|
78
|
+
"fullName": "Insurance_Billing_Field_Access",
|
|
79
|
+
"xmlRep": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><PermissionSet xmlns=\"http://soap.sforce.com/2006/04/metadata\"><fieldPermissions><field>InsPolicyBillingInfo.BillingTreatmentId</field><readable>true</readable><editable>true</editable></fieldPermissions><fieldPermissions><field>InsPolicyBillingInfo.TaxTreatmentId</field><readable>true</readable><editable>true</editable></fieldPermissions><fieldPermissions><field>InsPolicyBillingInfo.ProrationPolicyId</field><readable>true</readable><editable>true</editable></fieldPermissions><fieldPermissions><field>InsPolicyBillingInfo.PaymentTermId</field><readable>true</readable><editable>true</editable></fieldPermissions><fieldPermissions><field>InsPolicyBillingInfo.ProductSellingModelId</field><readable>true</readable><editable>true</editable></fieldPermissions><fieldPermissions><field>InsPolicyBillingInfo.LegalEntityId</field><readable>true</readable><editable>true</editable></fieldPermissions><hasActivationRequired>false</hasActivationRequired><label>Insurance Billing Field Access</label><description>Grants FLS for InsPolicyBillingInfo billing lookup fields</description></PermissionSet>"
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Expected responses:**
|
|
84
|
+
1. **Success (new creation):**
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"results": [
|
|
88
|
+
{
|
|
89
|
+
"success": true,
|
|
90
|
+
"id": "0PS...",
|
|
91
|
+
"fullName": "Insurance_Billing_Field_Access",
|
|
92
|
+
"errors": []
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
2. **DUPLICATE_VALUE (already exists) — treat as success:**
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"results": [
|
|
102
|
+
{
|
|
103
|
+
"success": false,
|
|
104
|
+
"fullName": "Insurance_Billing_Field_Access",
|
|
105
|
+
"errors": [{"statusCode": "DUPLICATE_VALUE", "message": "..."}]
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**In both cases, proceed to the reconciliation step.** Do NOT treat DUPLICATE_VALUE as an error — it means the permission set already exists, which is acceptable.
|
|
112
|
+
|
|
113
|
+
### Reconcile Field Permissions (MANDATORY — DO NOT SKIP)
|
|
114
|
+
|
|
115
|
+
**CRITICAL: When a pre-existing permission set is found (DUPLICATE_VALUE), verify it has all 6 required FieldPermissions.** A pre-existing `Insurance_Billing_Field_Access` permission set might be missing some of the required fields, which would cause Phase 7 InsPolicyBillingInfo creation to fail with INVALID_FIELD.
|
|
116
|
+
|
|
117
|
+
**First, resolve the permission set ID:**
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
dispatch GET /query?q=SELECT+Id+FROM+PermissionSet+WHERE+Name='Insurance_Billing_Field_Access'+AND+IsOwnedByProfile=false
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Then query existing FieldPermissions:**
|
|
124
|
+
|
|
125
|
+
```text
|
|
126
|
+
dispatch GET /query?q=SELECT+Id,Field,PermissionsRead,PermissionsEdit+FROM+FieldPermissions+WHERE+ParentId='<PS_ID>'+AND+SobjectType='InsPolicyBillingInfo'+AND+Field+IN+('InsPolicyBillingInfo.BillingTreatmentId','InsPolicyBillingInfo.TaxTreatmentId','InsPolicyBillingInfo.ProrationPolicyId','InsPolicyBillingInfo.PaymentTermId','InsPolicyBillingInfo.ProductSellingModelId','InsPolicyBillingInfo.LegalEntityId')
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**For each of the 6 required fields, check the result:**
|
|
130
|
+
- If the field exists with `PermissionsRead=true` and `PermissionsEdit=true`, no action needed
|
|
131
|
+
- If the field exists but either permission is false, PATCH the FieldPermissions record to enable both
|
|
132
|
+
- If the field is missing entirely, CREATE a new FieldPermissions record
|
|
133
|
+
|
|
134
|
+
**To create missing FieldPermissions (repeat for each missing field):**
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
dispatch POST /sobjects/FieldPermissions
|
|
138
|
+
{
|
|
139
|
+
"ParentId": "<PS_ID>",
|
|
140
|
+
"SobjectType": "InsPolicyBillingInfo",
|
|
141
|
+
"Field": "InsPolicyBillingInfo.<FieldName>",
|
|
142
|
+
"PermissionsRead": true,
|
|
143
|
+
"PermissionsEdit": true
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**To fix incomplete FieldPermissions (if read or edit is false):**
|
|
148
|
+
|
|
149
|
+
```text
|
|
150
|
+
dispatch PATCH /sobjects/FieldPermissions/<FP_ID>
|
|
151
|
+
{
|
|
152
|
+
"PermissionsRead": true,
|
|
153
|
+
"PermissionsEdit": true
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
After reconciliation completes, proceed to assignment.
|
|
158
|
+
|
|
159
|
+
### Assign Permission Set to Target User
|
|
160
|
+
|
|
161
|
+
**MANDATORY STEP — DO NOT SKIP.** Verify assignment status and create the assignment if missing.
|
|
162
|
+
|
|
163
|
+
**Then check if already assigned:**
|
|
164
|
+
|
|
165
|
+
```text
|
|
166
|
+
dispatch GET /query?q=SELECT+Id+FROM+PermissionSetAssignment+WHERE+AssigneeId='<TARGET_USER_ID>'+AND+PermissionSetId='<PS_ID>'
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**If the assignment query returns 0 records, create the assignment:**
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
dispatch POST /sobjects/PermissionSetAssignment
|
|
173
|
+
{"AssigneeId": "<TARGET_USER_ID>", "PermissionSetId": "<PS_ID>"}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
If the assignment POST returns `400 DUPLICATE_VALUE`, the user already has the permission set assigned between your query and now (treat as success). Any other error is a failure and must be reported.
|
|
177
|
+
|
|
178
|
+
### Required Fields
|
|
179
|
+
|
|
180
|
+
| Field | Type | Required |
|
|
181
|
+
|-------|------|----------|
|
|
182
|
+
| BillingTreatmentId | Lookup(BillingTreatment) | Read + Edit |
|
|
183
|
+
| TaxTreatmentId | Lookup(TaxTreatment) | Read + Edit |
|
|
184
|
+
| ProrationPolicyId | Lookup(ProrationPolicy) | Read + Edit |
|
|
185
|
+
| PaymentTermId | Lookup(PaymentTerm) | Read + Edit |
|
|
186
|
+
| ProductSellingModelId | Lookup(ProductSellingModel) | Read + Edit |
|
|
187
|
+
| LegalEntityId | Lookup(LegalEntity) | Read + Edit |
|
|
188
|
+
|
|
189
|
+
### Notes
|
|
190
|
+
|
|
191
|
+
- The `/services/data/v66.0/headless/metadata` endpoint requires the `FileBasedMetadataCrud` org entitlement. If missing, the call returns `500 METADATA_CRUD_ERROR`.
|
|
192
|
+
- PermissionSet is allowlisted for full CRUD (create, read, update, delete) via the metadata endpoint.
|
|
193
|
+
- The `xmlRep` field must be a complete PermissionSet XML document following the Metadata API schema.
|
|
194
|
+
- Field permissions use the format `<SobjectType>.<FieldName>` (e.g., `InsPolicyBillingInfo.BillingTreatmentId`).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Field-Level Security
|
|
199
|
+
|
|
200
|
+
Check FLS via standard SOQL.
|
|
201
|
+
|
|
202
|
+
### Required FLS (Read + Edit for System Administrator)
|
|
203
|
+
|
|
204
|
+
**InsurancePolicy:** OriginalPolicyId, PolicyStage, StandardCommissionAmount, TermCommissionAmount
|
|
205
|
+
|
|
206
|
+
**InsurancePolicyCoverage:** OriginalCoverageId, StandardCommissionAmount, TermCommissionAmount
|
|
207
|
+
|
|
208
|
+
**InsurancePolicyAsset:** OriginalAssetId, StandardCommissionAmount, TermCommissionAmount
|
|
209
|
+
|
|
210
|
+
**InsurancePolicyParticipant:** OriginalParticipantId, StandardCommissionAmount, TermCommissionAmount
|
|
211
|
+
|
|
212
|
+
### Query FLS
|
|
213
|
+
|
|
214
|
+
```text
|
|
215
|
+
dispatch GET /query?q=SELECT+Field,PermissionsRead,PermissionsEdit+FROM+FieldPermissions+WHERE+Parent.Profile.Name='System+Administrator'+AND+SobjectType='<OBJECT>'+AND+Field+IN+('<OBJECT>.<FIELD1>','<OBJECT>.<FIELD2>')
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Object-Level CRUD (full access needed)
|
|
219
|
+
|
|
220
|
+
Objects: InsurancePolicyCoverage, InsurancePolicyAsset, InsurancePolicyParticipant, InsurancePolicySurcharge, InsurancePolicyTransaction, InsPolicyTransactionDetail, InsPolicyBillingInfo
|
|
221
|
+
|
|
222
|
+
```text
|
|
223
|
+
dispatch GET /query?q=SELECT+SobjectType,PermissionsRead,PermissionsCreate,PermissionsEdit,PermissionsDelete+FROM+ObjectPermissions+WHERE+Parent.Profile.Name='System+Administrator'+AND+SobjectType+IN+('InsurancePolicyCoverage','InsurancePolicyAsset','InsurancePolicyParticipant','InsurancePolicySurcharge','InsurancePolicyTransaction','InsPolicyTransactionDetail','InsPolicyBillingInfo')
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
If fields are missing access after permission set assignment, provide manual steps (Setup > Object Manager > Field > Set FLS).
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Phase 1: Prerequisites — Licenses & Feature Enablement
|
|
2
|
+
|
|
3
|
+
## Target User
|
|
4
|
+
|
|
5
|
+
Identify the authenticated user before any license or permission operations:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
dispatch GET /chatter/users/me
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Returns `{ id, username, displayName, ... }`. Capture `id` as the target user ID (`<targetUserId>`) for all subsequent license and permission set assignment calls in this workflow.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Required PermissionSetLicenses (19 total)
|
|
16
|
+
|
|
17
|
+
Query all at once:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
dispatch GET /query?q=SELECT+Id,DeveloperName,MasterLabel,Status+FROM+PermissionSetLicense+WHERE+DeveloperName+IN+('InsuranceBrokerageFoundationPsl','InsBrokerageCmsnMgmtPsl','InsBrokeragePolicyManagementPsl','InsBillingIntegrationPsl','ContextServiceAdminPsl','ContextServiceRuntimePsl','CorePricingRunTime','BREDesigner','BRERuntime','CSVDataImportPsl','RevLifecycleMgmtBillingPsl','BillingAdvancedPsl','ProductCatalogManagementAdministratorPsl','SonicEmbeddedStorePsl','UsageDesignTimePsl','UsageRunTimePsl','DataPipelinesAddOnPsl','FSCInsurancePsl','DocGenDesignerPsl')
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| # | MasterLabel | DeveloperName |
|
|
24
|
+
|---|-------------|---------------|
|
|
25
|
+
| 1 | Insurance Brokerage | InsuranceBrokerageFoundationPsl |
|
|
26
|
+
| 2 | Insurance Brokerage Commission Management | InsBrokerageCmsnMgmtPsl |
|
|
27
|
+
| 3 | Insurance Brokerage Policy Management | InsBrokeragePolicyManagementPsl |
|
|
28
|
+
| 4 | Insurance Billing Integration | InsBillingIntegrationPsl |
|
|
29
|
+
| 5 | Context Service Admin | ContextServiceAdminPsl |
|
|
30
|
+
| 6 | Context Service Runtime | ContextServiceRuntimePsl |
|
|
31
|
+
| 7 | Salesforce Pricing Run Time | CorePricingRunTime |
|
|
32
|
+
| 8 | Business Rules Engine Designer | BREDesigner |
|
|
33
|
+
| 9 | Business Rules Engine Runtime | BRERuntime |
|
|
34
|
+
| 10 | CSV Basic Data Import | CSVDataImportPsl |
|
|
35
|
+
| 11 | Billing | RevLifecycleMgmtBillingPsl |
|
|
36
|
+
| 12 | Billing Advanced | BillingAdvancedPsl |
|
|
37
|
+
| 13 | Product Catalog Management Administrator | ProductCatalogManagementAdministratorPsl |
|
|
38
|
+
| 14 | Data Pipelines Base User | SonicEmbeddedStorePsl |
|
|
39
|
+
| 15 | Usage Management Design Time | UsageDesignTimePsl |
|
|
40
|
+
| 16 | Usage Management Run Time | UsageRunTimePsl |
|
|
41
|
+
| 17 | Data Pipelines Add On User Settings | DataPipelinesAddOnPsl |
|
|
42
|
+
| 18 | FSC Insurance | FSCInsurancePsl |
|
|
43
|
+
| 19 | DocGen Designer | DocGenDesignerPsl |
|
|
44
|
+
|
|
45
|
+
If any are missing from the org, stop and tell the user which licenses need provisioning.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## License Assignment Check
|
|
50
|
+
|
|
51
|
+
Query assignments for the target user:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
dispatch GET /query?q=SELECT+PermissionSetLicense.DeveloperName+FROM+PermissionSetLicenseAssign+WHERE+AssigneeId='<targetUserId>'+AND+PermissionSetLicense.DeveloperName+IN+('InsuranceBrokerageFoundationPsl','InsBrokerageCmsnMgmtPsl','InsBrokeragePolicyManagementPsl','InsBillingIntegrationPsl','ContextServiceAdminPsl','ContextServiceRuntimePsl','CorePricingRunTime','BREDesigner','BRERuntime','CSVDataImportPsl','RevLifecycleMgmtBillingPsl','BillingAdvancedPsl','ProductCatalogManagementAdministratorPsl','SonicEmbeddedStorePsl','UsageDesignTimePsl','UsageRunTimePsl','DataPipelinesAddOnPsl','FSCInsurancePsl','DocGenDesignerPsl')
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
For each missing license, assign it:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
dispatch POST /sobjects/PermissionSetLicenseAssign
|
|
61
|
+
{"AssigneeId": "<targetUserId>", "PermissionSetLicenseId": "<licenseId>"}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Feature Enablement
|
|
67
|
+
|
|
68
|
+
Each feature is an independent **read current state → write → verify (re-read)** cycle. Enable in the order below — dependencies are strict.
|
|
69
|
+
|
|
70
|
+
### 1. Context Service
|
|
71
|
+
|
|
72
|
+
**Read:**
|
|
73
|
+
```text
|
|
74
|
+
dispatch GET /connect/contextservice/access/contextServiceEnabled/contextServiceEnabled
|
|
75
|
+
```
|
|
76
|
+
Returns `{ isEnabled: boolean, uniqueIdentifier: "contextServiceEnabled" }`.
|
|
77
|
+
|
|
78
|
+
**Enable (if `isEnabled` is false):**
|
|
79
|
+
```text
|
|
80
|
+
dispatch PUT /connect/contextservice/access/contextServiceEnabled/contextServiceEnabled
|
|
81
|
+
{"isEnabled": true}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Verify:** re-read. Confirm `isEnabled` is `true`.
|
|
85
|
+
|
|
86
|
+
> NOT writable via `/setup/org/preferences/` — use the Context Service Connect endpoint only.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### 2. Brokerage (requires Context Service to be on first)
|
|
91
|
+
|
|
92
|
+
**Read:**
|
|
93
|
+
```text
|
|
94
|
+
dispatch GET /setup/org/preferences/InsBrokerageEnabled
|
|
95
|
+
```
|
|
96
|
+
Returns `{ isPreferenceEnabled: boolean }`.
|
|
97
|
+
|
|
98
|
+
**Enable (if `isPreferenceEnabled` is false):**
|
|
99
|
+
```text
|
|
100
|
+
dispatch PATCH /setup/org/preferences/InsBrokerageEnabled
|
|
101
|
+
{"desiredState": true}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Verify:** re-read. Confirm `isPreferenceEnabled` is `true`.
|
|
105
|
+
|
|
106
|
+
> Enabling Brokerage triggers server-side seeding of default brokerage metadata records.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
### 3. Billing (requires Brokerage to be on first)
|
|
111
|
+
|
|
112
|
+
**Read:**
|
|
113
|
+
```text
|
|
114
|
+
dispatch GET /headless/invoke/platform/billing-settings/get-billing-general-setting-states
|
|
115
|
+
```
|
|
116
|
+
Inspect `BillingEnabled` key in the returned map.
|
|
117
|
+
|
|
118
|
+
**Enable (if `BillingEnabled` is false):**
|
|
119
|
+
```text
|
|
120
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-billing-setup-enabled
|
|
121
|
+
{"billingOrgPrefValue": true}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Verify:** re-read. Confirm `BillingEnabled` is `true`.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### 4. Salesforce Pricing
|
|
129
|
+
|
|
130
|
+
**Read:**
|
|
131
|
+
```text
|
|
132
|
+
dispatch GET /setup/org/preferences/CorePricingPreference
|
|
133
|
+
```
|
|
134
|
+
Returns `{ isPreferenceEnabled: boolean }`.
|
|
135
|
+
|
|
136
|
+
**Enable (if `isPreferenceEnabled` is false):**
|
|
137
|
+
```text
|
|
138
|
+
dispatch PATCH /setup/org/preferences/CorePricingPreference
|
|
139
|
+
{"desiredState": true}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Verify:** re-read. Confirm `isPreferenceEnabled` is `true`.
|
|
@@ -130,9 +130,10 @@ Before presenting the workflow, establish which org to use. Do this **every time
|
|
|
130
130
|
|
|
131
131
|
2. **Ask for confirmation**: "Ready to begin the full Life Sciences Cloud setup? (yes/no)"
|
|
132
132
|
|
|
133
|
-
3. **Download the shared source folder
|
|
133
|
+
3. **Download the shared source folder FRESH (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 one fresh download here and a single delete in Phase 8. **Always re-pull — never reuse an existing folder** (a stale copy could serve outdated CSVs, silently defeating Stage 5's "create strictly from the current CSV" rule, or skip newly added components). Delete any pre-existing `.lsc-starter-config` first, then sparse-checkout only that subtree (the repo is large) fresh into the CWD:
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
+
rm -rf .lsc-starter-config lsstarter-tmp
|
|
136
137
|
git clone --no-checkout --depth 1 --filter=blob:none \
|
|
137
138
|
https://github.com/SalesforceLabs/LSStarterConfig.git lsstarter-tmp
|
|
138
139
|
cd lsstarter-tmp && git sparse-checkout init --cone \
|
|
@@ -140,7 +141,7 @@ Before presenting the workflow, establish which org to use. Do this **every time
|
|
|
140
141
|
mv lsstarter-tmp/Codey ./.lsc-starter-config && rm -rf lsstarter-tmp
|
|
141
142
|
```
|
|
142
143
|
|
|
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.
|
|
144
|
+
> `.lsc-starter-config/LSStarterConfig/` contains its own `sfdx-project.json` (pins `sourceApiVersion: 65.0`) — the deploy step (Phase 3) must run from inside it.
|
|
144
145
|
|
|
145
146
|
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
147
|
- If present → set `sourceFolderDownloaded: true` in `OrchestrationState` and proceed to Phase 2.
|
|
@@ -103,8 +103,6 @@ Step <N>/16 FAILED: <StepName>
|
|
|
103
103
|
| Territory query returns no results | Territory model may not be Active — direct user to `life-sciences-territory-configure` |
|
|
104
104
|
| `FIELD_INTEGRITY_EXCEPTION` on PlaceId in Visit | ContactPointAddress must be linked to the same Account; verify ParentId matches |
|
|
105
105
|
| `INSUFFICIENT_ACCESS` creating ObjectTerritory2Association | This object may require admin access — if rep fails, create this specific record as admin and document the exception |
|
|
106
|
-
| Account active flag | Use the standard `IsActive` (boolean), NOT `IsActive__c`. If the rep lacks FLS to it, omit and set as admin |
|
|
107
|
-
| `Unable to create/update fields: NationalProviderIdentifier` on HealthcareProvider | FLS — rep lacks access. Omit NPI and IsSpeaker (not needed for visit); admin can set later |
|
|
108
106
|
| `entity type cannot be inserted: Object Territory Association` (Step 5) | Rep lacks "Manage Territories"; create as admin (or skip — nothing downstream needs it) |
|
|
109
107
|
| `No such column 'ProductCode' on Product2` (Steps 7–8) | Rep has no create permission on product master data. Create Steps 7–9 as admin |
|
|
110
108
|
| Date format rejected | Use ISO 8601: `YYYY-MM-DDTHH:MM:SS.000+0000` for datetime, `YYYY-MM-DD` for date |
|
|
@@ -183,6 +181,8 @@ After all records are created, display this block (substituting the actual IDs a
|
|
|
183
181
|
|-----------|-----------|
|
|
184
182
|
| **Require `.lsc-starter-config/LSStarterConfig/` to already be present in the CWD; do NOT download or delete it** | The shared folder's download/cleanup is owned by the coordinator (`life-sciences-fieldsalesrep-coordinate`) — one download at start, one delete at end |
|
|
185
183
|
| **Read the `.lsc-starter-config/LSStarterConfig/Data/` CSV for each object and use ONLY its values** — read at execution time, one record per row; never hardcode field values from this stage or reuse values from a prior run | The CSVs are the single source of truth and may change between runs; illustrative values in the steps can be stale |
|
|
184
|
+
| **Build `--values` strictly from the row's CSV columns; only these non-CSV values are permitted** — (a) runtime FK IDs threaded from a prior create, (b) an org-resolved ID (RecordTypeId — including the Product2 RecordType resolved via `DeveloperName='LSC_Sample'`, whose CSV value is a foreign Id — Territory2Id, the Product2/LifeSciMarketableProduct natural-key map), (c) the generated `PlannedVisitStartTime` (NOW). Anything else is a violation. **On recovery, re-`cat` the CSV — never resume from remembered/hardcoded values** | Recovery must not silently reintroduce hardcoded literals; the closed set keeps every field either CSV-sourced or a documented runtime/resolved ID |
|
|
185
|
+
| **Post-create reconciliation:** for every object in Steps 2–13, records created this run == data rows in that object's CSV; the product chain (`product2.csv`, `lifescimarketableproduct.csv`, `productterritoryavailability.csv`, `providervisitproddetailing.csv`, `providervisitproddiscussion.csv`) is multi-row — verify none were dropped. If a count is short, STOP before Phase 5 and report object/expected/actual | Catches the "created 1 of N" regression where only the first product row is created and the rest are silently dropped |
|
|
186
186
|
| Create the **visit records** (Account, HealthcareProvider, ContactPointAddress, ProviderAcctTerritoryInfo, Visit, ProviderVisit, detailing, discussion) as the Sales Rep | Visit ownership must be the field rep for realistic field sales workflows |
|
|
187
187
|
| Create **territory associations (Step 5), product master data (Steps 7–9), and metadata cache (Steps 14–15) as the admin** | The LSC Custom Profile has no create permission on ObjectTerritory2Association, Product2, or LifeSciMarketableProduct; metadata cache records are admin-managed |
|
|
188
188
|
| Ask for rep credentials — never assume | Security; credentials vary per org |
|
|
@@ -191,6 +191,6 @@ After all records are created, display this block (substituting the actual IDs a
|
|
|
191
191
|
| Create records in exact order 2→15, then run the manual iPad validation (Step 16) last | Later records reference earlier IDs (Account→Visit→ProviderVisit); the metadata cache (14–15) must exist before the app can sync the Visit |
|
|
192
192
|
| Step 16 (iPad validation) is **manual** — show the rep credentials (ask for the password if unknown; never use admin creds), give the instructions, and never claim it is done without the user's explicit "yes" | It requires a human with a physical iPad or simulator, logged in as the rep; the skill cannot verify app visibility programmatically |
|
|
193
193
|
| Treat a "yes" on the Step 16 prompt as the end of the LSC setup; on a reported issue, run the troubleshooting checks (territory assignment, ProviderAcctTerritoryInfo, metadata cache freshness) before re-asking | Confirms the end-to-end setup actually works on the device the rep uses |
|
|
194
|
-
| Product2
|
|
194
|
+
| Product2 `RecordTypeId` is org-resolved | `product2.csv` holds a foreign RecordTypeId; resolve the target org's `Product2` RecordType with `DeveloperName='LSC_Sample'` and use that Id instead |
|
|
195
195
|
| Show diagnosis on every failure | User needs to understand what went wrong without investigating CLI output |
|
|
196
196
|
| Wait for user decision on failure — no silent skips | User controls recovery path |
|