Runtime verified

This badge does not verify untested writes or general CRUD support. A claim marked offline-tested rests on the plugin code and its offline tests; no live run is recorded for it.

Data Model Object (DMO) is a custom object with the __dlm suffix. A DMO is the shape your data is mapped into, such as a customer or an order.

Example used in every chapter: Customer__dlm, an empty custom DMO with a text key Id and a text field Note. Each method below works on this same object.

Supplied workflows for Data Model Object (DMO)
ReadCreateUpdateDelete
Yes
CLI API sf-plugin-data
Yes
CLI API sf-plugin-data
Yes
CLI API sf-plugin-data
Yes
CLI API sf-plugin-data
Coverage by method for Data Model Object (DMO)
MethodReadCreateUpdateDelete
CLI
Yes
Yes
Yes
Yes
API
Yes
Yes
Partial
Yes
sf-plugin-data
Yes
Yes
Yes
Yes

Yes: a usable scoped workflow is supplied. For Read, Yes also requires reading every item of the type without naming each one; a route that only reads named items is Partial. Partial: a usable workflow is supplied, but some operation variants, independent steps or asynchronous completion remain unsupported or unqualified. Neither means universal capability. No: proven unavailable in an explicit scope. Not supported: tested in the stated scope and not supported. Not tested: nothing has been tested or researched here. Neither Not supported nor Not tested displays method icons. CLI means dedicated CLI commands; API means API-led requests or facades, even when invoked through the CLI. sf-plugin-data means a proven scoped sf-plugin-data workflow. The sf-plugin-data grade follows the plugin README's definition: a refusal or gap in the plugin itself is Partial; Salesforce limits, API-version and data-space limits and verification breadth are not. Multiple icons identify alternatives, not equivalent coverage. Where method grades are recorded, the overall rating uses the best single supported route: Yes before Partial, then ?; No requires every method explicitly No. Partial routes are not combined into Yes. The method table records each route separately; older pages without method grades do not imply equal coverage. Version and prerequisite limits still apply to Yes. Read each operation's prerequisites and limits. An available operation tab may explain an illustrative mechanism without supplying a usable summary workflow.

Plugin qualification: “Yes” means the plugin workflow works in the tested scope listed under Evidence, not for every DMO.

Enum letter case: An enum value in a field’s dataType that differs from Salesforce’s stored spelling only in letter case counts as unchanged on deploy. The plugin sends the value as written; retrieve writes Salesforce’s spelling.

“API” means the Metadata API or the Connect API. Each one is listed on its own. The CLI runs on the Metadata API, but that alone does not show that the Metadata API works when called directly.

Read

CLI

Downloads the object's XML definition and its fields.

Downloads the object and its fields as XML files into your project folder.

sf project retrieve start --metadata CustomObject:Customer__dlm --target-org SOURCE_ALIAS --wait 5

Metadata API (XML): this command uses the Metadata API and saves XML files. It is separate from the native Connect REST JSON route on the Connect API tab.

Files written (a real retrieve of the same shape, renamed to our example; system fields are written too):

force-app/main/default/objects/Customer__dlm/Customer__dlm.object-meta.xml
force-app/main/default/objects/Customer__dlm/fields/DataSource__c.field-meta.xml
force-app/main/default/objects/Customer__dlm/fields/DataSourceObject__c.field-meta.xml
force-app/main/default/objects/Customer__dlm/fields/Id__c.field-meta.xml
force-app/main/default/objects/Customer__dlm/fields/InternalOrganization__c.field-meta.xml
force-app/main/default/objects/Customer__dlm/fields/KQ_Id__c.field-meta.xml
force-app/main/default/objects/Customer__dlm/fields/Note__c.field-meta.xml

Object file:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Customer</label>
    <mktDataModelAttributes>
        <creationType>Custom</creationType>
        <dataModelTaxonomy>Salesforce_SFDCReferenceModel_0_93</dataModelTaxonomy>
        <dataSpaceName>default</dataSpaceName>
        <isEnabled>false</isEnabled>
        <isSegmentable>false</isSegmentable>
        <isUsedForMetrics>false</isUsedForMetrics>
        <labelOverride>Customer</labelOverride>
        <masterLabel>Customer</masterLabel>
        <objectCategory>Salesforce_SFDCReferenceModel_0_93.Related</objectCategory>
    </mktDataModelAttributes>
</CustomObject>

Id__c:

<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Id__c</fullName>
    <label>Id</label>
    <length>60</length>
    <mktDataModelFieldAttributes>
        <definitionCreationType>Custom</definitionCreationType>
        <isDynamicLookup>false</isDynamicLookup>
        <labelOverride>Id</labelOverride>
        <masterLabel>Id</masterLabel>
        <primaryIndexOrder>1</primaryIndexOrder>
        <usageTag>None</usageTag>
    </mktDataModelFieldAttributes>
    <required>false</required>
    <type>Text</type>
</CustomField>

Note__c:

<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Note__c</fullName>
    <label>Note</label>
    <length>60</length>
    <mktDataModelFieldAttributes>
        <definitionCreationType>Custom</definitionCreationType>
        <isDynamicLookup>false</isDynamicLookup>
        <labelOverride>Note</labelOverride>
        <masterLabel>Note</masterLabel>
        <usageTag>None</usageTag>
    </mktDataModelFieldAttributes>
    <required>false</required>
    <type>Text</type>
</CustomField>

