Loading
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
          Set Up Card Actions to Update a Flexcard

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

          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.

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

          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.

          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.

            • 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.

          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.
           
          Loading
          Salesforce Help | Article