@salesforce/afv-skills 1.68.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/package.json +1 -1
  2. package/skills/afcc-setup-coordinate/SKILL.md +348 -0
  3. package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
  4. package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
  5. package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
  6. package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
  7. package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
  8. package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
  9. package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
  10. package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
  11. package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
  12. package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
  13. package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
  14. package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
  15. package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
  16. package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
  17. package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
  18. package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
  19. package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
  20. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
  21. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
  22. package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
  23. package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
  24. package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
  25. package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
  26. package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
  27. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
  28. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
  29. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
  30. package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
  31. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
  32. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
  33. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
  34. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
  35. package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
  36. package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
  37. package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
  38. package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
  39. package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
  40. package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
  41. package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
  42. package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
  43. package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
  44. package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
  45. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
  46. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
  47. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
  48. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
  49. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
  50. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
  51. package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
  52. package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
  53. package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
  54. package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
  55. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +23 -31
  56. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +2 -1
  57. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +118 -2
  58. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +2 -2
  59. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +9 -2
  60. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +12 -1
  61. package/skills/commerce-react-storefront-create/SKILL.md +54 -21
  62. package/skills/dx-lifecycle-center/SKILL.md +24 -18
  63. package/skills/dx-lifecycle-center/examples/workflows.md +57 -34
  64. package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
  65. package/skills/dx-lifecycle-center/references/connect-org.md +59 -28
  66. package/skills/dx-lifecycle-center/references/deploy.md +3 -3
  67. package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
  68. package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
  69. package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
  70. package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
  71. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
  72. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
  73. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
  74. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +2 -3
  75. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +10 -7
  76. package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
  77. package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
  78. package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
  79. package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
  80. package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
  81. package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
  82. package/skills/experience-afv-analytics-query/SKILL.md +239 -0
  83. package/skills/experience-afv-analytics-query/references/references.md +176 -0
  84. package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
  85. package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
  86. package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
  87. package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
  88. package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
  89. package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
  90. package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
  91. package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
  92. package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
  93. package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
  94. package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
  95. package/skills/experience-app-mcp-generate/SKILL.md +174 -0
  96. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
  97. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
  98. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
  99. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
  100. package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
  101. package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
  102. package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
  103. package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
  104. package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
  105. package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
  106. package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
  107. package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
  108. package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
  109. package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
  110. package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
  111. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
  112. package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
  113. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
  114. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
  115. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
  116. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
  117. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
  118. package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
  119. package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
  120. package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
  121. package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
  122. package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
  123. package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
  124. package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
  125. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
  126. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
  127. package/skills/platform-custom-field-generate/SKILL.md +24 -16
  128. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
  129. package/skills/platform-custom-setting-generate/SKILL.md +1 -0
  130. package/skills/platform-dataspace-access-configure/SKILL.md +25 -10
  131. package/skills/platform-flexipage-generate/SKILL.md +7 -10
  132. package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
  133. package/skills/platform-policy-rule-generate/SKILL.md +9 -7
  134. package/skills/platform-policy-rule-generate/references/condition-model.md +3 -3
  135. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +9 -1
  136. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +9 -1
  137. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +1 -2
  138. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +1 -2
  139. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +1 -2
  140. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +1 -2
  141. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +1 -0
  142. package/skills/platform-policy-rule-generate/references/headless-transport.md +2 -2
  143. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +1 -1
  144. package/skills/platform-policy-rule-generate/references/policy-shapes.md +33 -0
  145. package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
  146. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +5 -5
  147. package/skills/platform-report-generate/SKILL.md +20 -1
  148. package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
  149. package/skills/platform-report-generate/references/verification-checklist.md +12 -0
  150. package/skills/service-digital-engagement-channel-configure/SKILL.md +44 -107
  151. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -0
  152. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
  153. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
  154. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
  155. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  156. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +18 -14
  157. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
  158. package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
  159. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
  160. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
  161. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
  162. package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
  163. package/skills/service-e911-configure/SKILL.md +242 -0
  164. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
  165. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
  166. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
  167. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
  168. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
  169. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
  170. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
  171. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
  172. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
  173. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
  174. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
  175. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
  176. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
  177. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
  178. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +0 -65
  179. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +0 -32
  180. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +0 -57
  181. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +0 -21
  182. package/skills/dx-lifecycle-center/scripts/card-policy.jq +0 -71
  183. package/skills/dx-lifecycle-center/scripts/fill-widget.jq +0 -29
  184. package/skills/dx-lifecycle-center/scripts/widget.sh +0 -28
  185. package/skills/experience-content-media-image-generate/SKILL.md +0 -83
  186. package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
  187. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
  188. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
