data-cloud-data-model-objects

Use when designing or managing Data Model Objects (DMOs) in Salesforce Data Cloud — covers DMO schema design, subject area governance, data relationships between DMOs, XMD (extended metadata) layer management, data transforms (streaming vs. batch), and mandatory DMO requirements for identity resolution. NOT for standard Salesforce CRM object design, Data Cloud data stream configuration, or SOQL queries against Data Cloud objects.

Best use case

data-cloud-data-model-objects is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when designing or managing Data Model Objects (DMOs) in Salesforce Data Cloud — covers DMO schema design, subject area governance, data relationships between DMOs, XMD (extended metadata) layer management, data transforms (streaming vs. batch), and mandatory DMO requirements for identity resolution. NOT for standard Salesforce CRM object design, Data Cloud data stream configuration, or SOQL queries against Data Cloud objects.

Teams using data-cloud-data-model-objects should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/data-cloud-data-model-objects/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/data/data-cloud-data-model-objects/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/data-cloud-data-model-objects/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How data-cloud-data-model-objects Compares

Feature / Agentdata-cloud-data-model-objectsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when designing or managing Data Model Objects (DMOs) in Salesforce Data Cloud — covers DMO schema design, subject area governance, data relationships between DMOs, XMD (extended metadata) layer management, data transforms (streaming vs. batch), and mandatory DMO requirements for identity resolution. NOT for standard Salesforce CRM object design, Data Cloud data stream configuration, or SOQL queries against Data Cloud objects.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Data Cloud Data Model Objects

This skill activates when a practitioner needs to design or manage Data Model Objects (DMOs) in Salesforce Data Cloud. DMOs are the semantic layer of the Customer 360 Data Model — they are logical groupings of data stored in Data Lake Objects (DLOs) and organized into subject areas. This skill covers DMO schema design, mandatory DMOs for identity resolution, the XMD (extended metadata) layer for field formatting, and the data transform types that can create or populate DMOs.

---

## Before Starting

Gather this context before working on anything in this domain:

- DMOs do NOT support SOQL. Queries against DMO data require the Data Cloud Query API (ANSI SQL), not standard Salesforce SOQL. Attempting to query a DMO via SOQL will fail.
- Five DMOs are mandatory for identity resolution: Individual, Party Identification, Contact Point Email, Contact Point Phone, and Contact Point Address. Data streams that do not map to these DMOs cannot participate in identity resolution.
- Only one data relationship is permitted per field pair between two mapped DMOs. Multiple relationships between the same two fields are not supported.
- XMD (extended metadata) has three tiers: System XMD (platform-generated, immutable), Main XMD (org-customizable via REST API), and User XMD (per-user preferences). You can only modify Main XMD, not System XMD.
- Streaming transforms are restricted to a single DLO (no cross-DLO joins); batch transforms support joins and aggregations across multiple DLOs.

---

## Core Concepts

### DMO Architecture: DLO → DMO Layer

Data Cloud stores raw ingested data in Data Lake Objects (DLOs). DMOs are a semantic abstraction layer on top of DLOs:

- **DLO** — Raw storage: one DLO per data stream source. Fields are ingested as-is.
- **DMO** — Semantic model: curated schema with business-friendly names, relationships, and subject area classification. Multiple DLOs can map to a single DMO.
- **Subject Areas** — Organizational groups within the Customer 360 Data Model (e.g., Sales Order, Unified Individual, Marketing). DMOs belong to a subject area.

Field mapping from DLO to DMO is configured in the Data Stream setup. This mapping determines which DLO fields populate which DMO fields.

### Five Mandatory DMOs for Identity Resolution

Identity resolution in Data Cloud requires data to be mapped to specific standard DMOs:

| DMO | Purpose |
|---|---|
| `Individual` | Unified customer/person record |
| `Party Identification` | External IDs linking a person to source systems |
| `Contact Point Email` | Email addresses linked to Individual |
| `Contact Point Phone` | Phone numbers linked to Individual |
| `Contact Point Address` | Physical addresses linked to Individual |

Data streams that omit field mappings to these DMOs cannot contribute to unified identity profiles. The identity resolution ruleset operates exclusively on these five DMOs.

### XMD: Extended Metadata Layer

XMD controls how Data Cloud fields are displayed: labels, formatting, data type hints, and measure/dimension classification. It has three immutable tiers:

- **System XMD** — Automatically generated by the platform when a dataset or DMO is created. Cannot be modified.
- **Main XMD** — Org-level customization. Can be updated via `PATCH /services/data/v{version}/wave/datasets/{datasetId}/xmds/main`. This is the correct layer for adding field labels, aliases, and formatting properties.
- **User XMD** — Per-user preferences applied on top of Main XMD. Cannot be updated via API; managed by end users in the interface.

Attempting to update System XMD fields via the REST API returns an error. Identify the XMD type before attempting to modify it.

### Streaming vs. Batch Transforms

Two transform types create or populate DMO records from DLO data:

**Streaming Transforms:**
- Execute near-real-time on new DLO records as they arrive
- Support only a single source DLO per transform (no joins)
- Cannot perform aggregations
- Use for event enrichment that does not require cross-source joins

