sf-plugin-data 0.0.0-stage → 0.2.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 (256) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +589 -2
  3. package/bin/run.js +4 -0
  4. package/docs/artifact-format.md +527 -0
  5. package/docs/capabilities.md +1208 -0
  6. package/docs/git-workflow.md +160 -0
  7. package/docs/handover.md +10446 -0
  8. package/lib/api.d.ts +7 -0
  9. package/lib/api.js +7 -0
  10. package/lib/artifacts/code-fields.d.ts +49 -0
  11. package/lib/artifacts/code-fields.js +142 -0
  12. package/lib/artifacts/data-graph-document.d.ts +29 -0
  13. package/lib/artifacts/data-graph-document.js +52 -0
  14. package/lib/artifacts/data-space-field.d.ts +65 -0
  15. package/lib/artifacts/data-space-field.js +98 -0
  16. package/lib/artifacts/data-stream-document.d.ts +264 -0
  17. package/lib/artifacts/data-stream-document.js +680 -0
  18. package/lib/artifacts/data-transform-document.d.ts +152 -0
  19. package/lib/artifacts/data-transform-document.js +560 -0
  20. package/lib/artifacts/dependency-selection.d.ts +51 -0
  21. package/lib/artifacts/dependency-selection.js +154 -0
  22. package/lib/artifacts/dlo-document.d.ts +93 -0
  23. package/lib/artifacts/dlo-document.js +253 -0
  24. package/lib/artifacts/enum-case.d.ts +39 -0
  25. package/lib/artifacts/enum-case.js +67 -0
  26. package/lib/artifacts/git-deploy-selection.d.ts +68 -0
  27. package/lib/artifacts/git-deploy-selection.js +474 -0
  28. package/lib/artifacts/identity-resolution-document.d.ts +133 -0
  29. package/lib/artifacts/identity-resolution-document.js +625 -0
  30. package/lib/artifacts/mapping-document.d.ts +1 -0
  31. package/lib/artifacts/mapping-document.js +1 -0
  32. package/lib/artifacts/native-calculated-insight-document.d.ts +142 -0
  33. package/lib/artifacts/native-calculated-insight-document.js +321 -0
  34. package/lib/artifacts/native-data-graph-document.d.ts +124 -0
  35. package/lib/artifacts/native-data-graph-document.js +780 -0
  36. package/lib/artifacts/native-dmo-document.d.ts +151 -0
  37. package/lib/artifacts/native-dmo-document.js +313 -0
  38. package/lib/artifacts/native-mapping-document.d.ts +67 -0
  39. package/lib/artifacts/native-mapping-document.js +187 -0
  40. package/lib/artifacts/native-relationship-document.d.ts +76 -0
  41. package/lib/artifacts/native-relationship-document.js +232 -0
  42. package/lib/artifacts/path-selector.d.ts +55 -0
  43. package/lib/artifacts/path-selector.js +167 -0
  44. package/lib/artifacts/read-deploy-input.d.ts +239 -0
  45. package/lib/artifacts/read-deploy-input.js +1359 -0
  46. package/lib/artifacts/segment-document.d.ts +183 -0
  47. package/lib/artifacts/segment-document.js +570 -0
  48. package/lib/artifacts/verbatim-document.d.ts +203 -0
  49. package/lib/artifacts/verbatim-document.js +339 -0
  50. package/lib/artifacts/write-data-graph.d.ts +17 -0
  51. package/lib/artifacts/write-data-graph.js +162 -0
  52. package/lib/artifacts/write-data-stream.d.ts +11 -0
  53. package/lib/artifacts/write-data-stream.js +175 -0
  54. package/lib/artifacts/write-data-transform.d.ts +11 -0
  55. package/lib/artifacts/write-data-transform.js +180 -0
  56. package/lib/artifacts/write-dlo.d.ts +11 -0
  57. package/lib/artifacts/write-dlo.js +158 -0
  58. package/lib/artifacts/write-identity-resolution.d.ts +18 -0
  59. package/lib/artifacts/write-identity-resolution.js +165 -0
  60. package/lib/artifacts/write-mapping-definition.d.ts +17 -0
  61. package/lib/artifacts/write-mapping-definition.js +127 -0
  62. package/lib/artifacts/write-member-export.d.ts +88 -0
  63. package/lib/artifacts/write-member-export.js +199 -0
  64. package/lib/artifacts/write-native-calculated-insight.d.ts +21 -0
  65. package/lib/artifacts/write-native-calculated-insight.js +176 -0
  66. package/lib/artifacts/write-native-dmo.d.ts +11 -0
  67. package/lib/artifacts/write-native-dmo.js +158 -0
  68. package/lib/artifacts/write-native-mapping.d.ts +11 -0
  69. package/lib/artifacts/write-native-mapping.js +157 -0
  70. package/lib/artifacts/write-native-relationship.d.ts +11 -0
  71. package/lib/artifacts/write-native-relationship.js +157 -0
  72. package/lib/artifacts/write-segment.d.ts +26 -0
  73. package/lib/artifacts/write-segment.js +212 -0
  74. package/lib/commands/data360/delete.d.ts +280 -0
  75. package/lib/commands/data360/delete.js +2297 -0
  76. package/lib/commands/data360/deploy.d.ts +303 -0
  77. package/lib/commands/data360/deploy.js +2400 -0
  78. package/lib/commands/data360/publish.d.ts +93 -0
  79. package/lib/commands/data360/publish.js +292 -0
  80. package/lib/commands/data360/retrieve.d.ts +322 -0
  81. package/lib/commands/data360/retrieve.js +1963 -0
  82. package/lib/commands/data360/segment/members/export.d.ts +101 -0
  83. package/lib/commands/data360/segment/members/export.js +318 -0
  84. package/lib/errors/codes/calculated-insight.d.ts +2 -0
  85. package/lib/errors/codes/calculated-insight.js +25 -0
  86. package/lib/errors/codes/data-graph.d.ts +2 -0
  87. package/lib/errors/codes/data-graph.js +22 -0
  88. package/lib/errors/codes/data-stream.d.ts +2 -0
  89. package/lib/errors/codes/data-stream.js +70 -0
  90. package/lib/errors/codes/data-transform.d.ts +2 -0
  91. package/lib/errors/codes/data-transform.js +35 -0
  92. package/lib/errors/codes/dependency.d.ts +2 -0
  93. package/lib/errors/codes/dependency.js +11 -0
  94. package/lib/errors/codes/dlo.d.ts +2 -0
  95. package/lib/errors/codes/dlo.js +31 -0
  96. package/lib/errors/codes/dmo.d.ts +2 -0
  97. package/lib/errors/codes/dmo.js +28 -0
  98. package/lib/errors/codes/general.d.ts +2 -0
  99. package/lib/errors/codes/general.js +57 -0
  100. package/lib/errors/codes/identity-resolution.d.ts +2 -0
  101. package/lib/errors/codes/identity-resolution.js +24 -0
  102. package/lib/errors/codes/mapping.d.ts +2 -0
  103. package/lib/errors/codes/mapping.js +42 -0
  104. package/lib/errors/codes/relationship.d.ts +2 -0
  105. package/lib/errors/codes/relationship.js +21 -0
  106. package/lib/errors/codes/segment.d.ts +2 -0
  107. package/lib/errors/codes/segment.js +49 -0
  108. package/lib/errors/registry.d.ts +60 -0
  109. package/lib/errors/registry.js +123 -0
  110. package/lib/plugin.d.ts +5 -0
  111. package/lib/plugin.js +5 -0
  112. package/lib/services/acquire-retrieve-selection.d.ts +43 -0
  113. package/lib/services/acquire-retrieve-selection.js +145 -0
  114. package/lib/services/bind-identity-resolution-dependencies.d.ts +53 -0
  115. package/lib/services/bind-identity-resolution-dependencies.js +238 -0
  116. package/lib/services/bind-segment-dependencies.d.ts +49 -0
  117. package/lib/services/bind-segment-dependencies.js +115 -0
  118. package/lib/services/bounded-reads.d.ts +17 -0
  119. package/lib/services/bounded-reads.js +42 -0
  120. package/lib/services/calculated-insight-sql-checks.d.ts +33 -0
  121. package/lib/services/calculated-insight-sql-checks.js +193 -0
  122. package/lib/services/command-dlo.d.ts +48 -0
  123. package/lib/services/command-dlo.js +103 -0
  124. package/lib/services/command-native-data-graph.d.ts +54 -0
  125. package/lib/services/command-native-data-graph.js +485 -0
  126. package/lib/services/command-native-data-stream.d.ts +104 -0
  127. package/lib/services/command-native-data-stream.js +257 -0
  128. package/lib/services/command-native-dmo.d.ts +124 -0
  129. package/lib/services/command-native-dmo.js +338 -0
  130. package/lib/services/command-native-mapping.d.ts +65 -0
  131. package/lib/services/command-native-mapping.js +129 -0
  132. package/lib/services/command-native-relationship.d.ts +46 -0
  133. package/lib/services/command-native-relationship.js +103 -0
  134. package/lib/services/cross-dataspace-deploy.d.ts +111 -0
  135. package/lib/services/cross-dataspace-deploy.js +493 -0
  136. package/lib/services/cross-dataspace-rename.d.ts +74 -0
  137. package/lib/services/cross-dataspace-rename.js +1314 -0
  138. package/lib/services/cross-dataspace-sql.d.ts +109 -0
  139. package/lib/services/cross-dataspace-sql.js +1301 -0
  140. package/lib/services/cross-space-context.d.ts +23 -0
  141. package/lib/services/cross-space-context.js +36 -0
  142. package/lib/services/crud-plan.d.ts +137 -0
  143. package/lib/services/crud-plan.js +408 -0
  144. package/lib/services/data-space-check.d.ts +89 -0
  145. package/lib/services/data-space-check.js +162 -0
  146. package/lib/services/data-space-prefix.d.ts +77 -0
  147. package/lib/services/data-space-prefix.js +127 -0
  148. package/lib/services/data-transform-space.d.ts +31 -0
  149. package/lib/services/data-transform-space.js +79 -0
  150. package/lib/services/delete-calculated-insight.d.ts +44 -0
  151. package/lib/services/delete-calculated-insight.js +101 -0
  152. package/lib/services/delete-data-transform.d.ts +52 -0
  153. package/lib/services/delete-data-transform.js +222 -0
  154. package/lib/services/delete-dmo-field.d.ts +211 -0
  155. package/lib/services/delete-dmo-field.js +472 -0
  156. package/lib/services/delete-identity-resolution.d.ts +43 -0
  157. package/lib/services/delete-identity-resolution.js +295 -0
  158. package/lib/services/delete-segment.d.ts +42 -0
  159. package/lib/services/delete-segment.js +248 -0
  160. package/lib/services/deploy-result.d.ts +54 -0
  161. package/lib/services/deploy-result.js +60 -0
  162. package/lib/services/escaped-copy.d.ts +23 -0
  163. package/lib/services/escaped-copy.js +88 -0
  164. package/lib/services/execute-calculated-insight-deploy.d.ts +42 -0
  165. package/lib/services/execute-calculated-insight-deploy.js +96 -0
  166. package/lib/services/execute-data-transform-deploy.d.ts +56 -0
  167. package/lib/services/execute-data-transform-deploy.js +168 -0
  168. package/lib/services/execute-native-identity-resolution-deploy.d.ts +48 -0
  169. package/lib/services/execute-native-identity-resolution-deploy.js +360 -0
  170. package/lib/services/execute-segment-deploy.d.ts +45 -0
  171. package/lib/services/execute-segment-deploy.js +393 -0
  172. package/lib/services/local-file-removal.d.ts +36 -0
  173. package/lib/services/local-file-removal.js +103 -0
  174. package/lib/services/native-calculated-insight.d.ts +87 -0
  175. package/lib/services/native-calculated-insight.js +164 -0
  176. package/lib/services/native-crm-data-stream.d.ts +91 -0
  177. package/lib/services/native-crm-data-stream.js +272 -0
  178. package/lib/services/native-data-graph-context.d.ts +12 -0
  179. package/lib/services/native-data-graph-context.js +139 -0
  180. package/lib/services/native-data-graph-crd.d.ts +261 -0
  181. package/lib/services/native-data-graph-crd.js +866 -0
  182. package/lib/services/native-data-stream.d.ts +329 -0
  183. package/lib/services/native-data-stream.js +1830 -0
  184. package/lib/services/native-dlo.d.ts +163 -0
  185. package/lib/services/native-dlo.js +402 -0
  186. package/lib/services/native-dmo.d.ts +191 -0
  187. package/lib/services/native-dmo.js +614 -0
  188. package/lib/services/native-mapping.d.ts +255 -0
  189. package/lib/services/native-mapping.js +1226 -0
  190. package/lib/services/native-relationship.d.ts +132 -0
  191. package/lib/services/native-relationship.js +512 -0
  192. package/lib/services/operation-diagnostic.d.ts +83 -0
  193. package/lib/services/operation-diagnostic.js +272 -0
  194. package/lib/services/preflight-calculated-insight-deploy.d.ts +58 -0
  195. package/lib/services/preflight-calculated-insight-deploy.js +95 -0
  196. package/lib/services/preflight-data-transform-deploy.d.ts +33 -0
  197. package/lib/services/preflight-data-transform-deploy.js +104 -0
  198. package/lib/services/preflight-identity-resolution-deploy.d.ts +107 -0
  199. package/lib/services/preflight-identity-resolution-deploy.js +281 -0
  200. package/lib/services/preflight-segment-deploy.d.ts +31 -0
  201. package/lib/services/preflight-segment-deploy.js +109 -0
  202. package/lib/services/publish-calculated-insight.d.ts +40 -0
  203. package/lib/services/publish-calculated-insight.js +95 -0
  204. package/lib/services/publish-segment.d.ts +65 -0
  205. package/lib/services/publish-segment.js +194 -0
  206. package/lib/services/readback-pace.d.ts +16 -0
  207. package/lib/services/readback-pace.js +23 -0
  208. package/lib/services/retrieve-data-transform.d.ts +26 -0
  209. package/lib/services/retrieve-data-transform.js +65 -0
  210. package/lib/services/retrieve-identity-resolution.d.ts +40 -0
  211. package/lib/services/retrieve-identity-resolution.js +87 -0
  212. package/lib/services/retrieve-inventory.d.ts +32 -0
  213. package/lib/services/retrieve-inventory.js +151 -0
  214. package/lib/services/retrieve-segment.d.ts +120 -0
  215. package/lib/services/retrieve-segment.js +502 -0
  216. package/lib/services/segment-lookup.d.ts +46 -0
  217. package/lib/services/segment-lookup.js +108 -0
  218. package/lib/services/segment-members.d.ts +144 -0
  219. package/lib/services/segment-members.js +402 -0
  220. package/lib/services/select-native-retrieve.d.ts +60 -0
  221. package/lib/services/select-native-retrieve.js +226 -0
  222. package/lib/services/settle-calculated-insight.d.ts +22 -0
  223. package/lib/services/settle-calculated-insight.js +53 -0
  224. package/lib/services/sql-tokens.d.ts +58 -0
  225. package/lib/services/sql-tokens.js +147 -0
  226. package/lib/transport/api-version.d.ts +36 -0
  227. package/lib/transport/api-version.js +89 -0
  228. package/lib/transport/bound-ssot.d.ts +27 -0
  229. package/lib/transport/bound-ssot.js +116 -0
  230. package/lib/transport/calculated-insight-rest.d.ts +28 -0
  231. package/lib/transport/calculated-insight-rest.js +62 -0
  232. package/lib/transport/connect-client.d.ts +129 -0
  233. package/lib/transport/connect-client.js +446 -0
  234. package/lib/transport/connect-diagnostic.d.ts +89 -0
  235. package/lib/transport/connect-diagnostic.js +331 -0
  236. package/lib/transport/data-graph-rest.d.ts +27 -0
  237. package/lib/transport/data-graph-rest.js +76 -0
  238. package/lib/transport/data-stream-rest.d.ts +62 -0
  239. package/lib/transport/data-stream-rest.js +348 -0
  240. package/lib/transport/data-transform-rest.d.ts +25 -0
  241. package/lib/transport/data-transform-rest.js +100 -0
  242. package/lib/transport/dlo-native-rest.d.ts +22 -0
  243. package/lib/transport/dlo-native-rest.js +89 -0
  244. package/lib/transport/dlo-rest.d.ts +23 -0
  245. package/lib/transport/dlo-rest.js +135 -0
  246. package/lib/transport/dmo-native-rest.d.ts +18 -0
  247. package/lib/transport/dmo-native-rest.js +55 -0
  248. package/lib/transport/dmo-rest.d.ts +30 -0
  249. package/lib/transport/dmo-rest.js +163 -0
  250. package/lib/transport/mapping-rest.d.ts +63 -0
  251. package/lib/transport/mapping-rest.js +341 -0
  252. package/lib/transport/project-metadata.d.ts +36 -0
  253. package/lib/transport/project-metadata.js +118 -0
  254. package/lib/transport/relationship-rest.d.ts +43 -0
  255. package/lib/transport/relationship-rest.js +201 -0
  256. package/package.json +96 -4
