@salesforce/afv-skills 1.30.0 → 1.32.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 (126) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-bot-upgrade/SKILL.md +217 -0
  3. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +242 -0
  4. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +128 -0
  5. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +208 -0
  6. package/skills/agentforce-bot-upgrade/references/input-contract.md +101 -0
  7. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +113 -0
  8. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +78 -0
  9. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +67 -0
  10. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +33 -0
  11. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +116 -0
  12. package/skills/data360-code-extension-generate/SKILL.md +15 -2
  13. package/skills/dx-devops-work-item-manage/SKILL.md +270 -0
  14. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +479 -0
  15. package/skills/dx-devops-work-item-manage/references/cli-commands.md +476 -0
  16. package/skills/dx-org-manage/SKILL.md +8 -5
  17. package/skills/dx-org-trial-expiration-check/SKILL.md +239 -0
  18. package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +588 -0
  19. package/skills/dx-pkg-post-install-configure/SKILL.md +184 -0
  20. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +202 -35
  21. package/skills/experience-ui-bundle-app-coordinate/scripts/check-hosting-target.sh +26 -0
  22. package/skills/experience-ui-bundle-app-coordinate/scripts/check-sfdx-project.sh +15 -0
  23. package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +29 -5
  24. package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +1 -1
  25. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +30 -0
  26. package/skills/experience-ui-bundle-features-generate/SKILL.md +86 -11
  27. package/skills/experience-ui-bundle-features-generate/references/conflict-resolution-schema.json +20 -0
  28. package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +14 -0
  29. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +6 -1
  30. package/skills/experience-ui-bundle-frontend-generate/references/component.md +34 -1
  31. package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -1
  32. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +19 -8
  33. package/skills/experience-ui-bundle-metadata-generate/references/csp-metadata-format.md +2 -2
  34. package/skills/experience-ui-bundle-metadata-generate/scripts/check-api-version.sh +30 -0
  35. package/skills/experience-ui-bundle-project-generate/SKILL.md +111 -0
  36. package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
  37. package/skills/platform-custom-field-generate/SKILL.md +12 -11
  38. package/skills/platform-custom-field-generate/references/advanced-picklists.md +17 -17
  39. package/skills/platform-custom-lightning-type-generate/SKILL.md +9 -14
  40. package/skills/platform-custom-lightning-type-generate/references/widget-rendition.md +27 -111
  41. package/skills/platform-custom-report-type-generate/SKILL.md +259 -0
  42. package/skills/platform-custom-report-type-generate/examples/AccountProjectsWithTasks.reportType-meta.xml +51 -0
  43. package/skills/platform-custom-report-type-generate/examples/AccountsWithIndustry.reportType-meta.xml +27 -0
  44. package/skills/platform-custom-report-type-generate/examples/AccountsWithProjects.reportType-meta.xml +44 -0
  45. package/skills/platform-custom-report-type-generate/references/category-values.md +32 -0
  46. package/skills/platform-custom-report-type-generate/references/errors-and-troubleshooting.md +24 -0
  47. package/skills/platform-dataspace-access-configure/SKILL.md +318 -0
  48. package/skills/platform-docs-get/SKILL.md +4 -0
  49. package/skills/platform-docs-get/scripts/extract_salesforce_doc.py +78 -13
  50. package/skills/platform-encryption-configure/SKILL.md +122 -0
  51. package/skills/platform-encryption-configure/assets/EncryptionKey.settings-meta.xml +17 -0
  52. package/skills/platform-encryption-configure/assets/PlatformEncryption.settings-meta.xml +15 -0
  53. package/skills/platform-encryption-configure/assets/encrypted-field.field-meta.xml +22 -0
  54. package/skills/platform-encryption-configure/examples/cache-only-keys.settings-meta.xml +11 -0
  55. package/skills/platform-encryption-configure/references/encryption-schemes.md +34 -0
  56. package/skills/platform-encryption-configure/references/key-models.md +34 -0
  57. package/skills/platform-encryption-configure/references/tenant-secret-lifecycle.md +23 -0
  58. package/skills/platform-encryption-configure/scripts/validate-encryption-metadata.sh +54 -0
  59. package/skills/platform-lightning-type-widget-coordinate/SKILL.md +214 -0
  60. package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +80 -0
  61. package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +75 -0
  62. package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +67 -0
  63. package/skills/platform-lightning-type-widget-coordinate/references/lightning-type-discovery.md +124 -0
  64. package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +130 -0
  65. package/skills/platform-metadata-api-context-get/SKILL.md +13 -10
  66. package/skills/platform-sharing-owd-configure/SKILL.md +142 -0
  67. package/skills/platform-sharing-owd-configure/examples/get_owd_output.md +38 -0
  68. package/skills/platform-sharing-owd-configure/examples/update_owd_output.md +44 -0
  69. package/skills/platform-sharing-owd-configure/references/access_levels.md +49 -0
  70. package/skills/platform-sharing-owd-configure/references/metadata_api_approach.md +69 -0
  71. package/skills/platform-sharing-rules-generate/SKILL.md +89 -19
  72. package/skills/platform-sharing-rules-generate/examples/test-cases.md +381 -0
  73. package/skills/platform-widget-generate/SKILL.md +241 -0
  74. package/skills/platform-widget-generate/examples/conditional.json +73 -0
  75. package/skills/platform-widget-generate/examples/list-with-foreach.json +66 -0
  76. package/skills/platform-widget-generate/examples/single-object.json +64 -0
  77. package/skills/platform-widget-generate/references/schema-from-lightning-type.md +76 -0
  78. package/skills/platform-widget-generate/references/widget-bundle-layout.md +116 -0
  79. package/skills/platform-widget-generate/references/widget-meta-directives.md +130 -0
  80. package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +268 -0
  81. package/skills/sales-agentforce-pipeline-management-configure/assets/field-completion-template.genAiPromptTemplate-meta.xml +141 -0
  82. package/skills/sales-agentforce-pipeline-management-configure/assets/pipeline_management_flow.flow-meta.xml +548 -0
  83. package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.agent +2938 -0
  84. package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.bundle-meta.xml +4 -0
  85. package/skills/sales-agentforce-pipeline-management-configure/assets/sfdx-project.json +12 -0
  86. package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/bant.txt +11 -0
  87. package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/meddic.txt +11 -0
  88. package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/spiced.txt +11 -0
  89. package/skills/sales-agentforce-pipeline-management-configure/examples/custom-prompt-instructions.md +317 -0
  90. package/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md +355 -0
  91. package/skills/sales-agentforce-pipeline-management-configure/references/agent-creation.md +383 -0
  92. package/skills/sales-agentforce-pipeline-management-configure/references/auth-and-cli.md +146 -0
  93. package/skills/sales-agentforce-pipeline-management-configure/references/automation-matrix.md +23 -0
  94. package/skills/sales-agentforce-pipeline-management-configure/references/autonomous-updates.md +215 -0
  95. package/skills/sales-agentforce-pipeline-management-configure/references/canonical-agent-path.md +75 -0
  96. package/skills/sales-agentforce-pipeline-management-configure/references/data-sources.md +155 -0
  97. package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompt-template.md +120 -0
  98. package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompts.md +149 -0
  99. package/skills/sales-agentforce-pipeline-management-configure/references/flags.md +13 -0
  100. package/skills/sales-agentforce-pipeline-management-configure/references/flow-clone-from-template.md +447 -0
  101. package/skills/sales-agentforce-pipeline-management-configure/references/metadata-inventory.md +330 -0
  102. package/skills/sales-agentforce-pipeline-management-configure/references/opportunity-stages.md +246 -0
  103. package/skills/sales-agentforce-pipeline-management-configure/references/repair-diagnostics.md +265 -0
  104. package/skills/sales-agentforce-pipeline-management-configure/references/setup-order.md +263 -0
  105. package/skills/sales-agentforce-pipeline-management-configure/references/soap-api-enablement.md +528 -0
  106. package/skills/sales-agentforce-pipeline-management-configure/scripts/CHANGES.md +180 -0
  107. package/skills/sales-agentforce-pipeline-management-configure/scripts/README.md +56 -0
  108. package/skills/sales-agentforce-pipeline-management-configure/scripts/add-field-suggestion.sh +679 -0
  109. package/skills/sales-agentforce-pipeline-management-configure/scripts/create-agent.sh +302 -0
  110. package/skills/sales-agentforce-pipeline-management-configure/scripts/create-flow.sh +250 -0
  111. package/skills/sales-agentforce-pipeline-management-configure/scripts/define-agent-access.sh +430 -0
  112. package/skills/sales-agentforce-pipeline-management-configure/scripts/deploy-settings.sh +77 -0
  113. package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-deal-agent.sh +241 -0
  114. package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-prerequisites.sh +538 -0
  115. package/skills/sales-agentforce-pipeline-management-configure/scripts/flow-debug-and-verify.sh +385 -0
  116. package/skills/sales-agentforce-pipeline-management-configure/scripts/retrieve-settings.sh +131 -0
  117. package/skills/sales-agentforce-pipeline-management-configure/scripts/setup-all.sh +2791 -0
  118. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-bundle-publish.sh +189 -0
  119. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-detection.sh +239 -0
  120. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/flow-builder.sh +238 -0
  121. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/psg.sh +48 -0
  122. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/soap.sh +140 -0
  123. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/stage-descriptions.sh +448 -0
  124. package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/test-opp.sh +166 -0
  125. package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-all.sh +636 -0
  126. package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-prompt-generation.sh +346 -0
