@salesforce/afv-skills 1.58.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-bot-upgrade/SKILL.md +3 -1
- 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/agentforce-generate/SKILL.md +21 -1
- package/skills/agentforce-generate/references/known-issues.md +51 -1
- package/skills/agentforce-generate/references/legacy-nga-regression-eval.md +547 -0
- package/skills/agentforce-generate/references/upgrade-legacy-agent-to-agentscript.md +577 -0
- package/skills/agentforce-generate/scripts/upgrade-legacy-nga-analyze.py +404 -0
- package/skills/agentforce-generate/scripts/upgrade-legacy-nga-run-trials.sh +58 -0
- package/skills/agentforce-persona-generate/SKILL.md +505 -0
- package/skills/agentforce-persona-generate/assets/checklist-template.md +100 -0
- package/skills/agentforce-persona-generate/assets/persona-encoding-template.md +252 -0
- package/skills/agentforce-persona-generate/assets/persona-template.md +229 -0
- package/skills/agentforce-persona-generate/assets/sample-dialog-template.md +50 -0
- package/skills/agentforce-persona-generate/assets/workshop-outline-template.md +97 -0
- package/skills/agentforce-persona-generate/examples/concierge-persona.md +189 -0
- package/skills/agentforce-persona-generate/examples/concierge-sample-dialog.md +70 -0
- package/skills/agentforce-persona-generate/examples/drover-persona.md +194 -0
- package/skills/agentforce-persona-generate/examples/drover-sample-dialog.md +62 -0
- package/skills/agentforce-persona-generate/examples/steady-hand-persona.md +188 -0
- package/skills/agentforce-persona-generate/examples/steady-hand-sample-dialog.md +68 -0
- package/skills/agentforce-persona-generate/examples/yt-persona.md +195 -0
- package/skills/agentforce-persona-generate/examples/yt-sample-dialog.md +66 -0
- package/skills/agentforce-persona-generate/references/attributions.md +36 -0
- package/skills/agentforce-persona-generate/references/interaction-design-notes.md +30 -0
- package/skills/agentforce-persona-generate/references/persona-encoding-guide.md +566 -0
- package/skills/agentforce-persona-generate/references/persona-framework.md +796 -0
- package/skills/agentforce-persona-generate/references/refinement-mappings.md +31 -0
- package/skills/agentforce-persona-generate/references/scoring-rubric.md +58 -0
- package/skills/agentforce-persona-generate/references/voice-catalog.json +2327 -0
- package/skills/agentforce-persona-generate/references/workshop-question-policy.md +90 -0
- package/skills/agentforce-persona-generate/references/workshop-scenario-seeds.md +119 -0
- package/skills/agentforce-persona-generate/scripts/parse_agent_yaml.py +223 -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-app-analytics-query/SKILL.md +8 -8
- 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/experience-ui-bundle-app-coordinate/SKILL.md +12 -12
- package/skills/experience-ui-bundle-app-coordinate/references/phase-completion-validation.md +3 -3
- package/skills/experience-ui-bundle-app-coordinate/references/phase-execution-pattern.md +9 -7
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.mjs +132 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.mjs +62 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.mjs +71 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.mjs +95 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.mjs +78 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.mjs +21 -0
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.mjs +28 -0
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +3 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +40 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +7 -5
- package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.mjs +70 -0
- package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.mjs +76 -0
- package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.mjs +115 -0
- package/skills/experience-ui-bundle-metadata-generate/SKILL.md +7 -3
- package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +1 -1
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.mjs +43 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.mjs +131 -0
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.mjs +152 -0
- package/skills/experience-ui-bundle-mfa-configure/references/branding.md +10 -6
- 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/experience-ui-bundle-app-coordinate/scripts/check-dangling-refs.sh +0 -42
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +0 -26
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-1-complete.sh +0 -35
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-4-complete.sh +0 -47
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-phase-6-ready.sh +0 -33
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-prerequisites.sh +0 -20
- package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +0 -15
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +0 -30
- package/skills/experience-ui-bundle-frontend-generate/scripts/check-preconditions.sh +0 -37
- package/skills/experience-ui-bundle-frontend-generate/scripts/resolve-ui-bundle.sh +0 -66
- package/skills/experience-ui-bundle-frontend-generate/scripts/verify-rules.sh +0 -58
- package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +0 -30
- package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +0 -73
- package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +0 -118
- package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +0 -102
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Phase 5: Accounting Setup
|
|
2
|
+
|
|
3
|
+
All creates use `dispatch POST /sobjects/<Object>` with a JSON body.
|
|
4
|
+
All queries use `dispatch GET /query?q=<SOQL>`.
|
|
5
|
+
|
|
6
|
+
## Correct API Names
|
|
7
|
+
|
|
8
|
+
| Concept | API Object | Key Fields |
|
|
9
|
+
|---------|-----------|------------|
|
|
10
|
+
| Accounting Period | AccountingPeriod | Name, FinancialYear, StartDate, EndDate, Status (Open/Closed) |
|
|
11
|
+
| GL Account | GeneralLedgerAccount | AccountingCode (number), AccountingName (display), Type. Name is auto-generated. |
|
|
12
|
+
| GLAAR Rule | GeneralLedgerAcctAsgntRule | Name, TransactionType, LegalEntityId, Status, Priority, FilterCriteria |
|
|
13
|
+
| Journal Entry Rule | GeneralLedgerJrnlEntryRule | GeneralLedgerAcctAsgntRuleId, TransactionAmountField, Percentage, DebitGeneralLedgerAccountId, CreditGeneralLedgerAccountId |
|
|
14
|
+
| LE Accounting Period | LegalEntyAccountingPeriod | LegalEntityId, AccountingPeriodId, Status. Name is auto-generated. |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Step 1: Accounting Periods
|
|
19
|
+
|
|
20
|
+
Compute dates at runtime. Use FY label format: `FY {YYYY}-{YY+1}` (e.g., `FY 2026-27`).
|
|
21
|
+
|
|
22
|
+
**Query existing:**
|
|
23
|
+
```text
|
|
24
|
+
dispatch GET /query?q=SELECT+Id,Name,FinancialYear,StartDate,EndDate,Status+FROM+AccountingPeriod+WHERE+FinancialYear='FY+<year>-<nextYearShort>'+ORDER+BY+StartDate
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Create monthly periods for gaps only.** Naming convention: `FY {year}-{nextYearShort}-{MonthName}{startDay}-{MonthName}{endDay}`
|
|
28
|
+
|
|
29
|
+
Example — January 2026:
|
|
30
|
+
```text
|
|
31
|
+
dispatch POST /sobjects/AccountingPeriod
|
|
32
|
+
{"Name": "FY 2026-27-January1-January31", "FinancialYear": "FY 2026-27", "StartDate": "2026-01-01", "EndDate": "2026-01-31", "Status": "Open"}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 2: Legal Entity Accounting Periods
|
|
38
|
+
|
|
39
|
+
Link each accounting period to the Legal Entity.
|
|
40
|
+
|
|
41
|
+
**Query existing:**
|
|
42
|
+
```text
|
|
43
|
+
dispatch GET /query?q=SELECT+Id,LegalEntityId,AccountingPeriodId,Status+FROM+LegalEntyAccountingPeriod+WHERE+LegalEntityId='<LEGAL_ENTITY_ID>'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Create missing linkages** (Name is auto-generated, do NOT include):
|
|
47
|
+
```text
|
|
48
|
+
dispatch POST /sobjects/LegalEntyAccountingPeriod
|
|
49
|
+
{"LegalEntityId": "<LE_ID>", "AccountingPeriodId": "<AP_ID>", "Status": "Open"}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Step 3: General Ledger Accounts (11 total)
|
|
55
|
+
|
|
56
|
+
**Query by AccountingCode:**
|
|
57
|
+
```text
|
|
58
|
+
dispatch GET /query?q=SELECT+Id,Name,AccountingCode,AccountingName,Type+FROM+GeneralLedgerAccount+WHERE+AccountingCode+IN+('1110','1120','1210','2110','2120','2410','2510','4110','4210','5110','5200')+ORDER+BY+AccountingCode
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
| Code | AccountingName | Type |
|
|
62
|
+
|------|---------------|------|
|
|
63
|
+
| 1110 | Cash - Operating | Asset |
|
|
64
|
+
| 1120 | Cash - Premium Trust | Asset |
|
|
65
|
+
| 1210 | Premiums Receivable - Insured | Asset |
|
|
66
|
+
| 2110 | Accounts Payable - Carrier | Liability |
|
|
67
|
+
| 2120 | Accounts Payable - Carrier Fees | Liability |
|
|
68
|
+
| 2410 | Commission Payable | Liability |
|
|
69
|
+
| 2510 | Tax Payable | Liability |
|
|
70
|
+
| 4110 | Commission Income | Revenue |
|
|
71
|
+
| 4210 | Fee Income | Revenue |
|
|
72
|
+
| 5110 | Commission Expense | Expense |
|
|
73
|
+
| 5200 | Salaries & General Admin | Expense |
|
|
74
|
+
|
|
75
|
+
**Create** (Name is auto-generated, do NOT include):
|
|
76
|
+
```text
|
|
77
|
+
dispatch POST /sobjects/GeneralLedgerAccount
|
|
78
|
+
{"AccountingName": "Cash - Operating", "AccountingCode": "1110", "Type": "Asset", "LegalEntityId": "<LE_ID>"}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Step 4: GLAAR Rules (Parent + Child)
|
|
84
|
+
|
|
85
|
+
GLAAR uses parent-child structure. Debit/credit accounts go on the CHILD, not the parent.
|
|
86
|
+
|
|
87
|
+
**Query existing parents:**
|
|
88
|
+
```text
|
|
89
|
+
dispatch GET /query?q=SELECT+Id,Name,TransactionType,LegalEntityId,Status,FilterCriteria,Priority+FROM+GeneralLedgerAcctAsgntRule+ORDER+BY+Name
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Query existing children:**
|
|
93
|
+
```text
|
|
94
|
+
dispatch GET /query?q=SELECT+Id,GeneralLedgerAcctAsgntRuleId,TransactionAmountField,Percentage,DebitGeneralLedgerAccountId,CreditGeneralLedgerAccountId+FROM+GeneralLedgerJrnlEntryRule+ORDER+BY+GeneralLedgerAcctAsgntRuleId
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Default rule — Posted Invoice Assignment:**
|
|
98
|
+
|
|
99
|
+
Parent (create as Inactive first — Active requires child journal entry rule to exist; valid Status values: Active, Inactive — no Draft):
|
|
100
|
+
```text
|
|
101
|
+
dispatch POST /sobjects/GeneralLedgerAcctAsgntRule
|
|
102
|
+
{"Name": "Posted Invoice Assignment Rule", "TransactionType": "InvoiceLine", "LegalEntityId": "<LE_ID>", "Status": "Inactive", "FilterCriteria": "All", "Priority": 1}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Child:
|
|
106
|
+
```text
|
|
107
|
+
dispatch POST /sobjects/GeneralLedgerJrnlEntryRule
|
|
108
|
+
{"GeneralLedgerAcctAsgntRuleId": "<RULE_ID>", "TransactionAmountField": "ChargeAmount", "Percentage": 100, "DebitGeneralLedgerAccountId": "<GL_1210_ID>", "CreditGeneralLedgerAccountId": "<GL_2110_ID>"}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Activate parent after child exists:
|
|
112
|
+
```text
|
|
113
|
+
dispatch PATCH /sobjects/GeneralLedgerAcctAsgntRule/<RULE_ID>
|
|
114
|
+
{"Status": "Active"}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Available TransactionType values:** Invoice, InvoiceLine, InvoiceLineTax, CreditMemo, CreditMemoLine, CreditMemoLineTax, Payment, Refund, PaymentLineInvoice, PaymentLineInvoiceLine, CreditMemoInvApplication, CreditMemoLineInvoiceLine, RefundLinePayment, DebitMemoLine, DebitMemoLineTax
|
package/skills/insurance-brokerage-agency-billing-configure/references/billing-rules-config.md
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Phase 3: Billing Rules Configuration
|
|
2
|
+
|
|
3
|
+
For every record: query broadly first using `dispatch GET /query?q=<SOQL>`, then create only what is missing. Proceed autonomously without asking.
|
|
4
|
+
|
|
5
|
+
All creates: `dispatch POST /sobjects/<Object>` with a JSON body.
|
|
6
|
+
All updates: `dispatch PATCH /sobjects/<Object>/<recordId>` with a JSON body.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Legal Entity
|
|
11
|
+
|
|
12
|
+
**Object:** `LegalEntity`
|
|
13
|
+
|
|
14
|
+
**Search:**
|
|
15
|
+
```text
|
|
16
|
+
dispatch GET /query?q=SELECT+Id,Name,CompanyName,Description,Status+FROM+LegalEntity+WHERE+Status='Active'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If any active entities exist, use the first one found. Do not add CurrencyIsoCode to this query — LegalEntity has no such field on orgfarm orgs, and including it fails the query with 400 INVALID_FIELD.
|
|
20
|
+
|
|
21
|
+
**Create (if none found):**
|
|
22
|
+
```text
|
|
23
|
+
dispatch POST /sobjects/LegalEntity
|
|
24
|
+
{"Name": "US Legal Entity", "CompanyName": "Agency Sync Brokerages", "Description": "Primary US legal entity for Agency Billing", "Status": "Active"}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Billing Treatments (3 types)
|
|
30
|
+
|
|
31
|
+
**Object:** `BillingTreatment` + child `BillingTreatmentItem`
|
|
32
|
+
|
|
33
|
+
**Search all:**
|
|
34
|
+
```text
|
|
35
|
+
dispatch GET /query?q=SELECT+Id,Name,Status,ExcludeFromBilling,IsMilestoneBilling,(SELECT+Id,Name,Status,ProcessingOrder,Type,Percentage,BillingType,MilestoneType,MilestoneStartDate,MilestoneStartDateOffset,MilestoneStartDateOffsetUnit+FROM+BillingTreatmentItems)+FROM+BillingTreatment+WHERE+Status='Active'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Match criteria:**
|
|
39
|
+
- Advance: `IsMilestoneBilling=false`, Name contains "Advance", child BTI with `BillingType='Advance'`
|
|
40
|
+
- Arrears: `IsMilestoneBilling=false`, Name contains "Arrear", child BTI with `BillingType='Arrears'`
|
|
41
|
+
- Milestone 60-20-20: `IsMilestoneBilling=true`, 3 child BTIs with percentages 60/20/20
|
|
42
|
+
|
|
43
|
+
**Creation sequence (MUST follow this order):**
|
|
44
|
+
1. Create BillingTreatment in `Status='Draft'`
|
|
45
|
+
2. Create all BillingTreatmentItems in `Status='Active'`
|
|
46
|
+
3. Update BillingTreatment to `Status='Active'`
|
|
47
|
+
|
|
48
|
+
### Advance
|
|
49
|
+
|
|
50
|
+
Parent:
|
|
51
|
+
```text
|
|
52
|
+
dispatch POST /sobjects/BillingTreatment
|
|
53
|
+
{"Name": "Advance Billing Treatment", "ExcludeFromBilling": "No", "IsMilestoneBilling": false, "Status": "Draft"}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Item (Percentage is required even for Advance/Arrears types; CurrencyIsoCode is NOT a field on this object):
|
|
57
|
+
```text
|
|
58
|
+
dispatch POST /sobjects/BillingTreatmentItem
|
|
59
|
+
{"Name": "Advance Billing Treatment Item", "Status": "Active", "Type": "Percentage", "Percentage": 100, "BillingType": "Advance", "BillingTreatmentId": "<BT_ID>"}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Activate:
|
|
63
|
+
```text
|
|
64
|
+
dispatch PATCH /sobjects/BillingTreatment/<BT_ID>
|
|
65
|
+
{"Status": "Active"}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Arrears
|
|
69
|
+
|
|
70
|
+
Parent:
|
|
71
|
+
```text
|
|
72
|
+
dispatch POST /sobjects/BillingTreatment
|
|
73
|
+
{"Name": "Arrear Billing Treatment", "ExcludeFromBilling": "No", "IsMilestoneBilling": false, "Status": "Draft"}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Item:
|
|
77
|
+
```text
|
|
78
|
+
dispatch POST /sobjects/BillingTreatmentItem
|
|
79
|
+
{"Name": "Arrear Billing Treatment Item", "Status": "Active", "Type": "Percentage", "Percentage": 100, "BillingType": "Arrears", "BillingTreatmentId": "<BT_ID>"}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Activate:
|
|
83
|
+
```text
|
|
84
|
+
dispatch PATCH /sobjects/BillingTreatment/<BT_ID>
|
|
85
|
+
{"Status": "Active"}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Milestone 60-20-20
|
|
89
|
+
|
|
90
|
+
Parent:
|
|
91
|
+
```text
|
|
92
|
+
dispatch POST /sobjects/BillingTreatment
|
|
93
|
+
{"Name": "Hybrid 60-20-20", "ExcludeFromBilling": "No", "IsMilestoneBilling": true, "Status": "Draft"}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Items (3) — no CurrencyIsoCode on this object:
|
|
97
|
+
```text
|
|
98
|
+
dispatch POST /sobjects/BillingTreatmentItem
|
|
99
|
+
{"Name": "60% Milestone", "Status": "Active", "ProcessingOrder": 1, "Type": "Percentage", "Percentage": 60, "BillingType": "None", "MilestoneType": "Date", "MilestoneStartDate": "OrderProductActivation", "MilestoneStartDateOffset": 10, "MilestoneStartDateOffsetUnit": "Days", "BillingTreatmentId": "<BT_ID>"}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
dispatch POST /sobjects/BillingTreatmentItem
|
|
104
|
+
{"Name": "20% Milestone - Second", "Status": "Active", "ProcessingOrder": 2, "Type": "Percentage", "Percentage": 20, "BillingType": "None", "MilestoneType": "Date", "MilestoneStartDate": "OrderProductActivation", "MilestoneStartDateOffset": 2, "MilestoneStartDateOffsetUnit": "Months", "BillingTreatmentId": "<BT_ID>"}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
dispatch POST /sobjects/BillingTreatmentItem
|
|
109
|
+
{"Name": "20% Milestone - Third", "Status": "Active", "ProcessingOrder": 3, "Type": "Percentage", "Percentage": 20, "BillingType": "None", "MilestoneType": "Date", "MilestoneStartDate": "OrderProductActivation", "MilestoneStartDateOffset": 3, "MilestoneStartDateOffsetUnit": "Months", "BillingTreatmentId": "<BT_ID>"}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Activate:
|
|
113
|
+
```text
|
|
114
|
+
dispatch PATCH /sobjects/BillingTreatment/<BT_ID>
|
|
115
|
+
{"Status": "Active"}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 3. Tax Engine
|
|
121
|
+
|
|
122
|
+
**Object:** `TaxEngine` (name field is `TaxEngineName`, NOT `Name`)
|
|
123
|
+
|
|
124
|
+
**Search:**
|
|
125
|
+
```text
|
|
126
|
+
dispatch GET /query?q=SELECT+Id,TaxEngineName,Type,Status+FROM+TaxEngine+WHERE+Type='InsuranceTaxProration'+AND+Status='Active'
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Create:**
|
|
130
|
+
```text
|
|
131
|
+
dispatch POST /sobjects/TaxEngine
|
|
132
|
+
{"TaxEngineName": "Insurance Tax Proration Engine", "Type": "InsuranceTaxProration", "Status": "Active"}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 4. Tax Treatment
|
|
138
|
+
|
|
139
|
+
**Object:** `TaxTreatment`
|
|
140
|
+
|
|
141
|
+
**Search:**
|
|
142
|
+
```text
|
|
143
|
+
dispatch GET /query?q=SELECT+Id,Name,Status,IsTaxable,TaxEngineId+FROM+TaxTreatment+WHERE+IsTaxable=true+AND+Status='Active'
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Create:**
|
|
147
|
+
```text
|
|
148
|
+
dispatch POST /sobjects/TaxTreatment
|
|
149
|
+
{"Name": "Passthrough Tax", "Status": "Active", "IsTaxable": true, "TaxEngineId": "<TAX_ENGINE_ID>"}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 5. Payment Term + Item
|
|
155
|
+
|
|
156
|
+
**Object:** `PaymentTerm` + child `PaymentTermItem`
|
|
157
|
+
|
|
158
|
+
**Search:**
|
|
159
|
+
```text
|
|
160
|
+
dispatch GET /query?q=SELECT+Id,Name,IsDefault,Status,(SELECT+Id,Name,Type,PaymentTimeframe,Period,PeriodUnit+FROM+PaymentTermItems)+FROM+PaymentTerm+WHERE+Status='Active'
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Create parent (Status and IsDefault must be set AFTER child item exists):**
|
|
164
|
+
```text
|
|
165
|
+
dispatch POST /sobjects/PaymentTerm
|
|
166
|
+
{"Name": "Net 10"}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Create item** (Type is `Period-Based`, PeriodUnit is singular):
|
|
170
|
+
```text
|
|
171
|
+
dispatch POST /sobjects/PaymentTermItem
|
|
172
|
+
{"Type": "Period-Based", "PaymentTimeframe": "Standard", "Period": 10, "PeriodUnit": "Days", "PaymentTermId": "<PT_ID>"}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Activate parent after item exists:**
|
|
176
|
+
```text
|
|
177
|
+
dispatch PATCH /sobjects/PaymentTerm/<PT_ID>
|
|
178
|
+
{"Status": "Active", "IsDefault": true}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
> Platform enforces: cannot save PaymentTerm with Status=Active until a child PaymentTermItem exists. Create parent without Status, add child, then PATCH to Active+IsDefault.
|
|
182
|
+
|
|
183
|
+
> **Org prerequisite:** PaymentTerm is only writable when billing features are enabled (Phase 1 Step 3). On orgs without billing, the sObject describe returns `createable: false` — this is expected and does not indicate a gap in the skill.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 6. Product Selling Models (5 records)
|
|
188
|
+
|
|
189
|
+
**Object:** `ProductSellingModel`
|
|
190
|
+
|
|
191
|
+
**Search all:**
|
|
192
|
+
```text
|
|
193
|
+
dispatch GET /query?q=SELECT+Id,Name,SellingModelType,PricingTerm,PricingTermUnit,Status+FROM+ProductSellingModel+ORDER+BY+Name
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Match by SellingModelType + PricingTermUnit (fuzzy on Name):**
|
|
197
|
+
|
|
198
|
+
| SellingModelType | PricingTermUnit | Default Name |
|
|
199
|
+
|-----------------|-----------------|--------------|
|
|
200
|
+
| OneTime | Months | One time |
|
|
201
|
+
| TermDefined | Months | Term Defined - Monthly |
|
|
202
|
+
| TermDefined | Quarterly | Term Defined - Quarterly |
|
|
203
|
+
| TermDefined | Semi-Annual | Term Defined - Semi Annual |
|
|
204
|
+
| TermDefined | Annual | Term Defined - Annual |
|
|
205
|
+
|
|
206
|
+
**Create pattern (TermDefined types):**
|
|
207
|
+
```text
|
|
208
|
+
dispatch POST /sobjects/ProductSellingModel
|
|
209
|
+
{"Name": "<NAME>", "SellingModelType": "<TYPE>", "PricingTerm": 1, "PricingTermUnit": "<UNIT>", "Status": "Active"}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Create pattern (OneTime — no PricingTerm or PricingTermUnit):**
|
|
213
|
+
```text
|
|
214
|
+
dispatch POST /sobjects/ProductSellingModel
|
|
215
|
+
{"Name": "One time", "SellingModelType": "OneTime", "Status": "Active"}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
> Platform enforces: OneTime selling models cannot have PricingTerm or PricingTermUnit set. Omit both fields.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## 7. Proration Policy
|
|
223
|
+
|
|
224
|
+
**Object:** `ProrationPolicy` (has NO Status field)
|
|
225
|
+
|
|
226
|
+
**Search:**
|
|
227
|
+
```text
|
|
228
|
+
dispatch GET /query?q=SELECT+Id,Name,RemainderStrategy,ArePartialPeriodsAllowed,ProrationPolicyType+FROM+ProrationPolicy
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Match:** `RemainderStrategy='AddToLast'` AND `ArePartialPeriodsAllowed=false`
|
|
232
|
+
|
|
233
|
+
**Create:**
|
|
234
|
+
```text
|
|
235
|
+
dispatch POST /sobjects/ProrationPolicy
|
|
236
|
+
{"Name": "No Partial Proration Add to Last", "RemainderStrategy": "AddToLast", "ArePartialPeriodsAllowed": false, "ProrationPolicyType": "StandardTimePeriods"}
|
|
237
|
+
```
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Phase 2: Billing Settings
|
|
2
|
+
|
|
3
|
+
## Read Current State
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
dispatch GET /headless/invoke/platform/billing-settings/get-billing-general-setting-states
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Returns a map of all current billing setting states. Compare each key against the desired values below and write only settings that differ.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Billing Settings
|
|
14
|
+
|
|
15
|
+
### Transaction Journal Creation
|
|
16
|
+
|
|
17
|
+
**Key in read response:** `TxnJournalCreationEnabled`
|
|
18
|
+
**Desired:** `true`
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-txn-journal-creation-enabled
|
|
22
|
+
{"TxnJournalCreationEnabled": true}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### Payment Schedules and Items Creation
|
|
28
|
+
|
|
29
|
+
**Key in read response:** `PaymentScheduleAutomationEnabled`
|
|
30
|
+
**Desired:** `true`
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-payment-schedule-automation-enabled
|
|
34
|
+
{"paymentScheduleAutomation": true}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### Convert Negative Invoice Lines to Credit Memo Lines
|
|
40
|
+
|
|
41
|
+
**Key in read response:** `ApplyConvertedNegIL`
|
|
42
|
+
**Desired:** `true`
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-apply-converted-neg-il
|
|
46
|
+
{"applyConvertedNegIL": true}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Credit Memo Application to Posted Invoices
|
|
52
|
+
|
|
53
|
+
**Key in read response:** `PaymentApplicationToInvEnabled`
|
|
54
|
+
**Desired:** `true`
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-payment-application-to-inv-enabled
|
|
58
|
+
{"PaymentApplicationToInvEnabled": true}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### Invoice PDF Generation + Invoice Email Delivery (Tooling API)
|
|
64
|
+
|
|
65
|
+
These two fields live on the `BillingSettings` Metadata type. No headless route exists — use the Tooling API read/mutate/write-back pattern (same approach as `InsuranceBrokerageSettings`).
|
|
66
|
+
|
|
67
|
+
**Read current state (captures the full blob — required for the PATCH):**
|
|
68
|
+
```text
|
|
69
|
+
dispatch GET /tooling/query?q=SELECT+Id,Metadata+FROM+BillingSettings
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Returns one record with `Id` and a `Metadata` object containing all billing settings fields.
|
|
73
|
+
|
|
74
|
+
**Write (must send the full Metadata blob — partial writes wipe omitted fields):**
|
|
75
|
+
|
|
76
|
+
Take the `Metadata` object from the read response, set the two invoice fields to `true`, then PATCH the entire blob back:
|
|
77
|
+
|
|
78
|
+
```text
|
|
79
|
+
dispatch PATCH /tooling/sobjects/BillingSettings/<id>
|
|
80
|
+
{
|
|
81
|
+
"Metadata": {
|
|
82
|
+
"<all other fields from read, unchanged>": "...",
|
|
83
|
+
"enableInvoicePdfGeneration": true,
|
|
84
|
+
"enableInvoiceEmailDelivery": true
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Verify:** re-read `SELECT Metadata FROM BillingSettings` and confirm both fields are `true`.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Billing Context Definition
|
|
94
|
+
|
|
95
|
+
**Desired:** `BillingContext__stdctx`
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-billing-ctx-def-org-value-and-get-mapping
|
|
99
|
+
{"selectedContextDefinition": "BillingContext__stdctx"}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Billing Context Source Mapping
|
|
105
|
+
|
|
106
|
+
**Desired:** `OrderEntitiesMapping`
|
|
107
|
+
|
|
108
|
+
**First, get available mapping options** (returned by the context definition setter):
|
|
109
|
+
```text
|
|
110
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-billing-ctx-def-org-value-and-get-mapping
|
|
111
|
+
{"selectedContextDefinition": "BillingContext__stdctx"}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This returns the available mappings. Then set the source mapping:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
dispatch PATCH /headless/invoke/platform/billing-tax-configurations/set-billing-cxt-def-mapping-org-value
|
|
118
|
+
{"selectedMapping": "OrderEntitiesMapping"}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Intra Context Custom Mapping
|
|
124
|
+
|
|
125
|
+
**Desired:** `BSGEntitiesMapping`
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-billing-intra-cxt-def-mapping-org-value
|
|
129
|
+
{"selectedIntraContextCustomMapping": "BSGEntitiesMapping"}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### Rule-Based Credit and Payment Application Order
|
|
135
|
+
|
|
136
|
+
**Desired:** `{"first":"Payments","rules":["EM","EA","OI","HI"]}`
|
|
137
|
+
- `first: Payments` — apply payments before credit memos
|
|
138
|
+
- `EM` = Exact Match, `EA` = Exact Account, `OI` = Oldest Invoice, `HI` = Highest Invoice
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
dispatch PATCH /headless/invoke/platform/billing-settings/set-rules-based-application-order-org-value
|
|
142
|
+
{"rulesBasedApplicationOrder": "{\"first\":\"Payments\",\"rules\":[\"EM\",\"EA\",\"OI\",\"HI\"]}"}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## InsuranceBrokerage Settings
|
|
148
|
+
|
|
149
|
+
> **Must run after Billing is enabled (Phase 1 Step 3).** The `InsuranceSettingsPageController` returns `NOT_IMPLEMENTED` until billing setup is on.
|
|
150
|
+
|
|
151
|
+
### Generate Insurance Policy Transaction Details (iptdEnabledForBrokerage)
|
|
152
|
+
|
|
153
|
+
**Read current state:**
|
|
154
|
+
```text
|
|
155
|
+
dispatch GET /setup/org/values/I_P_T_D_ENABLED_FOR_BROKERAGE
|
|
156
|
+
```
|
|
157
|
+
Returns `{ booleanValue: boolean }`.
|
|
158
|
+
|
|
159
|
+
**Enable (must run BEFORE InsuranceBilling):**
|
|
160
|
+
```text
|
|
161
|
+
dispatch PATCH /setup/org/values/I_P_T_D_ENABLED_FOR_BROKERAGE
|
|
162
|
+
{"orgValue": true}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Verify:** re-read, confirm `booleanValue = true`.
|
|
166
|
+
|
|
167
|
+
> NOT via `handle-pref-enable` — that route's write guard checks `InsuranceBrokerageSettings` Metadata type which may not be present. Use `setup/org/values` instead (the same path the UI calls via `SetupApiFamilyController.updateOrgValue`).
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Generate Insurance Policy Transactions (iptEnabledForBrokerage)
|
|
172
|
+
|
|
173
|
+
**Read current state:**
|
|
174
|
+
```text
|
|
175
|
+
dispatch GET /setup/org/values/I_P_T_ENABLED_FOR_BROKERAGE
|
|
176
|
+
```
|
|
177
|
+
Returns `{ booleanValue: boolean }`.
|
|
178
|
+
|
|
179
|
+
**Enable (requires I_P_T_D_ENABLED_FOR_BROKERAGE to be on first):**
|
|
180
|
+
```text
|
|
181
|
+
dispatch PATCH /setup/org/values/I_P_T_ENABLED_FOR_BROKERAGE
|
|
182
|
+
{"orgValue": true}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Verify:** re-read, confirm `booleanValue = true`.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### Context Mapping Fields
|
|
190
|
+
|
|
191
|
+
These three context mapping fields use the same `/setup/org/values/*` pattern as IPTD and IPT above (backed by `SetupApiFamilyController.updateOrgValue`).
|
|
192
|
+
|
|
193
|
+
#### insBrkBillingCtxDef
|
|
194
|
+
|
|
195
|
+
**Read current state:**
|
|
196
|
+
```text
|
|
197
|
+
dispatch GET /setup/org/values/INS_BRK_BILLING_CTX_DEF
|
|
198
|
+
```
|
|
199
|
+
Returns `{ booleanValue, dateValue, numberValue, stringValue }`.
|
|
200
|
+
|
|
201
|
+
**Set (if not already correct):**
|
|
202
|
+
```text
|
|
203
|
+
dispatch PATCH /setup/org/values/INS_BRK_BILLING_CTX_DEF
|
|
204
|
+
{"orgValue": "InsBillingTransactionContext__stdctx"}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
**Verify:** re-read, confirm `stringValue = "InsBillingTransactionContext__stdctx"`.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
#### insBrkBillingCtxSchedGrpMap
|
|
212
|
+
|
|
213
|
+
**Read current state:**
|
|
214
|
+
```text
|
|
215
|
+
dispatch GET /setup/org/values/INS_BRK_BILLING_CTX_SCHED_GRP_MAP
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Set (if not already correct):**
|
|
219
|
+
```text
|
|
220
|
+
dispatch PATCH /setup/org/values/INS_BRK_BILLING_CTX_SCHED_GRP_MAP
|
|
221
|
+
{"orgValue": "BSGEntitiesMapping"}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Verify:** re-read, confirm `stringValue = "BSGEntitiesMapping"`.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
#### insBrkBillingCtxTnxMapping
|
|
229
|
+
|
|
230
|
+
**Read current state:**
|
|
231
|
+
```text
|
|
232
|
+
dispatch GET /setup/org/values/INS_BRK_BILLING_CTX_TNX_MAPPING
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Set (if not already correct):**
|
|
236
|
+
```text
|
|
237
|
+
dispatch PATCH /setup/org/values/INS_BRK_BILLING_CTX_TNX_MAPPING
|
|
238
|
+
{"orgValue": "InsBillingTransactionMapping"}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
**Verify:** re-read, confirm `stringValue = "InsBillingTransactionMapping"`.
|
|
242
|
+
|
|
243
|
+
> **Note:** The Tooling API path (`SELECT Metadata FROM InsuranceBrokerageSettings`) returns `INVALID_TYPE` on standard orgfarm orgs. These `/setup/org/values/*` routes are the correct headless path and work universally.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Design Document Templates
|
|
248
|
+
|
|
249
|
+
**Must run after billing is enabled (Phase 1, Step 3).** The `BillingGettingStartedController` is only available once billing setup is on.
|
|
250
|
+
|
|
251
|
+
**Read current state:**
|
|
252
|
+
```text
|
|
253
|
+
dispatch GET /headless/invoke/platform/document-generation-setting/get-init-data
|
|
254
|
+
```
|
|
255
|
+
Returns `{ canUserAccessDocGenSettingsUI, nameSpacePrefix }`.
|
|
256
|
+
|
|
257
|
+
**Check if already enabled:**
|
|
258
|
+
```text
|
|
259
|
+
dispatch GET /headless/invoke/platform/document-generation-setting/fetch-doc-gen-setting-records
|
|
260
|
+
```
|
|
261
|
+
Returns count of existing DocGen setting records. If `0`, the feature is not yet enabled.
|
|
262
|
+
|
|
263
|
+
**Enable via billing setup route** (after billing is on):
|
|
264
|
+
```text
|
|
265
|
+
dispatch PATCH /headless/invoke/platform/accounting-guided-setup/setup-billing-doc-gen-and-fetch-invoice-template-data
|
|
266
|
+
{"BillingDocGenEnabled": true}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
> This route was validated in the route corpus. On the probe org it returned `NOT_IMPLEMENTED` because billing was not yet enabled — this is expected. Run this step after Phase 1 Step 3 (billing enablement) completes.
|
|
270
|
+
|
|
271
|
+
**Verify:** re-call `GET /headless/invoke/platform/document-generation-setting/fetch-doc-gen-setting-records` and confirm count > 0.
|