@@ -0,0 +1,1208 @@
1
+ ## Mixed retrieve — 2026-11-14
2
+
3
+ One retrieve may hold any mix of selectors: `dlo`, `dmo`, `mapping`, `relationship:<Dmo__dlm>`,
4
+ `data-stream:`, `data-transform:`, `data-graph:` (several), `calculated-insight:`,
5
+ `identity-resolution:` and `segment:`, plus the existing type-inventory forms. Every family's
6
+ selector, version and data-space checks run before any org read; one refusal blocks the
7
+ whole run; with several families selected its diagnostic names the family (for example `--api-version 67.0` with a
8
+ transform, which reads at API 68 only). The families then run one after another: DLO, DMO,
9
+ mapping, relationship, Segment, calculated insight and identity resolution first, then data
10
+ streams, data transforms and data graphs. Each keeps its own rules (inventory refusals,
11
+ `--overwrite`, identical bytes `unchanged`). A failing component or family does not stop
12
+ the others; their files are kept and the result is the worst status (`failed` over
13
+ `blocked` over `success`). A failing graph gets its own diagnostic and the next graph still
14
+ runs. Retrieve only reads.
15
+
16
+ Live on `isolated-source` (2026-11-14, `auto`): one retrieve of a DMO, an Ingestion API
17
+ stream, a transform, two graphs and an identity resolution ruleset retrieved all six in one
18
+ `success` result. A repeat reported the DMO, ruleset, transform and graphs `unchanged`; the
19
+ stream was refused with `OVERWRITE_REQUIRED` because Salesforce returns its field mappings in a
20
+ different order on each read, and the file keeps that order (also for a stream retrieved alone).
21
+
22
+ ## Delete phases — 2026-11-14
23
+
24
+ One delete may hold any mix of families, selected by name with `-m` only (no
25
+ `--source-dir`). Delete runs the deploy
26
+ phases in reverse: P4 data graphs, P3 identity resolution, calculated insight and Segment
27
+ (every dependent in an earlier stage than the component it needs, including a graph, CI or
28
+ Segment on the unified/link DMO of a selected ruleset), P2 data transforms, P1
29
+ relationships, mappings, DMOs and DLOs (in that order), P0 data streams. Each family keeps
30
+ its own delete checks. A phase starts only after every item of the previous one settled; a
31
+ blocked, failed or unconfirmed item stops the run, and an item Salesforce accepted but still
32
+ processes (`deletion-processing`) stops the later phases (`DELETE_PHASE_NOT_SETTLED`;
33
+ rerun the same delete once it reads absent). A `-m` delete needs no confirmation flag;
34
+ `--confirm-delete` is accepted only with `--changed-since`. Every item carries `family`.
35
+
36
+ - Before the first delete (read-only, preview too) each selected transform, Segment, IR,
37
+ CI and graph is read from the org by name with the existing readers: transform through
38
+ the complete transform list (name ignoring case → record ID; no match `unchanged`, 2+
39
+ `TRANSFORM_TARGET_NOT_RESOLVED`) and `retrieveDataTransform`; Segment and IR by exact
40
+ GET (only `ITEM_NOT_FOUND` is absence); CI by the API 68 GET
41
+ (`acquireCalculatedInsight`, any status); graph by the
42
+ item GET; absence needs the item's exact "not found" answer, a metadata 404
43
+ `METADATA_ERROR_ENTITY_NOTFOUND`, a complete graph list without the name and an empty
44
+ SOQL read. Metadata, list or SOQL still holding it stops the delete before any deletion. An absent component reports
45
+ `unchanged` / `not-attempted` without calling its executor. The read definition is what
46
+ the family executor compares against; every executor guard is unchanged.
47
+ - Relationships are selected as `relationship:<SourceDmo__dlm>:<Name>`; a bare
48
+ `relationship:<Name>` (or more or fewer parts) is refused with `INVALID_SELECTION`. The
49
+ source DMO's relationships are listed and the name is matched ignoring case: no match
50
+ `unchanged` (also when the source DMO itself does not exist: its list answers HTTP 404
51
+ `ITEM_NOT_FOUND`; any other list error stops the delete), 2+ `AMBIGUOUS_RELATIONSHIP_TARGET`, a match whose source object is another
52
+ DMO `RELATIONSHIP_TARGET_BINDING_MISMATCH`. No local file is read.
53
+ - Local files after a confirmed deletion are removed at their canonical paths by name:
54
+ `data360/dataTransforms/<Name>.dataTransform.json`, the Segment, IR and graph file and
55
+ both CI members under `data360/` in the current directory. `--keep-local-files` keeps them. The name in those paths and in the
56
+ result item is the org's spelling when the read matched ignoring case (absent: the
57
+ selector's spelling).
58
+
59
+ - Preview runs every phase read-only (also after a blocked phase). An item whose selected
60
+ dependents an earlier phase plans to delete is reported `planned-dependencies`
61
+ (`DEPENDENCIES_PLANNED`, naming the dependents) without being read: an IR beside a graph
62
+ on its unified DMO, a DMO beside a graph on it, a DLO beside a transform reading it.
63
+ - A stream and its landing DLO both selected: one stream delete with `--delete-dlo`
64
+ semantics (the stream's linked DLO is looked up read-only before any write). The DLO is
65
+ never deleted on its own; its item reports `removedWith: data-stream:<Name>` and the
66
+ stream's outcome.
67
+ - A DMO and its last mapping both selected: the mapping guard
68
+ (`MAPPING_LAST_MAPPING_DELETE_BLOCKED`, before any write) hands the mapping to the DMO.
69
+ Only the DMO is deleted; the mapping item reports `removedWith: dmo:<Name>` and the DMO's
70
+ outcome, and its local file is removed with it. No read confirms the mapping's absence
71
+ separately: deleting a custom DMO removes its last mapping (observed at API68), while
72
+ that mapping's own delete fails with an internal error. Without the DMO in the selection the last
73
+ mapping stays refused.
74
+ - `--changed-since <ref>`: the components of the canonical plugin files deleted in the
75
+ range (committed or staged) are deleted through the same phases; changed and added files
76
+ are not part of a delete. Exclusive with `-m`; `--delete-dlo` is refused. Execution
77
+ always needs `--confirm-delete`; preview does not. Each family runs from its merge-base document (identity from content), every
78
+ deleted path must still be absent right before each phase and before each source-family
79
+ write (`BLOCKED_GIT_LIFECYCLE`), and each candidate's data space must equal the requested
80
+ one. A relationship takes its source DMO from the base content; a data transform resolves
81
+ its target ID by name from the complete transform list, ignoring case: no match is
82
+ `unchanged` / `not-attempted` (also on a rerun), 2+ is refused
83
+ (`TRANSFORM_TARGET_NOT_RESOLVED`). A deleted stream
84
+ file plus its landing DLO file is one stream delete with that DLO. No local file is
85
+ listed or removed. A rename split across commit, index and worktree (one component
86
+ deleted at one path, added at another) blocks the selection before any org call.
87
+
88
+ ## Deploy phases — 2026-11-13
89
+
90
+ One deploy may hold any mix of families. They run in phases: P0 data streams, P1 native
91
+ DLO/DMO/mapping/relationship, P2 the data transform, P3 identity resolution, calculated
92
+ insight and Segment, P4 data graphs. A phase starts only after every item of the previous
93
+ one settled, and a blocked, failed or unknown item stops the run. With a mapping,
94
+ relationship or transform in the selection, P1 runs on the native route; DLO/DMO files
95
+ beside P3 files only stay in the ordered batch. A calculated insight, Segment or graph on
96
+ an identity resolution's unified or link DMO (name derived from the ruleset file) runs
97
+ after that ruleset is `PUBLISHED`. Before the first write, P3 inputs pass their local
98
+ file, version and dependency checks and the stream, transform and graph scope is checked.
99
+ A deploy takes any number of transforms, each created or updated by name, of any owner
100
+ (Salesforce refuses writes to system transforms, reported as `rejected`); a transform
101
+ file's optional `schedule` is sent with its own schedule PUT when it differs, and a file
102
+ without it leaves the schedule alone. A
103
+ DLO file named like the landing DLO of a stream the deploy creates is refused after the
104
+ stream's read-only comparison, before any write (`DATA_STREAM_DLO_COLLISION`); beside an
105
+ existing stream it deploys. `--wait-timeout` applies to every selected graph and needs
106
+ one. Preview runs every phase read-only (also after a blocked phase) and reports items
107
+ whose parents an earlier phase creates as `planned-dependencies` (`DEPENDENCIES_PLANNED`,
108
+ `MAPPING_DEPENDENCIES_PLANNED`): a mapping or transform on a new stream's landing DLO, a
109
+ graph on a new DMO or ruleset output. Live (isolated-source, 2026-11-13): one
110
+ `--changed-since` deploy of an existing probe stream, DMO and mapping reported all three
111
+ `unchanged` with no write. The IR + graph create in one deploy is not yet run live.
112
+
113
+ ## Public native Data Graph CRUD
114
+
115
+ Default/`auto` or `68.0` retrieval exports `.native-dataGraph.json`
116
+ (`kind: native-data-graph`, `apiVersion: 68.0`); other versions are `INVALID_SCOPE`. The
117
+ API67 graph route and its `.dataGraph.json` file are gone. Every graph shape the API returns is admitted: any root (standard or
118
+ unified), related objects with joins, all field types, any refresh schedule. Checks are
119
+ structural only (closed keys, names, tree and join shape, `c__dataSpace` agreeing with
120
+ `definition.dataspaceName`, root equals `primaryObjectName`); the root is bound by the
121
+ document's own `primaryObjectName`, read with `?dataspace=` of the run's data space.
122
+ Lowercase API values are stored as `NONE`, `KEY_QUALIFIER`, `DESC`, `Day`; node `type`
123
+ stays lowercase. All six graphs in `isolated-source` retrieve at `auto` and preview
124
+ `unchanged` on route 68.0. Deploy runs graphs as the last phase of any selection,
125
+ explicit or `--changed-since`.
126
+
127
+ Create waits up to `--wait-timeout` while the graph builds: `creating` with empty
128
+ generated names (empty names on a non-ready read are not authored values), then `ready`
129
+ before the day-zero names exist, then metadata `Inprogress` for about 5 minutes,
130
+ sometimes briefly missing. The POST is resent only after a 429/503 answer. A create the plugin cannot confirm
131
+ reports `failed`/`unknown` with `DATA_GRAPH_CREATE_UNCONFIRMED` naming the step
132
+ (`request`, `response`, `settlement`, `identity`, `deadline`); an unchanged repeat deploy or a
133
+ retrieve confirms the graph. Retrieve resolves a relative
134
+ `-d`/`--output-dir` against the current directory for every family.
135
+
136
+ Create sends the authored root, related objects, fields and schedule and needs
137
+ `--allow-processing`; Salesforce adds key-qualifier fields to related objects and can
138
+ report a different node `type`. A node without `type` is sent without one and Salesforce
139
+ assigns it (live at API 68, 2026-11-18, a create without node types answered 201). A
140
+ related object added by an update without `type` is sent without one; not verified live. A graph with a related object took about 17 minutes to
141
+ build (metadata `Inprogress` most of it). Builds pass a brief `processing` status
142
+ between `creating` and `ready`, which settlement accepts. Update sends the file as the
143
+ desired state in one PUT (label, description, schedule, incremental refresh, the fields
144
+ and related objects as listed, field settings, the root object); Salesforce decides and an
145
+ API 4xx answer is `failed`/`rejected`, with Salesforce's answer as the item diagnostic
146
+ (`REQUEST_FAILED`). Live at API 68 (2026-11-18) it refuses with 400 a
147
+ removed field (also `isProjected: false`), a removed related object, another related
148
+ object in place of an existing one and a root change; key-qualifier fields it added are
149
+ kept when the file leaves them out. A join change of an existing related object answers
150
+ 200 but keeps the old join, so the plugin refuses it before any write
151
+ (`DATA_GRAPH_JOIN_CHANGE`; preview reports the graph `present` and the run
152
+ `DEPLOY_PREVIEW_BLOCKED`), and a graph read back with another join than sent is
153
+ `DATA_GRAPH_CHANGE_NOT_APPLIED`. A changed node type, reference or projected name of an
154
+ existing node is refused (Salesforce assigns them). Name and data space identify the
155
+ graph: a renamed file creates or addresses another graph and the old graph is not renamed, because a PUT cannot rename one (400
156
+ `INVALID_API_INPUT`). Identical deploy is zero-write `unchanged`. Preview is read-only. Cascade is unsupported.
157
+ Preview (only) checks the root DMO and, for a derived
158
+ root, its IR owner via `GET /ssot/identity-resolutions` (`DATA_GRAPH_ROOT_NOT_FOUND`,
159
+ `DATA_GRAPH_OWNER_NOT_FOUND`, `DATA_GRAPH_OWNER_NOT_PUBLISHED`, info `DATA_GRAPH_OWNER`).
160
+
161
+ Delete needs an exact selector (the definition is read from the org by name) and fresh
162
+ ready/identity/created-date/definition/root checks, with explicitly empty
163
+ known dependency/related-segment arrays. Unknown/nonempty dependencies block;
164
+ exhaustive external-consumer exclusion remains unverified. Live API68 create/read/
165
+ delete evidence confirmed independent graph-definition absence. The DELETE answer
166
+ decides (2xx deleted, API 4xx rejected, other 5xx/transport unknown); 429/503 means not
167
+ processed: create, update and delete wait (Retry-After or 20 s) and resend within the wait
168
+ budget, then report `failed`/`not-attempted`. There is no
169
+ read-back, because the by-name metadata read serves a stale copy of a deleted graph for
170
+ about 11-12 minutes, alternating with not found. No generated DMO/mapping/transform/internal-state,
171
+ storage/credits cleanup or computation claim. Installed package smoke verifies
172
+ offline routing only, not live installed cross-org acceptance.
173
+
174
+ ## Public native identity resolution
175
+
176
+ Retrieve, deploy (POST create, full-settings PATCH) and delete use native API68 in the
177
+ run's data space for every ruleset the API returns or accepts: any configuration type
178
+ and name, automatic run on or off, case sensitivity, secondary DMO, filters, trusted
179
+ sources, any match and reconciliation rules, unpublished rulesets. Kept refusals:
180
+ structural checks; one reconciliation entry per entity (outputs are keyed by entity);
181
+ the `1ir…` ID check before DELETE; configuration type or secondary DMO changes
182
+ (`blocked-changes`, PATCH cannot carry them); a create name other than `<type>` or
183
+ `<type>_<rulesetId>`, outside `default` `<prefix>_<type>` or `<prefix>_<type>_<rulesetId>`
184
+ (`IDENTITY_RESOLUTION_NAME_TYPE_MISMATCH`); PATCH or
185
+ DELETE while `PUBLISHING`/`DELETING` (`IDENTITY_RESOLUTION_NOT_SETTLED`). Run statistics
186
+ are not part of the file. The API 67 IR routes are gone.
187
+
188
+ By default deploy waits after a create or update until the ruleset is `PUBLISHED`
189
+ with equal settings and verified generated outputs. `deploy --async` (IR only;
190
+ `INVALID_ASYNC_SCOPE` without an IR) runs all checks before the write, sends the one
191
+ POST/PATCH, requires the immediate answer to name the ruleset (API name, or the
192
+ existing ID on PATCH) and returns `creation-processing` /
193
+ `update-processing` with mutation `acknowledged-processing`, exit 0, with no
194
+ settlement reads. `--changed-since` with no IR in the change set is also
195
+ `INVALID_ASYNC_SCOPE` (exit 1); with `--preview` the flag has no effect. A selection
196
+ holding a calculated insight, Segment or data graph on the ruleset's derived unified or
197
+ link DMO is refused with `--async` (`IDENTITY_RESOLUTION_ASYNC_DEPENDENTS`); without
198
+ it, those dependents run after the ruleset reads `PUBLISHED`.
199
+
200
+ - Helps: no wait for publishing (one to four minutes after the write) or for the
201
+ checks after it; several rulesets can be deployed in a row and checked later.
202
+ - Does not save the checks before the write, which take most of the time: live, an
203
+ `--async` create took 570 s (default create 695 s; a read-only `unchanged` rerun
204
+ 663 s).
205
+ - Hurts: no confirmation that publishing succeeded, the settings stuck or the
206
+ outputs exist; dependent steps run right after fail (a Data Graph on the unified
207
+ DMO needs a `PUBLISHED` owner, preview reports `DATA_GRAPH_OWNER_NOT_PUBLISHED`);
208
+ rerunning the same file is refused with `IDENTITY_RESOLUTION_NOT_SETTLED` until it
209
+ settles; a failed publish looks like a slow one until you rerun.
210
+ - Status check: deploy the same file again (full checks, so as slow as a deploy).
211
+ `IDENTITY_RESOLUTION_NOT_SETTLED` = still publishing; `unchanged` = settled as
212
+ written with verified outputs.
213
+
214
+ ## Data stream reference reads on native API 68
215
+
216
+ Data stream retrieve, deploy and delete read connections (`/ssot/connections` list, by id
217
+ and `/schema`) and dependencies (`/ssot/data-streams/{name}/dependencies`,
218
+ `/ssot/data-lake-objects/{name}/dependencies`) through native API 68 GETs; route output
219
+ says `transport: native`. The API 67 tool layer (`mcp-execute.ts`) is gone. The native
220
+ bodies matched the tool results minus the `{result}` wrapper in live probes.
221
+
222
+ Stream create and update send the file as written and Salesforce decides (live, API 68:
223
+ it refuses changing or removing an existing Ingestion API mapping, a new field type and an
224
+ Ingestion API create other than `UPSERT`; it accepts additive mappings at create, from the
225
+ primary key and of any type). Streams of every connector other than the Ingestion API use
226
+ the GET-shaped file; only Salesforce CRM is tested live. The file format is in
227
+ [artifact-format.md](artifact-format.md#public-data-stream-document).
228
+
229
+ ## Public native calculated insight lifecycle
230
+
231
+ Calculated insights use API 68 for retrieve, deploy (including `--draft`), publish and
232
+ delete; every other version is refused with `INVALID_SCOPE`. In the run's data space
233
+ (`c__dataSpace`; another is `CI_DATASPACE_MISMATCH`). No
234
+ Metadata API or dependency reads; no command needs `--allow-processing`.
235
+
236
+ Retrieve writes `data360/calculatedInsights/<Name>__cio.calculatedInsight-meta.json`
237
+ (the GET body minus status, run history, record links and the SQL-derived dimensions
238
+ and measures) and `<Name>__cio.calculatedInsight-meta.sql` (the expression as plain
239
+ SQL). Deploy, publish and delete read the same two files.
240
+
241
+ Deploy: one GET by name; 404 creates (POST), a present insight holding every key of the
242
+ file is `unchanged`, otherwise one PATCH. A 404 `ENTITY_IS_DELETED` (an insight
243
+ Salesforce is still deleting) reads absent as well: one POST, Salesforce's answer
244
+ reported as is. The file is sent as written with only the input key names
245
+ (`dataSpaceName`, `createdFromPackage`, `sourceDeveloperName`) and PascalCase enums translated and null values left out
246
+ (`calculatedInsightInputBody`); a PATCH leaves out an unchanged `definitionType`. Live
247
+ API 68 (2026-11-15): `dataSpace`/`isFromPackage` are rejected as unrecognised,
248
+ `publishScheduleInterval` must be PascalCase, `definitionType`/`queryDialect` pass in
249
+ either form on POST, any `definitionType` on PATCH is refused, and a PATCH without
250
+ `draft` activates a DRAFT (deploy sends `draft: true` for one). A 4xx answer is `rejected`; otherwise bounded reads (12, one second apart,
251
+ 120 s) confirm the file is held and the insight is not `PROCESSING`. `--draft` sends
252
+ `draft: true`; a DRAFT insight stays a draft on update. Publish sends the file with
253
+ `draft: false` and waits for ACTIVE. Delete: GET (identity must match), one DELETE,
254
+ reads until 404. Ordering: the `<Name>__dlm` and `<Name>__cio` tokens of the SQL are
255
+ the insight's dependencies (`calculatedInsightReference`).
256
+
257
+ ## Installed API61 mapping create and single addition — 2026-11-04
258
+
259
+ Fresh empty custom Other/Text fixtures passed installed public mapping create, exact
260
+ canonical retrieval, filtered target binding lookup, one additive Text identity pair
261
+ and a GET-only unchanged repeat at explicit API61, with `--dataspace` omitted.
262
+ Captured native routes retained v61.0 and omitted the dataspace query; mapping write
263
+ bodies carried no scope field. Independent reads confirmed ACTIVE mapping settlement,
264
+ all prior pairs/selectors, the full DLO and DMO field/key definitions; only the added
265
+ Extra__c isMapped flag changed during update. Create/update previews were read-only.
266
+
267
+ This covers the exercised API61 create, read and one-pair addition with omitted
268
+ scope, not general CRUD or inventory pagination. API60 GET404 is separate evidence,
269
+ not POST/PATCH/DELETE rejection proof. Pair removal (desired-state) is admitted at
270
+ every native version the plugin accepts and is observed through the plugin at API 61,
271
+ 64 and 68. No nondefault space, ingestion, populated data
272
+ or released-package qualification follows. The fresh sole mapping and both parents
273
+ are deliberately retained under the accepted last-mapping limitation; no delete,
274
+ parent cascade or terminal cleanup was attempted.
275
+
276
+ # Capability contract checklist
277
+
278
+ ## Installed mapping cross-org acceptance — 2026-11-04
279
+
280
+ API68/default empty Other/Text fixtures passed exact source mapping retrieval,
281
+ portable JSON transport changing only logical source-DLO/target-DMO bindings,
282
+ target-local mapping creation and canonical retrieval. One additive Extra Text
283
+ identity pair persisted; repeated preview/execution was GET-only and unchanged.
284
+ Explicit create/update previews were independently checked as nonmutating.
285
+
286
+ Whole-mapping deletion is specified under
287
+ [Native mapping targets](#dmo-native-route-bounded-live-verification) below. The
288
+ last mapping of a custom DMO is not deleted, so the exact owned source and target
289
+ final mappings and their parents remain; DMO object deletion/cascade was not tested.
290
+ This is not general schema portability, populated-object, lower-version,
291
+ inventory-completeness or released-package proof.
292
+
293
+ ## Native standalone DMO unchanged deployment — 2026-11-04
294
+
295
+ Historical record of the 2026-11-04 scope. Its limits (Other category, Text fields,
296
+ label and additive Text updates only) no longer apply; current behaviour is in the
297
+ [dmo section](#dmo-native-route-bounded-live-verification) below.
298
+
299
+ Exact native `dmo:Name__dlm` deployment compared the existing target only after
300
+ all scope, key and field-preservation checks. Equal labels with no additions returned
301
+ `unchanged` / `not-attempted`, without POST or PATCH. Field order is immaterial;
302
+ the deliberate omission of ordinary generated System `KQ_Id__c` from saved JSON
303
+ is not a removal. At that time other field edits were blocked, and label changes and
304
+ ordinary nonprimary Text additions used independent post-write GET confirmation.
305
+
306
+ Fresh isolated-installed API68 acceptance transported an exact source-retrieved
307
+ portable Other/default empty Text DMO into the target with a different local ID.
308
+ Raw generated-field and primary-key definitions were preserved; portable source
309
+ and target definitions matched. Label plus additive Text update persisted; actual
310
+ repeat was GET-only. All create/update/delete previews were explicitly selected
311
+ and independently checked as nonmutating. Both exact owned fixtures were deleted
312
+ without cascade and independently absent by name. Protected returned inventory
313
+ subsets were preserved; 200 returned entries without count/page metadata do not
314
+ establish complete inventories. Scoped mapping/relationship checks are not
315
+ exhaustive dependency discovery. No ingestion, populated-object, lower-version,
316
+ mixed-family or released-package qualification is earned.
317
+
318
+ ## Native standalone DLO unchanged deployment — 2026-11-04
319
+
320
+ Exact native `dlo:Name__dll` deployment now compares the existing target after all
321
+ category, data-space, primary-key and field-preservation admission. Equal labels
322
+ and no added fields return `unchanged` / `not-attempted`, without POST or PATCH.
323
+ Field order is immaterial. A file may omit the fields Salesforce generated
324
+ (`cdp_sys_SourceVersion__c`, `DataSource__c`, `DataSourceObject__c`,
325
+ `InternalOrganization__c` and the key qualifier `KQ_<Name>__c` of another field,
326
+ for example `KQ_Id__c` for the primary key or `KQ_RefId__c` for a relationship
327
+ source field); they stay as they are, so a hand-written file with only the
328
+ authored fields deploys onto its existing DLO. Any other omitted field is refused
329
+ (`UNSUPPORTED_DLO_FIELD_CHANGE`). A listed field is compared on the keys the file
330
+ states; keys only the org's copy carries are ignored, and a differing stated key is
331
+ refused with the same code. On Engagement DLOs the file may also omit
332
+ `cdp_sys_PartitionDate__c`, the DateTime field Salesforce adds with the event field.
333
+ Retrieve leaves all of these generated fields out of the file; the fields named by
334
+ `eventDateTimeFieldName` and `recordModifiedFieldName` are always saved, so retrieved files redeploy `unchanged`.
335
+ Label changes and nonprimary field additions of any type Salesforce accepts use the
336
+ update route; changed or removed existing fields are refused with the same code.
337
+ Create sends the category as the file states it, and for Engagement the event field
338
+ `spec.eventDateTimeFieldName`; neither can change afterwards, so a changed category
339
+ is refused with `UNSUPPORTED_DLO_CATEGORY_CHANGE` and a changed event field with
340
+ `UNSUPPORTED_DLO_EVENT_FIELD_CHANGE`, before any write. Observed at API 68 through
341
+ the plugin on 2026-11-11: a Profile and an Engagement DLO created, redeployed and
342
+ round-tripped through retrieval unchanged, a field added to the Engagement DLO, and
343
+ a changed event field refused with nothing written.
344
+
345
+ The optional `spec.recordModifiedFieldName` is carried through retrieve, create and
346
+ update. Observed at API 68 on 2026-11-16: create set it, an update set it on a DLO
347
+ without one, a repeat deploy of the retrieved file was `unchanged`, and a changed
348
+ value was answered by Salesforce with HTTP 400 `Record modified field already present`
349
+ (reported as `DLO_HTTP_ERROR`). A hand-written DLO, DMO and mapping file deployed
350
+ `unchanged` after a relationship made Salesforce add `KQ_RefId__c` and its mapping
351
+ pair. `capabilities` (DLO) and `isSegmentable` (DMO) are not authorable: Salesforce
352
+ answers HTTP 403 to non-empty `capabilities` and HTTP 400 `JSON_PARSER_ERROR` to
353
+ `isSegmentable` on create and update, so neither is saved in a file.
354
+
355
+ Fresh isolated-installed API68 acceptance retrieved an empty standalone Other/default
356
+ DLO from the source and deployed the exact saved file into the target, with differing
357
+ org-local IDs and independent full generated/primary-key preservation. A label and
358
+ additive Text update persisted; repeated deploy captured only GET, no mutation.
359
+ Both exact owned fixtures were independently confirmed absent after guarded deletion.
360
+ This does not close mixed-family dependency acceptance, ingestion, populated-object,
361
+ lower-version or released-package qualification.
362
+
363
+ General seven-family support is **unimplemented**. Each family section below
364
+ states its own bounded scope; verified behaviour is named there and nothing beyond
365
+ it is claimed. Historical API observations are not implemented contracts.
366
+ Every family must complete all gates below before support can be declared.
367
+
368
+ `--api-version latest` is not accepted. Default/`auto` and explicit numeric pins
369
+ select the family-specific routes described in each section.
370
+
371
+ ## dlo: unimplemented
372
+
373
+ Data spaces (2026-11-18): every command checks its data space and the `c__dataSpace` names of
374
+ the selected files with one `GET /ssot/data-spaces` before any read or write. A DLO file lists
375
+ all its data spaces. Deploy adds the DLO to a listed data space with one
376
+ `PUT /ssot/data-spaces/<space>/members` naming only this DLO; the PUT adds and keeps every
377
+ other member (live API 68, DB entry `data360:dataspace-members-put-semantics-api68`), so no
378
+ member list is read or resent (a data space whose list cannot be read completely, such as
379
+ `default`, is no longer refused; run live on `default`, DB entry
380
+ `data360:plugin-dlo-add-default-dataspace-api68`). It removes the DLO from an unlisted data space
381
+ with `DELETE …/members?memberNames=<Name>__dll` only with `--allow-dataspace-removal`, then
382
+ reads the DLO until it lists the planned data spaces. A member write that Salesforce answers
383
+ without success is `DLO_MEMBERSHIP_UPDATE_REJECTED`. Create sends the run's data space only;
384
+ the others follow through the member route. Delete refuses a DLO in other data spaces too
385
+ (`DLO_DELETE_OTHER_DATASPACES`), also as the landing DLO of a stream deleted with
386
+ `--delete-dlo`. Routes proven live at API 68 (verification DB entries
387
+ `data360:dlo-dataspace-membership-20261118.api68`,
388
+ `data360:dataspace-followups-20261118.api68`); the plugin's own run of them is not yet
389
+ verified live.
390
+
391
+ Data spaces of DMOs, mappings and relationships (2026-11-19, D1b): each file names its one
392
+ data space in a top-level `c__dataSpace` string (the old `identity.dataSpace` is
393
+ `LEGACY_DATASPACE_KEY`), and deploy and delete refuse a file of another data space than the
394
+ run's (`DMO_DATASPACE_MISMATCH`, `MAPPING_DATASPACE_MISMATCH`,
395
+ `UNSUPPORTED_RELATIONSHIP_DATASPACE`). Every mapping and relationship REST request sends
396
+ `?dataspace=` with the run's data space and every DMO create and update `dataSpaceName`, also
397
+ for `default`. The DMO list holds every data space and is kept by each entry's
398
+ `dataSpaceName`; an entry without one stops the listing (`NATIVE_INVENTORY_UNCONFIRMED`).
399
+ Files carry the names Salesforce stores (`ds2_Individual__dlm` and `FirstName__c` for a
400
+ standard DMO copy in `dataspace2`). The first mapping onto a copy that does not exist yet is
401
+ sent once more with the default spelling (`ssot__X__dlm`, `ssot__` target fields, the prefix
402
+ from `GET /ssot/data-spaces`) when Salesforce answers the copy spelling with 404, and read back
403
+ under the copy name; proven live through the raw API (DB entry
404
+ `data360:dataspace-identity-resolution-api68`), not yet through the plugin. The
405
+ `*_DATASPACE_COLLISION` codes of DMOs, mappings and relationships are gone: their names are
406
+ unique in the org.
407
+
408
+ Data spaces of data streams and calculated insights (2026-11-19, D2): a stream file lists the
409
+ data spaces of its landing DLO in `c__dataSpace` (read from the DLO on retrieve) and deploy
410
+ only checks it: it must hold the run's data space and equal the DLO's data spaces, and a new
411
+ stream lists the run's data space alone, sent as the DLO's `dataspaceInfo` in the create
412
+ (`STREAM_DATASPACE_MISMATCH`). Spaces change only through the DLO file. A stream belongs to the
413
+ run's data space when its DLO lists it; the stream list is kept by each entry's
414
+ `dataLakeObjectInfo.dataSpaceInfo`, and a stream outside the run's data space is
415
+ `UNSUPPORTED_STREAM_DATASPACE`. `STREAM_DATASPACE_COLLISION` is gone. A calculated insight file
416
+ names its data space in a top-level `c__dataSpace` string instead of Salesforce's `dataSpace`;
417
+ deploy sends it as `dataSpaceName` in create and update, retrieve lists with `?dataspace=` and
418
+ checks each GET, and deploy, publish and delete refuse a file of another data space
419
+ (`CI_DATASPACE_MISMATCH`). The ordered batch keys components by data space; CI SQL names
420
+ carry no data space, so an insight's dependencies are taken from its own data space. Neither family has run live outside `default` through the
421
+ plugin yet.
422
+
423
+ Data spaces of segments and data transforms (2026-11-19, D3): a segment file names its data
424
+ space in a top-level `c__dataSpace` string (`identity.dataSpace` and `spec.segmentOn.dataSpace`
425
+ are `LEGACY_DATASPACE_KEY`); its DMO and Waterfall children are in the same data space
426
+ (`SEGMENT_DEPENDENCY_OTHER_DATASPACE`). Files carry the stored name (`ds2_<Name>` in
427
+ `dataspace2`), sent unchanged as `developerName` with `POST /ssot/segments?dataspace=<space>`;
428
+ a non-default file without the org's prefix is `SEGMENT_NAME_NOT_STORED`. Item routes (GET,
429
+ PATCH, DELETE, publish by ID) take no data space; the segment list is kept by each entry's
430
+ `dataSpace`. Retrieve, deploy, delete, publish and `segment members export` (detail query with
431
+ `dataspace=`) work in the run's data space and refuse another (`SEGMENT_DATASPACE_MISMATCH`). A
432
+ data transform file names its data space in `c__dataSpace`, equal to `definition.dataSpaceName`
433
+ when it names one; otherwise the data space comes from the transform's MktDataTransform record
434
+ (one SOQL read per command, `TRANSFORM_DATASPACE_UNREADABLE` on failure), and a transform without
435
+ any data space there is handled in `default` only. Retrieve, deploy and delete resolve it before
436
+ any projection, verbatim file, write or DELETE and refuse another
437
+ (`TRANSFORM_DATASPACE_MISMATCH`); a create outside `default` needs `dataSpaceName`. Neither family has
438
+ run live outside `default` through the plugin yet.
439
+
440
+ Data spaces of data graphs and identity resolution (2026-11-19, D4): with them every family works
441
+ in any data space, and every default-only refusal is gone. A graph file names its data space in
442
+ `c__dataSpace`, equal to `definition.dataspaceName` when the definition names it (deploy fills
443
+ it otherwise; the create body sends it). Graph names are unique in the org, so retrieve, deploy
444
+ and delete read the graph by name and check its `dataspaceName` before anything is projected
445
+ (`DATA_GRAPH_DATASPACE_MISMATCH`, `DATA_GRAPH_DATASPACE_UNREADABLE`); the metadata and inventory
446
+ reads send `?dataspace=<run>`, the `DataSpace` SOQL names the run's data space, and the root DMO
447
+ read names it too (a root of another data space is `DATA_GRAPH_DEPENDENCY_OTHER_DATASPACE`;
448
+ related objects are sent as written). An identity resolution file names its data space in
449
+ `c__dataSpace`; its references carry none (`LEGACY_DATASPACE_KEY` for the old keys) and use the
450
+ stored spelling (`ds2_Individual_<id>`, `ds2_Individual__dlm`, `FirstName__c`; DB
451
+ `data360:dataspace-identity-resolution-api68`). Deploy refuses a non-default file without the
452
+ org's prefix before any write (`IDENTITY_RESOLUTION_NAME_NOT_STORED`) and creates with the ruleset
453
+ ID after `<prefix>_<type>_` and `dataSpaceName`; the prefix is the one the org's data space list
454
+ names, also in the create itself. A ruleset named `<prefix>_<type>` (no ruleset ID) outside
455
+ `default` is untested. The item GET reads a ruleset of any data space,
456
+ so each read checks `dataSpaceName` first (`IDENTITY_RESOLUTION_DATASPACE_MISMATCH`); the list
457
+ ignores `?dataspace=` and is kept by each entry's `dataSpaceName`. Entity and output DMOs are
458
+ read with `?dataspace=`; one of another data space, or a DLO source outside it, is
459
+ `IDENTITY_RESOLUTION_DEPENDENCY_OTHER_DATASPACE`. The mixed retrieve and the deploy batch take
460
+ every family in any one data space. Neither family has run live outside `default` through the
461
+ plugin yet.
462
+
463
+ Data space name prefixes of the org-unique families (2026-11-21): custom DMOs (creationType
464
+ `Custom`, no namespace), calculated insights and data transforms (creationType `Custom`) and
465
+ data graphs carry the prefix of their data space; in `default` no other space's prefix. The
466
+ prefixes come from the command's one `GET /ssot/data-spaces`. Deploy checks every selected file
467
+ locally before the first write of the run and reads only a name that breaks the rule, the way
468
+ the type's own stage does (a transform by the complete inventory, ignoring case): absent is
469
+ refused (`DMO_PREFIX_MISMATCH`, `CI_PREFIX_MISMATCH`, `TRANSFORM_PREFIX_MISMATCH`,
470
+ `DATA_GRAPH_PREFIX_MISMATCH`), present is a warning and the deploy goes ahead. Retrieve warns
471
+ per item. An org with only `default` reads nothing more. A new `<prefix>_<Name>__dlm` DMO file
472
+ is refused as a standard copy when `ssot__<Name>__dlm` or `<Name>__dlm` reads as a Standard DMO
473
+ of `default`, and is created as a custom DMO otherwise; a copy of a `<Name>__dlm` standard DMO is
474
+ not created by a mapping file either (only the `ssot__` spelling is). Proven live through the plugin on API 68 in
475
+ `dataspace2` and `default` (DMO and calculated insight draft probes; DB entry
476
+ `data360:plugin-dataspace-prefix-rule-acceptance-api68`); transforms and graphs are covered by
477
+ unit tests only.
478
+
479
+ Cross-data-space deploy (2026-11-21, `--allow-cross-dataspace` / `-c`): a selected file whose
480
+ `c__dataSpace` is not the run's is translated in memory before any other check, with the
481
+ prefixes of the same one `GET /ssot/data-spaces` (read early only when such a file is selected).
482
+ Rule renames only: the data space prefix on, off or swapped (custom DMOs, segments, Waterfall
483
+ children), standard DMO `ssot__<Name>__dlm` and its copy `<prefix>_<Name>__dlm` with fields
484
+ `ssot__X__c` and `X__c` (`KQ_` fields keep their names), identity resolution outputs
485
+ `Unifiedssot<Entity><Id>__dlm` and `<prefix>_Unified<Entity><Id>__dlm` (also `UnifiedLink`; towards
486
+ `default` the unified fields get `ssot__` back except `UnifiedRecordId__c` and
487
+ `SourceRecordId__c`). Translated: DMO (name, fields), mapping (target DMO and target fields; the
488
+ DLO side stays, the mapping is found by its binding), relationship (both sides; a CRM target
489
+ stays), DLO (the run's data space added to its list), UI segment (name, `segmentOn`, every
490
+ `objectApiName` and `fieldApiName` of the criteria; compared values stay) and Waterfall segment
491
+ (name, `segmentOn`, children). A name no rule places exactly (towards `default` a
492
+ `<prefix>_<Name>__dlm` without a selected custom DMO file, packaged DMOs, unified outputs without
493
+ the `ssot` spelling, a foreign prefix, a data space without a prefix) is
494
+ `CROSS_DATASPACE_UNRESOLVED`; STL transforms with any node other than load, join, formula,
495
+ filter, sqlFilter, aggregate, appendV2 and output (Step 3b-1), DCSQL transforms with a manifest
496
+ node without SQL in `compiled_code`, transforms of other types, segment types other than UI,
497
+ Waterfall and DBT, and data streams are `CROSS_DATASPACE_UNSUPPORTED`; both before any write.
498
+ Step 3b-2 translates DCSQL transforms: both names, `dataSpaceName`, each manifest node's
499
+ `compiled_code` (and `raw_code`) by the SQL rewrite below, `relation_name` and
500
+ `outputDataObjects` (with their `dataspaceName`) by the object rules, DLOs kept. Each node's
501
+ top-level output columns (first `UNION` branch) are checked against the fields of the output object
502
+ its `relation_name` names: an alias spelled like an output field
503
+ takes the field's target name (`AS ssot__Name__c` becomes `AS Name__c` towards `dataspace2`, its
504
+ uses in `ORDER BY`/`HAVING` follow, and a `GROUP BY` name equal to such a renamed alias is
505
+ refused unless the alias names a column of the same name (`s.Id__c AS Id__c`), since Spark reads it as a table column when one exists and as the alias otherwise); a column without an alias is refused unless its target
506
+ name equals its field's target name (write it with `AS` and the source field name, which then
507
+ follows the field), and so is `*` over a table that is not a DLO, or over a DLO when the output
508
+ fields change. A node whose `relation_name` names no output object is an intermediate model:
509
+ its `relation_name` follows the object rules, and its output columns are checked the same way
510
+ against that relation's fields by the relation's own rule (a DLO relation keeps every name, a
511
+ DMO relation's fields follow its rule, as the nodes reading it see them; a custom DMO relation
512
+ keeps its fields, so `*` over a DLO into it is kept); a missing or non-string `relation_name` is refused. A node's `config` is kept
513
+ (`materialized` is the only key retrieve shows); a value holding a name-like part (`__c`,
514
+ `__dlm`, `__dll`, `__cio`, `ssot__`, e.g. `unique_key`) is refused rather than translated, since
515
+ no retrieved transform shows such a key. The DCSQL checks are proven by unit tests only. Also
516
+ translated (Step 3a): calculated
517
+ insights (`apiName` and `sourceCiDevName` by the prefix rule, `dataSpace`, and the SQL of
518
+ classic and `DC_SQL` insights) and DBT segments (name, `segmentOn` and every model's SQL). The
519
+ SQL is tokenized: single-quoted texts and `--` / `/* */` comments are skipped, double quotes and
520
+ backticks are names; a backslash before a quote in a text, a comment inside a comment, an
521
+ unclosed text, name or comment, unmatched parentheses, or an HTML entity (`&#39;`, `&lt;`, …)
522
+ outside texts and comments refuse the file (every Data 360 request asks for plain text with
523
+ `X-Chatter-Entity-Encoding: false`, so retrieve writes the SQL as Salesforce stores it; without
524
+ that header Connect REST HTML-escapes every string of a response; Salesforce stores what it is
525
+ sent and never decodes, DB entries
526
+ `data360:plugin-cross-dataspace-deploy-3b-api68` and
527
+ `data360:connect-rest-entity-encoding-header-api68`). An STL expression a file still holds
528
+ HTML-escaped is read unescaped and written plain; a same-space deploy of a transform file
529
+ holding an entity outside texts is refused before any write (`UNSUPPORTED_TRANSFORM_INPUT`: write
530
+ the character itself; one Salesforce stores so reads back the same after a fresh retrieve).
531
+ Before any update of any type, a file text that decodes once to exactly the org's text is
532
+ refused (`HTML_ESCAPED_FILE`). Tables in `FROM` and
533
+ `JOIN` are placed by the DMO rules and the ruleset list (`__dlm`), the prefix rule (`__cio`) or
534
+ kept (`__dll`); a parenthesis after a join word (`JOIN (SELECT …) a`, `JOIN (t a)`) is a
535
+ subquery with its own scope or a table group, `LEFT(`/`RIGHT(` stay functions; `WITH` blocks
536
+ (also `RECURSIVE`, read by the columns of their first block), aliases and column aliases are
537
+ user names and stay. A name equal to a select alias reads the alias only in the clauses Spark
538
+ resolves against the projection (`ORDER BY`, `SORT BY`, `DISTRIBUTE BY`, `CLUSTER BY`, `HAVING`,
539
+ `QUALIFY`); in `WHERE`, `GROUP BY` (a table column wins over an alias there) and `WINDOW` it is
540
+ the table's column; after a set operation the trailing `ORDER BY` reads the first branch's
541
+ aliases and columns, and a name the first branch does not put out is refused. A column alias without `AS` is read only after a complete operand (`)`, a
542
+ number, a text, a quoted name or a word that is no operator keyword such as `NOT`, `OR`, `IS`,
543
+ `BETWEEN`, `EXISTS`, `DIV`), as Salesforce accepts it; such an alias that looks like a name
544
+ still goes through the leftover check below.
545
+ Name-likeness and the leftover check ignore case as SQL does; a name whose rule part (`__c`,
546
+ `__dlm`, `__cio`, `__dll`, `ssot__`, `KQ_`, `Unified`, a data space prefix) is in another case
547
+ is refused, not placed. A column is placed by its table through the
548
+ table name, alias, `WITH` block or subquery (whose output columns are tracked, `*` included); a
549
+ column without a qualifier only when every table of the query and the enclosing ones that could
550
+ own it spells it the same way. Afterwards every word and quoted token of the result outside
551
+ texts and comments is checked: a name-like token (`__c`, `__dlm`, `__cio`, `__dll`, `ssot__`)
552
+ the rewrite did not account for, or one still holding `ssot__` towards a non-default space or
553
+ another space's prefix (user names excepted), is `CROSS_DATASPACE_UNRESOLVED`, named by SQL
554
+ file, line and column, because Salesforce accepts a default-spelled insight in `dataspace2`
555
+ and fails it about three minutes after activation with `ERROR` `CREATE_FAILED` and no message
556
+ (DB entry `data360:dataspace-ci-spelling-stl-nodes-api68`). The insight and segment copy files
557
+ include their SQL files, checked before the first write like the JSON. Also translated (Step 2b): data graphs
558
+ (name by the prefix rule, `dataspaceName`, root, `projectedName`, every related object with its
559
+ rebuilt `jsonPath`, fields and `keyQualifierName`, join `fieldName`/`parentFieldName` by the
560
+ node's and its parent's DMO, recency, filter and top-K criteria fields; the graph-level
561
+ generated names, fragment DMOs, join and field developer names and `referenceDeveloperName` are
562
+ left out), identity resolution rulesets (`<prefix>_<type>_<rulesetId>` with the ID kept,
563
+ secondary DMO, match criteria, reconciliation entities and field overrides, output owner and
564
+ entity; DLO sources stay) and STL transforms (both names, `dataSpaceName` set to the target,
565
+ load datasets, fields and `sampleDetails.dataspace`, output names, `fieldsMappings` and
566
+ `dedupOrder`, join keys by the side's lineage, `outputDataObjects`; DLO names stay). For these
567
+ three, a full-coverage check refuses the file (`CROSS_DATASPACE_UNRESOLVED`) when any `__c` or
568
+ `__dlm` value was not looked at by the translation, or any value still holds `ssot__` towards a
569
+ non-default space or another space's prefix, because Salesforce accepts and builds a graph left
570
+ in the default spelling in `dataspace2` (DB entry
571
+ `data360:dataspace-graph-ir-field-spelling-api68`). An identity resolution output whose ruleset
572
+ is not in the same deploy is named from one `GET /ssot/identity-resolutions` (read only when a
573
+ selected file names an output): the source ruleset that lists it, then the one target ruleset of
574
+ the same type and its output for the same entity; none or several are
575
+ `CROSS_DATASPACE_UNRESOLVED`, a failed read `CROSS_DATASPACE_RULESETS_READ_FAILED`. Two inputs that reach the same org item once translated (same family and API name; a
576
+ mapping's source DLO and target DMO; a relationship's source and target fields), such as a copy
577
+ file selected beside its original, are `DUPLICATE_IDENTITY`, also before any write. Every later
578
+ file check, `--changed-since` snapshots included, compares against the file's own bytes and
579
+ document, never the translation. After the stages, every translated item that deployed gets a copy file written
580
+ like retrieve writes it, only to a new path: DMO and segment copy paths are checked before the
581
+ first write (identical content reused, other content `CROSS_DATASPACE_COPY_CONFLICT`); a
582
+ mapping or relationship copy takes the name Salesforce holds it under (a mapping copy is the
583
+ mapping as the deploy read it back, with its pair selectors, as a retrieve writes it) and is left alone when a
584
+ differing file exists there; a DLO gets none. `--preview` reports every rewrite and the planned
585
+ copy files and writes nothing. Proven live through the plugin on API 68, default to `dataspace2` in one run: a custom DMO (created under its `ds2_` name), its DLO (membership added), its mapping (copy file under the name Salesforce returned) and a UI segment on it; the copy files redeploy unchanged, the default originals stay unchanged, a repeat reuses the identical copies, and the reverse preview places the `ds2_` files back (DB entry `data360:plugin-cross-dataspace-deploy-2a-api68`). Step 2b, proven live through the plugin on API 68, default to `dataspace2`: a data graph written by hand on `ssot__ContactPointPhone__dlm` with `ssot__` fields was created as `ds2_CliXsPhone2b` on `ds2_ContactPointPhone__dlm` and built to ready, and the stored graph holds only copy spelling; an STL transform on DLOs was created as `ds2_CliXsCopy2b` in `dataspace2` with both DLOs added to `dataspace2` (DB entry `data360:plugin-cross-dataspace-deploy-2b-api68`). Identity resolution rulesets, ruleset pairing, join keys and STL transforms on DMOs are covered by unit tests only: a live ruleset in `dataspace2` would need new mappings onto its standard DMO copies.
586
+
587
+ Native DLO retrieve and delete read one exact `__dll` detail at API 68 (or an explicit
588
+ numeric pin of 61 and up) through the guarded GET transport without refresh, retry or
589
+ redirects. Stream/connector bindings, lineage and generated replay remain unqualified.
590
+
591
+ The unused internal raw-page DLO evidence inventory helper and its
592
+ incomplete-evidence type have been removed. Native DLO inventory is
593
+ `listNativeNames`: it takes every DLO the list pages return (live, `totalSize` can exceed
594
+ the entries returned) and keeps those of the run's data space; the file of each lists every
595
+ data space the DLO belongs to (`c__dataSpace`), so a DLO in several data spaces retrieves
596
+ from any of them into the same file. This internal cleanup changes no public command or native
597
+ retrieval behavior; the historical evidence below does not qualify ingestion,
598
+ stream/connector bindings, lineage or generated replay.
599
+
600
+ API68 official-reference annotations mark list/detail routes available from API60;
601
+ that reference availability is not live qualification at every version, nor of
602
+ connector-specific behavior. The current reference
603
+ marks DLO `dataSource` and atomic `dataModelObjectConfig` inputs as API67-only.
604
+ [Official DLO reference](https://developer.salesforce.com/docs/data/connectapi/references/spec#tag/Data-Lake-Objects).
605
+
606
+ - [ ] Record official list/detail/create/update endpoints and API versions.
607
+ - [ ] Prove pagination, complete schema and stream/connection/lineage bindings.
608
+ - [ ] Classify writable/read-only/unknown fields and connector prerequisites.
609
+ - [ ] Prove configuration-only create/update/no-op without starting ingestion.
610
+
611
+ ## dmo: native route, bounded live verification
612
+
613
+ The plugin has one DMO route, the native one. Default/`auto` uses API 68; numeric
614
+ pins from 61 are kept. The artifact is `data360/dmo/<ApiName>__dlm.dmo-meta.json`;
615
+ its format is described in [artifact formats](artifact-format.md). DMOs use only
616
+ this file location.
617
+
618
+ The plugin keeps no local allowlists. Category, field data types, label length,
619
+ object and field descriptions and extra keys are sent as authored; Salesforce
620
+ decides and its error is reported. Retrieval supports exact names, the bare type
621
+ and omitted selectors; standard, namespaced and generated DMOs can be retrieved. A
622
+ definition may omit generated and system fields, and retrieve leaves them out: fields
623
+ read as `System`, `DataSource__c`, `DataSourceObject__c`, `InternalOrganization__c`
624
+ and `KQ_` names. Primary keys and the standard fields of a standard DMO are always
625
+ saved. Deploy keeps the generated fields from the org. Keys only returned by reads
626
+ (`creationType`, `isDistinct`, `usageTag`, `keyQualifierName`) are kept in
627
+ retrieved files and never sent. After a write the plugin polls reads (up to 6,
628
+ 5 seconds apart) to confirm the requested definition and the absence of removed
629
+ fields; a write is never repeated.
630
+
631
+ Observed at API 68 on two orgs with empty, unmapped custom DMOs in the default data
632
+ space:
633
+
634
+ - [x] Create with the categories Profile, Engagement and Other. Segment_Membership
635
+ is internal-only; the other ten schema values are rejected. Input spelling is
636
+ case-insensitive, reads return upper case, the plugin saves
637
+ `Profile`/`Engagement`/`Other`. Engagement needs no event date key;
638
+ `eventDateTimeFieldName` is rejected as unknown input.
639
+ - [x] Ten field data types: Number, Text, Date, DateTime, Url, Phone, Email,
640
+ Percent, Boolean, Currency. ArrayOfFloats and ArrayOfTexts are rejected by the
641
+ API. A Currency field adds the generated system field
642
+ `cdp_sys_record_currency__c`.
643
+ - [x] Salesforce limits object and field labels to 40 characters, requires exactly
644
+ one primary key (any accepted type), generates the key qualifier
645
+ (`KQ_<key>__c`, `keyQualifierName`) and rejects input keys outside its schema.
646
+ - [x] Object `description` round-trips. Field `description` and `isDynamicLookup`
647
+ are accepted but never returned by reads, and a field description does not
648
+ appear in the Data Model UI either: the plugin sends them when a field is
649
+ created or otherwise edited, and cannot detect or confirm a change to them
650
+ alone.
651
+ - [x] Update by PATCH: change the object label, set or clear the object description
652
+ (absent `spec.description` is not managed; an empty string clears it), change
653
+ existing field labels, add fields of any accepted type.
654
+
655
+ Refused by the plugin before any write, because the native DMO API cannot do it:
656
+
657
+ - Changing an existing field's data type or moving the primary key (the API answers
658
+ 200 and silently ignores it): `UNSUPPORTED_DMO_FIELD_CHANGE`.
659
+ - Removing a field without `--allow-field-removal` (no native route):
660
+ `UNSUPPORTED_DMO_FIELD_CHANGE`. Omitting a custom field that exists in the target
661
+ counts as a removal. Omitting the target's primary-key field is refused with the
662
+ same code, with or without the flag.
663
+ - Adding a generated field or a second primary key:
664
+ `UNSUPPORTED_DMO_FIELD_ADDITION`.
665
+
666
+ Field removal with `--allow-field-removal` (deploy only, native DMO inputs only):
667
+
668
+ - Custom target fields missing from the file are removed with one Metadata API
669
+ destructive change per DMO: `sf project deploy start --metadata-dir` with an empty
670
+ `package.xml` and a `destructiveChanges.xml` listing `CustomField` members
671
+ `<ObjectName>__dlm.<FieldName>__c`. The manifest version is the native API version
672
+ in use. Names are validated before they are written into the manifest.
673
+ - Order: the PATCH for other changes first (skipped when removals are the only
674
+ change), then the removal, then readback, which also requires every removed field
675
+ to be absent. No write is retried.
676
+ - The DMO deploys in its normal position (DLO, DMO, mapping), also beside selected
677
+ mappings that target it: PATCH, a wait until the PATCH is readable, then the
678
+ removal. One result item per file.
679
+ - Salesforce drops a field's mapping pairs itself when the field is removed through
680
+ the Metadata API. Observed at API 68, also with the field mapped by two mappings:
681
+ exactly that field's pairs disappear, every other pair keeps its selector, both
682
+ mappings stay ACTIVE, and the DMO's properties and other fields are unchanged. The
683
+ plugin therefore removes a mapped field with the one destructive change and does
684
+ not delete pairs one by one.
685
+ - A deploy never removes the primary key or a generated field (a missing one is
686
+ kept); `delete --field` removes generated fields on request.
687
+ - A mapped field is removed with one command,
688
+ `sf data360 deploy -m mapping:<MappingApiName> -m dmo:<Dmo__dlm> --allow-field-removal`,
689
+ when the DMO file omits the field and the mapping file omits its pair. Before the
690
+ first write the plugin lists the mappings that target the DMO read-only; every
691
+ mapping holding a pair for the field must be reconciled by a selected mapping file
692
+ (same source and target object) without that pair. A field held by several
693
+ mappings needs every one of them selected without its pair.
694
+ - Otherwise the batch is refused with `DMO_FIELD_REMOVAL_MAPPED` before any write.
695
+ The refusal names every mapped field with its mappings (`mappedFields` in JSON) and
696
+ prints the retrieve command, the file edits and the single deploy command; without
697
+ an identifiable mapping, or when the list request fails, it keeps the generic
698
+ instruction. An unmapped field on a mapped DMO is removed normally. The `isMapped`
699
+ marker on fields is never sent, compared or required.
700
+ - Before the DMO's first write (its PATCH, or the destructive change when there is no
701
+ PATCH) the same read-only check runs (fields present, mappings ACTIVE, every pair on
702
+ a removed field covered); a removal that would be refused stops the item as
703
+ `blocked`/`not-attempted` with nothing written.
704
+ - Right before the destructive change the plugin reads the DMO and all of its
705
+ mappings again. A pair for a removed field held by a mapping that is not selected
706
+ with a file, or targeting a field the admission did not cover, stops the DMO item
707
+ with `DMO_FIELD_REMOVAL_MAPPED` before the destructive change; an earlier PATCH
708
+ stays in place.
709
+ - After the destructive change: polled reads (up to 6, 5 seconds apart) until the
710
+ fields are absent and every mapping equals its earlier state minus exactly the
711
+ removed fields' pairs, ACTIVE. Any other change (another pair, field, DMO property,
712
+ mapping or status) stops with `DMO_FIELD_REMOVAL_SIDE_EFFECT`. Not settled in time:
713
+ `DMO_PERSISTENCE_UNCONFIRMED` (field still readable) or
714
+ `MAPPING_UNMAP_PERSISTENCE_UNCONFIRMED` (a pair still listed). Never retried, never
715
+ rolled back; the DMO item is `failed` with mutation `unknown` and the batch stops.
716
+ - The DMO item lists `removedFields` and `droppedPairs` (`mapping`,
717
+ `sourceFieldDeveloperName`, `targetFieldDeveloperName`). The selected mapping files
718
+ deploy afterwards and find those pairs already gone; a file whose only change was
719
+ dropping them reports `unchanged`. Deploying the mapping files first and the DMO
720
+ file in a second command works as well.
721
+ - Observed at API 68 through the plugin on a custom DMO field mapped by two mappings:
722
+ one deploy of both mapping files plus the DMO file removed the field, Salesforce
723
+ dropped both pairs, and a repeat reported unchanged. A mapped custom field of a
724
+ standard DMO is covered by synthetic tests only.
725
+ - Observed at API 68 on empty custom DMOs in two orgs; removal of mapped fields in one
726
+ org only. Not verified: other API versions, non-default data spaces, fields that
727
+ hold data or are referenced by a segment, calculated insight, relationship or other
728
+ component.
729
+ - Preview reports the planned removals (`removeFields`,
730
+ `DMO_FIELD_REMOVAL_PLANNED`) and writes nothing. For a mapped field the diagnostic
731
+ says that Salesforce drops its pairs together with the field, so the selected
732
+ mapping files find them already gone. A removal-only deploy reports `updated`; a
733
+ repeat with the same file reports `unchanged`.
734
+ - A deployment that does not report every member as deleted fails with
735
+ `DMO_FIELD_REMOVAL_FAILED` and Salesforce's problem text; the mutation is reported
736
+ as unknown.
737
+ - The destructive change is observed on empty, unmapped custom DMOs with a manifest
738
+ at version 65.
739
+
740
+ A category change is sent, and Salesforce rejects it ("Data Object Category cannot
741
+ be updated"). On a standard DMO the category is ignored.
742
+
743
+ Write scope, decided from the raw read of the existing target
744
+ (`nativeDmoWriteScope`):
745
+
746
+ - `creationType` `Custom` and a name without a double underscore before `__dlm`:
747
+ everything above, whole-DMO delete and field-level delete.
748
+ - Everything else (standard scope): `creationType` `Standard` (for example
749
+ `ssot__Brand__dlm`), a platform-generated DMO (`Adg`, `Bridge`, `Derived`,
750
+ `Segment_Membership` or any other `creationType`), a custom `creationType` under a
751
+ namespaced name and a read without `creationType`. Deploy writes custom fields
752
+ (add, relabel, remove with `--allow-field-removal` under the same rules; a field
753
+ that reads mapped while no mapping lists a pair for it, as on generated DMOs, has
754
+ no pair to lose and is removed), the labels
755
+ of the other fields, the object label (sent only when it differs) and the object
756
+ description (absent is not managed, an empty string clears it). Field-level delete
757
+ removes any named field but the primary key. Whole-DMO delete is sent for every
758
+ DMO, a standard one and a read without `creationType` included, and Salesforce
759
+ decides (a 4xx answer is reported as rejected); a standard DMO is never created.
760
+
761
+ Standard-scope rules:
762
+
763
+ - Standard, system and generated fields (field `creationType` other than `Custom`)
764
+ are never removed by a deploy and may be absent from the file (retrieve leaves the
765
+ generated ones out, so a missing one is kept). One that the file lists with another
766
+ `label` gets that label alone sent (`{"fields":[{"name","label","dataType"}]}`);
767
+ Salesforce decides (API 68: system and graph fields relabelled, an `ssot__` field
768
+ refused with 400 `INVALID_INPUT`). Any other difference in a comparable property is
769
+ refused with `UNSUPPORTED_DMO_FIELD_CHANGE`, naming field and property. `isMapped`
770
+ and `keyQualifierName` are not compared on these fields. Salesforce does not protect
771
+ these fields itself (API 68 relabels and deletes them), so this rule is the
772
+ plugin's.
773
+ - A new field must be a plain custom field: no double underscore before `__c` and no
774
+ `creationType` other than `Custom`. Otherwise `UNSUPPORTED_DMO_FIELD_ADDITION`.
775
+ - The category is neither sent nor compared nor required at readback. Mapping a
776
+ standard DMO for the first time changes its category from `UNASSIGNED` to `OTHER`,
777
+ enables it, adds the system field `KQ_Id__c` and sets `keyQualifierName` on the
778
+ standard primary key; none of this causes a write or a refusal, so a retrieved file
779
+ deploys back `unchanged`, also to an org where the DMO is not mapped yet.
780
+ - PATCH body for one added custom field: `{"fields":[{"name","label","dataType",
781
+ "isPrimaryKey"}]}`; for a label change: `{"label"}`; every create and update also
782
+ names the run's data space in `dataSpaceName` (`default` when `--dataspace` is left out).
783
+ - Readback confirms the label, a managed description, the custom fields of the file,
784
+ the labels of the other listed fields and the absence of removed fields.
785
+ - [x] Observed at API 68 through the plugin on one standard DMO in two orgs, active in
786
+ only one of them: add and relabel a custom field; remove it with
787
+ `--allow-field-removal` and with `delete --field` (local file refreshed);
788
+ object description set and cleared; a changed standard field refused;
789
+ whole-object delete refused; a file retrieved in one org deploys unchanged to
790
+ the other.
791
+ - [x] Observed at API 68 on one standard DMO: object label changed and reverted;
792
+ Salesforce rejects an edit of a standard field ("Data model fields cannot start
793
+ with ssot__").
794
+ - [x] Observed at API 68 through the raw API on `Derived`/`Bridge` (identity
795
+ resolution) and `Adg` (data graph) DMOs: object label/description, added custom
796
+ fields, custom-field relabels and Metadata API field deletes accepted; system
797
+ and graph fields relabelled and deleted; `ssot__` field relabel refused (400);
798
+ mapping POST refused (400 "Unsupported DMO Creation Type used for mapping");
799
+ DMO DELETE refused while the owner exists (412 `MATCH_PRECONDITION_FAILED`).
800
+ - [ ] Not tested: a category change on a standard DMO, standard DMOs in active use
801
+ (data-bearing, referenced), whole-DMO delete of a standard DMO, namespaced
802
+ custom DMOs. The plugin's writes to platform-generated DMOs and the removal of a
803
+ mapped custom field of a standard DMO are covered by synthetic tests only.
804
+
805
+ Native mapping targets, decided from the same raw read:
806
+
807
+ - A mapping deploys onto any DMO and Salesforce decides; at API 68 it refuses
808
+ platform-generated targets (400 `INVALID_INPUT`), and that answer is reported.
809
+ `MAPPING_ACTIVATES_STANDARD_DMO` is shown only for a `creationType` `Standard`
810
+ target.
811
+ - Create and update, custom and standard target alike: the plugin sends the pairs the
812
+ file lists and Salesforce decides. No local rule on field data types, source and
813
+ target names, `KQ_` names, one source field onto several targets or a target another
814
+ mapping of the DMO also holds. Pairs whose data types differ are sent; the preview
815
+ adds the non-blocking diagnostic `MAPPING_FIELD_TYPES_DIFFER`
816
+ (`Source (Type) -> Target (Type)`). A pair naming a missing field is refused with
817
+ `MAPPING_FIELD_NOT_FOUND`, naming the pair, the field and its object. A new mapping
818
+ without a pair joining the two primary keys is rejected by Salesforce (HTTP 400
819
+ `MISSING_ARGUMENT: Unable to find Primary Key of DLO in POST request of Mapping Creation`, reported as `MAPPING_HTTP_ERROR`). Pair removal and whole-mapping delete
820
+ are admitted at every native API version the plugin accepts (61 and up, default 68).
821
+ - Standard target, create: authored pairs may target standard and custom fields; the
822
+ primary-key pair joins the two keys (for example `Id__c` to `ssot__Id__c`). The
823
+ body carries the authored pairs only.
824
+ - Standard target, generated pairs: a system pair is recognised when its target is
825
+ the source's namesake or `ssot__<Name>Id__c` and the target read reports the field
826
+ as `System`, or as `Standard` for `DataSource`, `DataSourceObject` and
827
+ `InternalOrganization`. The key qualifier pair is `KQ_<Key>__c` on both sides for
828
+ the source primary key `<Key>__c`; on a DMO that is not yet enabled its target
829
+ field may still be absent. A relationship from a non-key target field adds a key
830
+ qualifier pair whose names differ: `KQ_<S>__c` onto the `System` key-qualifier field that the
831
+ target field names in `keyQualifierName`, where the mapping maps `<S>__c` onto
832
+ that target field (seen at API 68: `KQ_RefId__c` to `KQ_Name__c` for `RefId__c` to
833
+ `ssot__Name__c`; custom DMOs are treated the same way). Generated pairs are never
834
+ sent and, with the key pair, never unmapped by a deploy.
835
+ - Mapping file and existing mapping, custom and standard target alike: the file may
836
+ list only the authored pairs. The pairs Salesforce generated (the three system
837
+ pairs and the key qualifier pair) are taken from the org's copy and treated as part
838
+ of the file, so a hand-written file deploys back `unchanged`, can add pairs, and
839
+ removes exactly the authored pairs it drops. The authored primary-key pair must
840
+ stay in the file (`MAPPING_PROTECTED_PAIR_REQUIRED`). Retrieve writes the authored
841
+ pairs only. One rule (`isGeneratedMappingPair`), applied to fresh reads of the
842
+ source data lake object and the target DMO, decides for retrieve which pairs to
843
+ leave out and for deploy which org pairs to keep, so a pair a retrieved file omits
844
+ is never read as a removal. When those reads fail, retrieve refuses the mapping with
845
+ `MAPPING_GENERATED_PAIRS_UNPROVEN` and writes nothing for it.
846
+ - Activation notice: when the raw target read of a standard DMO does not say
847
+ `isEnabled: true`, the preview item and the created item carry
848
+ `MAPPING_ACTIVATES_STANDARD_DMO`. The first mapping enables the object for good
849
+ (category `OTHER`, system field `KQ_Id__c`, `keyQualifierName` on the primary key);
850
+ deleting the mapping does not undo it. The notice changes neither outcome nor exit
851
+ status.
852
+ - Pair removal by deploy (a pair the file no longer lists), custom and standard
853
+ target alike: any authored pair is removed, including a pair onto a standard field
854
+ of a standard DMO (for example `Name__c` to `ssot__Name__c`), a pair whose source
855
+ and target names differ, and any data type; Salesforce decides. The three system
856
+ pairs, the key qualifier pair of the target's primary key and the key pair (source
857
+ primary key onto target primary key, any name and type, from the org's
858
+ `isPrimaryKey` flags) are never removed. A file that omits one is refused with
859
+ `MAPPING_PROTECTED_PAIR_REQUIRED`; when the key pair cannot be identified, removal
860
+ is refused with `MAPPING_PROTECTED_LAYOUT_UNPROVEN` before any write, and so is a dropped
861
+ pair onto a system or key-qualifier field not recognised as generated.
862
+ - Whole-mapping delete (`sf data360 delete -m mapping:<Name>`), native API 61 and up,
863
+ default 68: one Metadata API destructive deployment, type
864
+ `ObjectSourceTargetMap`, member the mapping developer name. No pair is unmapped
865
+ first and no native DELETE is sent. Any mapping is deleted this way, whatever pairs
866
+ it holds, on a custom or a standard DMO.
867
+ - Reads before the write: the mapping, all mappings of the target DMO, the DMO.
868
+ - Only refusal, without a write: the last mapping of a custom DMO
869
+ (`MAPPING_LAST_MAPPING_DELETE_BLOCKED`). Salesforce does not delete it (Metadata
870
+ API: internal error; native DELETE: HTTP 500). The message names the DMO and the
871
+ way out, `sf data360 delete --metadata dmo:<Dmo__dlm>`, which removes the mapping
872
+ with the DMO. Selected together with that DMO, the mapping is reported
873
+ `removedWith` the DMO instead. The last mapping of a standard DMO is deleted; the DMO stays
874
+ enabled with its generated `KQ_Id__c` field and no mapped fields. In a data space other than `default`, Salesforce refuses to delete the last mapping onto a standard DMO copy (`ds2_X__dlm`): the destructive deployment fails with "An unexpected error occurred" and the item is reported rejected (live API 68).
875
+ - `--preview` is read-only and reports the single planned step `delete`.
876
+ - The deployment is sent once and never retried. Not confirmed by Salesforce:
877
+ `MAPPING_DELETE_FAILED` with Salesforce's problem text.
878
+ - Readback: up to 6 reads, 5 seconds apart, until the mapping reads 404
879
+ (`MAPPING_DELETION_UNCONFIRMED` otherwise); then the DMO's other mappings (pairs
880
+ and selectors) and the DMO's field names must be exactly what they were
881
+ (`MAPPING_DELETE_SIDE_EFFECT` otherwise). On a standard DMO copy in another data
882
+ space the fields only the deleted mapping targeted may be gone (Salesforce drops a
883
+ copy field with its last mapping); every other field must stay.
884
+ - Shared target field: a pair is removed even when another mapping of the same DMO
885
+ targets the same field. The field must then keep `isMapped: true`; it loses the
886
+ marker with the last such pair. A pair onto a field another mapping targets is sent
887
+ like any other addition.
888
+ - [x] Observed through the plugin on empty synthetic fixtures in one org: a mapping
889
+ created with a Number pair, a renamed pair (`Note__c` to `Other__c`) and one
890
+ Number source onto a Number and a Text target, ACTIVE (66 seconds for two data
891
+ lake objects, the DMO and the mapping); its preview `unchanged` with
892
+ `MAPPING_FIELD_TYPES_DIFFER`, a repeat deploy and a deploy of the retrieved
893
+ file `unchanged` (5 seconds each); a pair removed at API 64 (16 seconds) and
894
+ API 61 (17 seconds); a file dropping the key pair refused with
895
+ `MAPPING_PROTECTED_PAIR_REQUIRED`, nothing written.
896
+ - [x] Observed at API 68 through the plugin: a mapping created onto one already active
897
+ standard DMO, together with its data lake object, from a hand-written file with
898
+ the pairs `Id__c` to `ssot__Id__c` and `Name__c` to `ssot__Name__c`; the four
899
+ generated pairs added by Salesforce; the retrieved mapping deploying back with
900
+ no change; the activation notice in a mapping preview against a second org where
901
+ the same standard DMO is not active, with nothing changed.
902
+ - [x] Observed at API 68 through the plugin: a first mapping onto the inactive
903
+ standard DMO `ssot__Brand__dlm` (outcome created, with
904
+ `MAPPING_ACTIVATES_STANDARD_DMO`; the DMO then enabled with category `OTHER` and
905
+ `KQ_Id__c`).
906
+ - [x] Observed at API 68 through the plugin: the pair onto the standard field
907
+ `ssot__Name__c` removed by deploying the retrieved mapping file without it.
908
+ - [x] Observed at API 68 through the plugin, whole-mapping delete: a non-last mapping
909
+ of a custom DMO with two mappings (21 seconds; the other mapping and all 8 DMO
910
+ fields unchanged); the last mapping of the same DMO refused with nothing
911
+ written; the only mapping of `ssot__Brand__dlm` deleted in two orgs, one of them
912
+ still holding the pair onto `ssot__Name__c`.
913
+ - [x] Observed at API 68 through the plugin on a custom DMO field mapped by two
914
+ mappings: `delete --field` removed the field with one destructive change and
915
+ Salesforce dropped both pairs (28 seconds); one deploy of both mapping files
916
+ plus the DMO file with `--allow-field-removal` did the same (29 seconds) and a
917
+ repeat reported unchanged. Both mappings stayed ACTIVE with their other pairs.
918
+ - [x] Observed at API 68 through the raw API: activation by the first mapping onto one
919
+ unused standard DMO (HTTP 201, object enabled, category from Unassigned to
920
+ Other, `KQ_Id__c` added and referenced by the standard primary key, not undone
921
+ by deleting the mapping) and HTTP 500 on a native DELETE of the only mapping of
922
+ a custom DMO.
923
+ - [x] Observed at API 68 through the plugin in one org, hand-written files with
924
+ authored fields and pairs only: a data lake object, a custom DMO and their
925
+ mapping created (45 seconds) and deployed again, all three `unchanged` with no
926
+ write; with one field added to the data lake object and to the DMO, one pair
927
+ added and one authored pair dropped in the mapping file, all three `updated`
928
+ (64 seconds), the mapping then holding the two kept authored pairs, the new
929
+ pair, the key pair and the four generated pairs; a data lake object and a
930
+ mapping onto `ssot__Brand__dlm` with the pairs `Id__c` to `ssot__Id__c` and
931
+ `Name__c` to `ssot__Name__c` created and deployed again, `unchanged`.
932
+ - [x] Measured at API 68 in one org on empty synthetic fixtures: create a data lake
933
+ object, a custom DMO and their mapping, 45 s; unchanged redeploy of 2 data lake
934
+ objects, a DMO and 2 mappings, 9 s; mapping deploy removing one pair, 17 s; two
935
+ mapping deploys each adding one pair, 32 s; one field added to data lake object
936
+ and DMO with one pair added and one dropped, 64 s; mapping file plus DMO file
937
+ with `--allow-field-removal` removing a mapped field, 29 s; `delete --field` on
938
+ a field mapped by two mappings, 28 s; delete of a non-last mapping of a custom
939
+ DMO, 21 s; delete of two custom DMOs, 24 s. During deploy, data lake object, DMO
940
+ and mapping reads use one authenticated connection per org and API version;
941
+ writes run through the Salesforce CLI. Settle reads after a data lake object,
942
+ DMO or mapping write: up to 6, 3 seconds apart; DMO readback after a DMO write
943
+ and field-removal readback: up to 6, 5 seconds apart.
944
+ - [x] Observed at API 68 through the plugin in one org, lean retrieve: a data lake
945
+ object, a custom DMO and their mapping plus a data lake object and a mapping onto
946
+ `ssot__Brand__dlm` created (90 s) and retrieved; the files held the authored
947
+ fields and pairs only (custom mapping: three authored pairs and the key pair;
948
+ standard mapping: `Name__c` to `ssot__Name__c` and `Id__c` to `ssot__Id__c`).
949
+ All five files deployed back `unchanged` (10 s) and the org still held every
950
+ generated pair.
951
+ - [x] Observed at API 68 through the plugin, local files on delete: the preview listed
952
+ the mapping file (`exists: true`); the mapping delete removed its file (27 s);
953
+ a data lake object delete with `--keep-local-files` kept its file; a DMO plus
954
+ data lake object delete removed both files (28 s).
955
+ - [ ] Not run live through the plugin: removal of a pair for a custom field of a
956
+ standard DMO (covered by synthetic tests), whole-mapping delete at API 61 to
957
+ 67, populated objects.
958
+
959
+ Whole-DMO delete: exact name, no dependency preflight, no prompt, no local file read.
960
+ After a confirmed deletion the DMO's local file is removed (see Local files after
961
+ delete in [artifact formats](artifact-format.md)); `--keep-local-files` keeps it.
962
+ Salesforce may cascade to the DMO's mapping. Deletion resolves the exact
963
+ target through `deleteNativeDmo` and uses `DmoClient.delete`.
964
+
965
+ Field-level delete,
966
+ `sf data360 delete -m dmo:<Name__dlm> --field <Field__c>`:
967
+
968
+ - Removes named custom fields from one DMO together with their mapping pairs. It is
969
+ the one delete operation that rewrites project files (it removes none), and it changes mappings the
970
+ command line does not name; check it with `--preview` first.
971
+ - `--field` is repeatable and needs exactly one `dmo:` selector. Any other selector,
972
+ `--changed-since`, `--delete-dlo`, or `--output-dir` without
973
+ `--field` is refused with `INVALID_FIELD_DELETE_SELECTION` before any org call.
974
+ - Admission is read-only: any DMO; each field exists (`DMO_FIELD_NOT_FOUND`) and is
975
+ not the primary key (`UNSUPPORTED_DMO_FIELD_CHANGE`); standard, system and
976
+ generated fields may be named and Salesforce decides (a Metadata API refusal is
977
+ reported with mutation `rejected`); the mappings targeting the DMO are listed and
978
+ every pair targeting a named field is collected. A mapped field is refused with
979
+ `DMO_FIELD_REMOVAL_MAPPED` only when the list request fails (other than 404); a
980
+ mapped field that no mapping lists a pair for has none to lose and is removed. Every collected pair must be identified on an ACTIVE
981
+ mapping whose detail read equals its list entry.
982
+ - Right before the write the plugin reads the DMO and all of its mappings again; the
983
+ pairs must still be exactly the planned ones (`MAPPING_UNMAP_PLAN_CHANGED`
984
+ otherwise, nothing written).
985
+ - Write, once and never retried: one Metadata API destructive change for all fields.
986
+ Salesforce drops the collected pairs with the fields; no request is sent per pair.
987
+ - Readback: polled reads (up to 6, 5 seconds apart) until the fields are absent and
988
+ every mapping equals its earlier state minus exactly the collected pairs, ACTIVE.
989
+ Any other change stops with `DMO_FIELD_REMOVAL_SIDE_EFFECT`; not settled in time
990
+ stops with `DMO_PERSISTENCE_UNCONFIRMED` (field still readable) or
991
+ `MAPPING_UNMAP_PERSISTENCE_UNCONFIRMED` (a pair still listed). Nothing is rolled
992
+ back. Outcomes: a stop before the write is `blocked`/`not-attempted`; a sent but
993
+ unconfirmed destructive change is `failed`/`unknown`; an unconfirmed readback is
994
+ `deletion-unconfirmed`/`acknowledged`.
995
+ - After success the existing `data360/dmo/<Name__dlm>.dmo-meta.json` and
996
+ `data360/mapping/<MappingApiName>.mapping-meta.json` files under `--output-dir`
997
+ (default: current directory) are overwritten with fresh reads. A mapping file with
998
+ another name is found by its binding (source DLO, target DMO, data space) and keeps
999
+ its name. Absent files are not created (`not-present`); no file is deleted. A failed refresh keeps outcome
1000
+ `deleted`, reports the file as `failed` and `LOCAL_REFRESH_FAILED`, and exits
1001
+ nonzero.
1002
+ - `--preview` writes nothing and reports one `unmap` step per pair (the pair
1003
+ Salesforce drops with the field), one `delete-field` step per field and
1004
+ `localFiles` with `exists`. Human preview line per pair:
1005
+ `Planned pair drop (Salesforce removes it with the field): ...`.
1006
+ - Result item: operation `delete-field`, `removedFields`, `unmappedPairs` (the pairs
1007
+ Salesforce dropped), `refreshedFiles`. Human output per pair:
1008
+ `dropped pair <Source> -> <Target> in mapping <Mapping>`. A repeat after success is
1009
+ refused with `DMO_FIELD_NOT_FOUND`.
1010
+ - Observed at API 68: a field mapped by two mappings of a custom DMO (one destructive
1011
+ change, both pairs dropped by Salesforce, 28 seconds), a custom field of a standard
1012
+ DMO in two orgs, and unmapped fields in a second org.
1013
+
1014
+ Git selection (`--changed-since`) uses the native DMO file. A native DMO selected
1015
+ beside Segment/CI/IR inputs, explicitly or through Git, joins the ordered batch. Prerequisites are checked, not pulled in: each must be selected
1016
+ explicitly or already exist in the target. On retrieve, a DMO beside other families
1017
+ is read at the native version while each other family keeps its own version rule.
1018
+
1019
+ Not qualified:
1020
+
1021
+ - [ ] Data-bearing DMOs and standard DMOs in active use.
1022
+ - [ ] A real first mapping onto an inactive standard DMO through the plugin.
1023
+ - [ ] Field removal of data-bearing or otherwise referenced fields.
1024
+ - [ ] Non-default data spaces.
1025
+ - [ ] API versions other than 68 for the behaviour listed above.
1026
+ - [ ] Relationships and SQL/flex DMOs.
1027
+ - [ ] Released-package acceptance.
1028
+
1029
+ ## relationship: native definition retrieve, create, update and delete
1030
+
1031
+ - [x] File `data360/relationship/<Name>.relationship-meta.json`: `schemaVersion: 1`,
1032
+ `kind: relationship`, `c__dataSpace`, `identity` (`apiName`) and `spec` with
1033
+ `sourceObjectName`, `sourceFieldName`, `targetObjectName`, `targetFieldName`,
1034
+ `cardinality` and `relationshipOwner`, plus an optional `label`. Cardinality,
1035
+ owner and label are sent as written.
1036
+ - [x] Native route only, default/auto API68; numeric pins from 61 are kept.
1037
+ - [x] Retrieve `-m relationship:<Dmo__dlm>`: every relationship whose source is that
1038
+ DMO, one file each. Bare `relationship` reads those of every listed DMO,
1039
+ one DMO after another. The list is read in pages of 200 by
1040
+ offset and must add up to `totalSize` without duplicate names
1041
+ (`RELATIONSHIP_INVENTORY_INCOMPLETE` otherwise). The label comes from the
1042
+ Metadata API (`FieldSrcTrgtRelationship` read, ten per call, same connection).
1043
+ - [x] Deploy matches by the file's name, then by binding (source object and field, target object and field), so
1044
+ a hand-written file may use any name; Salesforce generates the name on create.
1045
+ Present with the file's values: `unchanged`. Absent: one create,
1046
+ then reads until ACTIVE (`RELATIONSHIP_PERSISTENCE_UNCONFIRMED`, at once on a
1047
+ status other than ACTIVE or CREATING), then a label update when the file states one.
1048
+ Other values: one Metadata API `updateMetadata` of the whole record over the
1049
+ command's connection, read back until it holds the file (`updated`,
1050
+ `confirmed-updated`); Salesforce's refusal is `RELATIONSHIP_UPDATE_REJECTED`,
1051
+ mutation `rejected`.
1052
+ - [x] Native batches run DLOs, DMOs, mappings, then relationships; a preview of a
1053
+ relationship whose DMO the batch creates reports `planned-dependencies`.
1054
+ - [x] Salesforce requires both DMOs to be mapped (HTTP 400, reported as
1055
+ `RELATIONSHIP_HTTP_ERROR`, mutation `rejected`); no local check.
1056
+ - [x] Delete `-m relationship:<SourceDmo__dlm>:<Name>` lists the source DMO's
1057
+ relationships and finds the name ignoring case (`unchanged` when absent or when
1058
+ the source DMO itself does not exist, list HTTP 404 `ITEM_NOT_FOUND`,
1059
+ `AMBIGUOUS_RELATIONSHIP_TARGET` for 2+, `RELATIONSHIP_TARGET_BINDING_MISMATCH` when
1060
+ its source is another DMO); a bare `relationship:<Name>` is `INVALID_SELECTION`. With
1061
+ `--changed-since` the base content gives the source DMO and binding
1062
+ (`RELATIONSHIP_NAME_MISMATCH`, nothing deleted, when the binding exists only
1063
+ under another name). It sends one DELETE and confirms absence
1064
+ (`RELATIONSHIP_DELETION_UNCONFIRMED`). HTTP 4xx: mutation `rejected`.
1065
+ Relationships run first in a delete command. `--preview` only reads.
1066
+ - [x] Observed at API68 through the plugin in one org on empty custom DMOs: combined
1067
+ create of two DLOs, two DMOs, two mappings and the relationship, unchanged
1068
+ repeat, retrieve by DMO with unchanged redeploy, read-only delete preview,
1069
+ confirmed delete and unchanged repeat delete.
1070
+ - [x] Update observed at API68 through the plugin on an active relationship between
1071
+ mapped custom DMOs: label and cardinality changed, retrieved back, unchanged
1072
+ repeat. Raw probes: source field change accepted; target field, target object and
1073
+ owner refused (`UNKNOWN_EXCEPTION`).
1074
+ - [ ] Standard and data-bearing DMOs, non-default data spaces, other API versions,
1075
+ cardinalities other than ManyToOne.
1076
+
1077
+ ## mapping: native API 68 route
1078
+
1079
+ - [x] Mappings retrieve, deploy and delete on the native route (default/auto API 68, numeric
1080
+ pins from 61 kept); see the README type overview. There is no Metadata API mapping export.
1081
+ - [x] Mapping label (`spec.label`): the native routes carry none (GET without label; mapping
1082
+ PATCH/PUT 405; field-mappings PATCH and create ignore `label`; live API 68). Retrieve
1083
+ reads it with Metadata API `readMetadata` (10 names per call, warning and no label when
1084
+ the read fails); deploy sets a different label with one `updateMetadata` after the pair
1085
+ writes, carrying every pair the mapping currently has and no other (a pair left out is
1086
+ kept, a pair sent is added), and reads the label and pairs back.
1087
+ - [ ] Record official endpoints, versions, pagination and inventory scope.
1088
+ - [ ] Preserve deterministic source/target identity, fields and qualifier mappings.
1089
+ - [ ] Verify replacement/update semantics cannot silently remove existing mappings.
1090
+ - [ ] Prove schema-reference validation and supported create/update/no-op.
1091
+
1092
+ ## identity-resolution: unimplemented
1093
+
1094
+ - [ ] Record official endpoints, versions, pagination and writable contracts.
1095
+ - [ ] Preserve matching/reconciliation order, precedence, case and secondary objects.
1096
+ - [ ] Classify generated-schema dependencies and automatic-run side effects.
1097
+ - [ ] Prove configuration-only behavior without running resolution.
1098
+
1099
+ ## data-graph: native API 68 route
1100
+
1101
+ - [x] Native API68 retrieve, create, PUT update and delete; see the top section.
1102
+ - [ ] Prove create/read-back/no-op without refresh, activation or delete/recreate.
1103
+
1104
+ ## segment: native API 68 route
1105
+
1106
+ - [x] Native API68 retrieve, create, PATCH update, delete and publish by exact name in the
1107
+ default data space.
1108
+ - [x] DBT SQL models, UI criteria and other types (Waterfall, Dynamic,
1109
+ EinsteinGptSegmentsUI) are sent as written with their lookback; Salesforce decides
1110
+ (live API 68, 2026-11-18: lookbacks P7D to P1Y accepted, P0D, `30` and P400D refused).
1111
+ - [x] Refresh schedule: the optional `schedule` key in write shape is sent on create and,
1112
+ when a key it states differs, on update; absent leaves the schedule alone. A left-out
1113
+ start date is kept (verified); a left-out end date is checked by the readback. A UI schedule is cleared
1114
+ with `{"frequency": "None"}`; Salesforce refuses every clearing body for a DBT segment
1115
+ and that 400 is reported. Preview and deploy report `SEGMENT_SCHEDULE_CHANGE`.
1116
+ - [x] Parameters are not segment input at API 68 (create answers 400 for the key); a
1117
+ segment with parameters is retrieved as-is.
1118
+ - [x] Waterfall child segments: retrieve writes them by name (`childSegments`, one segment
1119
+ list read names the org-specific definition IDs); deploy binds each child in the
1120
+ target (children outside the selection are read before the first write of the run;
1121
+ `SEGMENT_CHILD_NOT_FOUND` before any write when missing), sends them as
1122
+ `includeCriteria` on create and PATCH, deploys selected children first and reads the
1123
+ children back by name. Live API 68 (2026-11-18): create with children 201; a PATCH
1124
+ without them keeps the children (200).
1125
+ - [x] Updates of other types are sent as written: a Waterfall and a Dynamic PATCH answered
1126
+ 200 and kept the rest (live API 68); Salesforce refuses every EinsteinGptSegmentsUI
1127
+ update with 400, reported as rejected.
1128
+ - [ ] A Waterfall PATCH that changes the children is sent as written, not verified live.
1129
+ Waterfalls with DBT children on an empty probe DMO ended `ERROR`
1130
+ (`PROCESSING_FAILED`, cause not investigated).
1131
+ - [ ] End dates and an hourly `publishInterval` are kept and sent as written, not verified
1132
+ live.
1133
+ - [ ] Criteria of dynamic and Einstein segments, real-time segments on a data graph and
1134
+ lookalike segments with a real seed are not verified.
1135
+
1136
+ ## calculated-insight: unimplemented
1137
+
1138
+ The bounded native lifecycle above does not close general lifecycle or
1139
+ cross-org support.
1140
+
1141
+ - [ ] Record official endpoints, versions, pagination and writable contracts.
1142
+ - [ ] Preserve exact SQL, dimensions, measures, relationships and settings.
1143
+ - [ ] Classify implicit compute/enable/schedule side effects and block unsafe routes.
1144
+ - [ ] Prove safe export-to-target create/update/no-op without computation.
1145
+
1146
+ ## Bounded Git deployment selection
1147
+
1148
+ `deploy --changed-since <ref>` is exclusive with metadata/source-dir. It selects current
1149
+ canonical files of every family (DLO, DMO, mapping, relationship, data stream, data
1150
+ transform, data graph, identity resolution, calculated insight, Segment JSON), admitted
1151
+ through the existing input resolver with byte capture, and routes them as explicit
1152
+ selections of the same families and runs them in the same phases, data transforms included. Files deleted in the range become delete candidates (family and identity
1153
+ from the merge-base content; relationship source DMO and transform API name included),
1154
+ reported in `result.selection.deletions` and never deleted by deploy (`delete
1155
+ --changed-since` deletes them). A path deleted and re-added is not a delete; one
1156
+ component deleted at one path and added at another across commit, index and worktree
1157
+ blocks. Repository-root resolution, unique merge-base/HEAD changes,
1158
+ index, worktree and untracked selection are local. Renames, conflicts, unstaged deletions, deleted
1159
+ files of no known family and half-deleted calculated insight pairs block the whole selection,
1160
+ regardless of diff.renames configuration. Git inference is not historical rename-intent
1161
+ proof. A relevant untracked addition plus any tracked worktree deletion blocks
1162
+ conservatively. Empty selection succeeds before downstream target inspection/services,
1163
+ without changing core parse-time auth. File list: [Git workflow](git-workflow.md).
1164
+
1165
+ ## Shared gates
1166
+
1167
+ ConnectClient SSOT GETs now use an operation-local no-refresh receiver, like guarded
1168
+ writes: expired authentication fails immediately without OAuth refresh or replay.
1169
+ Repair authentication before a new explicit invocation. Retry and redirect refusal
1170
+ remain in place; the caller's connection and unrelated consumers are unchanged.
1171
+ This does not change API-version discovery or the separate Metadata/SOAP guard.
1172
+
1173
+ - [x] Read-only authenticated Connect REST transport, structured errors and redaction.
1174
+ Broader resource contracts remain pending.
1175
+ - [x] Native DMO route as described in the dmo section above. The items formerly
1176
+ listed here for the Metadata API DMO adapter (deploy preflight, common projector,
1177
+ file writer, DMO pagination, relationship acquisition, field join
1178
+ and request mappers) were removed together with that adapter.
1179
+ - [ ] Qualified logical references and verified data-space binding.
1180
+ - [ ] Versioned deterministic artifacts, safe paths and unknown-field blocking.
1181
+ See [artifact formats](artifact-format.md) for the current documents.
1182
+ - [ ] Whole-selection dependency/diff preflight and input/target drift guards.
1183
+ - [ ] Read-back verification and partial/uncertain failure handling.
1184
+ - [ ] Bounded opt-in live acceptance with explicit fixture ownership ledger.
1185
+
1186
+ No live fixtures were created, claimed, modified or removed by this slice.
1187
+
1188
+ Deploy items of DLOs, DMOs and mappings report mutation `rejected` when Salesforce
1189
+ answered the item's first write with an HTTP 4xx status: nothing was written for the
1190
+ item. A failure after a completed write stays `unknown`.
1191
+
1192
+ DLO delete reads the DLO's dependency list (`GET ssot/data-lake-objects/{name}/dependencies`)
1193
+ before the DELETE, in preview too. Salesforce refuses to delete a DLO with dependents (HTTP 412
1194
+ `DEPENDENCY_EXISTS`; a mapped DLO lists the DMO). All selected DLOs are checked before the command's first write; a dependent the same command does not delete stops the command with `DLO_DEPENDENCY_EXISTS`, naming each one, before anything is deleted. A DMO
1195
+ dependent is covered by `dmo:<Name>` or by selecting every mapping between the DLO and the
1196
+ DMO. Delete selections run mappings, then DMOs, then DLOs; the DLO waits (6 reads, 3 seconds
1197
+ apart) for the list to empty, otherwise `DLO_DEPENDENCY_PENDING`. Observed at API 68: a mapped
1198
+ DLO refused with the DMO named; DLO plus its mapping deleted in one command (32 s); DLO plus
1199
+ its DMO deleted in one command (15 s). DMOs have no dependency route (`/dependencies` answers
1200
+ 404), so DMO delete checks no dependents.
1201
+
1202
+ After a confirmed deletion (`deleted`/`confirmed-deleted`, or
1203
+ `deletion-processing`/`acknowledged-processing`) delete removes the component's local
1204
+ file at its canonical path by name, one regular file at a time and only inside the
1205
+ project's `data360` folder. Results list `removedLocalFiles` (`removed`, `not-present`,
1206
+ `kept`, `failed`); a failed removal keeps the org outcome and exits nonzero with
1207
+ `LOCAL_FILE_REMOVAL_FAILED`. `--keep-local-files` keeps the files and `--preview` lists
1208
+ them as `localFiles`. Details are in [artifact formats](artifact-format.md).