@@ -0,0 +1,106 @@
1
+ # Push upgrade — object reference
2
+
3
+ All live on the **Dev Hub / License Management Org**, not subscriber orgs.
4
+
5
+ **Query with the standard data API — NOT `--use-tooling-api`.** `PackageSubscriber`,
6
+ `PackagePushRequest`, `PackagePushJob`, and `PackagePushError` return "sObject type not supported"
7
+ under the Tooling API; query them with plain `sf data query --target-org <devhub> --query "..."`.
8
+ `MetadataPackage` and `MetadataPackageVersion` work under either API — use the standard one for
9
+ consistency. (Field lists below were verified via `sf sobject describe`, which works on both APIs and
10
+ is not a guarantee the object is Tooling-queryable — the query itself is.)
11
+
12
+ ---
13
+
14
+ ## PackageSubscriber — who has the package installed
15
+
16
+ The discovery object. One row per org/package install.
17
+
18
+ | Field | Type | Notes |
19
+ |-------|------|-------|
20
+ | `Id` | id | |
21
+ | `MetadataPackageId` | reference | The **033** package ID. Filter on this to scope to your package. |
22
+ | `MetadataPackageVersionId` | reference | The **04t** version the subscriber currently has. Compare to your target to find orgs that are behind. |
23
+ | `InstalledStatus` | picklist | `i` = installed, `u` = not installed / uninstalled. Filter `= 'i'`. |
24
+ | `OrgKey` | string | **The org ID that goes in the schedule CSV / `--org-list`.** |
25
+ | `OrgName` | string | Subscriber org name. |
26
+ | `OrgType` | picklist | `Production`, `Sandbox`. Pilot in sandboxes first. |
27
+ | `OrgStatus` | picklist | `Active`, `Demo`, `Free`, `Inactive`, `Trial`. Usually skip `Inactive`. |
28
+ | `InstanceName` | string | Instance (e.g. `NA123`) — useful proxy for time-zone batching. |
29
+ | `ParentOrg` | string | Parent org key (sandboxes trace to a parent). |
30
+ | `IsCustomUpgradeAllowed` | boolean | Whether custom upgrade handling is allowed. |
31
+ | `CustomUpgradeType` | picklist | `None`, `BlockedBySubscriber`. |
32
+ | `HasRestrictionEnabled` | boolean | `true` = subscriber has restricted push upgrades — **exclude these**; pushing to them errors. |
33
+ | `SystemModstamp` | datetime | |
34
+
35
+ ---
36
+
37
+ ## MetadataPackageVersion — resolve/validate the target version
38
+
39
+ | Field | Type | Notes |
40
+ |-------|------|-------|
41
+ | `Id` | id | The **04t** version ID. |
42
+ | `MetadataPackageId` | reference | The **033** package. |
43
+ | `Name` | string | Version name. |
44
+ | `MajorVersion` / `MinorVersion` / `PatchVersion` / `BuildNumber` | int | Compare against subscriber versions to confirm "strictly higher". |
45
+ | `ReleaseState` | picklist | `Beta`, `Released`. Push target must be `Released`. |
46
+ | `IsDeprecated` | boolean | Must be `false`. |
47
+ | `SystemModstamp` | datetime | |
48
+
49
+ ---
50
+
51
+ ## PackagePushRequest — one scheduled push (the `0DV`)
52
+
53
+ | Field | Type | Notes |
54
+ |-------|------|-------|
55
+ | `Id` | id | The **0DV** request ID. |
56
+ | `PackageVersionId` | reference | Target 04t version. |
57
+ | `ScheduledStartTime` | datetime | The UTC start you requested (null = ASAP). |
58
+ | `Status` | picklist | `Created`, `Pending`, `InProgress`, `Succeeded`, `Failed`, `Canceled`. |
59
+ | `StartTime` / `EndTime` | datetime | Actual execution window. |
60
+ | `DurationSeconds` | int | |
61
+ | `IsMigration` | boolean | `true` for 1GP→2GP push migrations. |
62
+ | `SystemModstamp` | datetime | |
63
+
64
+ Note: CLI `--status` filter shows `Cancelled`/`In Progress` (spacing); the object picklist uses
65
+ `Canceled`/`InProgress`.
66
+
67
+ ---
68
+
69
+ ## PackagePushJob — one per org within a request
70
+
71
+ | Field | Type | Notes |
72
+ |-------|------|-------|
73
+ | `Id` | id | |
74
+ | `PackagePushRequestId` | reference | Parent **0DV** request. |
75
+ | `SubscriberOrganizationKey` | string | The org this job targets (matches `PackageSubscriber.OrgKey`). |
76
+ | `Status` | picklist | `Created`, `Pending`, `InProgress`, `Succeeded`, `Failed`, `Canceled`. |
77
+ | `StartTime` / `EndTime` | datetime | |
78
+ | `DurationSeconds` | int | |
79
+ | `IsMigration` | boolean | |
80
+ | `SystemModstamp` | datetime | |
81
+
82
+ ---
83
+
84
+ ## PackagePushError — failure detail, attached to a job
85
+
86
+ | Field | Type | Notes |
87
+ |-------|------|-------|
88
+ | `Id` | id | |
89
+ | `PackagePushJobId` | reference | Parent job. |
90
+ | `ErrorSeverity` | picklist | `Warning`, `Error`. |
91
+ | `ErrorType` | picklist | `DeployError`, `ApexTestFailure`, `LockingFailure`, `IneligibleUpgrade`, … |
92
+ | `ErrorTitle` | string | Short label. |
93
+ | `ErrorMessage` | string | Human-readable message. |
94
+ | `ErrorDetails` | string | Extended detail / stack. |
95
+ | `SystemModstamp` | datetime | |
96
+
97
+ ---
98
+
99
+ ## ID prefix cheat sheet
100
+
101
+ | Prefix | Object |
102
+ |--------|--------|
103
+ | `033` | MetadataPackage (the package) — used by `push-upgrade list`. |
104
+ | `04t` | MetadataPackageVersion (the version) — the push **target**, `push-upgrade schedule --package`. |
105
+ | `0DV` | PackagePushRequest — returned by `schedule`, consumed by `report`/`abort`. |
106
+ | `00D` | Subscriber org ID — the `OrgKey` values in the CSV. |
@@ -0,0 +1,144 @@
1
+ # SOQL recipes — subscribers & monitoring
2
+
3
+ Run all with `sf data query --target-org <devhub> --query "..."` (the **standard** data API — do **not**
4
+ add `--use-tooling-api`; the push objects return "sObject type not supported" under Tooling).
5
+ Add `--result-format csv` to pipe straight toward a CSV (strip the header before feeding `--org-file`).
6
+
7
+ Placeholders: `<033>` = package ID, `<04t>` = target version ID, `<0DV>` = push request ID.
8
+
9
+ ---
10
+
11
+ ## Discover subscribers
12
+
13
+ ### All currently-installed subscribers for a package
14
+ ```sql
15
+ SELECT OrgKey, OrgName, OrgType, OrgStatus, InstanceName,
16
+ MetadataPackageVersionId, InstalledStatus, HasRestrictionEnabled, CustomUpgradeType
17
+ FROM PackageSubscriber
18
+ WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
19
+ ```
20
+
21
+ ### Eligible production orgs, excluding restricted and already-on-target
22
+ ```sql
23
+ SELECT OrgKey, OrgName, OrgStatus, InstanceName, MetadataPackageVersionId
24
+ FROM PackageSubscriber
25
+ WHERE MetadataPackageId = '<033>'
26
+ AND InstalledStatus = 'i'
27
+ AND OrgType = 'Production'
28
+ AND OrgStatus != 'Inactive'
29
+ AND HasRestrictionEnabled = false
30
+ AND CustomUpgradeType != 'BlockedBySubscriber'
31
+ AND MetadataPackageVersionId != '<04t>'
32
+ ```
33
+ > `OrgType` (Production/Sandbox) and `OrgStatus` (Active/Demo/Free/Inactive/Trial) are **independent**
34
+ > — a Production org can be `Trial`, `Demo`, or `Free`, not just `Active`. Don't whitelist
35
+ > `OrgStatus = 'Active'` or you'll silently drop paying-but-non-`Active` production subscribers. Exclude
36
+ > only what you mean to (typically `Inactive`), and select `OrgStatus` so you can eyeball the mix.
37
+
38
+ ### Sandboxes only (pilot batch)
39
+ ```sql
40
+ SELECT OrgKey, OrgName, InstanceName, MetadataPackageVersionId
41
+ FROM PackageSubscriber
42
+ WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i' AND OrgType = 'Sandbox'
43
+ AND HasRestrictionEnabled = false
44
+ AND CustomUpgradeType != 'BlockedBySubscriber'
45
+ ```
46
+
47
+ ### Restricted / blocked orgs (report, then exclude from pushes)
48
+ ```sql
49
+ SELECT OrgKey, OrgName, HasRestrictionEnabled, CustomUpgradeType
50
+ FROM PackageSubscriber
51
+ WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
52
+ AND (HasRestrictionEnabled = true OR CustomUpgradeType = 'BlockedBySubscriber')
53
+ ```
54
+
55
+ ### Orgs on a specific old version (target a known-bad build)
56
+ ```sql
57
+ SELECT OrgKey, OrgName, OrgType, InstanceName
58
+ FROM PackageSubscriber
59
+ WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
60
+ AND MetadataPackageVersionId = '<04t-old-version>'
61
+ ```
62
+
63
+ ### Count by org type (population sanity check)
64
+ ```sql
65
+ SELECT OrgType, COUNT(Id) total
66
+ FROM PackageSubscriber
67
+ WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
68
+ GROUP BY OrgType
69
+ ```
70
+
71
+ > Note: `PackageSubscriber` has **no version-comparison operator** — you can only filter version by
72
+ > exact `MetadataPackageVersionId`. To push only to orgs *strictly below* the target, resolve each
73
+ > distinct installed version's numbers via `MetadataPackageVersion` and exclude any at/above the
74
+ > target before building the CSV.
75
+
76
+ ---
77
+
78
+ ## Resolve / validate versions
79
+
80
+ ### Released versions of a package, newest first
81
+ ```sql
82
+ SELECT Id, Name, MajorVersion, MinorVersion, PatchVersion, BuildNumber, ReleaseState, IsDeprecated
83
+ FROM MetadataPackageVersion
84
+ WHERE MetadataPackageId = '<033>' AND ReleaseState = 'Released'
85
+ ORDER BY MajorVersion DESC, MinorVersion DESC, PatchVersion DESC, BuildNumber DESC
86
+ ```
87
+
88
+ ### Validate a single target version
89
+ ```sql
90
+ SELECT Id, MetadataPackageId, Name, MajorVersion, MinorVersion, PatchVersion, BuildNumber,
91
+ ReleaseState, IsDeprecated
92
+ FROM MetadataPackageVersion
93
+ WHERE Id = '<04t>'
94
+ ```
95
+ Target is valid only if `ReleaseState = 'Released'` and `IsDeprecated = false`.
96
+
97
+ ---
98
+
99
+ ## Monitor push requests
100
+
101
+ ### Recent requests for a package
102
+ ```sql
103
+ SELECT Id, PackageVersionId, Status, ScheduledStartTime, StartTime, EndTime, DurationSeconds, IsMigration
104
+ FROM PackagePushRequest
105
+ WHERE PackageVersionId IN (
106
+ SELECT Id FROM MetadataPackageVersion WHERE MetadataPackageId = '<033>'
107
+ )
108
+ ORDER BY ScheduledStartTime DESC
109
+ ```
110
+
111
+ ### Jobs (per-org) for one request
112
+ ```sql
113
+ SELECT Id, SubscriberOrganizationKey, Status, StartTime, EndTime, DurationSeconds
114
+ FROM PackagePushJob
115
+ WHERE PackagePushRequestId = '<0DV>'
116
+ ORDER BY Status
117
+ ```
118
+
119
+ ### Job status rollup for one request
120
+ ```sql
121
+ SELECT Status, COUNT(Id) total
122
+ FROM PackagePushJob
123
+ WHERE PackagePushRequestId = '<0DV>'
124
+ GROUP BY Status
125
+ ```
126
+
127
+ ### Errors for a request (join through jobs)
128
+ ```sql
129
+ SELECT PackagePushJobId, ErrorSeverity, ErrorType, ErrorTitle, ErrorMessage, ErrorDetails
130
+ FROM PackagePushError
131
+ WHERE PackagePushJobId IN (
132
+ SELECT Id FROM PackagePushJob WHERE PackagePushRequestId = '<0DV>'
133
+ )
134
+ ```
135
+
136
+ ### Errors grouped by type (decide what to re-push)
137
+ ```sql
138
+ SELECT ErrorType, ErrorSeverity, COUNT(Id) total
139
+ FROM PackagePushError
140
+ WHERE PackagePushJobId IN (
141
+ SELECT Id FROM PackagePushJob WHERE PackagePushRequestId = '<0DV>'
142
+ )
143
+ GROUP BY ErrorType, ErrorSeverity
144
+ ```
@@ -0,0 +1,239 @@
1
+ ---
2
+ name: experience-afv-analytics-query
3
+ description: "System-of-record for the public Lightning Instrumentation Headless Connect REST API route that retrieves Agentforce Vibes (AFV) metrics, analytics, data, and adoption/usage insights, including token/LOC, weekly active-user, and per-user activity. Supports local result filtering by period (default current), orgType (default All), recordType, modelName (default All), and other explicitly returned row fields after one parameterless API call."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "68.0"
7
+ accessCheck: "(DxDevopsAnalytics.orgHasDevopsAnalyticsAccess)"
8
+ domains:
9
+ - "Experience"
10
+ - "Agentforce"
11
+ ---
12
+
13
+ # Agentforce Vibes metrics
14
+
15
+ Use this skill when a user asks to retrieve Agentforce Vibes (AFV) usage or
16
+ instrumentation metrics for the current Salesforce org.
17
+
18
+ This skill describes one public, read-only Connect API operation:
19
+
20
+ - **Get AFV metrics** — trigger phrases: "get afv metrics", "agentforce vibes metrics", "afv analytics", "fetch agentforce vibes analytics", "headless afv metrics", "afv data", "agentforce vibes data", "get afv adoption usage data", "Vibes adoption", "token/LOC metrics", "weekly active users", "per-user AFV activity", "current or prior AFV metrics", "AFV model metrics", "AFV metrics by org type", and "filter AFV metrics by record type". Primary route: `GET /instrumentation/afv-metrics` (`operationId: getAFVMetrics`).
21
+
22
+ The route is available at external API version **v68.0 or later**. Call it at
23
+ v68.0; do not infer a lower version from the source
24
+ spec's generic `info.version` or `servers` example. v67.0 returns
25
+ `404 NOT_FOUND`. A version above the org's own maximum also returns `404`;
26
+ that is an org limit, not a reason to call a version below v68.0.
27
+
28
+ ## Workflow
29
+
30
+ 1. Call `GET /services/data/v68.0/instrumentation/afv-metrics`.
31
+ 2. Send no path parameters, query parameters, or request body.
32
+ 3. Read the returned `AFVMetricsOutputRepresentation`:
33
+ - `success` — whether the metrics download succeeded.
34
+ - `message` — an optional status or failure message.
35
+ - `rows` — an array of metric maps; each map can contain heterogeneous
36
+ metric names and values.
37
+ 4. If `success` is `false`, surface `message` and the raw response. Do not
38
+ present the rows as a successful metrics result or retry automatically.
39
+ 5. If `success` is `true` and `rows` is empty, report the no-data result and
40
+ stop. Do not retry, treat it as an API error, or fall back to an internal
41
+ API.
42
+ 6. Branch on each row's `recordType` before reading class-specific fields.
43
+ Do not assume that any particular record class is present. Preserve unknown
44
+ record types and fields instead of dropping them.
45
+
46
+ ## Optional result filters
47
+
48
+ Users can narrow the displayed metrics with optional result filters. These
49
+ filters control local processing after the complete response is received; they
50
+ are not Connect API query parameters or `get-afv-metrics` dispatch inputs.
51
+
52
+ | Filter | Accepted value | Matching rule |
53
+ |---|---|---|
54
+ | `period` | `current` (default) or `prior` | Exact match on `rows[*].period`. Reject another explicit value before calling the API. |
55
+ | `orgType` | `All` (default) or an org-type value returned by the API | Case-insensitive exact match on `rows[*].orgType`. `All` is a literal roll-up value, not a wildcard. |
56
+ | `recordType` | One or more record-type names | Exact match on `rows[*].recordType`. Known values include `aggregate`, `dailyTimeSeries`, `modelMetrics`, `orgBreakdown`, `userMetrics`, and `weeklyActiveUsers`, but accept an exact future value when the user supplies it. |
57
+ | `modelName` | `All` (default) or a model name returned by the API | Case-insensitive exact match on `rows[*].modelName`. `All` is a literal roll-up value, not a wildcard. |
58
+ | Other returned row field | Explicit field name and value supplied by the user | Exact match only when that field is present. Do not invent aliases or assume the field exists on every record type. |
59
+
60
+ If the user does not supply `period`, apply `period=current`; if the user does
61
+ not supply `orgType`, apply `orgType=All`; if the user does not supply
62
+ `modelName`, apply `modelName=All`. These are default local result filters. An
63
+ explicit value overrides its corresponding default. A request that compares
64
+ the current and prior periods explicitly selects both values and therefore
65
+ overrides the single-period default. Likewise, a request to compare or rank
66
+ models explicitly selects the concrete model names present in the response
67
+ instead of the `All` model roll-up. If the user supplies more than one filter
68
+ name, combine them with AND. If the user supplies multiple values for the same
69
+ field, match any of those values. Each default still applies when the user
70
+ supplies another filter but omits one of these three fields.
71
+
72
+ Apply filters only after checking HTTP status, `success`, and the unfiltered
73
+ `rows` array:
74
+
75
+ 1. Capture the requested result filters from the user's prompt and add the
76
+ defaults `period=current`, `orgType=All`, and `modelName=All` when those
77
+ fields were omitted and the request does not imply a multi-value comparison.
78
+ 2. Call `get-afv-metrics` once with no arguments and no query string.
79
+ 3. If `success` is `false` or the complete `rows` array is empty, follow the
80
+ normal response handling without filtering.
81
+ 4. Otherwise, filter the returned rows in memory and render the matching rows.
82
+ 5. Report the filters applied, the total rows returned by the API, and the
83
+ number of rows matched.
84
+
85
+ A successful response with rows but zero filter matches, including when a
86
+ default filter finds no rows, is a successful zero-match view, not an empty
87
+ API response. Report that the complete response
88
+ contained no matching rows. Do not retry, change the request URL, infer zero
89
+ metric values, or report that the API itself returned no data. When the
90
+ requested `recordType` is `userMetrics`, also apply the permission-dependent
91
+ guidance below instead of treating the absence as proof of zero user activity.
92
+
93
+ ## Permission-dependent results
94
+
95
+ HTTP status is part of the gate and permission contract. Do not treat every
96
+ denial as HTTP `200` with `success: false`.
97
+
98
+ The route returns a metrics body only when the org gate is enabled and the
99
+ caller passes the user access check. The user access check passes when any
100
+ of these is true:
101
+
102
+ - the caller has both **Customize Application** and **Modify All Data**, or
103
+ - the caller has **Lifecycle Center Developer-Level Insights**, or
104
+ - the caller has **Lifecycle Center User**.
105
+
106
+ - **Org gate disabled, or the caller fails the user access check:** the
107
+ route returns HTTP `403`. Surface the response as an access denial.
108
+ Recommend verifying that AFV metrics are enabled for the org and that the
109
+ caller has `Lifecycle Center User`, `Lifecycle Center Developer-Level
110
+ Insights`, or both Customize Application and Modify All Data. Do not retry,
111
+ and do not present a `403` as an empty dataset or as `success: false`.
112
+ - **`Lifecycle Center User` only:** the call can return HTTP `200` with
113
+ `success: true`, but `userMetrics` rows are omitted. The message then
114
+ includes `Some per-user metrics were omitted because you do not have
115
+ permission to view them.` Other record classes remain subject to data
116
+ availability. Absence of `userMetrics` does not prove that no users used
117
+ AFV.
118
+ - **`Lifecycle Center Developer-Level Insights`, or Customize Application
119
+ together with Modify All Data:** the caller is eligible to receive rows
120
+ whose `recordType` is `userMetrics` when that class has data. A populated
121
+ System Administrator probe returned those rows with message
122
+ `AFV metrics retrieved successfully.` and no omission sentence.
123
+
124
+ When the user specifically asks for per-user results and no `userMetrics`
125
+ rows are visible, explain that the class can be absent because
126
+ `Lifecycle Center Developer-Level Insights` is not assigned or because the
127
+ current dataset has no rows of that class. Recommend verifying
128
+ `Lifecycle Center Developer-Level Insights`; do not report zero per-user
129
+ activity from an absent record class.
130
+
131
+ ## Variable record classes
132
+
133
+ Production exports show that successful populated responses can contain only a
134
+ subset of the known record classes. Treat `aggregate`, `dailyTimeSeries`,
135
+ `modelMetrics`, `orgBreakdown`, `userMetrics`, and `weeklyActiveUsers` as
136
+ independently optional collections. For a requested class that is absent,
137
+ report that the current response contains no rows of that class. Do not infer a
138
+ zero value, fail the whole response, or retry. Row counts are data-dependent.
139
+
140
+ ## Output
141
+
142
+ On success, report the server message when present, the number of rows, and
143
+ the rows themselves. Preserve the keys returned in each row; the schema
144
+ intentionally permits arbitrary metric-name/value pairs.
145
+
146
+ ```markdown
147
+ ## AFV metrics
148
+
149
+ - Success: `<success>`
150
+ - Message: `<message, when present>`
151
+ - Result filters: `<filters, including period=current, orgType=All, and modelName=All defaults when applicable>`
152
+ - Rows returned by API: `<unfiltered rows.length>`
153
+ - Rows matched: `<filtered rows.length, when filters are present>`
154
+
155
+ <render the rows without inventing or renaming fields>
156
+ ```
157
+
158
+ For every successful populated response with no user-supplied result filters,
159
+ append a compact filter-discovery block even though the default
160
+ `period=current AND orgType=All AND modelName=All` view was applied. Compute
161
+ distinct values from the full, unfiltered API response and include only fields
162
+ that occur in at least one row. Do not present known-but-absent values as
163
+ available in the current result, and do not make a second API call.
164
+
165
+ ```markdown
166
+ ### Available result filters in this response
167
+
168
+ - `period`: `<distinct rows[*].period values>` (default: `current`)
169
+ - `orgType`: `<distinct rows[*].orgType values>` (default: `All`)
170
+ - `recordType`: `<distinct rows[*].recordType values>`
171
+ - `modelName`: `<distinct rows[*].modelName values>` (default: `All`)
172
+
173
+ Example: `Get AFV metrics for period=prior, orgType=Sandbox, recordType=modelMetrics, and modelName=<returned model name>.`
174
+ ```
175
+
176
+ When user-supplied filters were provided, show the effective filters in
177
+ `Result filters` and omit the discovery block. The default
178
+ `period=current AND orgType=All AND modelName=All` filters alone do not
179
+ suppress discovery. The filter list and example are part of the same final
180
+ result, not a follow-up question. Available `orgType` and `modelName` values
181
+ are data-dependent; never hardcode values observed in one org.
182
+
183
+ An empty `rows` array is a valid successful response. The no-data result is
184
+ HTTP `200` with `success: true`, message
185
+ `No AFV metrics are available yet for this org.`, and `rows: []`. Report
186
+ that no metric rows were returned, include the server's message, and stop
187
+ without retrying. Distinguish this from `success: false` with `rows: []`,
188
+ which is a service failure, and from HTTP `403`, which is an access denial.
189
+
190
+ ## Error handling
191
+
192
+ - `400` — surface the returned AFV result as a bad request.
193
+ - `401` — authentication is missing or invalid; ask the user to reconnect to
194
+ the org, then retry only when they request it.
195
+ - `403` — the org gate is disabled or the caller fails the user access check.
196
+ Surface the response and recommend verifying org enablement plus
197
+ `Lifecycle Center User`, `Lifecycle Center Developer-Level Insights`, or
198
+ both Customize Application and Modify All Data. Do not retry automatically.
199
+ - `500` — the metrics service failed internally; surface the response and
200
+ advise retrying later.
201
+ - HTTP `200` with `success: false` — surface `message` and `rows` as returned.
202
+ The caller-facing service-failure message is
203
+ `Unable to retrieve AFV metrics at this time. Please try again later.`
204
+ This is not a permission or gate denial. Do not recommend a permission
205
+ change for it.
206
+ - HTTP `200` with `success: true` and the per-user omission sentence — follow
207
+ the permission-dependent guidance. Do not treat the remaining rows as a
208
+ failure.
209
+ - Route not found at a lower API version — retry at v68.0 or later. v67.0
210
+ returns `404`. Do not probe a matrix of versions automatically.
211
+ - Rate limiting — the public family enables rate limits. Surface the error and
212
+ do not auto-retry.
213
+
214
+ ## Constraints
215
+
216
+ - Read-only and idempotent.
217
+ - Never send result filters to the server: the operation declares
218
+ `parameters: []`. Apply optional user filters only after the full response is
219
+ received, including the default
220
+ `period=current AND orgType=All AND modelName=All` view.
221
+ - Never call the internal Aura-only Lightning Instrumentation Agentforce API;
222
+ this skill uses the separate public headless Connect API family.
223
+ - Never infer that an absent record class represents zero-valued data. In
224
+ particular, `userMetrics` can be omitted by permission-based filtering.
225
+ - Do not rely on fixed row counts. Counts observed during validation describe
226
+ that test dataset, not the API contract.
227
+ - Return one final result. Do not make a follow-up write or verification call.
228
+
229
+ <!-- skill-validate: ignore-start -->
230
+ <!-- codey:operations start -->
231
+ ## Operations Reference
232
+
233
+ Operations this skill uses — routing and dependency reference.
234
+
235
+ | Operation | Purpose | Status | Call | Depends on |
236
+ |-----------|---------|--------|------|------------|
237
+ | `get-afv-metrics` | read | — | `GET /services/data/v68.0/instrumentation/afv-metrics` | — |
238
+ <!-- codey:operations end -->
239
+ <!-- skill-validate: ignore-end -->
@@ -0,0 +1,176 @@
1
+ # AFV Connect API reference
2
+
3
+ ## Authoritative Core contract
4
+
5
+ The API was introduced by Core pull request 25670. The accepted IDL-first API
6
+ definition and implementation are the authority for the contract summarized
7
+ here.
8
+
9
+ Contract facts used by this skill:
10
+
11
+ - Public, REST-callable Connect API.
12
+ - Available at external API v68.0 or later.
13
+ - Route: `GET /instrumentation/afv-metrics`.
14
+ - Operation: `getAFVMetrics`.
15
+ - No request parameters.
16
+ - Rate limiting enabled.
17
+ - API integrations declared for Catalog, Flow, Agentforce, and MCP.
18
+ - No Aura controller or LDS adapter is generated for this family.
19
+
20
+ The generated unified OpenAPI document must advertise
21
+ `/services/data/v68.0` in `servers[0].url`. The skill-derived base generator's
22
+ generic v67.0 server is not valid for this route: a live probe returned
23
+ `404 NOT_FOUND` at v67.0, and the same route returned the AFV response at
24
+ v68.0 and v69.0. A version above the org catalog maximum also returns `404`;
25
+ that limit is not a route restriction.
26
+
27
+ The generated unified OpenAPI projection must keep the six known
28
+ `recordType` values on the property itself. The description may explain that
29
+ future values are possible, but it must not remove this `enum` metadata:
30
+
31
+ ```yaml
32
+ recordType:
33
+ type: string
34
+ enum:
35
+ - aggregate
36
+ - modelMetrics
37
+ - dailyTimeSeries
38
+ - weeklyActiveUsers
39
+ - orgBreakdown
40
+ - userMetrics
41
+ ```
42
+
43
+ ## Response representation
44
+
45
+ `AFVMetricsOutputRepresentation` is an object with:
46
+
47
+ | Field | Type | Meaning |
48
+ |---|---|---|
49
+ | `success` | boolean | Whether the dashboard-metrics download succeeded. |
50
+ | `message` | string | Optional status or failure detail. |
51
+ | `rows` | array of object maps | Dashboard metric rows. Each row permits arbitrary property names and value types. |
52
+
53
+ The implementation delegates to the existing dashboard metrics service and
54
+ copies its `success`, `message`, and `rows` values directly into the public
55
+ representation.
56
+
57
+ An empty dataset is still a successful response: HTTP `200` with
58
+ `success: true`, message `No AFV metrics are available yet for this org.`,
59
+ and `rows: []`.
60
+
61
+ A populated success response uses message
62
+ `AFV metrics retrieved successfully.` A service failure that still returns
63
+ HTTP `200` uses `success: false` and message
64
+ `Unable to retrieve AFV metrics at this time. Please try again later.`
65
+
66
+ ## Result-filtering boundary
67
+
68
+ The operation has no path, query, or body parameters. User phrases such as
69
+ `period=current`, `orgType=Sandbox`, `recordType=modelMetrics`, or
70
+ `modelName=<name>` are skill-level result filters, not part of the Connect API
71
+ request. The runtime must first call the parameterless endpoint and then filter
72
+ the complete `rows` array in memory.
73
+
74
+ The supported filter semantics are:
75
+
76
+ - `period` defaults to `current` when the user does not supply one. An explicit
77
+ `current` or `prior` value overrides the default and matches
78
+ `rows[*].period` exactly. A comparison request can explicitly select both
79
+ values, which uses OR semantics within the field.
80
+ - `orgType` defaults to the literal `All` roll-up when the user does not supply
81
+ an org type. An explicit value overrides the default and uses a
82
+ case-insensitive exact match against `rows[*].orgType`; `All` is not a
83
+ wildcard.
84
+ - `recordType` matches one or more exact discriminator values. The known
85
+ record classes are examples, not a closed enum; a future value can be used
86
+ when it is actually returned.
87
+ - `modelName` defaults to the literal `All` roll-up when the user does not
88
+ supply a model. An explicit model name overrides the default and uses a
89
+ case-insensitive exact match. A request to compare or rank models selects
90
+ the concrete model names present in the response instead of the `All`
91
+ roll-up; those names must be derived from the response rather than hardcoded.
92
+ - Another explicitly named row field can be matched exactly, but the consumer
93
+ must not invent aliases or assume the field exists on every heterogeneous
94
+ row.
95
+ - Different filter names use AND semantics; multiple values for one field use
96
+ OR semantics. The defaults `period=current`, `orgType=All`, and
97
+ `modelName=All` participate in the AND expression whenever the user omits the
98
+ corresponding field and does not request a multi-value comparison.
99
+
100
+ Unknown query parameters are silently ignored by the live endpoint, so a
101
+ filter-shaped URL can return HTTP `200` and the same unfiltered body. A zero-row
102
+ result after local filtering therefore means "no rows in the complete response
103
+ matched these filters," which is distinct from the API returning `rows: []`.
104
+ When the requested filter is `recordType=userMetrics`, the permission-dependent
105
+ absence rules still apply; zero matches do not establish zero user activity.
106
+ The SOR step inputs and OpenAPI operation parameters must remain empty.
107
+
108
+ For a successful populated call without user-supplied filters, the final result
109
+ should render the default
110
+ `period=current AND orgType=All AND modelName=All` view and advertise the
111
+ filter values available in the complete response. Derive the distinct
112
+ non-empty `period`, `orgType`, `recordType`, and `modelName` values from the
113
+ unfiltered `rows` and include only fields that are present. This is response
114
+ discovery, not a second API operation. Available `orgType` and `modelName`
115
+ values are org- and time-dependent and must never be copied into the skill as
116
+ fixed lists.
117
+
118
+ ## Permission-dependent responses
119
+
120
+ The public permission-set labels are `Lifecycle Center User` and
121
+ `Lifecycle Center Developer-Level Insights`. HTTP status changes when the
122
+ org gate is disabled or the caller fails the user access check.
123
+
124
+ The user access check passes when the caller has both Customize Application
125
+ and Modify All Data, or has `Lifecycle Center Developer-Level Insights`, or
126
+ has `Lifecycle Center User`.
127
+
128
+ | Access state | HTTP | Body |
129
+ |---|---|---|
130
+ | Org gate disabled, or the caller fails the user access check | `403` | Access denial. Not a metrics body with `success: false`. |
131
+ | `Lifecycle Center User` only | `200` | `success: true`. `userMetrics` rows are omitted, and the message includes `Some per-user metrics were omitted because you do not have permission to view them.` |
132
+ | `Lifecycle Center Developer-Level Insights`, or Customize Application with Modify All Data | `200` | Eligible for `userMetrics` when that class has data. A populated System Administrator probe returned `success: true`, message `AFV metrics retrieved successfully.`, and `userMetrics` rows, with no omission sentence. |
133
+
134
+ The structural conclusions are:
135
+
136
+ - A disabled org gate and a failed user access check both return HTTP `403`.
137
+ Callers must surface that status instead of the older HTTP `200` service
138
+ failure.
139
+ - `Lifecycle Center User` is enough to call the route, but not enough to
140
+ receive `userMetrics`.
141
+ - `Lifecycle Center Developer-Level Insights` controls visibility of
142
+ `userMetrics`. Customize Application together with Modify All Data also
143
+ receives that class.
144
+ - Missing `userMetrics` rows on an HTTP `200` are an authorization-filtered
145
+ representation, not proof that the org has no per-user activity.
146
+ - `success: false` with
147
+ `Unable to retrieve AFV metrics at this time. Please try again later.`
148
+ is a service failure inside HTTP `200`. It is not the permission or gate
149
+ denial.
150
+ - `success: true`, `rows: []`, and
151
+ `No AFV metrics are available yet for this org.` remain a distinct, valid
152
+ empty-dataset response.
153
+
154
+ ## Production record-class variability
155
+
156
+ The supplied production exports use the same field vocabulary but contain
157
+ different record-class combinations. Some responses contain only
158
+ `aggregate`, `dailyTimeSeries`, and `modelMetrics`; others add
159
+ `orgBreakdown` and `userMetrics`; and some also contain
160
+ `weeklyActiveUsers`. The number of rows in every class also varies by org and
161
+ over time.
162
+
163
+ Consequently, none of the known record classes or their row counts is required
164
+ for a successful populated response. Consumers must branch on the
165
+ `recordType` of each returned row, handle an absent requested class as
166
+ unavailable in the current response, and preserve unknown future classes and
167
+ fields. Permission filtering remains one possible reason that `userMetrics` is
168
+ absent, but absence alone does not identify the cause.
169
+
170
+ ## Declared responses
171
+
172
+ The source OAS declares `200`, `400`, `401`, `403`, and `500`. The `403`
173
+ response is the declarative access denial: the org gate is disabled or the
174
+ user access check fails. These are contract declarations. The populated
175
+ success path was wire-probed; the `403` path was not reproduced on an
176
+ administrator session where the gate was open.