Explore Omniscript Group and Input Elements
Learning Objectives
After completing this unit, you’ll be able to:
- Explain the purpose of Omniscript elements and how they work together.
- Describe how group elements organize an Omniscript.
- Explain how input elements work to collect user information.
Combine Elements to Build Your Omniscript
In unit 1, you learned that Omniscript elements are the foundational building blocks used to construct interactive workflows in Omniscript.
You build the structure of an Omniscript by dragging elements from the Elements panel and dropping them onto the Canvas in the Omniscript Designer. Each element on the canvas works together to build the final product, and can be grouped and nested within each other.
Check out this diagram, which shows the elements that make up a form.
The Step element contains all of the elements, while a Block element nests a subset of fields to collect address information. Each of these Omniscript elements is based on extendable Lightning web components (LWCs), allowing for customization of their behavior and styling.
Throughout the rest of this module, we explore elements in more detail and how they’re used. There are many individual elements, but they can be grouped into a few basic categories: group, input, action, display, and function elements.
Let’s explore what each category of element does and some examples of each. In this unit, we cover group and input elements.
Group Elements
Group elements in Omniscripts organize elements and structure the user interface within an Omniscript. They help combine logical groups of elements and can affect how data is structured in the resulting JSON output, sometimes creating nested data.
There are four key types of group elements that contain other elements.
-
Step divides an Omniscript into different sections or pages, with each Step presenting a page to the user. You can apply conditional logic so that users are directed to one step or another depending on their inputs. In the earlier diagram, all of the other elements were nested inside of one Step.
-
Block groups elements inside of a Step, such as the Block that contains all of the address fields in the earlier example. Blocks can also be repeated to contain many data points. For example, if you want to show all the opportunities or products related to an account with the same information, you repeat a Block for each.
-
Action Block groups multiple Action elements, which you learn about in the next unit. Action Blocks can run included actions in parallel rather than sequentially, which can improve performance by triggering several tasks at one time. For example, use an Action Block to get data from two external systems at the start of an Omniscript for simultaneous data calls.
-
Edit Block groups inputs so that users can add, edit, and delete records. Edit Blocks are repeatable by default, and are helpful in situations such as managing an account's list of contacts.
There are two additional groups that can help you better collect information from users.
-
Radio Group shows many multiple-choice questions in a questionnaire format, providing the same selection options for each question. This helps users quickly answer many multiple-choice questions in one Step.
-
Type Ahead Block helps users make a selection by showing a list of selectable results when they start to type in an input field. When a user selects a record, the Type Ahead Block retrieves additional information related to that record.
Now that you understand how to group elements, what do you group? Mostly inputs and actions.
Input Elements
Input elements are the interactive components where users provide information. They’re how users enter text, select from lists, upload files, and more.
Input elements can be placed in a Step or a Block. You can set input elements as required so that the user must provide a value or make a selection before moving to the next step. Plus, input fields can be prefilled with relevant data from previous steps, Salesforce, or external sources. If you don’t want a user to change those prefilled values, make the input read-only.
Omniscripts provide a wide variety of input elements to handle different types of data. Some of them check for a particular data type. For example, Text elements capture text and Number elements capture numbers. In the earlier example, a Text element was used to collect a company name and Number element was used to capture the number of employees. This built-in validation ensures that the input data is clean and consistent.
Other inputs check for specific structures, such as Email, Telephone, Date/Time, and URL, which all check that entered data matches a standard format of those data types. Selection elements include Checkbox for Boolean values, Radio for single choices from a list, Multi-select for multiple choices from a list, and Select for single choices from a picklist. Plus, there are File and Image inputs for uploads.
Other inputs include:
-
Range shows the user a numeric range that they select from using a slider.
-
Lookup queries Salesforce using a Data Mapper and presents the results of the query.
-
Disclosure presents a disclosure statement that requires acknowledgment from a user.
There’s also a Custom LWC input, which helps you add another input element not in the list. How? Create a custom Lightning web component and then use the Custom LWC element to include it in the Omniscript. Read Create a Custom Lightning Web Component for Omniscript in Salesforce Help for details about custom Lightning web components.
To get the data to prefill inputs and to write the data back to Salesforce and other systems, you use action elements. You start exploring those elements and function and display elements, in the next unit.