---
schema_version: "1"
id: bae0807addaf5a0438bd77ba125e04071d9f8e8bca83c0ccc92d25591e2cd9d3
title: Set Up a Data Source on a Flexcard
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_configure_a_data_source_on_a_flexcard_35864.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d663d030d337d4fd46c772a905cc001eb1c31deaf9eaebff5efbe40a23968413
description: Configure how to retrieve the data that a Flexcard shows. Pull it directly from Salesforce objects with Omnistudio Data Mappers, Salesforce Object Query Language (SOQL) queries, and Salesforce Object Search Language (SOSL) searches. You can also use an external source with REST methods. For complex business processes, use the Apex remote method or Integration Procedures. If needed, set different data sources for the child and parent Flexcards. Then, choose where to publish the Flexcard.
products:
  - Omnistudio
release: "264"
---
# Set Up a Data Source on a Flexcard

Configure how to retrieve the data that a Flexcard shows. Pull it directly from Salesforce objects with Omnistudio Data Mappers, Salesforce Object Query Language (SOQL) queries, and Salesforce Object Search Language (SOSL) searches. You can also use an external source with REST methods. For complex business processes, use the Apex remote method or Integration Procedures. If needed, set different data sources for the child and parent Flexcards. Then, choose where to publish the Flexcard.

For optimal flexibility and easier implementation, use an Integration Procedure as a data source to execute multiple actions in a single server call. See [Set Up an Integration Procedure Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5 "Configure a data source to use an Integration Procedure that executes multiple actions in a single server call. For example, you want your customer service agents to view the weather forecast of policyholders when they’re on a call. To do so, use an Integration Procedure with a Data Mapper Extract that returns an account's ZIP code. Then, use a REST API call that gets the current forecast for the account's region based on the ZIP code.").

