You are here:
Let Users Update an Omniscript by Selecting Records on a Flexcard (Managed Package)
For the managed package runtime, let users select records in a list on a Flexcard by using the Select Cards action. For example, users can add and remove multiple shopping cart items, or select and deselect one or more cases from a list. When users click a Select Cards action, the selectcards_{listname} event fires and the selected record is added to a list whose name you can define. The Omniscript's data JSON is updated with the list of selected records.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Required Versions |
|---|
Available beginning Summer '21. |
-
In the Flexcard designer, drag an Action element, a Block element, or a Toggle
element from the Build panel into a state. If you use a Block or a Toggle element,
add an action to the element.
The Block element supports the Select Cards action in Winter ’22 and later.
- In the Action Type field, select Card.
- In the Type field, select Select Cards.
-
In the Selected Cards List Name field, enter a name for the list where you want to
add selected records. To use the default name,
selectedcards, leave the field blank.When you create an event listener to listen for theselectcards_event, the list name must be all lowercase and alphanumeric, and it can’t include spaces. See step 7. - In the Selectable Mode field, set how many records users can select by selecting Single or Multiple.
-
(Optional) To preselect a card in the list, click in the Selectable Field field and
select a data field. The data field must have a value of true or false. When the
value is true, then the record is selected by default.
For example, let's say you want to send a list of escalated case records to an Omniscript. To preselect escalated cases, enter IsEscalated in the Selectable Field field. In Preview, all cards where IsEscalated is true are selected.


-
Create the custom event listener that executes the Update Omniscript action, which
passes the selected records list to the Omniscript.
- In the Setup panel, next to Event Listener, click + Add New and select the Event Type Custom.
-
In the Event Name field, enter the event
selectcards_and then the name you entered in the Selected Cards List Name field. For example, selectcards_selectedcaseslist. If the Selected Cards List Name field is blank, use the default name,selectedcards. For example, selectcards_selectedcards. - Select the Action Type Update Omniscript.
- In the Input Parameters section, click + Add New. In the Key field, enter a name for the data node to pass to the Omniscript. For example, selected.
- In the Value field, enter the name that you entered in the Selected Cards List Name field as a variable. For example, {selectedcaseslist}.
- (Optional) Configure other options common to action properties.
- In the Setup panel, select Omniscript Support.
-
To preview and test your action before publishing the Flexcard, click the Preview
tab.
In Winter ’22 and later, click the select card action on the canvas, under _flex in the cards object in the data JSON, and look for
isSelected: true.
If you entered a data field in the Selectable Field field, see Step 6. - Click Activate.
-
Embed your Flexcard in an Omniscript as a custom LWC.