@@ -0,0 +1,259 @@
1
+ ---
2
+ name: platform-custom-report-type-generate
3
+ description: "Use this skill when users need to create, generate, or validate Salesforce Custom Report Type metadata. Trigger when users mention custom report types, report types, CRTs, reporting frameworks, cross-object reports, report builder data sources, or ask to expose fields for reporting across related objects. Also use when users mention primary and related objects for reports, inner vs outer joins in reports, report type categories, or encounter deployment errors for .reportType-meta.xml files. Do NOT trigger for: running, editing, or filtering existing reports; creating report folders, dashboards, or list views; or general reporting questions that don't involve authoring a .reportType-meta.xml file."
4
+ metadata:
5
+ version: "1.0"
6
+ minApiVersion: "51.0"
7
+ ---
8
+
9
+ ## Specification
10
+
11
+ # Salesforce Custom Report Type Metadata Knowledge
12
+
13
+ ## Overview
14
+ Custom Report Types (CRTs) define the **data framework** for Salesforce reports. They specify a primary object, up to 3 related objects, the relationship (join) between them, and which fields are available in the report builder.
15
+
16
+ ## Purpose
17
+ - Enable reporting across custom objects and custom relationships not covered by standard report types
18
+ - Curate a focused set of fields for report builders (including fields reached via lookup)
19
+ - Control inner/outer join behavior to include or exclude primary records without related records
20
+
21
+ ## Configuration
22
+
23
+ **File extension:** `.reportType-meta.xml`. The file basename is the report type's developer name (e.g. `AccountsWithProjects.reportType-meta.xml`). Each CRT is a single file, not nested under an object folder.
24
+
25
+ ### Key Elements
26
+
27
+ Top-level `<ReportType>` children:
28
+
29
+ | Element | Required | Notes |
30
+ |---------|----------|-------|
31
+ | `<fullName>` | Yes | API identifier; must match the file name. Letters, numbers, underscores; must begin with a letter; no spaces; no trailing underscore; no consecutive underscores |
32
+ | `<label>` | Yes | Human-friendly name shown in the report type picker |
33
+ | `<description>` | Recommended | State the business "why" — who uses this and what they learn |
34
+ | `<baseObject>` | Yes | API name of the primary object (e.g. `Account`, `Project__c`). Cannot be changed after initial creation. All objects, including custom and external, are supported (external objects from API 38.0+) |
35
+ | `<category>` | Recommended | Report builder category — see `references/category-values.md` |
36
+ | `<deployed>` | Yes | `true` to expose to users; `false` while building/iterating |
37
+ | `<join>` | Conditional | Adds a related object and its join behavior. Nest further `<join>` blocks for deeper relationships |
38
+ | `<sections>` | Recommended | Groups of columns available to the report type. Though not strictly required, a report without columns isn't useful |
39
+
40
+ `<sections>` (group of columns) sub-elements:
41
+
42
+ | Element | Required | Notes |
43
+ |---------|----------|-------|
44
+ | `<masterLabel>` | Yes | Section heading shown in the report builder |
45
+ | `<columns>` | Conditional | One per field exposed in the section |
46
+
47
+ `<columns>` (single field) sub-elements:
48
+
49
+ | Element | Required | Notes |
50
+ |---------|----------|-------|
51
+ | `<field>` | Yes | Field API name (or dotted lookup-traversal path) |
52
+ | `<table>` | Yes | The object the field belongs to — base object name or dotted relationship path |
53
+ | `<checkedByDefault>` | Yes | `true` if the column is selected by default in the report builder |
54
+ | `<displayNameOverride>` | No | Custom column label shown in the report builder, overriding the field's default label |
55
+
56
+ ## Critical Rules (Read First)
57
+
58
+ ### Rule 1: If `<fullName>` Is Present, It Must Match the File Name
59
+ In source format, `fullName` is inherited from `Metadata` and derived from the file name, so the `<fullName>` element is technically optional. The repo convention is to include it. **If you include `<fullName>`, its value must equal the file name (everything before `.reportType-meta.xml`) exactly — same characters, same casing, same underscores.**
60
+
61
+ **Wrong** — file name and `<fullName>` differ:
62
+ - File: `account_projects.reportType-meta.xml`
63
+ - `<fullName>AccountProjects</fullName>`
64
+ (Mismatch: file uses `account_projects`, fullName uses `AccountProjects`)
65
+
66
+ **Right** — file name and `<fullName>` are identical:
67
+ - File: `AccountProjects.reportType-meta.xml`
68
+ - `<fullName>AccountProjects</fullName>`
69
+
70
+ ### Rule 2: Join Semantics — `outerJoin` Controls Inclusion
71
+
72
+ Each `<join>` block has an `<outerJoin>` element that determines which primary records appear in the report:
73
+
74
+ | `<outerJoin>` value | Behavior | Report Builder Label |
75
+ |---------------------|----------|----------------------|
76
+ | `false` | Inner join — only primary records that HAVE at least one related record | "Each 'A' record must have at least one related 'B' record" |
77
+ | `true` | Outer join — all primary records, with or without related records | "'A' records may or may not have related 'B' records" |
78
+
79
+ **Default when unspecified:** Use `true` (outer join) when the user wants to see all primary records regardless of children. Use `false` when the report only makes sense if children exist.
80
+
81
+ ### Rule 3: Each Object Needs Its Own `<sections>` Block
82
+
83
+ Every object in the CRT (primary + each joined object) must have a corresponding `<sections>` block that lists the fields exposed for reporting. Without a section for an object, none of its fields appear in the report builder.
84
+
85
+ - `<masterLabel>` on each section is the section heading in the report builder
86
+ - `<columns>` entries list the fields — each with a `<field>` (API name) and `<table>` (object API name)
87
+ - For fields reached via lookup, use the relationship path in `<field>` (e.g. `Owner.Name` with `<table>` set to the owning object)
88
+
89
+ ### Rule 4: Field API Names, Not Labels
90
+
91
+ Use exact API names for fields: standard fields use their defined names (`Name`, `CreatedDate`, `OwnerId`), custom fields use `Field__c`. Custom objects must include `__c`.
92
+
93
+ **Wrong:**
94
+ - `<field>Account Name</field>`
95
+
96
+ **Right:**
97
+ - `<field>Name</field>` with `<table>Account</table>`
98
+
99
+ ### Rule 5: Relationship Path for Joined Objects
100
+
101
+ When adding a `<join>`, the `<relationship>` element must use the **child relationship name** as defined on the lookup/master-detail field pointing from the child object to the parent. For custom relationships, this typically ends in `__r`.
102
+
103
+ **Wrong:**
104
+ - `<relationship>Project</relationship>` (for a custom child relationship)
105
+
106
+ **Right:**
107
+ - `<relationship>Projects__r</relationship>` (child relationship name)
108
+ - `<relationship>Contacts</relationship>` (standard, non-custom child relationship)
109
+
110
+ ### Rule 6: Maximum 4 Objects Total in a Join Chain
111
+
112
+ A single CRT can join a maximum of **four objects total** (the base object + up to 3 additional objects via nested `<join>` blocks).
113
+
114
+ ### Rule 7: No Inner Join After an Outer Join
115
+
116
+ Once the join chain contains an outer join (`<outerJoin>true</outerJoin>`), every subsequent nested join must also be an outer join. An inner join that follows an outer join earlier in the sequence is not allowed.
117
+
118
+ **Wrong:**
119
+ ```xml
120
+ <join>
121
+ <outerJoin>true</outerJoin> <!-- outer join first -->
122
+ <relationship>Contacts</relationship>
123
+ <join>
124
+ <outerJoin>false</outerJoin> <!-- WRONG: inner join after outer -->
125
+ <relationship>Assets</relationship>
126
+ </join>
127
+ </join>
128
+ ```
129
+
130
+ **Right:**
131
+ ```xml
132
+ <join>
133
+ <outerJoin>true</outerJoin>
134
+ <relationship>Contacts</relationship>
135
+ <join>
136
+ <outerJoin>true</outerJoin> <!-- outer stays outer -->
137
+ <relationship>Assets</relationship>
138
+ </join>
139
+ </join>
140
+ ```
141
+
142
+ ### Rule 8: `<table>` for Joined Objects Uses Dotted Path
143
+
144
+ In `<sections>`, the `<table>` element identifies which object in the join chain each column belongs to. For the base object, use the object name directly (e.g. `Account`). For joined objects, use the **dotted relationship path** from the base object.
145
+
146
+ | Object in chain | `<table>` value |
147
+ |-----------------|-----------------|
148
+ | Base (Account) | `Account` |
149
+ | First join (Account → Contacts) | `Account.Contacts` |
150
+ | Nested join (Account → Contacts → Assets) | `Account.Contacts.Assets` |
151
+
152
+ ### Rule 9: Field Paths Can Traverse Lookups
153
+
154
+ `<field>` values may reference fields reached via lookup relationships using dot notation — for example `Owner.Email` (owner User's email) or `ReportsTo.CreatedBy.Contact.Owner.MobilePhone`. The `<table>` must still be the object that owns the starting field.
155
+
156
+ ### Rule 10: Historical Trending Fields Use `_hst` Suffix
157
+
158
+ For a field with `trackTrending=true`, the API name in `<field>` and `<table>` uses the `_hst` suffix:
159
+
160
+ ```xml
161
+ <columns>
162
+ <checkedByDefault>false</checkedByDefault>
163
+ <field>Field2__c_hst</field>
164
+ <table>CustomTrendedObject__c.CustomTrendedObject__c_hst</table>
165
+ </columns>
166
+ ```
167
+
168
+ ### Rule 11: Primary Object Cannot Be Changed After Deployment
169
+
170
+ Once deployed, the `<baseObject>` of a CRT is locked. To change the primary object, create a new CRT and retire the old one.
171
+
172
+ ### Rule 12: `autogenerated` Is Reserved for Historical Trending
173
+
174
+ The `<autogenerated>` element (API 29.0+) marks CRTs that Salesforce created automatically when historical trending was enabled on an object. Do not set this manually on hand-authored CRTs.
175
+
176
+ ## Generation Workflow
177
+
178
+ ### Step 1: Gather Requirements
179
+ - Primary object API name (e.g. `Account`, `Project__c`)
180
+ - Related objects and the relationship between each (which has the lookup/master-detail to which)
181
+ - For each relationship: inner join (children required) or outer join (children optional)?
182
+ - Which fields to expose per object — aim for task-relevant, not the full field list
183
+ - Audience and category — where should this appear in the report builder picker?
184
+ - Whether this ships as `deployed=true` now or stays `deployed=false` during iteration
185
+
186
+ ### Step 2: Examine Existing Examples
187
+ - Look in the project for in-project CRT patterns
188
+ - If existing report types have been retrieved from an org, compare against those structures
189
+
190
+ ### Step 3: Write the Specification
191
+ Document before authoring:
192
+ - `fullName` and `label`
193
+ - `baseObject`
194
+ - Category and `deployed` state
195
+ - Join chain: for each related object — relationship name, outer vs inner join
196
+ - Section layout: one section per object, ordered list of fields
197
+ - Acceptance criteria: which records should appear when the report runs, which fields are available in the builder
198
+
199
+ ### Step 4: Author the Metadata File
200
+
201
+ Start from the closest example in `examples/` and adapt it to the user's scenario:
202
+
203
+ - Primary object only (no joins) → `examples/AccountsWithIndustry.reportType-meta.xml`
204
+ - Outer join (primary records included even without children) → `examples/AccountsWithProjects.reportType-meta.xml`
205
+ - Nested inner join (every level requires children) → `examples/AccountProjectsWithTasks.reportType-meta.xml`
206
+
207
+ Name the file `<DeveloperName>.reportType-meta.xml`.
208
+
209
+ ### Step 5: Validate
210
+ - Well-formed XML with correct namespace (`xmlns="http://soap.sforce.com/2006/04/metadata"`)
211
+ - File name (without `.reportType-meta.xml`) matches `<fullName>` when `<fullName>` is included
212
+ - `<baseObject>` is a valid API name and the object is deployed
213
+ - Every `<relationship>` uses the correct child relationship name (`__r` suffix for custom)
214
+ - Each object referenced in `<sections>` is part of the CRT (primary or joined)
215
+ - All `<field>` references exist on the parent `<table>` and use API names (not labels)
216
+ - `<category>` is a valid Salesforce category value
217
+ - `<deployed>` is `true` if users need to access the CRT immediately
218
+
219
+ ## Reference File Index
220
+
221
+ | File | When to read |
222
+ |------|--------------|
223
+ | `examples/AccountsWithIndustry.reportType-meta.xml` | Step 2 / Step 4 — primary-object-only template |
224
+ | `examples/AccountsWithProjects.reportType-meta.xml` | Step 2 / Step 4 — outer-join template (primary included even without children) |
225
+ | `examples/AccountProjectsWithTasks.reportType-meta.xml` | Step 2 / Step 4 — nested inner-join template (every level requires children) |
226
+ | `references/category-values.md` | Step 3 — to choose a valid `<category>` value from the `ReportTypeCategory` enum |
227
+ | `references/errors-and-troubleshooting.md` | When fields don't appear in the report builder or join requirements conflict |
228
+
229
+ ## Verification Checklist
230
+
231
+ ### Universal Checks
232
+ - [ ] File extension is `.reportType-meta.xml`
233
+ - [ ] File basename satisfies the developer-name rules (begins with a letter, only letters/numbers/underscores, no spaces, no trailing underscore, no consecutive underscores)
234
+ - [ ] If `<fullName>` is included, it matches the file basename exactly (same characters, casing, and underscores)
235
+ - [ ] `<label>` is human-readable and under 40 characters
236
+ - [ ] `<description>` explains the business purpose
237
+ - [ ] `<baseObject>` uses a valid API name and that object is deployed
238
+ - [ ] `<category>` is a valid `ReportTypeCategory` enum value
239
+ - [ ] `<deployed>` is set appropriately (`true` for user access, `false` for in-progress iteration)
240
+ - [ ] `<autogenerated>` is NOT set manually (reserved for historical-trending CRTs)
241
+
242
+ ### Join Checks
243
+ - [ ] Each `<join>` uses the correct child **relationship name** (not the lookup field API name)
244
+ - [ ] Custom relationships use `__r` suffix
245
+ - [ ] `<outerJoin>` is set intentionally: `true` = optional children, `false` = required children
246
+ - [ ] No inner join (`<outerJoin>false</outerJoin>`) appears after an outer join earlier in the sequence
247
+ - [ ] Total object count (base + joins, including nested) is 4 or fewer
248
+
249
+ ### Section Checks
250
+ - [ ] Every object in the CRT has a corresponding `<sections>` block
251
+ - [ ] `<masterLabel>` on each section is descriptive
252
+ - [ ] Every `<columns>` has both `<field>` (API name) and `<table>` (object API name or dotted path)
253
+ - [ ] `<checkedByDefault>` is set for each column
254
+ - [ ] `<table>` for base object is the object API name (e.g. `Account`)
255
+ - [ ] `<table>` for joined objects uses the dotted relationship path (e.g. `Account.Projects__r`, `Account.Projects__r.Tasks__r`)
256
+ - [ ] Field references use API names (not labels); custom fields use `__c`
257
+ - [ ] Lookup traversal fields use dot notation (e.g. `Owner.Email`) with `<table>` set to the object owning the starting field
258
+ - [ ] Historical trending fields use `_hst` suffix in both `<field>` and `<table>` when applicable
259
+ - [ ] No duplicate fields within a section
@@ -0,0 +1,51 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ReportType xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <fullName>AccountProjectsWithTasks</fullName>
4
+ <baseObject>Account</baseObject>
5
+ <category>other</category>
6
+ <deployed>true</deployed>
7
+ <label>Accounts with Projects with Tasks</label>
8
+ <description>Reports on accounts that have projects, and those projects that have tasks — useful for active-engagement tracking. Demonstrates a nested inner join chain and how each level extends the dotted relationship path in <table> (Account → Account.Projects__r → Account.Projects__r.Tasks__r).</description>
9
+ <join>
10
+ <outerJoin>false</outerJoin>
11
+ <relationship>Projects__r</relationship>
12
+ <join>
13
+ <outerJoin>false</outerJoin>
14
+ <relationship>Tasks__r</relationship>
15
+ </join>
16
+ </join>
17
+ <sections>
18
+ <masterLabel>Account Fields</masterLabel>
19
+ <columns>
20
+ <checkedByDefault>true</checkedByDefault>
21
+ <field>Name</field>
22
+ <table>Account</table>
23
+ </columns>
24
+ </sections>
25
+ <sections>
26
+ <masterLabel>Project Fields</masterLabel>
27
+ <columns>
28
+ <checkedByDefault>true</checkedByDefault>
29
+ <field>Name</field>
30
+ <table>Account.Projects__r</table>
31
+ </columns>
32
+ <columns>
33
+ <checkedByDefault>true</checkedByDefault>
34
+ <field>Status__c</field>
35
+ <table>Account.Projects__r</table>
36
+ </columns>
37
+ </sections>
38
+ <sections>
39
+ <masterLabel>Task Fields</masterLabel>
40
+ <columns>
41
+ <checkedByDefault>true</checkedByDefault>
42
+ <field>Name</field>
43
+ <table>Account.Projects__r.Tasks__r</table>
44
+ </columns>
45
+ <columns>
46
+ <checkedByDefault>false</checkedByDefault>
47
+ <field>Due_Date__c</field>
48
+ <table>Account.Projects__r.Tasks__r</table>
49
+ </columns>
50
+ </sections>
51
+ </ReportType>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ReportType xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <fullName>AccountsWithIndustry</fullName>
4
+ <baseObject>Account</baseObject>
5
+ <category>accounts</category>
6
+ <deployed>true</deployed>
7
+ <label>Accounts with Industry Detail</label>
8
+ <description>Report framework for reviewing accounts with industry and revenue fields surfaced.</description>
9
+ <sections>
10
+ <masterLabel>Account Fields</masterLabel>
11
+ <columns>
12
+ <checkedByDefault>true</checkedByDefault>
13
+ <field>Name</field>
14
+ <table>Account</table>
15
+ </columns>
16
+ <columns>
17
+ <checkedByDefault>true</checkedByDefault>
18
+ <field>Industry</field>
19
+ <table>Account</table>
20
+ </columns>
21
+ <columns>
22
+ <checkedByDefault>false</checkedByDefault>
23
+ <field>AnnualRevenue</field>
24
+ <table>Account</table>
25
+ </columns>
26
+ </sections>
27
+ </ReportType>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ReportType xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <fullName>AccountsWithProjects</fullName>
4
+ <baseObject>Account</baseObject>
5
+ <category>accounts</category>
6
+ <deployed>true</deployed>
7
+ <label>Accounts with or without Projects</label>
8
+ <description>Shows every account; related project fields appear when projects exist. Demonstrates outer join — primary records included regardless of related-record presence — and the dotted relationship path used in <table>Account.Projects__r</table> for joined-object fields.</description>
9
+ <join>
10
+ <outerJoin>true</outerJoin>
11
+ <relationship>Projects__r</relationship>
12
+ </join>
13
+ <sections>
14
+ <masterLabel>Account Fields</masterLabel>
15
+ <columns>
16
+ <checkedByDefault>true</checkedByDefault>
17
+ <field>Name</field>
18
+ <table>Account</table>
19
+ </columns>
20
+ <columns>
21
+ <checkedByDefault>true</checkedByDefault>
22
+ <field>Industry</field>
23
+ <table>Account</table>
24
+ </columns>
25
+ </sections>
26
+ <sections>
27
+ <masterLabel>Project Fields</masterLabel>
28
+ <columns>
29
+ <checkedByDefault>true</checkedByDefault>
30
+ <field>Name</field>
31
+ <table>Account.Projects__r</table>
32
+ </columns>
33
+ <columns>
34
+ <checkedByDefault>true</checkedByDefault>
35
+ <field>Status__c</field>
36
+ <table>Account.Projects__r</table>
37
+ </columns>
38
+ <columns>
39
+ <checkedByDefault>false</checkedByDefault>
40
+ <field>CreatedDate</field>
41
+ <table>Account.Projects__r</table>
42
+ </columns>
43
+ </sections>
44
+ </ReportType>
@@ -0,0 +1,32 @@
1
+ # `<category>` Values — `ReportTypeCategory` Enumeration
2
+
3
+ The `category` value determines where the CRT appears in the report builder's "Create New Report Type" wizard. Use one of these Salesforce-defined values from the Metadata API `ReportTypeCategory` enum.
4
+
5
+ | Category value | Typical use |
6
+ |----------------|-------------|
7
+ | `accounts` | Accounts & Contacts |
8
+ | `opportunities` | Opportunities |
9
+ | `forecasts` | Forecasts |
10
+ | `cases` | Customer Support Reports |
11
+ | `leads` | Leads |
12
+ | `campaigns` | Campaigns |
13
+ | `activities` | Activities |
14
+ | `busop` | Business operations |
15
+ | `products` | Price Books, Products and Assets |
16
+ | `admin` | Administrative Reports |
17
+ | `territory` | Territory management |
18
+ | `territory2` | Territory management (Enterprise Territory Management) — API 31.0+ |
19
+ | `usage_entitlement` | Usage entitlements |
20
+ | `wdc` | Work.com / Calibration — API 29.0+ |
21
+ | `calibration` | Calibration — API 29.0+ |
22
+ | `other` | Other Reports (default for custom-object-based CRTs without a natural home) |
23
+ | `content` | Content |
24
+ | `quotes` | Quotes |
25
+ | `individual` | Individual (privacy) — API 45.0+ |
26
+ | `employee` | Employee — API 46.0+ |
27
+ | `data_cloud` | Data Cloud — API 55.0+ |
28
+ | `commerce` | Commerce — API 60.0+ |
29
+ | `flow` | Flow — API 60.0+ |
30
+ | `semantic_model` | Semantic model — API 60.0+ |
31
+
32
+ **When in doubt:** Use `other` for custom-object-based CRTs.
@@ -0,0 +1,24 @@
1
+ # Common Authoring Errors
2
+
3
+ Read this when a generated `.reportType-meta.xml` is rejected during deployment or fields don't appear in the report builder. Use these to validate the authored XML before handing it off; deployment itself is outside this skill's scope.
4
+
5
+ | Error | Cause | Fix |
6
+ |-------|-------|-----|
7
+ | `Invalid object name 'X'` on `<baseObject>` | Primary object doesn't exist or isn't deployed | Deploy the custom object before the CRT |
8
+ | `Invalid relationship name 'X'` on `<join>` | Used the field API name instead of the child relationship name, or forgot `__r` | Use the child relationship name (e.g. `Projects__r` for a custom relationship) |
9
+ | `Invalid field 'X' for object 'Y'` | Field doesn't exist on `<table>`, used label instead of API name, or field not yet deployed | Verify field API name; deploy dependent fields first |
10
+ | `Invalid category value 'X'` | Typo or non-existent category | Use a valid `ReportTypeCategory` value (see `category-values.md`); use `other` for general-purpose custom-object CRTs |
11
+ | Inner join after outer join | A nested `<join>` has `<outerJoin>false</outerJoin>` following an earlier outer join | Switch the nested join to `<outerJoin>true</outerJoin>`, or restructure so inner joins come first |
12
+ | Fields from joined object not visible in report builder | `<table>` in `<sections>` for the joined object doesn't use the dotted relationship path | Change `<table>` to the full path (e.g. `Account.Projects__r` not `Project__c`) |
13
+ | `Cannot change base object` on update | Attempted to change `<baseObject>` after initial deploy | Create a new CRT with the new primary object; retire the old one |
14
+ | File not found / fullName mismatch | File name doesn't match `<fullName>` | Rename file so `<fullName>.reportType-meta.xml` matches |
15
+
16
+ ## Handling Conflicting Join Requirements
17
+
18
+ When a user wants both "include primary records without children" AND "exclude children that lack their own children" — those constraints are inexpressible in a single CRT join chain (Rule 7 forbids inner-after-outer). Three workarounds:
19
+
20
+ 1. **All-outer + report-level filter** — keep all joins outer and filter at report time (e.g. `Case ID ≠ null`). Pragmatic, but every report author must remember the filter.
21
+ 2. **Flip the base object** — base on the deepest required object. Lose primary-without-children but gain the inner-join guarantee. Lookup fields on the new base let you traverse back up for context.
22
+ 3. **Two CRTs** — one all-outer for "all primary records," one inner-chained for "only primary records with full children." Users pick the right one.
23
+
24
+ Surface this trade-off to the user rather than picking silently.