---
schema_version: "1"
id: 67e87e0b64e38fa353b9b2b17aefd1ecf38b987f0498cc30336c348406e25ed3
title: Extract from Multiple Related Custom Objects (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_extract_from_multiple_related_custom_objects.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_extract_from_multiple_related_custom_objects.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1484e1f80cdd105103c1c0cd928ca28b1cc955743d7b41761072c9afcf39faa0
description: For the managed package runtime, although relationship notation is different for standard and custom fields, it is exactly the same for standard and custom objects. This example extracts data from three custom fields of the vlocity_cmt__CatalogProductRelationship__c SObject.
products:
  - Omnistudio
release: "264"
---
# Extract from Multiple Related Custom Objects (Managed Package)

For the managed package runtime, although relationship notation is different for standard and custom fields, it is exactly the same for standard and custom objects. This example extracts data from three custom fields of the vlocity\_cmt\_\_CatalogProductRelationship\_\_c SObject.

![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).

To download a DataPack of this example, click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/3m0000005uKH/70hf0RIbtI9gd.TPjDQPLu8osGdGP3mQNA4Q8xc8U6Y).

To use relationship notation:

1. On the Omnistudio Data Mapper's Extract tab, define an extraction step for the vlocity\_cmt\_\_CatalogProductRelationship\_\_c object. Filter on the vlocity\_cmt\_\_CatalogId\_\_c field as follows:
    
    ![The vlocity\_cmt\_\_CatalogProductRelationship\_\_c object has an Extract Output Path of CatalogPRD and a filter of vlocity\_cmt\_\_CatalogId = CatalogId.](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/drextractrel3_extract.png)
    
    Note that you can use the **Extract Output Path** to shorten the object name for mapping.
2. Define Extract JSON Paths for the Catalog Name, Product Name, and Promotion Name fields on the Data Mapper's Output tab as follows:
    
    ![CatalogPRD:vlocity\_cmt\_\_CatalogId\_\_r.Name is mapped to CatalogName. CatalogPRD:vlocity\_cmt\_\_Product2Id\_\_r.Name is mapped to ProductName. CatalogPRD:vlocity\_cmt\_\_PromotionId\_\_r.Name is mapped to PromotionName.](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/drextractrel3_output.png)
    
    For these custom fields, the relationship names are the same as the field names except that the suffix is `__r` instead of `__c`.
3. Supply a CatalogId on the Preview tab. You get a Response such as this one:
    
    ```
    [
      {
        "PromotionName": "Two for One",
        "CatalogName": "Phones"
      },
      {
        "ProductName": "Samsung Galaxy S8 Active",
        "CatalogName": "Phones"
      },
      {
        "PromotionName": "Free Case",
        "CatalogName": "Phones"
      },
      {
        "ProductName": "Apple iPhone X",
        "CatalogName": "Phones"
      }
    ]
    ```
4. See the SOQL query in the Debug Log. It looks like this:
    
    ```
    SELECT id,vlocity_cmt__catalogid__c, vlocity_cmt__catalogid__r.name, 
    vlocity_cmt__product2id__r.name, vlocity_cmt__promotionid__r.name FROM 
    vlocity_cmt__CatalogProductRelationship__c WHERE (vlocity_cmt__CatalogId__c = 
    'a0c6g000000Q2XcAAK')
    ```