Skip to main content

Use Action, Function, and Display Elements

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the role of action elements in performing tasks.
  • Describe how you can use function elements to add logic to an Omniscript.
  • Explain the display elements that show information to the user.
  • Describe how Omniscripts can be used within other Omniscripts.

Action Elements

In the last unit, you learned how you use group elements to organize your Omniscripts, and input elements to collect information from your users and customers. Now it’s time to learn how you run tasks in an Omniscript: You use action elements.

Action elements get or update data from Salesforce and external systems, call other processes, send emails or documents, and direct users to other pages. They handle data and external integrations by interacting with Omnistudio Data Mappers, Omnistudio Integration Procedures, APIs, and Apex.

Place Action elements within a Step or Block as a button that the user selects to trigger an action. Or place them before, between, or after Steps to run automatically or remotely, as shown in this sample Omniscript.

An action appears before two steps, and four actions appear after them in this screenshot of an Omniscript canvas.

The first action in the sample gets data before two steps. The last four actions set values, set errors, save the data, and finally navigate the user away from the completed Omniscript to a specific page or record in Salesforce.

In the Omniscript Designer, Actions are grouped into two categories: Data Mapper Actions and Standard Actions. Data Mapper Actions, as you might expect, run Omnistudio Data Mappers that extract, transform, or load data. See the Omnistudio Data Mapper Fundamentals module for details about Data Mappers and what they do.

There are many standard actions—let’s explore a few commonly used ones here.

  • HTTP calls internal and external web services without the need for coding. Use it to retrieve data from an external system within an Omniscript. Send requests like GET, POST, PUT, or DELETE to endpoints and interact with data or APIs.
  • Integration Procedure calls an Omnistudio Integration Procedure to run complex server-side logic and get data efficiently from various sources. See the Omnistudio Integration Procedures Fundamentals module for details about Integration Procedures and what they do.
  • Set Values redefines and adds data in the Omniscript JSON. This action is usually between steps in the Omniscript so that it runs automatically to process data before the user moves on. For example, you use a Set Values action to calculate a date one week from a date the user entered on a previous step.
  • Navigate actions are sometimes placed in a step and configured as a button to redirect the user to another page—such as a different Salesforce record page or an external website—after they complete a task. They’re also used at the end of an Omniscript to give direction on what should happen after the user finishes the process, such as returning to the record page where the Omniscript was launched.
  • PDF actions enter information into an existing PDF form with help from Data Mappers.
  • Decision Matrix and Expression Set actions connect an Omniscript to Business Rules Engine to make automated decisions. A decision matrix matches input values with output values. An expression set is a series of rules that form sequential, logical steps to make a decision. To learn more about decision matrices and expression sets, complete the Business Rules Engine module in Trailhead.

We don’t have the space here to explore the other critical actions for sending emails and Docusign documents, and requiring Docusign signatures. Check out the Omniscript Action Elements section in Salesforce Help to dive deeper into those actions.

Function Elements

Function elements perform calculations, aggregations, and show conditional messages to guide users. These elements help you add logic and provide feedback without the need for code. There are three function elements: Aggregate, Formula, and Messaging.

  • Aggregate handles functions like averaging or summing values, requiring input in the form of an array.
  • Formula makes automatic calculations. For example, you use a date formula to determine a contract’s end date by adding a specific number of days to a date input.
  • Messaging shows comments, requirements, or success and warning messages based on validation expressions. You usually set up a Messaging element after creating an element like a Formula or Aggregate. This way, it shows validation messages that are linked to the results of those elements.

Just one type of element to go!

Display Elements

Display elements show information to the user through rich text and images. These elements help to refine the presentation and usability of the guided interaction. There are two display elements: Line Break and Text Block.

  • Line Break makes a line break where it's placed in the Omniscript design. Any element placed after a Line Break starts on a new line, no matter how wide that element is. This helps control the visual layout and organization of elements on the page, and keeps everything neat and organized.
  • Text Block adds text, images, and other rich content to ‌Omniscripts. They’re useful for providing explanations, instructions, or important information to the user within a step.

That’s all of the individual elements, but Omniscripts are reusable, which has one big advantage.

Use Omniscripts in Omniscripts

You can use an Omniscript within another Omniscript. Meta, right?

Complex or repeatable processes can be built as reusable Omniscripts, called child Omniscripts. Add child Omniscripts to one or more parent Omniscripts using the Omniscript element. Or navigate to them using a Navigate action with the Omniscript page reference type.

This modular design allows you to break down large processes into smaller, manageable, and reusable components. Pass parameters when launching or embedding one Omniscript from another to maintain the context of the overall process. However, avoid single-page Omniscripts, especially child Omniscripts, and consider consolidating them into a parent to reduce embedded elements.

You can only nest Omniscripts at one level. So, if a parent Omniscript contains a child Omniscript, the parent Omniscript can’t be used in another Omniscript. Also, make sure that all the elements in both a child and parent Omniscript have unique names.

Now that you understand how Omniscript elements fit together, let’s explore how Omniscripts work with other Omnistudio components to get, modify, and write data and create great user interface experiences. You pick up there in the next unit.

Resources

Comparta sus comentarios sobre Trailhead en la Ayuda de Salesforce.

Nos encantaría conocer su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios cuando quiera desde el sitio de la Ayuda de Salesforce.

Más información Continuar para compartir comentarios