Metadata API

Tested at API 68.0 with readMetadata by exact name. listMetadata does not list DMOs.

Metadata API read of the object

Send readMetadata to the Metadata SOAP endpoint. Post the envelope to https://MyDomainName.my.salesforce.com/services/Soap/m/68.0 with the headers Content-Type: text/xml and SOAPAction: "". Nothing in the org changes. Use the exact object name, including __dlm.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:met="http://soap.sforce.com/2006/04/metadata">
  <soapenv:Header>
    <met:SessionHeader><met:sessionId>ACCESS_TOKEN</met:sessionId></met:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <met:readMetadata>
      <met:type>CustomObject</met:type>
      <met:fullNames>Customer__dlm</met:fullNames>
    </met:readMetadata>
  </soapenv:Body>
</soapenv:Envelope>

The record holds fullName, label, mktDataModelAttributes and the fields list. Each field carries mktDataModelFieldAttributes; the primary key field has primaryIndexOrder set. listMetadata with the type CustomObject did not return any DMO at API 68.0, so you need to know the name first; the Connect API tab lists them.

Connect API

Tested at API versions 61.0 to 68.0 (see Evidence).

Reads the object over the Connect API. Nothing in the org changes.

sf api request rest /services/data/v68.0/ssot/data-model-objects/Customer__dlm --target-org SOURCE_ALIAS --method GET

Response (HTTP 200):

{
  "category": "OTHER",
  "creationType": "Custom",
  "dataSpaceName": "default",
  "fields": [
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Data Source",
      "name": "DataSource__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Data Source Object",
      "name": "DataSourceObject__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "Custom",
      "isDistinct": false,
      "isPrimaryKey": true,
      "keyQualifierName": "KQ_Id",
      "label": "Id",
      "name": "Id__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Internal Organization",
      "name": "InternalOrganization__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Key Qualifier Id",
      "name": "KQ_Id__c",
      "type": "Text",
      "usageTag": "KeyQualifier"
    },
    {
      "creationType": "Custom",
      "isDistinct": false,
      "label": "Note",
      "name": "Note__c",
      "type": "Text",
      "usageTag": "None"
    }
  ],
  "hasExternalDataLakeObjectMappings": false,
  "id": "0gjXXXXXXXXXXXXXXX",
  "isEditable": true,
  "isEnabled": false,
  "isSegmentable": false,
  "label": "Customer",
  "name": "Customer__dlm"
}

Keep it for reference. Do not send it back as input, because it contains values that Salesforce generates.

Known failures:

  • At API version 60.0 this request returns “not found”, even for an object that exists.

sf-plugin-data

Tested live at API 68.0, by exact name and for every DMO of an org (see Evidence).

Saves the object as one JSON file. You can deploy that file to another org later.

sf data360 retrieve -m dmo:Customer__dlm -o SOURCE_ALIAS

File written: data360/dmo/Customer__dlm.dmo-meta.json

{
  "schemaVersion": 1,
  "kind": "dmo",
  "identity": {
    "apiName": "Customer__dlm",
    "dataSpace": "default"
  },
  "spec": {
    "label": "Customer",
    "category": "Other",
    "fields": [
      {
        "name": "Id__c",
        "label": "Id",
        "dataType": "Text",
        "isPrimaryKey": true,
        "creationType": "Custom",
        "isDistinct": false,
        "keyQualifierName": "KQ_Id",
        "usageTag": "None"
      },
      {
        "name": "Note__c",
        "label": "Note",
        "dataType": "Text",
        "isPrimaryKey": false,
        "creationType": "Custom",
        "isDistinct": false,
        "usageTag": "None"
      }
    ]
  }
}

The keys creationType, isDistinct, usageTag and keyQualifierName come from reads only. A retrieved file keeps them, a deploy never sends them, and a file may differ from the org in them without causing an update. spec.description is present only when the object has a description.

The fields are saved sorted by name, because Salesforce returns them in a different order from one read to the next. Deploy matches fields by name, so their order in the file does not matter.

Output:

Downloaded dmo:Customer__dlm (retrieved).
Downloaded dmo: 1

If that file already exists and differs, the retrieve replaces it; an identical file is left unchanged. --output-dir (-d) sets the project root, which defaults to the current directory.

sf data360 retrieve -m dmo -o SOURCE_ALIAS saves every DMO of the data space. A retrieve without -m includes every DMO as well. The -m dmo form ran live at API 68.0 over every DMO of an org. An empty inventory succeeds with no files. Standard, namespaced and platform-generated DMOs can be retrieved.

The optional --dataspace NAME (alias --data-space) selects a data space other than default. A file saved for one data space is never replaced by another space’s file. Non-default data spaces are offline-tested only.

What the saved file leaves out

The file holds only the authored fields. Salesforce-generated fields are left out: DataSource__c, DataSourceObject__c, InternalOrganization__c, and the key qualifier, for example KQ_Id__c. A key qualifier combines the ID with source context to avoid collisions. The primary key Id__c always stays. Custom qualifiers and keyQualifierName references stay as read. Native CREATE generates the left-out fields again, and deploy keeps them from the org. Leaving them out is therefore not field deletion or proof of mapping auto-pair behavior. A retrieved file deploys back unchanged. The raw API response remains complete. The file is not a complete ingestion/mapping/relationship export.