**Batch Transforms:**
- Execute on a scheduled interval
- Support joins across multiple DLOs and aggregations
- Use for analytical metrics, cross-source unified views, or enrichment requiring multiple data sources

---

## Common Patterns

### Pattern 1: Custom DMO Schema Design

**When to use:** Onboarding a new data source that doesn't map to any existing standard DMO — e.g., a custom loyalty transaction object.

**How it works:**
1. Define the DMO name, API name, and subject area assignment
2. Identify the source DLO(s) and define field mappings (source field → DMO field)
3. Determine if the DMO needs a relationship to another DMO (e.g., linking loyalty transactions to the Individual DMO)
4. Create only one data relationship per field pair — multiple relationships between the same two DMO fields are not allowed
5. Map identity-relevant fields (email, phone, address) to the five mandatory DMOs in a separate data stream if they exist in the source

**Why not use SOQL to query the DMO:** DMOs are columnar stores, not Salesforce objects. SOQL does not work against DMO data. Use the Data Cloud Query API with ANSI SQL to query DMO records.

### Pattern 2: Main XMD Update for Field Label Customization

**When to use:** Field labels in a Data Cloud dataset or DMO need to be renamed for business-friendly display without modifying the underlying field API name.

**How it works:**
1. Retrieve the current Main XMD: `GET /services/data/v{version}/wave/datasets/{datasetId}/xmds/main`
2. Modify the `fields` array in the XMD JSON: update `label`, `alias`, or formatting properties for the target field
3. Submit the updated XMD: `PATCH /services/data/v{version}/wave/datasets/{datasetId}/xmds/main`
4. Validate the change by querying the dataset in CRM Analytics or Data Cloud interface

**Why not edit System XMD:** System XMD is platform-generated and immutable. PATCH requests targeting System XMD return a 403 error. Always work with Main XMD.

---

## Decision Guidance

| Situation | Recommended Approach | Reason |
|---|---|---|
| New data source, identity-relevant fields | Map to mandatory identity DMOs (Individual, Party ID, Contact Points) | Required for identity resolution participation |
| Cross-source data join for analytics | Batch Transform | Streaming transforms support only single DLO; joins require batch |
| Near-real-time enrichment, single source | Streaming Transform | Faster execution; no join needed |
| Field label/format customization | PATCH Main XMD via REST API | Only Main XMD is modifiable; System XMD is immutable |
| Querying DMO data | Data Cloud Query API (ANSI SQL) | SOQL does not work against DMO objects |
| Relationship between two DMOs | One relationship per field pair maximum | Platform limit: multiple relationships on same field pair not supported |

---

## Recommended Workflow

1. **Inventory source data schema** — Document all entities, fields, data types, and relationships in the source system.
2. **Map to Customer 360 Data Model subject areas** — Identify which standard DMOs the source data fits. Create custom DMOs only for entities with no standard DMO equivalent.
3. **Design mandatory DMO mappings for identity resolution** — Confirm that identity-relevant fields (email, phone, address, external IDs) are mapped to the five mandatory DMOs.
4. **Define data relationships** — Document which DMOs need relationships. Enforce the one-relationship-per-field-pair limit during design.
5. **Select transform type** — For each DMO population path, choose streaming (single source, near-real-time) or batch (multi-source join, scheduled).
6. **Design XMD customization** — Identify which fields need label changes or formatting updates. Plan Main XMD PATCH calls for each.
7. **Validate with Data Cloud Query API** — After DMO population, run ANSI SQL queries via the Data Cloud Query API to confirm field values and relationship traversal.

---

## Review Checklist

- [ ] Five mandatory DMOs mapped for identity resolution (Individual, Party ID, Email, Phone, Address)
- [ ] Data relationships limited to one per field pair between DMO pairs
- [ ] XMD updates target Main XMD, not System XMD
- [ ] Streaming transforms restricted to single-DLO sources; joins use batch transforms
- [ ] DMO queries use Data Cloud Query API (ANSI SQL), not SOQL
- [ ] Subject area assignments documented for each custom DMO

---

## Salesforce-Specific Gotchas

1. **DMOs do not support SOQL** — DMOs are columnar stores in the Data Cloud data lake, not Salesforce objects in the CRM object model. SOQL queries against DMO API names return errors or empty results. All DMO data access requires the Data Cloud Query API with ANSI SQL syntax.
2. **System XMD is immutable — PATCH against it returns 403** — System XMD is auto-generated by the platform and cannot be modified. Main XMD is the correct target for field customization. Always retrieve the XMD type before attempting to patch it.
3. **Only one data relationship per field pair between DMOs** — You cannot create two separate data relationships between the same pair of fields on two DMOs. If a more complex mapping is needed, it must be modeled as a different field pairing or through a transform.

---

## Output Artifacts

| Artifact | Description |
|---|---|
| DMO schema design document | Entity list with subject area, field definitions, and relationship map |
| Mandatory DMO mapping checklist | Confirmation that all five identity-resolution DMOs are mapped |
| Transform type selection | Streaming vs. batch decision for each DMO population path |
| XMD update specification | Field labels, aliases, and formatting changes as PATCH payload |