If you don’t see a data source, confirm that it’s turned on. See [Enable and Disable Data Sources](https://help.salesforce.com/s/articleView?id=xcloud.os_enable_and_disable_data_sources_36352.htm&release=264.0.0&type=5 "Enable and disable data source types for an org, profile, or user level from the Card Framework Configuration custom setting. For example, disable Apex REST, Apex Remote, and other complex data sources for your entire org, or prevent system admins with limited permissions from using these data sources.").

Set up the data source when you create a Flexcard or update the existing data source on an existing, inactive Flexcard from the Setup tab. See [Configure Flexcard Settings](https://help.salesforce.com/s/articleView?id=xcloud.os_set_up_a_flexcard_in_the_flexcard_designer_37646.htm&release=264.0.0&type=5 "Specify your Flexcard’s behavior with the setup options. For example, add or update a data source, create an event listener, or add session variables.").

This article describes the information required after you select the data source type for the Flexcard.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note We recommend that when you pull data into the Flexcard through any data source, you impose a low limit on the amount of data you're fetching. After your card is developed and published, you can increase the amount of data you pull.

- **[Set Up a SOQL Query Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Configure a data source to use a Salesforce Object Query Language (SOQL) query to search an org's data for specific information. SOQL queries are encrypted so that Flexcards don’t display query information on the client-side.
- **[Set Up a SOSL Search Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Construct text-based search queries against the search index with Salesforce Object Search Language (SOSL). By using a single query, you can search text, email, and phone fields for multiple objects to which you have access, including custom objects. SOSL queries are encrypted so the query information isn’t visible on the client side. To enforce field-level security for an SOSL query, navigate to Setup and add the EnableQueryWithFLS Omni Interaction Configuration and set it to true: EnableQueryWithFLS=true
- **[Set Up an Apex Remote Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Configure a data source to invoke an Apex class and method that fetch data to populate a Flexcard. Apex remote data sources can run asynchronously, which increases the CPU time but ensures that long-running transactions don’t time out. An Apex remote class is a standard Apex class that implements the VlocityOpenInterface.
- **[Set Up an Apex REST Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Configure a data source to use an Apex REST call to retrieve data to populate fields on a Flexcard with the GET method. Use the POST method to send back data to the server.
- **[Set Up an Omnistudio Data Mapper Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Configure a Data Mapper data source to fetch data from a Data Mapper Extract. Field-level security is fully supported.
- **[Set Up a REST Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Configure a REST data source by retrieving or sending data through a public API, such as weather data from a weather API based on a policyholder's ZIP code. You can also use named credentials to authenticate Apex callouts that specify the URL of a callout endpoint and its required authentication parameters in one definition.
- **[Set Up an Integration Procedure Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Configure a data source to use an Integration Procedure that executes multiple actions in a single server call. For example, you want your customer service agents to view the weather forecast of policyholders when they’re on a call. To do so, use an Integration Procedure with a Data Mapper Extract that returns an account's ZIP code. Then, use a REST API call that gets the current forecast for the account's region based on the ZIP code.
- **[Set Up a Streaming API Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    The streaming API method uses push technology, which is a publish and subscribe model that transfers information initiated from a server to the client based on criteria that you define. It has a persistent connection that continuously delivers new data as it becomes available, rather than using client polling. By using streaming API, you reduce the number of API calls and thus improve performance.
- **[Set Up a Custom Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Directly embed custom JSON data into Flexcard without depending on an external data source. Configure this custom data to test with temporary static data, such as when waiting for API access or for rapid concept testing.
- **[Autolaunched Flows in Flexcards](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Connect a Flexcard directly to a Salesforce autolaunched flow. The autolaunched flow runs in the background without a user interface, allowing you to reuse existing business logic.

## Set Up a SOQL Query Data Source

Configure a data source to use a Salesforce Object Query Language (SOQL) query to search an org's data for specific information. SOQL queries are encrypted so that Flexcards don’t display query information on the client-side.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note

When you map fields, only fields in the field picker that have non-null values for the specific record in the test query are visible. Use a test record that you know has non-null values for all the fields to map. Or use custom fields if the test record doesn't have such fields.

1. To enforce field-level security for an SOQL query:
    
    1. From Setup, select and open **Omni Interaction Configuration**.
    2. Click **New Omni Interaction Configuration**.
    3. For Name and Label, enter EnableQueryWithFLS. For Value, enter true.
    4. Save your changes.
    
    When the EnableQueryWithFLS setting is enabled, Flexcards display only the fields that the user has permission to view. Any fields the user doesn't have access to are hidden.
    
    ![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_important.png)
    
    Important During the week of February 2, 2026, Salesforce enables the EnableQueryWithFLS setting by default to enhance org security. Review and prepare your configuration for a seamless transition and to prevent potential service interruptions. See [Security Checks for Omnistudio](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_security_updates_overview.htm&release=264.0.0&type=5 "The security checks for Omnistudio enforce stricter validation of access and permissions. These checks make sure that users, including guest, authenticated, and non-authenticated users, have the appropriate access to objects and fields used within Omnistudio components.").
2. Enter an SOQL query and other options as needed.
    
    For example, get up to 10 fields from the Contact object when there’s an existing email address by using this query:
    
    ```
    SELECT Id, Name, Email, Phone, Title FROM Contact WHERE Email != Null LIMIT 10
    ```

## Set Up a SOSL Search Data Source

Construct text-based search queries against the search index with Salesforce Object Search Language (SOSL). By using a single query, you can search text, email, and phone fields for multiple objects to which you have access, including custom objects. SOSL queries are encrypted so the query information isn’t visible on the client side. To enforce field-level security for an SOSL query, navigate to Setup and add the EnableQueryWithFLS Omni Interaction Configuration and set it to true: EnableQueryWithFLS=true

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_important.png)

Important During the week of February 2, 2026, Salesforce enables the EnableQueryWithFLS setting by default to enhance org security. Review and prepare your configuration for a seamless transition and to prevent potential service interruptions. See [Security Checks for Omnistudio](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_security_updates_overview.htm&release=264.0.0&type=5 "The security checks for Omnistudio enforce stricter validation of access and permissions. These checks make sure that users, including guest, authenticated, and non-authenticated users, have the appropriate access to objects and fields used within Omnistudio components.").

1. Enter the search term.
2. Select the fields to search from.
3. Select at least one sObject and one field to search.
4. If needed, enter a limit of the maximum number of rows to return.
5. Enter other search information as needed.

## Set Up an Apex Remote Data Source

Configure a data source to invoke an Apex class and method that fetch data to populate a Flexcard. Apex remote data sources can run asynchronously, which increases the CPU time but ensures that long-running transactions don’t time out. An Apex remote class is a standard Apex class that implements the VlocityOpenInterface.

Before you begin, add an Apex class permissions checker to define who can access VlocityOpenInterface classes (APIs) from a remote action on a Flexcard. See [Set Up Access to Remote Action APIs](https://help.salesforce.com/s/articleView?id=xcloud.os_add_an_apex_class_permissions_checker_20650.htm&type=5&language=en_US).

1. Select an Apex class and method.
    
    See [View Apex Classes](https://help.salesforce.com/s/articleView?id=platform.code_view_class.htm&type=5&language=en_US).
    
    This example shows an Apex class `RemoteActionClass` with a `getAccounts` method:
    
    `global class RemoteActionClass implements [Namespace].VlocityOpenInterface2 {      public Boolean invokeMethod(String methodName, Map<String,Object> input, Map<String,Object> outMap, Map<String,Object> options) {         if (methodName.equals('getAccounts')) {             getAccounts(input, outMap, options);         }         return true;     }     public void getAccounts(Map<String,Object> input, Map<String,Object> outMap, Map<String,Object> options) {         String accountName = String.valueOf(input.get('account'));         List<Account> accounts = new List<Account>();                  if (String.isBlank(accountName)) {             accounts = [SELECT Id, Name, Phone FROM Account];         } else {             accounts = [SELECT Id, Name, Phone FROM Account WHERE Name Like :('%' + accountName + '%')];         }         outMap.put('accounts', accounts);     } }`
2. Choose whether to run the call asynchronously through Apex.
3. If needed, enter an interval in milliseconds to check the response status.
4. If needed, pass values from the Flexcard to the remote class method:
    
    1. Add an input map.
    2. In **Key**, enter a context ID variable.
    3. In **Value**, enter the variable value.
    
    For example, enter the AccountId key and a record’s account ID as the value.
5. If needed, send additional key value pairs to the input map passed to the remote method:
    1. Add an options map.
    2. Enter the values.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
        
        Note
        
        The Value fields support static values and merge fields such as `{recordId}` or `{name}`.
6. Enter other Apex remote data source information as needed.

## Set Up an Apex REST Data Source

Configure a data source to use an Apex REST call to retrieve data to populate fields on a Flexcard with the GET method. Use the POST method to send back data to the server.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/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 [Set Up an Integration Procedure Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5 "Configure how to retrieve the data that a Flexcard shows. Pull it directly from Salesforce objects with Omnistudio Data Mappers, Salesforce Object Query Language (SOQL) queries, and Salesforce Object Search Language (SOSL) searches. You can also use an external source with REST methods. For complex business processes, use the Apex remote method or Integration Procedures. If needed, set different data sources for the child and parent Flexcards. Then, choose where to publish the Flexcard.").

1. Enter the endpoint URL such as /services/apexrest/{namespace}/CardTestApexRestResource/{recordId}.
    
    This example shows a REST class:
    
    `@RestResource(urlMapping='/v1/typeahead/*')   global with sharing class TypeaheadApexRest {     @HttpGet     global static void doGet()     {         RestResponse res = RestContext.response;         res.responseBody =blob.valueOf('["amazon","airbnb","amazon prime","american airlines","american express","apple","aol mail","at\u0026t","apple store","adele"]');     }          @HttpPost     global static void doPost()     {         RestRequest req = RestContext.request;         RestResponse res = RestContext.response;                  res.responseBody = blob.valueOf(JSON.serialize(new Map<String, Object>{'someResponse' => 'Post is done'}));     } }`
2. Select a method type:
    - **GET**: Request data based on the parameters of the URL.
    - **POST**: Send JSON data.
3. For the POST method, enter the JSON data to send in the JSON Payload field.
    
    You can use context variables to pass inherited values with either method.
4. Enter other Apex REST data source information as needed.

## Set Up an Omnistudio Data Mapper Data Source

Configure a Data Mapper data source to fetch data from a Data Mapper Extract. Field-level security is fully supported.

Before you begin, create a Data Mapper Extract that has an input parameter that corresponds to the Flexcard's context ID, such as AccountId. See [Working with Omnistudio Data Mappers](https://help.salesforce.com/s/articleView?id=xcloud.os_standard_data_mapper_workflow.htm&release=264.0.0&type=5 "Use the Data Mapper Designer to build and configure server-side processes that declaratively retrieve, write, and modify data. You can create Data Mappers from the Omnistudio or Data Mappers app. Or you can create them from Data Mapper elements in Integration Procedures and Omniscripts.").

1. Find and select the Data Mapper to use.
2. If needed, pass values from the Flexcard to the Data Mapper’s input parameters:
    
    1. Add an input map.
    2. In **Key**, enter a context ID variable.
    3. In **Value**, enter the variable value.
    
    For example, enter the AccountId key and a record’s account ID as the value.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    The Value field supports static values and merge fields such as `{recordId}` or `{name}`.
3. Enter other Data Mapper data source information as needed.

## Set Up a REST Data Source

Configure a REST data source by retrieving or sending data through a public API, such as weather data from a weather API based on a policyholder's ZIP code. You can also use named credentials to authenticate Apex callouts that specify the URL of a callout endpoint and its required authentication parameters in one definition.

Before you begin:

- Register the REST endpoint URL in Remote Sites. See [Configure Remote Site Settings](https://help.salesforce.com/s/articleView?id=xcloud.configuring_remoteproxy.htm&type=5&language=en_US).
- Add the REST endpoint URL as a trusted URL. See [Manage Trusted URLs](https://help.salesforce.com/s/articleView?id=xcloud.security_trusted_urls_manage.htm&type=5&language=en_US).

1. Select the REST type and then the method type:
    - **GET**: Request data based on the parameters of the URL.
    - **POST**: Send JSON data.
2. For the named credential REST type:
    1. Select a named credential.
    2. Enter a relative path for data retrieval such as `My_Payroll_System/paystubs?format=json`.
3. For the Web REST type, enter the REST endpoint URL such as `http://api.weatherstack.com/current?access_key={Session.weatherAPIkey}&query={BillingCity}`.
4. For the POST method, enter the JSON data to send in the JSON Payload field.
    
    You can use context variables to pass inherited values with either method.
5. If needed, add request headers such as tokens, public keys, or content-type:
    1. Add a key-value pair.
    2. In **Key**, enter a context ID variable.
    3. In **Value**, enter the variable value.
6. Enter other REST data source information as needed.

## Set Up an Integration Procedure Data Source

Configure a data source to use an Integration Procedure that executes multiple actions in a single server call. For example, you want your customer service agents to view the weather forecast of policyholders when they’re on a call. To do so, use an Integration Procedure with a Data Mapper Extract that returns an account's ZIP code. Then, use a REST API call that gets the current forecast for the account's region based on the ZIP code.

Before you begin, create an Integration Procedure. See [Omnistudio Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_integration_procedures_48334.htm&release=264.0.0&type=5 "Use Omnistudio Integration Procedures to declaratively automate data interactions between Salesforce and external third-party applications. Integration Procedures handle complex data transformations, API calls, and event-driven automation, and they can execute multiple actions in a single server call.").

1. Find and select the Integration Procedure to use.
2. If needed, pass values from the Flexcard to the Integration Procedure:
    
    1. Add a key-value pair.
    2. In **Key**, enter a context ID variable.
    3. In **Value**, enter the variable value in `{}, {}, ...` format. Array format isn’t supported.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)
    
    Note
    
    The Value fields support static values and merge fields such as `{recordId}` or `{name}`.
    
    array if objects in the form of \[{},{}\] will break interpolation logic, as it only accepts data of format { }, Unable to pass array of objects as input parameters to IP Data Action from a Flexcard to \[Doc\] Unable to pass array of objects as input parameters to IP Data Action from a Flexcard
    
    For example, enter the AccountId key and a record’s account ID as the value.
3. If you use Omnistudio Winter ‘23 or later, configure your Integration Procedure to use the Continuation class in Apex to make a long-running request to an external Web service:
    
    1. Add an options map.
    2. In **Key**, enter useContinuation.
    3. In **Value**, enter true.
    
    See [Continuation Class](https://developer.salesforce.com/docs/atlas.en-us.248.0.apexref.meta/apexref/apex_class_System_Continuation.htm).
4. If needed, add sample data to the Integration Procedure.
    
    See [Response Action for Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_response_action_for_integration_procedures.htm&type=5&language=en_US).
5. Enter other Integration Procedure data source information as needed.

## Set Up a Streaming API Data Source

The streaming API method uses push technology, which is a publish and subscribe model that transfers information initiated from a server to the client based on criteria that you define. It has a persistent connection that continuously delivers new data as it becomes available, rather than using client polling. By using streaming API, you reduce the number of API calls and thus improve performance.

Before you begin, create a streaming API data source. See [PushTopic Events (Legacy)](https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/pushtopic_events_intro.htm), [Generic Events (Legacy)](https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/generic_streaming_intro.htm), and [Push Technology](https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/intro_push_technology.htm).

The Streaming API data source is only supported with the designer on a managed package.

1. Select the streaming API type:
    - **PushTopic**: SOQL query that returns a result that notifies listeners of record changes in Salesforce by using a streaming API channel. For example, use this method to get notified when someone creates a case for a type, a status, or both.
    - **Streaming Channel**: Streaming API that sends notifications of general events that don’t relate to Salesforce data changes. You can use this method for any application that sends custom notifications, such as a chat application.
    - **Platform Event**: Event-driven messaging architecture that enables apps to communicate inside and outside of Salesforce. A platform event combines the PushTopic and streaming channel types. Instead of working with an sObject, platform events work with custom objects.
2. In Channel, enter the URL of the streaming API.
3. Select the type of operation, whether the retrieved data replaces or adds to the existing data.
4. From the Get All Messages picklist, select one of these options:
    - **True**: Get all data from the last 24 hours.
    - **False**: Get the latest data update.
5. Enter other streaming API data source information as needed.

## Set Up a Custom Data Source

Directly embed custom JSON data into Flexcard without depending on an external data source. Configure this custom data to test with temporary static data, such as when waiting for API access or for rapid concept testing.

1. Enter your custom JSON code, such as:
    
    `[ 	{ 		"attributes": { 			"type": "Contact", 			"url": "/services/data/v49.0/sobjects/Contact/0033700000TOF0eAAH" 		}, 		"Name": "Perry", 		"Id": "0033700000TOF0eAAH", 		"Phone": "(734) 489-5851", 		"AccountId": "0013700000NVVLvAAP", 		"Email": "perry@vlocity.com", 		"MailingAddress": { 			"city": "Concord", 			"country": "US", 			"geocodeAccuracy": null, 			"latitude": null, 			"longitude": null, 			"postalCode": "53813", 			"state": "WI", 			"street": "856 4th Avenue #76" 		}, 		"CreatedDate": "2017-06-14T18:53:11.000+0000" 	}, 	{ 		"attributes": { 			"type": "Contact", 			"url": "/services/data/v49.0/sobjects/Contact/0033700000TOB6mAAH" 		}, 		"Name": "Robert0 Taylor", 		"Id": "0033700000TOB6mAAH", 		"Phone": "(888) 888-8888", 		"AccountId": "00137000007D63JAAS", 		"MailingAddress": { 			"city": "SF", 			"country": "US", 			"geocodeAccuracy": null, 			"latitude": null, 			"longitude": null, 			"postalCode": "99999", 			"state": "CA", 			"street": "50 Santa Rita St" 		}, 		"CreatedDate": "2017-06-13T21:08:25.000+0000" 	}, 	{ 		"attributes": { 			"type": "Contact", 			"url": "/services/data/v49.0/sobjects/Contact/0033700000TNvK0AAL" 		}, 		"Name": "c1", 		"Id": "0033700000TNvK0AAL", 		"AccountId": "0013700000NVE4tAAH", 		"MailingAddress": null, 		"CreatedDate": "2017-06-08T20:13:41.000+0000" 	}, 	{ 		"attributes": { 			"type": "Contact", 			"url": "/services/data/v49.0/sobjects/Contact/0033700000TNvKKAA1" 		}, 		"Name": "c2", 		"Id": "0033700000TNvKKAA1", 		"AccountId": "0013700000NVE4tAAH", 		"MailingAddress": null, 		"CreatedDate": "2017-06-08T20:13:50.000+0000" 	}, 	{ 		"attributes": { 			"type": "Contact", 			"url": "/services/data/v49.0/sobjects/Contact/0033700000Vs6RzAAJ" 		}, 		"Name": "Smith", 		"Id": "0033700000Vs6RzAAJ", 		"Phone": "(300) 333-3763", 		"AccountId": "001370000098i8mAAA", 		"MailingAddress": { 			"city": "SF", 			"country": "US", 			"geocodeAccuracy": null, 			"latitude": null, 			"longitude": null, 			"postalCode": "99999", 			"state": "CA", 			"street": "50 Fremont St" 		}, 		"CreatedDate": "2017-08-16T20:26:07.000+0000" 	} ]`
2. Enter other custom data source information as needed.

## Autolaunched Flows in Flexcards

Connect a Flexcard directly to a Salesforce autolaunched flow. The autolaunched flow runs in the background without a user interface, allowing you to reuse existing business logic.

An autolaunched flow is a flow that runs in the background and doesn't require user interaction. This type of flow doesn't support screens and local actions. An autolaunched flow allows your users to interact with information on a screen or view information shown to them. For more information, see [Flow Types](https://help.salesforce.com/s/articleView?id=platform.flow_concepts_type.htm&type=5&language=en_US).

Use an autolaunched flow as a data source to populate the card with the flow's output when the card loads, or use it as an action to run the autolaunched flow when a user interacts with the card.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note Autolaunched flows are supported only on Omnistudio standard designers.

### When to Use Autolaunched Flow as Data Source or Action

An autolaunched flow connects to a Flexcard in two ways. Use it as a data source to populate the card with the autolaunched flow's output when the card loads, or use it as an action to run the autolaunched flow when a user interacts with the card. Choose the approach that matches when you want the autolaunched flow to run.

  
| Autolaunched Flow Types | Purpose | Result |
| --- | --- | --- |
| Data source | Populate the Flexcard with data from an autolaunched flow. | The autolaunched flow runs when the Flexcard loads. The data it returns is then available for use in the Flexcard. |
| Action | Run an autolaunched flow when a user interacts with the Flexcard such as clicking a button. | The autolaunched flow runs when the user performs the action using the input values you configured. |

### Known Limitations and Considerations

Some behaviors aren't fully supported. Review these limitations before you build.

- Autolaunched flows invoked from Flexcards don't support Picklist, Multi-Select Picklist, or Apex-Defined input variables.
- Only standard date-time formats are supported as input variables.

- **[Add Autolaunched Flow as Flexcard Data Source](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Add an autolaunched flow to a Flexcard and use it as a data source to populate the card with the flow's output.
- **[Add Autolaunched Flow as Flexcard Action](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_a_data_source_on_a_flexcard_35864.htm&release=264.0.0&type=5)**  
    Add an autolaunched flow as an action so that it runs when a user interacts with the card.

### Add Autolaunched Flow as Flexcard Data Source

Add an autolaunched flow to a Flexcard and use it as a data source to populate the card with the flow's output.

**Before You Begin**

- Enhanced Runtime Performance is turned on in Omnistudio Settings.
- Make sure that you have the Omnistudio user or Omnistudio admin permission.
- Before you connect a Flexcard to an autolaunched flow, create and activate the autolaunched flow in the Flow builder. The Flexcard always runs the active version of the autolaunched flow. For more information about how to create an autolaunched flow, see [Create the Autolaunched Flow and Setup the Action](https://help.salesforce.com/s/articleView?id=platform.automate_flow_build_screen_action_create_autolaunched_flow.htm&language=en_US&type=5).

Add an autolaunched flow as a data source so that its output populates your card.

1. From the App Launcher, find and select **Flexcards**.
2. From the Flexcards list page view, select an existing Flexcard or create a new Flexcard for which you want to add an autolaunched flow.
3. Open the **Setup** panel and go to the Data Source section.
4. From the Data Source Types dropdown, select **Autolaunched Flow**.
5. In the Autolaunched Flows field, search for the active autolaunched flow that you want to run, and select it.
6. In the Input Map section, click **Import**.
7. Select an autolaunched flow key-value map and click **Import**.
8. Save your changes.

The flow runs and returns data that you can reference on the card as merge fields, such as {fieldName}.

### Add Autolaunched Flow as Flexcard Action

Add an autolaunched flow as an action so that it runs when a user interacts with the card.

1. From the App Launcher, find and select **Flexcards**.
2. From the Flexcards list page view, select an existing Flexcard or create a new Flexcard for which you want to add an autolaunched flow as the Flexcard action.
3. In the Elements panel, expand the **Display** section.
4. Drag **Action** to the Flexcard canvas.
5. In the Properties panel, select the **Elements Details** tab.
6. Expand the **Action** section.
7. Add an action label.
8. For the action type, select **Data**.
9. From the Data Source Types dropdown, select **Autolaunched Flow**.
10. In the Input Map section, click **Import**.
11. Select an autolaunched flow key-value map and click **Import**.
12. Save your changes.

When a user triggers the action, the flow runs with the input values that you mapped.