Current default/auto is API68; explicit numeric versions from 61.0 are kept as given. The standard fields of a standard DMO are compared only when they are listed. Fields read as creationType=System are generated. On the DMO API the key qualifier is marked creationType=System and usageTag=KeyQualifier, unlike DLO Metadata’s usageTag=KEY_QUALIFIER.

isSegmentable is left out too. Salesforce derives it and does not accept it as input, so the file has no such key.

Create

CLI

Tested at API 68.0 on a new name. Unlike a Connect API create, it adds no generated fields (see Evidence).

Deploys the object XML from the Read chapter’s CLI tab: the object file plus Id__c and Note__c. Leave out the fields that Salesforce generates (DataSource__c, DataSourceObject__c, InternalOrganization__c, KQ_Id__c).

sf project deploy start --metadata CustomObject:Customer__dlm --target-org TARGET_ALIAS --api-version 68.0 --wait 10

The deploy reports the object and both fields as Created. The Connect API GET then returns the DMO with Id__c as its primary key and Note__c.

Unlike a Connect API create, a deploy adds no generated fields: the DMO has only the fields you deployed, without DataSource__c, DataSourceObject__c, InternalOrganization__c or the key qualifier KQ_Id__c. Such a DMO can be mapped: a Connect API mapping from a Connect-created DLO read ACTIVE. Salesforce then added only KQ_Id__c to the DMO, plus a generated KQ_Id__c pair; DataSource__c, DataSourceObject__c and InternalOrganization__c stayed absent. To get the same DMO as the other tabs, create it through the Connect API or the plugin.

Metadata API

Tested at API 68.0 with createMetadata on a new name. Unlike a Connect API create, it adds no generated fields (see Evidence).

Metadata API create of the object

Send createMetadata to https://MyDomainName.my.salesforce.com/services/Soap/m/68.0 with the headers Content-Type: text/xml and SOAPAction: "". The object and its authored fields go in one record.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:met="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header>
    <met:SessionHeader><met:sessionId>ACCESS_TOKEN</met:sessionId></met:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <met:createMetadata>
      <met:metadata xsi:type="met:CustomObject">
        <met:fullName>Customer__dlm</met:fullName>
        <met:label>Customer</met:label>
        <met:mktDataModelAttributes>
          <met:creationType>Custom</met:creationType>
          <met:dataModelTaxonomy>Salesforce_SFDCReferenceModel_0_93</met:dataModelTaxonomy>
          <met:dataSpaceName>default</met:dataSpaceName>
          <met:isEnabled>false</met:isEnabled>
          <met:isSegmentable>false</met:isSegmentable>
          <met:isUsedForMetrics>false</met:isUsedForMetrics>
          <met:labelOverride>Customer</met:labelOverride>
          <met:masterLabel>Customer</met:masterLabel>
          <met:objectCategory>Salesforce_SFDCReferenceModel_0_93.Related</met:objectCategory>
        </met:mktDataModelAttributes>
        <met:fields>
          <met:fullName>Id__c</met:fullName>
          <met:label>Id</met:label>
          <met:length>60</met:length>
          <met:mktDataModelFieldAttributes>
            <met:definitionCreationType>Custom</met:definitionCreationType>
            <met:isDynamicLookup>false</met:isDynamicLookup>
            <met:labelOverride>Id</met:labelOverride>
            <met:masterLabel>Id</met:masterLabel>
            <met:primaryIndexOrder>1</met:primaryIndexOrder>
            <met:usageTag>None</met:usageTag>
          </met:mktDataModelFieldAttributes>
          <met:type>Text</met:type>
        </met:fields>
        <met:fields>
          <met:fullName>Note__c</met:fullName>
          <met:label>Note</met:label>
          <met:length>60</met:length>
          <met:mktDataModelFieldAttributes>
            <met:definitionCreationType>Custom</met:definitionCreationType>
            <met:isDynamicLookup>false</met:isDynamicLookup>
            <met:labelOverride>Note</met:labelOverride>
            <met:masterLabel>Note</met:masterLabel>
            <met:usageTag>None</met:usageTag>
          </met:mktDataModelFieldAttributes>
          <met:type>Text</met:type>
        </met:fields>
      </met:metadata>
    </met:createMetadata>
  </soapenv:Body>
</soapenv:Envelope>

The response holds one success true result each for the object and both fields. As with the CLI tab, the DMO has only Id__c (the primary key) and Note__c; no generated fields are added. The Connect API GET finds it.

Connect API

Tested for empty custom DMOs at API versions 61.0 to 68.0 (see Evidence).

Saves the object definition as dmo-create.json, then sends it. Use the name without __dlm; Salesforce adds the suffix.

{"name":"Customer","label":"Customer","category":"Other","dataSpaceName":"default","fields":[{"name":"Id","label":"Id","dataType":"Text","isPrimaryKey":true},{"name":"Note","label":"Note","dataType":"Text","isPrimaryKey":false}]}
sf api request rest /services/data/v68.0/ssot/data-model-objects --target-org SOURCE_ALIAS --method POST --body @dmo-create.json --header Content-Type:application/json

Response (HTTP 201):

