---
schema_version: "1"
id: 2eb81f5b3b6f47103acfeaed33ce6809bd026e89157581a9aeadf44d626ac747
title: Relationship Notation versus Multiple Extract Steps (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_relationship_notation_versus_multiple_extract_steps.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_relationship_notation_versus_multiple_extract_steps.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ed7a8e12dcd5fd3b803740d15a98ad4d69bfc336dd18505c93601d8413ac8b61
description: For the managed package runtime, using relationship notation improves the performance of Omnistudio Data Mappers that retrieve data from a parent of the primary sObject. You use this notation in the Extract JSON Paths for the parent sObject's fields instead of adding a second sObject in the Data Mapper's Extract tab. Two examples illustrate how to use relationship notation.
products:
  - Omnistudio
release: "264"
---
# Relationship Notation versus Multiple Extract Steps (Managed Package)

For the managed package runtime, using relationship notation improves the performance of Omnistudio Data Mappers that retrieve data from a parent of the primary sObject. You use this notation in the Extract JSON Paths for the parent sObject's fields instead of adding a second sObject in the Data Mapper's Extract tab. Two examples illustrate how to use relationship notation.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

Relationship notation in Data Mappers is based on relationship queries in Salesforce. For more information about relationship names and other relevant topics, see [Relationship Queries](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships.htm) in the Salesforce help. Data Mappers support only child-to-parent relationship queries.

Suppose you want to retrieve Contact data that includes the name of the Account with which the Contact is associated. (Account is a parent object of Contact.) You can use multiple extract steps or relationship notation.

To use multiple extract steps, first define extraction steps for Contact and Account objects on the Data Mapper's Extract tab.

![The Contact object has an Extract Output Path of Person and the filter Id = Id. The Account object has an Extract Output Path of Company and the filter Id = Person:AccountId.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/accountcontactextract.png)

Then define Extract JSON Paths for the Contact and Account fields on the Data Mapper's Output tab.

![Company:Name maps to CompanyName. Person:FirstName maps to FirstName. Person:LastName maps to LastName.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/accountcontactoutput.png)

To use relationship notation, first define an extraction step for the Contact object on the Data Mapper's Extract tab.

![The Contact object has an Extract Output Path of Person and the filter Id = Id.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/accountcontactrqextract.png)

Then Define Extract JSON Paths for the Contact and Account fields on the Data Mapper's Output tab.

![Person:Account.Name maps to CompanyName. Person:FirstName maps to FirstName. Person:LastName maps to LastName.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/accountcontactrqoutput.png)

To download data packs of these examples for Omnistudio for Managed Packages, click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005uIV/cYqzboBgtbodNCWmvGkdyLg3Zz2be_uHSgmtivQV7F8) and [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005uIa/WY.jwXPpeWPeEQNStmZJ7O4fthjefxOgHUbzE0lCoXQ).

The Extract JSON Path for the Name field of the Account object is `Account.Name`. `Account` is the name of the relationship that the Contact object has with the parent Account object. The relationship name is different from the name of the field that references the parent object, which is AccountId. Most relationship names for standard objects follow this convention and omit the Id suffix.

If you supply a Contact Id on the Preview tab, you get the same Response for that Contact for both Data Mappers:

```
{
  "CompanyName": "Acme",
  "LastName": "Tomlin",
  "FirstName": "Leanne"
}
```

However, if you look in the Debug Log, you see two SOQL queries for the Data Mapper that uses multiple extract steps:

```
SELECT id, accountid, firstname, lastname, name FROM Contact WHERE (Id = '0031U00000HUob9QAD')
SELECT id, name FROM Account WHERE (Id = '0011U00000KbYZAQA3')
```

You see only one SOQL query for the Data Mapper that uses relationship notation:

```
SELECT id, firstname, lastname, account.name FROM Contact WHERE (Id = '0031U00000HUob9QAD')
```

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_important.png)

Important

Running only one SOQL query per primary object is always noticeably faster than running two. A Data Mapper performs processing steps for each SOQL query that it runs, and Salesforce contributes overhead for each SOQL query as well. With one query rather than two, you have half the overhead.

## What's Next

[Defining the Output of a Data Mapper Extract](https://help.salesforce.com/s/articleView?id=xcloud.os_dataraptor_extract_output.htm&release=264.0.0&type=5 "For the managed package runtime, to map data from the extraction step JSON to the output JSON, go to the Output tab. You can also handle null values, attributes, translations, field-level permissions, caching, and list transforms.")