---
schema_version: "1"
id: 4193ee8783ad74b777dcc73f7ac9888b202d68d2272dc4814a61c74418f934d6
title: Set Up Related DMO Hydration
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/ctx_set_up_related_dmo_hydration.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.ctx_set_up_related_dmo_hydration.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1459f1c9bf62fd274af183de2b4577cf4f9e2aa1fd679df90ee3ffc63b8fc070
description: Connect a parent and child Data Model Object (DMO) so Context Service hydrates the complete hierarchy in a single request instead of a separate request for each DMO. Configure the relationship in Data 360, then add and map the child DMO in your context definition.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Set Up Related DMO Hydration

Connect a parent and child Data Model Object (DMO) so Context Service hydrates the complete hierarchy in a single request instead of a separate request for each DMO. Configure the relationship in Data 360, then add and map the child DMO in your context definition.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Developer</strong>, <strong>Enterprise</strong>, <strong>Professional</strong>, and <strong>Unlimited</strong> editions for Industries clouds where Context Service and Data 360 are enabled.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d6237e72">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d6237e72 ">To set up related DMO hydration:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d6237e72 ">Context Service Admin</td>

          </tr>
        </tbody>
      </table>

If you already have a context definition with a DMO parent-child node tree, it hydrates the related DMO data automatically. No definition changes are required.

To set up related DMO hydration from scratch:

1. In Data 360, on the parent DMO's Relationships tab, create or confirm an active relationship to the child DMO. Specify the foreign key field on the parent, the cardinality, and the related field (the primary key) on the child DMO.
    
    For more information on relationship types and cardinality, see [Data Model Object Relationships](https://help.salesforce.com/s/articleView?id=data.c360_a_data_model_object_relationships.htm&type=5&language=en_US). To create or confirm a relationship between two DMOs, see [View Your Data Model Objects](https://help.salesforce.com/s/articleView?id=data.c360_a_data_model_object_view.htm&type=5&language=en_US).
2. In Context Service, create or edit your context definition and add the child DMO as a child node under its parent DMO node in the definition's structure.
    
    For more information on adding nodes to a context definition, see [Create a Context Definition](https://help.salesforce.com/s/articleView?id=ind.context_service_create_context_definitions.htm&release=264.0.0&type=5 "Create a context definition by choosing nodes, defining their relationship, adding attributes, and applying context tags.").
3. In your context definition, map each node to its corresponding DMO using the **sObjects & DMO** tab.
    
    See [Add Context Mapping](https://help.salesforce.com/s/articleView?id=ind.context_service_add_context_mapping.htm&release=264.0.0&type=5 "To make sure that your nodes and attributes are updated with the right input data, Salesforce objects, or context definition objects, create a mapping structure for your context definition.").
    
    Context Service automatically discovers the join fields from the Data 360 relationship metadata. No additional mapping is needed. If Data 360 contains more than one relationship between the same pair of DMOs, Context Service selects the first one automatically, consistent with the behavior for standard Salesforce objects. To specify which relationship to use, configure an explicit join field mapping on the child DMO in the context definition.