---
schema_version: "1"
id: aea9fc53d768467cac47599184134ba60db894f2f7c6daa4f72c040383bedf3d
title: Set Up Card Actions to Update a Flexcard
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_flexcard_card_actions_26671.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e6bf0346e9f803a5dd871775813fe40ea38a9c0f72116076479e2d15009dd039
description: Configure actions that users can trigger and that affect a record on a Flexcard or the Flexcard itself. For example, let users arrange a records view to suit their personal preference.
products:
  - Omnistudio
release: "264"
---
# Set Up Card Actions to Update a Flexcard

Configure actions that users can trigger and that affect a record on a Flexcard or the Flexcard itself. For example, let users arrange a records view to suit their personal preference.

After you select the card action type, select the specific type of operation for your users to launch on the Flexcard.

- **[Reload](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&release=264.0.0&type=5)**  
    Refresh the data shown on the Flexcard such as in response to an event. For example, create a Flexcard that listens for an event from another Flexcard and reloads itself when the event is fired.
- **[Remove a Record](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&release=264.0.0&type=5)**  
    Remove a Flexcard from the page that shows it, or a specific record from the Flexcard. Omnistudio removes the Flexcard or record from the page that the user views, but not from the data source.
- **[Select Card](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&release=264.0.0&type=5)**  
    Select records from a list on a Flexcard, such as to add or remove shopping cart items, or to select support cases. Then, create a custom event that passes the selected records to an Omniscript.
- **[Set Values](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&release=264.0.0&type=5)**  
    Update field values on a Flexcard, such as for customer service reps to update the status of a case when they resolve a case.
- **[Update Datasource](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcard_card_actions_26671.htm&release=264.0.0&type=5)**  
    Change the data source or update parameters of an existing data source, such as updating the pagination limits on a list of returned records.

## Reload

Refresh the data shown on the Flexcard such as in response to an event. For example, create a Flexcard that listens for an event from another Flexcard and reloads itself when the event is fired.

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.").

## Remove a Record

Remove a Flexcard from the page that shows it, or a specific record from the Flexcard. Omnistudio removes the Flexcard or record from the page that the user views, but not from the data source.

For information about permanently removing a record from the data source if the data source is from an Omniscript, see [Update an Omniscript's JSON Code from a Flexcard](https://help.salesforce.com/s/articleView?id=xcloud.os_update_an_omniscript_from_a_flexcard_27677.htm&release=264.0.0&type=5 "Specify the JSON node that Omnistudio updates in response to a user action on the Flexcard by embedding the Flexcard in the Omniscript as a custom Lightning web component.").

1. From the Flexcard Designer, drag an **Action** element into a state.
2. Select **Card** from the **Action Type** dropdown.
3. From the **Type** dropdown, select **Remove**.
4. To remove a specific record, create an Event Listener, and enter a **Record Index**.

## Select Card

Select records from a list on a Flexcard, such as to add or remove shopping cart items, or to select support cases. Then, create a custom event that passes the selected records to an Omniscript.

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

All actions with a type of Select Card on the same Flexcard use the same list, even when the actions have different names. When you enter values in Selected Cards List Name, Selectable Mode, or Selectable Field, Omnistudio populates those values across all Select Card actions on the Flexcard

1. In **Selected Cards List Name**, enter a value that uses only lowercase and alphanumeric characters and no spaces, such as `selectedcaseslist`.
    
    To use the default name, `selectedcards`, leave the field empty.
2. If needed, to show a preselected record to the user, enter a boolean data field.
    
    For example, you have case records with an IsEscalated field that indicates the escalation status. To send a list of preselected escalated case records, enter `IsEscalated`. In the JSON code in preview, all cards where `IsEscalated` is `true` are selected.
3. Enter the remaining information as needed.
4. In Setup, turn on Omniscript support.
5. Add an event listener.
6. Select the custom event type.
7. Enter `selectcards_` and the name of the selected card list as the event name, such as `selectcards_selectedcaseslist`. If you use the default list name, enter `selectcards_selectedcards`.
8. Expand the **Action** section.
9. Select the **Update Omniscript** action type.
    
    For example, to send a list of preselected escalated case records to an Omniscript, enter IsEscalated in the Selectable Field field. In Preview, all cards where IsEscalated is true are selected.
10. Add these input parameters:
    1. In Key, enter the name for the data node to pass to the Omniscript, such as `selected`.
    2. In Value, enter the name of the selected cards list as a variable, such as `{selectedcaseslist}`.
11. Save your changes.
    
    When you preview the Flexcard, in the JSON code under `_flex`, all cards where `isSelected` is `true` are selected.
12. Embed your Flexcard in an Omniscript as a custom Lightning web component.
    
    See [Embed Flexcards in an Omniscript](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcards_in_an_omniscript_24124.htm&type=5&language=en_US).

When the user launches the action, Omnistudio executes the `selectcards_{listname}` event. This event adds the selected records to the `{listname}` list, and updates the Omniscript's JSON code with the selected records.

For information about clearing the selection so that users can pick other records, see [Example Use Cases for Flexcard Events](https://help.salesforce.com/s/articleView?id=xcloud.os_standard_example_use_cases_for_flexcard_events.htm&release=264.0.0&type=5 "Review examples of Flexcard event setup for common use cases such as updating a product list, registering dynamic custom events, or resetting a user selection.").

## Set Values

Update field values on a Flexcard, such as for customer service reps to update the status of a case when they resolve a case.

1. Add a key-value pair for Set Values.
2. In Key, enter one of these values:
    - The field name returned from a data source
    - A session variable to update such as `{Session.time`}.
        
        See [Flexcards Context Variables](https://help.salesforce.com/s/articleView?id=xcloud.os_flexcards_context_variables_42922.htm&release=264.0.0&type=5 "To provide context to data sources, actions, and other components, add global and local context variables to a Flexcard. All variables are case-sensitive.").
    - A private variable name for configuring conditions in the Flex.varname format, where varname is an alphanumeric string, excluding index, which gets the Flexcard index. When record data changes, private variables remain the same.
        
        For example, you can set a condition on an element where the element displays for the first three records only. If your condition is `Flex.index < 3`, the element displays on card\[0\], card\[1\], and card\[2\]. For more examples of conditional display, including by using a private variable, see [Display Data on Flexcards Based on Conditions](https://help.salesforce.com/s/articleView?id=xcloud.os_standard_display_data_on_flexcards_based_on_conditions.htm&release=264.0.0&type=5 "Determine whether to apply conditions to individual Flexcard elements, to the entire Flexcard, or to both. Use states to control what’s available to users at the Flexcard level. For a more granular configuration, apply conditions to specific elements, fields, events, and more. For example, to show an alert icon for escalated cases, apply conditions to that icon. To show different Flexcards based on the payment status of an insurance account, create states for each status.").
3. In the Value field, enter a new field value as plain text, a merge field, or a concatenated string of both, such as `New Value`, `{Name}`, or `{Parent.type} > {Name}`.

## Update Datasource

Change the data source or update parameters of an existing data source, such as updating the pagination limits on a list of returned records.

Add a data source, or update the existing data source settings.

See [Set Up a Data Source on a Flexcard](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.").