{
  "category": "OTHER",
  "creationType": "Custom",
  "dataSpaceName": "default",
  "fields": [
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Data Source",
      "name": "DataSource__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Data Source Object",
      "name": "DataSourceObject__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "Custom",
      "isDistinct": false,
      "isPrimaryKey": true,
      "keyQualifierName": "KQ_Id",
      "label": "Id",
      "name": "Id__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Internal Organization",
      "name": "InternalOrganization__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Key Qualifier Id",
      "name": "KQ_Id__c",
      "type": "Text",
      "usageTag": "KeyQualifier"
    },
    {
      "creationType": "Custom",
      "isDistinct": false,
      "label": "Note",
      "name": "Note__c",
      "type": "Text",
      "usageTag": "None"
    }
  ],
  "hasExternalDataLakeObjectMappings": false,
  "id": "0gjXXXXXXXXXXXXXXX",
  "isEditable": true,
  "isEnabled": false,
  "isSegmentable": false,
  "label": "Customer",
  "name": "Customer__dlm"
}

Read it again in the Read chapter to confirm that it exists.

Known failures:

  • Labels longer than 40 characters are refused.
  • Names that already end in __dlm or __c are refused. Send the bare name.
  • A DMO needs exactly one primary key. Zero or two are refused.

sf-plugin-data

Tested live at API 68.0 for custom DMOs, alone and together with DLOs, mappings and relationships (see Evidence).

Creates the object from a JSON file in the same format as the plugin file in the Read chapter. The command first checks that the object does not exist yet.

sf data360 deploy -m dmo:Customer__dlm -o TARGET_ALIAS

File you deploy (data360/dmo/Customer__dlm.dmo-meta.json):

{
  "schemaVersion": 1,
  "kind": "dmo",
  "identity": {
    "apiName": "Customer__dlm",
    "dataSpace": "default"
  },
  "spec": {
    "label": "Customer",
    "category": "Other",
    "fields": [
      {
        "name": "Id__c",
        "label": "Id",
        "dataType": "Text",
        "isPrimaryKey": true
      },
      {
        "name": "Note__c",
        "label": "Note",
        "dataType": "Text",
        "isPrimaryKey": false
      }
    ]
  }
}

Output:

Created: dmo:Customer__dlm.
Deployed: 1 (1 created / 0 updated / 0 failed)

Running the same command again prints Unchanged: dmo:Customer__dlm. and writes nothing.

Add --preview to compare without writing anything:

sf data360 deploy -m dmo:Customer__dlm -o TARGET_ALIAS --preview

The preview reads the target and reports the planned step; it never sends a POST or PATCH. --dataspace NAME (alias --data-space) selects a non-default data space, which is offline-tested only. The object description round-trips, while a field description and isDynamicLookup are accepted on input and never returned, so the plugin cannot confirm a change to them alone.

Known failures:

  • A name with a double underscore before __dlm is refused.
  • An array field type is refused by Salesforce. The plugin reports it as an HTTP error.

Update

CLI

Tested at API 68.0 for a label change and an added field, and at API 68 for removing one custom field on empty custom DMOs.

Label and added field. Edit the object file’s label, labelOverride and masterLabel, add a field file, then deploy the object:

sf project deploy start --metadata CustomObject:Customer__dlm --target-org TARGET_ALIAS --api-version 68.0 --wait 10

The deploy reports the object as Changed, the new field as Created and the other fields as Unchanged. The Connect API GET then shows the new label and field. This was tested on a DMO that a deploy created.

Removing a field. Removes one custom field from a custom DMO with a destructive deploy. Salesforce also drops that field’s pairs from every mapping that holds one.

In an empty folder named destructive, save a package.xml that selects nothing:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <version>68.0</version>
</Package>

Save destructiveChanges.xml beside it, naming only the field:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
  <types>
    <members>Customer__dlm.Note__c</members>
    <name>CustomField</name>
  </types>
  <version>68.0</version>
</Package>
sf project deploy start --metadata-dir destructive --target-org TARGET_ALIAS --wait 10

Sample result excerpt, with --json added:

{ "status": 0, "result": { "status": "Succeeded", "details": { "componentSuccesses": [{ "componentType": "CustomField", "fullName": "Customer__dlm.Note__c", "deleted": true }] } } }

Read the DMO and its mappings afterwards: the field and its pairs are gone, everything else is unchanged. Do not remove the primary key or generated fields.

Metadata API

Tested at API 68.0: updateMetadata changed the label and createMetadata added a text field (see Evidence).

Metadata API update of the object

updateMetadata changes the object’s label. Send only the object, without fields:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:met="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Header>
    <met:SessionHeader><met:sessionId>ACCESS_TOKEN</met:sessionId></met:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <met:updateMetadata>
      <met:metadata xsi:type="met:CustomObject">
        <met:fullName>Customer__dlm</met:fullName>
        <met:label>Customer updated</met:label>
        <met:mktDataModelAttributes>
          <met:creationType>Custom</met:creationType>
          <met:dataModelTaxonomy>Salesforce_SFDCReferenceModel_0_93</met:dataModelTaxonomy>
          <met:dataSpaceName>default</met:dataSpaceName>
          <met:isEnabled>false</met:isEnabled>
          <met:isSegmentable>false</met:isSegmentable>
          <met:isUsedForMetrics>false</met:isUsedForMetrics>
          <met:labelOverride>Customer updated</met:labelOverride>
          <met:masterLabel>Customer updated</met:masterLabel>
          <met:objectCategory>Salesforce_SFDCReferenceModel_0_93.Related</met:objectCategory>
        </met:mktDataModelAttributes>
      </met:metadata>
    </met:updateMetadata>
  </soapenv:Body>
</soapenv:Envelope>

