Loading
Salesforce now sends email only from verified domains. Read More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Let Users Update an Omniscript by Selecting Records on a Flexcard (Managed Package)

          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.

          Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

          Required Versions

          Available beginning Summer '21.

          Note
          Note All actions with a Type of Select Card on the same Flexcard use the same list, even if you give the actions different names. When you enter values in the fields Selected Cards List Name, Selectable Mode, or Selectable Field, those values are populated across all Select Card actions on the Flexcard.
          1. 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.
          2. In the Action Type field, select Card.
          3. In the Type field, select Select Cards.
          4. 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 the selectcards_ event, the list name must be all lowercase and alphanumeric, and it can’t include spaces. See step 7.
          5. In the Selectable Mode field, set how many records users can select by selecting Single or Multiple.
          6. (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.
            Select Cards Action Selectable Field
            Preview Select Cards Action Selectable Field
          7. Create the custom event listener that executes the Update Omniscript action, which passes the selected records list to the Omniscript.
            1. In the Setup panel, next to Event Listener, click + Add New and select the Event Type Custom.
            2. 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.
            3. Select the Action Type Update Omniscript.
            4. 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.
            5. In the Value field, enter the name that you entered in the Selected Cards List Name field as a variable. For example, {selectedcaseslist}.
            FlexCards Select Cards Action Custom Event
          8. (Optional) Configure other options common to action properties.
          9. In the Setup panel, select Omniscript Support.
          10. 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.
            FlexCards Select Cards Action Preview
            If you entered a data field in the Selectable Field field, see Step 6.
          11. Click Activate.
          12. Embed your Flexcard in an Omniscript as a custom LWC.
            FlexCards Select Cards Action OS
           
          Loading
          Salesforce Help | Article