---

## Related Skills

- `data/data-cloud-data-streams` — For configuring DLO ingestion and field mapping from source to DLO
- `admin/data-cloud-identity-resolution` — For identity resolution ruleset design and matching rule configuration
- `admin/data-cloud-segmentation` — For building segments that query unified DMO profiles
- `architect/data-cloud-architecture` — For overall Data Cloud platform architecture and deployment planning

Related Skills

sandbox-data-masking

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when configuring or reviewing Salesforce Data Mask to protect PII/PHI in partial or full copy sandboxes after a refresh. Trigger keywords: data mask, sandbox masking, PII in sandbox, GDPR sandbox, HIPAA non-production, mask contacts, obfuscate fields non-production. NOT for sandbox refresh mechanics (use sandbox-refresh-and-templates), NOT for production data anonymization, NOT for Shield Platform Encryption at rest.

gdpr-data-privacy

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when implementing GDPR or CCPA data privacy controls in Salesforce: Individual sObject linkage, consent tracking, Right to Be Forgotten (RTBF) requests, data subject request handling, and Privacy Center configuration. Trigger keywords: GDPR, data privacy, consent management, right to erasure, Individual object, ContactPointConsent, ShouldForget, data subject request, Privacy Center, data portability. NOT for general data quality cleanup, duplicate management, field-level encryption (see platform-encryption skill), or sandbox data masking (see sandbox-data-masking skill).

experience-cloud-security

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when configuring access controls, sharing, or site security for authenticated or guest Experience Cloud (community) users: external OWD, Sharing Sets, Share Groups, CSP, clickjack protection, guest user record access. NOT for internal sharing model configuration (use sharing-and-visibility).

data-classification-labels

8
from PranavNagrecha/AwesomeSalesforceSkills

Classify Salesforce fields by data sensitivity and compliance category using the four built-in classification attributes (SecurityClassification, ComplianceGroup, BusinessOwnerId, BusinessStatus). Covers Metadata API deployment, Tooling API querying, and Einstein Data Detect recommendations. NOT for data masking, Shield Platform Encryption, or runtime access control enforcement.

customer-data-request-workflow

8
from PranavNagrecha/AwesomeSalesforceSkills

Implement GDPR/CCPA data subject rights (access, deletion, rectification) using Salesforce Privacy Center and/or custom workflow. NOT for general backup or org-level data retention policy.

omnistudio-deployment-datapacks

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when exporting, importing, or version-controlling OmniStudio components using DataPacks via the OmniStudio DataPacks tool or vlocity CLI. Covers DataPack export/import, Git version control integration, CI/CD for OmniStudio. NOT for SFDX-based metadata deployment of non-OmniStudio components.

omnistudio-asynchronous-data-operations

8
from PranavNagrecha/AwesomeSalesforceSkills

Use Integration Procedures queues, DataRaptor Chain, and Remote Actions with async patterns for long-running OmniStudio flows. NOT for simple DataRaptor reads.

dataraptor-transform-optimization

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when DataRaptor Transform operations are slow, hit governor limits, or use Apex where formula fields would suffice. Covers formula vs Apex expressions, bulk transform sizing, and chained transform composition. Triggers: 'dataraptor transform slow', 'dataraptor formula vs apex', 'dataraptor bulk transform', 'dr governor limit'. NOT for DataRaptor Extract or Load performance.

dataraptor-patterns

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when designing or reviewing OmniStudio DataRaptors, especially Extract versus Turbo Extract versus Transform versus Load, field mapping strategy, performance tradeoffs, and when to move work into Integration Procedures or Apex. Triggers: 'DataRaptor Extract', 'Turbo Extract', 'DataRaptor Load', 'DataRaptor Transform', 'OmniStudio data mapping'. NOT for overall OmniScript journey design or Integration Procedure sequencing when the main question is not the DataRaptor shape itself.

lwc-datatable-advanced

8
from PranavNagrecha/AwesomeSalesforceSkills

Advanced lightning-datatable patterns — inline edit + draftValues, custom cell types via extending LightningDatatable, sortable columns, infinite scroll with onloadmore, row-level errors, and the cost of large data sets. NOT for read-only display of small lists (plain lightning-datatable suffices) or fully custom grids (use a third-party library).

lwc-data-table

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when designing or reviewing `lightning-datatable` usage in Lightning Web Components, including column configuration, stable `key-field` values, inline editing, row actions, infinite loading, and custom cell types. Triggers: 'lightning datatable inline edit', 'row actions in lwc datatable', 'key field missing', 'infinite loading in datatable'. NOT for highly custom virtualized grids or broad page-performance work outside the datatable boundary.

lwc-custom-datatable-types

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when you need to extend `lightning-datatable` with custom cell renderings: status pills, progress bars, image thumbnails, action cells, editable pickliststo, rich-text, or any column that `lightning-datatable` does not ship out of the box. Triggers: 'custom cell type lightning datatable', 'progress bar column', 'image column', 'inline edit picklist in datatable', 'rich text column'. NOT for basic datatable usage (see `lwc-data-table`) and NOT for tree-grid or large-dataset virtualization (see `virtualized-lists`).