To add a field, send createMetadata with one CustomField record whose fullName is Customer__dlm.Extra__c and whose attributes match Note__c on the Create tab. Both calls persisted: the Connect API GET showed the new label and field. The label change also worked on a DMO that the Connect API created.

Connect API

Tested for labels and added fields at API versions 61.0 to 68.0. Removing a field or changing its type is not possible here (see Evidence).

Send one kind of change per request, then read the object again to confirm it.

To change the label, save {"label":"Customer (updated)"} as dmo-update.json:

sf api request rest /services/data/v68.0/ssot/data-model-objects/Customer__dlm --target-org SOURCE_ALIAS --method PATCH --body @dmo-update.json --header Content-Type:application/json
sf api request rest /services/data/v68.0/ssot/data-model-objects/Customer__dlm --target-org SOURCE_ALIAS --method GET

To add a text field, save this as dmo-update.json instead:

{"fields":[{"name":"UpdateNote","label":"Update Note","dataType":"Text"}]}

Response (HTTP 200), showing the state before the change:

{
  "category": "OTHER",
  "creationType": "Custom",
  "dataSpaceName": "default",
  "fields": [
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Data Source",
      "name": "DataSource__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Data Source Object",
      "name": "DataSourceObject__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "Custom",
      "isDistinct": false,
      "isPrimaryKey": true,
      "keyQualifierName": "KQ_Id",
      "label": "Id",
      "name": "Id__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Internal Organization",
      "name": "InternalOrganization__c",
      "type": "Text",
      "usageTag": "None"
    },
    {
      "creationType": "System",
      "isDistinct": false,
      "label": "Key Qualifier Id",
      "name": "KQ_Id__c",
      "type": "Text",
      "usageTag": "KeyQualifier"
    },
    {
      "creationType": "Custom",
      "isDistinct": false,
      "label": "Note",
      "name": "Note__c",
      "type": "Text",
      "usageTag": "None"
    }
  ],
  "hasExternalDataLakeObjectMappings": false,
  "id": "0gjXXXXXXXXXXXXXXX",
  "isEditable": true,
  "isEnabled": false,
  "isSegmentable": false,
  "label": "Customer",
  "name": "Customer__dlm"
}

That reply is not a confirmation (the mutation echo). Use the GET to check the saved result.

Known failures:

  • Changing the category is refused.
  • Changing an existing field’s data type returns success, but the type stays the same.
  • Removing a field is not possible through this API.

sf-plugin-data

Tested live at API 68.0 for a label change and for field removal on empty custom DMOs (see Evidence).

Change the local file, keeping every existing custom field with its type and key settings. Then deploy it. The command writes only what differs.

sf data360 deploy -m dmo:Customer__dlm -o TARGET_ALIAS

Output after a changed label:

Updated: dmo:Customer__dlm.

Running the same command again prints Unchanged: dmo:Customer__dlm. The change is read back before the command reports success.

An equal definition returns outcome: "unchanged" and mutation: "not-attempted"; comparison sends no POST or PATCH. Preservation and unsupported-addition checks still run first. --preview reports the planned label, description and field changes without writing.

spec.description absent means the description is not managed and the target keeps its value. An empty string clears it.

Refused before anything is written:

  • Changing a field’s data type, or moving the primary key.
  • Adding a generated field or a second primary key.
  • Leaving out a custom field that exists in the target. Removing it needs --allow-field-removal.
Standard DMOs such as ssot__Brand__dlm

A standard DMO (creationType Standard) is never created by the plugin. A delete of the whole DMO is sent, and Salesforce decides. The same deploy rules apply to the DMOs Salesforce generates for identity resolution (Derived, Bridge), data graphs (Adg) and segments, and to a custom DMO under a namespaced name. A deploy onto an existing one writes only:

  • custom fields: add, relabel, and remove with --allow-field-removal;
  • the label of any other field;
  • the object label, sent only when it differs;
  • the object description, with the same absent-or-empty rule as above.

The category is ignored. Standard, system and generated fields may be left out of the file, and a deploy never removes them. When the file lists one with another label, only that label is sent and Salesforce decides: at API 68 it relabels a system or graph field and refuses an ssot__ field with “Data model fields cannot start with ssot__”, which the plugin reports as rejected. Any other difference is refused with UNSUPPORTED_DMO_FIELD_CHANGE. A new field must be a plain custom field: a name starting with ssot__ is refused (UNSUPPORTED_DMO_FIELD_ADDITION). Salesforce does not protect generated fields itself, so the plugin keeps them out of every deploy. Everything on this list is offline-tested; the raw API behaviour is recorded under Evidence.

Removing a field that a mapping uses

When Salesforce removes a field through the Metadata API, it drops that field’s mapping pairs itself. The deploy must therefore also name every mapping that holds a pair for that field. Otherwise the command is refused before any write, with DMO_FIELD_REMOVAL_MAPPED.

sf data360 retrieve -o TARGET_ALIAS -m mapping:Customer_Mapping -m dmo:Customer__dlm
sf data360 deploy -o TARGET_ALIAS -m mapping:Customer_Mapping -m dmo:Customer__dlm --allow-field-removal

The DMO deploys first and drops the field with its pairs. Its result lists removedFields and droppedPairs. The mapping files then find those pairs already gone. Observed at API 68 for a field mapped by two mappings, with both mapping files and the DMO in one command: about 29 seconds. Deleting that field directly, see the Delete chapter, took about 28 seconds. --preview lists the planned removals (DMO_FIELD_REMOVAL_PLANNED) and writes nothing.

