---
schema_version: "1"
id: e6ace77a63fb0de7690f921c4a428e7eff7d7d313ae4e922592468007a578b25
title: Configuring Dual Data Sources (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_configuring_dual_data_sources.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_configuring_dual_data_sources.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6efb58c88f1fb6d2bb5c4affbe7258429aedaf9435d62637f773b3e5b141dcdb
description: For the managed package runtime, a dual data source combines Apex remote and Apex REST technologies to support hybrid applications for both web apps and mobile apps. The Salesforce web environment uses Apex remote technology, and the parallel mobile app uses the Apex REST API, requiring configuration for dual environments.
products:
  - Omnistudio
release: "264"
---
# Configuring Dual Data Sources (Managed Package)

For the managed package runtime, a dual data source combines Apex remote and Apex REST technologies to support hybrid applications for both web apps and mobile apps. The Salesforce web environment uses Apex remote technology, and the parallel mobile app uses the Apex REST API, requiring configuration for dual environments.

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

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

For optimal flexibility and easier implementation, use an Integration Procedure as a data source to execute multiple actions in a single server call. See [Configuring an Integration Procedure Data Source (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_configuring_an_integration_procedure_data_source.htm&release=264.0.0&type=5 "For the managed package runtime, configure a data source to use a Vlocity Integration Procedure to execute multiple actions in a single server call.").

To configure a dual data source:

1. On the Vlocity Cards tab, click **New** to configure a data source for a new cards component, or select an existing component to configure its data source.
2. In the Cards Designer, in the Layout or Cards pane, from the **Data Source** picklist, select **Dual**.
    
    ![image](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/desktopapexremote_config.png)
3. In the Desktop ApexRemote Config section, follow these steps:
    
    1. In the **Remote Class** box, enter the name of the remote class, for example, CpqAppHandler.
    2. In the **Remote Method** box, enter the name of the method the remote class invokes.
        
        For example, the method in the CpqAppHandler remote class is getCartsItemsGet Cart Items.
    3. Click **\+ Add Input Map Variable** to add input variables to the map that is passed to the remote method.
        
        Context variables allow the map to inherit values from variables in a parent Layout or Card. By defining CartId as {{params.id}}, the remote method receives an inherited value (an Account ID) from the layout or card, not the literal string `{{params.id}}`.
    4. Click **+Add Options Map Variable** to add option variables to the map that is passed to the remote method.
    5. In the **Result JSON Path** box, you can specify a path to a specific node in the JSON-formatted response. If the information resides specifically in the CartId node, set the **Result JSON Path** to CartId.
4. In the **Mobile Hybrid RemoteApex Config** section, follow these steps:
    
    1. In the **Endpoint** box, enter the Apex REST endpoint URL.
        
        ![image](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/mobilehybridapexrest.png)
    2. Specify the REST method:
        
        - `GET`—Requests data specified by the parameters of the URL.
        - `POST`—Sends JSON data specified in the Body text area.
            
            ![image](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/screenshot___rest___post.png)
        
        You can use Context Variables to pass inherited values with either method.
    3. (Optional). Enter values for these properties:
        
        - To drill down to a specific dataset, in the **Result JSON Path** field, enter a path. For example, enter records.results, which drills down to the `results` array and passes the array to the card or card layout.
        - To sort data by a specific data field, enter the field name in the **Order By** input field.
        - To reverse the order of the data returned, select **True** from the **Reverse Order** picklist.
            
            ![image](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/orderbyreverseorder.png)
        - Set a **Timeout** value in milliseconds.
            
            The timeout value controls the time that the framework waits for the designated data source to return a response. Timeouts improve handling user interactions with long running processes. Setting an appropriate timeout value allows the application and users to react accordingly to long wait times.
        - Set an **Interval** value in milliseconds.
            
            The card component's data source refreshes continuously at the given interval and checks for changes in data source records. If changes are found, the layout or card component reloads. Setting an interval enables recursive updates of records.
5. To preview a cards component using real data, add a test variable that the query can use to return live data. See [Testing Data Source Settings](https://help.salesforce.com/s/articleView?id=xcloud.os_testing_data_source_settings.htm&release=264.0.0&type=5 "For the managed package runtime, add runtime variables to fetch and test your data source.").