---
schema_version: "1"
id: 9db119fdbcd3dee4a7851e5bd0c643619cf30935c2090d4e7c154fa285952876
title: Define the Initial Extraction (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_define_the_initial_extraction.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_define_the_initial_extraction.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2dbf6e42313e1d954f7805782905ebcb710b8c8a97287955b4adb85601c3515a
description: For the managed package runtime, on the Extract tab, you specify the Salesforce objects to be queried and the filters that determine the data to be returned from the object. You can also specify a limit and offset for paging or a field on which to sort.
products:
  - Omnistudio
release: "264"
---
# Define the Initial Extraction (Managed Package)

For the managed package runtime, on the Extract tab, you specify the Salesforce objects to be queried and the filters that determine the data to be returned from the object. You can also specify a limit and offset for paging or a field on which to sort.

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

Custom objects must have unique names and shouldn't use API names that already exist for custom objects in a managed package. Custom objects are accessed in the managed package namespace and not as an object without a namespace. For example, in the vlocity\_ins\_\_ namespace, a custom object named Policy\_\_c is the same as the existing vlocity\_ins\_\_Policy\_\_c.

For each source object:

1. Click Add Extract Step and choose the source object from the dropdown list of objects.
    
    The FeedComment and IdeaComment objects aren't selectable.
2. Configure settings for the source object:
    - Extract Output Path: The top-level node in the JSON extraction step where you want the data to reside.
        
        When possible, name the Extract Output Path for the Salesforce object that is its data source. This value defines the first node of the Extract JSON Path field values on the Output tab. If the object relates to another, specify the hierarchy of the data model. For example, if your Contact object has Case as parent object, and Case has Account as parent, the extract output path is Account:Case:Contact.
    - Filter: The comparison used to determine what data is to be read. The item on the left is a field of the source object. The item in the middle is a comparison operator. The item on the right can be a quoted literal value, an input parameter, another field of the same source object, or a field of a source object in a previous extract step. To filter for null values, use the $Vlocity.NULL variable.
        
        You can use fields in related objects in filters, such as `Parent.Name`, but you have to enter them manually. For details about the notation, see [Relationship Notation versus Multiple Extract Steps (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_relationship_notation_versus_multiple_extract_steps.htm&release=264.0.0&type=5 "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.").
        
        The most basic filter is `Id = Id`, which sets the Id of the object to an input parameter named Id.
        
        Data Mapper Extract also supports case-sensitive filter queries using `Equals`, and case-insensitive filter queries using `Not Equal To`.
        
        The INCLUDES and EXCLUDES operators apply only to multi-select picklist fields. See [Querying Multi-Select Picklists](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_querying_multiselect_picklists.htm).
        
        ![Note](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_note.png)
        
        Note Omnistudio Data Mapper Extract doesn’t directly support filtering on lookup fields on external objects. To filter on a lookup field on an external object, create a field on the external object and map the value of the new field to the value of the lookup field. The new field can be of any type except lookup. Then, filter on the new field. You can set the value of the new field dynamically using triggers or flows.
3. Configure optional additional filter settings by clicking the down arrow to the right of the first filter:
    - AND: Add a filter and specify that both filters must be true.
    - OR: Add a filter and specify that either filter can be true.
    - LIMIT: Specify the maximum number of records returned. Valid values are 1 through 50000; the default is 50000.
    - OFFSET: To implement paging logic, add a filter to specify where record retrieval starts. The OFFSET must be a dynamic, not a static, value. Choose OFFSET from the dropdown list and specify the name of a node in the input payload where the caller maintains the offset (for example, `offsetValue`).
        
        Use OFFSET with LIMIT to specify the first record to appear on a page in a multi-page retrieval. The offset must be an integer. For example, if the LIMIT is 5, the offsets for successive pages are 0, 5, 10, and so on.
        
        ![Note](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_note.png)
        
        Note Salesforce imposes a 2000-record limit on queries that use OFFSET. Allowed OFFSET values are from 0 to 2000. See [Workaround for offset 2000 limit on SOQL query](https://help.salesforce.com/s/articleView?id=000387840&type=1&language=en_US).
    - ORDER BY: Sort the results by the specified field. To sort by multiple fields, specify a comma-separated list of field names in order of precedence, for example `LastName,FirstName`.
        
        You can optionally specify ASC or DESC for an ascending or descending sort. You can optionally specify NULLS FIRST or NULLS LAST to place blank values at the beginning or end. For example, to sort Accounts by the number of employees, listing the companies of unknown size first and the largest employers last, specify the ORDER BY value `NumberOfEmployees ASC NULLS FIRST`.

What’s next: [When to Use Multiple Extract Steps (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_when_to_use_multiple_extract_steps.htm&release=264.0.0&type=5 "For the managed package runtime, how many extract steps you need depends on how the object types you are extracting from are related. There are three basic scenarios: single, single with relationship notation, and multiple.").