If the state does not settle, the command stops with DMO_FIELD_REMOVAL_SIDE_EFFECT or MAPPING_UNMAP_PERSISTENCE_UNCONFIRMED. Nothing is retried or rolled back.

Delete

CLI

Tested at API 68.0 on empty DMOs created by deploy and by the Connect API, unmapped and mapped. A relationship target is refused (see Evidence).

Deletes the whole DMO with a destructive deploy. In an empty folder named destructive, save a package.xml that selects nothing:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>68.0</version>
</Package>

Save destructiveChanges.xml beside it, naming the object:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Customer__dlm</members>
        <name>CustomObject</name>
    </types>
    <version>68.0</version>
</Package>
sf project deploy start --metadata-dir destructive --target-org TARGET_ALIAS --api-version 68.0 --wait 10

The result lists the object with deleted true. Afterwards the Connect API GET answers ITEM_NOT_FOUND. This was tested on empty DMOs: an unmapped one that a deploy created, an unmapped one that the Connect API created, and mapped ones. A DMO’s mappings are deleted with it (the mapping GET answers 404), also its only mapping.

Known failures:

  • A DMO that is the target of a relationship is refused: “This object is referenced elsewhere in Salesforce. : The object … cannot be deleted because it is referenced by the following lookup fields: …”. Delete the relationship first (Field relationship).

Metadata API

Tested at API 68.0 with deleteMetadata on empty DMOs created by createMetadata and by the Connect API, unmapped and mapped (see Evidence).

Metadata API delete of the object

Send deleteMetadata with the exact name:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:met="http://soap.sforce.com/2006/04/metadata">
  <soapenv:Header>
    <met:SessionHeader><met:sessionId>ACCESS_TOKEN</met:sessionId></met:SessionHeader>
  </soapenv:Header>
  <soapenv:Body>
    <met:deleteMetadata>
      <met:type>CustomObject</met:type>
      <met:fullNames>Customer__dlm</met:fullNames>
    </met:deleteMetadata>
  </soapenv:Body>
</soapenv:Envelope>

The result is success true, and the Connect API GET then answers ITEM_NOT_FOUND. This worked on a DMO that createMetadata created, on an empty, unmapped DMO that the Connect API created, and on an empty, mapped DMO that the Connect API created; its only mapping was deleted with it (the mapping GET answers 404).

Connect API

Tested on empty, unmapped custom DMOs (see Evidence).

Deletes the object, then checks that it is gone. Use this only on an empty custom DMO that you own. Check ownership and dependencies first.

sf api request rest /services/data/v68.0/ssot/data-model-objects/Customer__dlm --target-org SOURCE_ALIAS --method DELETE
sf api request rest /services/data/v68.0/ssot/data-model-objects/Customer__dlm --target-org SOURCE_ALIAS --method GET

Response (HTTP 204): no body.

Then the GET (HTTP 404):

[
  {
    "errorCode": "ITEM_NOT_FOUND",
    "message": "No record exists or User might not have access to DMO with Developer name : Customer__dlm"
  }
]

The DELETE reply alone is not proof; check with the GET.

sf-plugin-data

Tested live at API 68.0 for whole custom DMOs, deleted with their mappings, DLOs and relationships; field removal is observed at API 68 (see Evidence).

Deletes the object and its local file. Check the object name first, and that it is empty and owned by you. The command has no confirmation prompt and runs no dependency check; Salesforce’s answer is reported as it comes.

sf data360 delete -m dmo:Customer__dlm -o TARGET_ALIAS --preview
sf data360 delete -m dmo:Customer__dlm -o TARGET_ALIAS

--preview only reads: it checks the target, reports the planned deletion and lists the local file it would remove. The plugin deletes only the DMO. Salesforce removes the DMO’s mapping with it; the DLO stays. After a confirmed deletion the plugin removes the local data360/dmo/<Name>.dmo-meta.json file. --keep-local-files keeps it. --dataspace NAME (alias --data-space) selects a non-default data space, which is offline-tested only.

Output:

deleted dmo Customer__dlm

The object is gone and its local file is removed. Running the command again reports that the object is already absent.

Known failures:

  • Every DMO delete is sent, also for a standard DMO and a DMO read without creationType, and Salesforce decides. A refusal (HTTP 4xx) is reported as rejected and the local file stays. Whether Salesforce deletes a standard DMO is not tested.
  • A DMO that Salesforce generated for an identity resolution or a data graph is sent; Salesforce refuses it while its owner exists with HTTP 412 MATCH_PRECONDITION_FAILED (“The resource is referenced in other features and thereby cannot be deleted”), reported as rejected. The local file stays. Delete the owner instead, which removes its DMOs.
  • The last mapping of a custom DMO cannot be deleted on its own. Deleting the DMO removes its mapping.
Delete one field instead of the whole object

Use --field to remove named fields and keep the object. Standard, system and generated fields may be named on any DMO, including the DMOs of an identity resolution or a data graph; this is the only way the plugin removes them, and Salesforce decides (at API 68 it deleted such fields, raw API). A Salesforce refusal is reported as rejected. Mappings change as well, so check the preview first; the delete lists the fields and asks before deleting (--no-prompt skips the question).

sf data360 delete -m dmo:Customer__dlm --field Note__c -o TARGET_ALIAS --preview
sf data360 delete -m dmo:Customer__dlm --field Note__c -o TARGET_ALIAS

The command sends one Metadata API destructive change. Salesforce drops each field’s pairs from every mapping that holds one. If the mapping plan changed since it was read, the command stops with MAPPING_UNMAP_PLAN_CHANGED, and nothing is written. The result lists removedFields and unmappedPairs. For a field mapped by two mappings the command took about 28 seconds at API 68. The primary key is refused.

Add --preview to list the planned field removals, the pairs Salesforce drops and the local files; it writes nothing, in the org or on disk. After a successful removal, the existing local data360/dmo and data360/mapping files under --output-dir (default: the current directory) are refreshed from the org. No file is created or deleted, and --keep-local-files does not apply to this form. A failed refresh keeps the org result and exits nonzero with LOCAL_REFRESH_FAILED. --field cannot be combined with another selector, --changed-since or --delete-dlo.

Evidence: tested scope, versions and error codes

API family: The native JSON route /services/data/vXX.0/ssot/data-model-objects (and its item routes) belongs to the Data 360 Connect REST API, listed in the Salesforce reference. It is not the SOAP-based Metadata API. Salesforce CLI here only sends the authenticated request. This does not expand the tested versions or plugin qualification.

Responses by version:

  • API 61.0–68.0: POST returns 201, GET 200, PATCH 200 and DELETE 204. API 61.0 is the lowest version observed to work, in one org; it is not a universal minimum or a plugin guard.
  • API 60.0 returns HTTP 404 for all four (NOT_FOUND, The requested resource does not exist), including for a DMO that exists.
  • Create and read return the object directly, with a fields list. Responses use field type where requests use dataType.
  • Category input Other is returned as OTHER.
  • A PATCH reply shows the pre-update state. A separate GET, not that response, confirms persistence.
  • A text key Id and one further field Note produces six fields, including generated fields such as Id__c, DataSource__c, DataSourceObject__c, InternalOrganization__c and KQ_Id__c. Adding one field gives seven.
  • A label PATCH changes only the object XML label, labelOverride and masterLabel. A field-adding PATCH adds only the new field’s field-meta.xml and leaves existing object and field XML byte-identical. Primary-index order 1 and key-qualifier attributes are kept. A field-adding PATCH leaves the entire runtime object and entire Metadata object equal to their state before the PATCH, apart from the new field.
  • API 61.0–68.0 return DELETE 204. After DELETE, GET returns 404, and Metadata retrieval no longer finds the object.
  • For a DMO without relationships, the relationship GET returns HTTP 204 (API 67.0).
  • An added field was visible about 28 seconds after the write at API 65.0. At API 68.0 each PATCH change was visible on the first read after the write. Visibility timing differs by version, so poll instead of assuming a fixed delay.

Create rules at API 68.0:

  • Only Profile, Engagement and Other can be created (POST 201). The other category values return HTTP 400.
  • eventDateTimeFieldName is refused with HTTP 400 as an unrecognized field. An Engagement object is created without it.
  • The field data types Number, Text, Date, DateTime, Url, Phone, Email, Percent, Boolean and Currency are created. ArrayOfFloats and ArrayOfTexts return HTTP 400. A Currency field adds cdp_sys_record_currency__c.
  • Object and field labels longer than 40 characters return HTTP 400.
  • Supplying keyQualifierName is refused. The key qualifier KQ_<key>__c is generated.
  • isSegmentable is derived and read-only: a create with it (true or false) returns HTTP 400 JSON_PARSER_ERROR (unrecognized field). New Other and Profile DMOs read false.
  • Keys outside the input schema return HTTP 400.
  • A field description and isDynamicLookup are accepted but never returned, so neither can be confirmed. The object description round-trips.

Update rules at API 68.0:

  • PATCH sets and clears the object description and changes existing field labels. It adds Number, DateTime and Boolean fields as well as Text.
  • A changed field data type returns HTTP 200, but reads still show the original type and key after 60 seconds of polling.
  • A PATCH that leaves out existing fields keeps them. Omission is not removal.
  • A PATCH with isSegmentable returns HTTP 400 JSON_PARSER_ERROR, like a create.
  • Field item paths return 404, and PUT on the object returns 405. Removing a custom field goes through the Metadata API with a destructive change for the member <ObjectName>__dlm.<FieldName>__c (API 65.0 and 68.0, empty custom DMOs).
  • Salesforce removes a mapped field and silently drops exactly that field’s pairs. The mappings stay active.

Plugin behaviour (offline-tested): the plugin code and its offline tests back everything in this block. The native DMO requests it sends are the raw routes recorded above. Live plugin runs at API 68 cover retrieve by exact name and of every DMO in an org, create of a DMO alone and inside DLO, mapping and relationship batches, a label update, field removal, and delete together with the DMO’s mappings, DLOs and relationships; they settle the method grades, not the rules below.

  • The plugin keeps no local allowlists. It checks only the shape of the saved file. Category, field data types, labels and descriptions are sent as authored, and Salesforce decides. Its error is reported.
  • Default and auto select API 68.0; explicit numeric versions from 61.0 are kept as given, and admitting a version is not a live test of it.
  • Refused before any write: UNSUPPORTED_DMO_FIELD_CHANGE (a type change or a moved key, or a missing custom field without --allow-field-removal), UNSUPPORTED_DMO_FIELD_ADDITION (a generated field or a second key), UNSUPPORTED_DMO_TARGET (creating a namespaced DMO, or a write to a DMO whose read has no name), and DMO_FIELD_REMOVAL_MAPPED.
  • Preview lists planned removals as removedFields and DMO_FIELD_REMOVAL_PLANNED and writes nothing.
  • After a deploy, polled reads (up to 6, five seconds apart) confirm the result. The plugin never repeats a write. If the reads do not confirm, it fails with DMO_PERSISTENCE_UNCONFIRMED.
  • If the local file cannot be removed after a deletion, the command fails with LOCAL_FILE_REMOVAL_FAILED after the org result.
  • Standard, platform-generated and namespaced DMOs: custom fields can be added, relabelled and removed, other fields relabelled, and the label and description can change. No other property of a standard, system or generated field is sent, a deploy never removes one, and the category is ignored. A custom field that reads mapped while no mapping lists a pair for it (every field of a generated DMO does) has no pair to lose and is removed with --allow-field-removal. delete --field removes any named field but the primary key. A first mapping onto a standard DMO enables it permanently; the plugin announces this with MAPPING_ACTIVATES_STANDARD_DMO.
  • This does not broaden standalone DMO CRUD or its tested versions.

Portability (offline-tested): a retrieved file deploys into another org as unchanged when the target already holds the same definition, and creates the DMO when it does not. An unchanged-source export comparison across API versions is not verified.

Platform-generated DMOs at API 68.0 (raw API, 2026-11-18): on the Derived and Bridge DMOs of a probe identity resolution and the Adg DMOs of a probe data graph, Salesforce accepted a PATCH of the object label and description, an added custom field, a relabel of that field and of a system or graph field (MatchKeys__c, json_blob__c), and Metadata API deletes of custom, standard, system and graph fields. It refused a relabel of an ssot__ field (400 INVALID_INPUT), a mapping onto any of these DMOs (400 INVALID_INPUT “Unsupported DMO Creation Type used for mapping”) and a DMO DELETE while the owner existed (412 MATCH_PRECONDITION_FAILED). A PATCH response showed the old label; only a later GET showed the change. Every probe was deleted afterwards.

Standard CLI: sf org list metadata --metadata-type CustomObject lists no DMOs, so take the name from a mapping file or the API; sf project retrieve start --metadata CustomObject:<name>__dlm then saved the object and its fields at API 68.0. At API 68 a destructiveChanges.xml deploy that named one CustomField removed that custom field, also when two mappings held it: each mapping lost only that pair, and the DMO and its other fields were unchanged.

CLI and Metadata API writes at API 68.0: On Cli… probes in one org, empty and unmapped; every probe was deleted afterwards and confirmed gone:

  • Create. A deploy and a createMetadata call, each with the object plus Id__c (primaryIndexOrder 1) and Note__c, succeeded. readMetadata and the Connect GET returned only those two fields, with Id__c as the primary key; no DataSource__c, DataSourceObject__c, InternalOrganization__c or KQ_Id__c was generated. The same two fields sent to the Connect API create produce six.
  • Update. A deploy changed the label and added Extra__c; updateMetadata changed the label and createMetadata of one CustomField added a field. The Connect GET showed each change. updateMetadata also changed the label of a DMO that the Connect API created.
  • Delete. A destructive deploy that named the CustomObject and a deleteMetadata call each deleted their DMO; deleteMetadata also deleted a DMO that the Connect API created. Afterwards the Connect GET answered ITEM_NOT_FOUND and readMetadata returned no record.
  • Mapping a deployed DMO (second run, 2026-11-16). A deploy created a DMO with Id__c and Note__c only. A Connect API mapping onto it from a Connect-created DLO (Id__c and Note__c pairs) answered HTTP 201 and read ACTIVE, with a generated KQ_Id__c pair. The DMO then listed Id__c, KQ_Id__c and Note__c; no DataSource__c, DataSourceObject__c or InternalOrganization__c was added.
  • Destructive deploys of Connect-created and mapped DMOs (same run). Destructive deploys naming the CustomObject deleted an unmapped DMO that the Connect API created (the plugin creates DMOs with the same Connect request), the mapped DMO above (its only mapping) and, in one deploy, two Connect-created DMOs with one mapping each, one of which had been the source of a relationship. Each DMO’s GET then answered ITEM_NOT_FOUND and each mapping’s GET 404. A destructive deploy of a mapped DMO that was still the target of a relationship failed: “referenced by the following lookup fields”, naming the source DMO’s rel_<number>_end__c lookup. Nothing changed until the relationship was deleted. deleteMetadata also deleted a Connect-created DMO with one mapping: the DMO’s GET answered ITEM_NOT_FOUND and the mapping’s GET 404.

Not verified: Populated DMOs. Related DMOs beyond the relationship refusal above. Standard DMOs in active use. Non-default data spaces. SQL or flex DMOs. An installed released package. The API 68.0 breadth at any other version. Cascade behavior and DMOs with dependencies, including a DMO that a segment or calculated insight references. Whether isDynamicLookup is stored.

Existing objects: A SQL query against an existing DMO can return SQLSTATE 42P01 even when the object exists. That is not an empty result. GET 404 can also mean the caller cannot access the DMO. Neither is proof that no record store exists.

Official examples: Salesforce’s own Postman examples: create and update.