Loading
Ongoing maintenance for Salesforce HelpRead More
Feature degradation | Gmail Email delivery failureRead 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
          Set Errors in an Omniscript

          Set Errors in an Omniscript

          To handle potential end-user errors, add an error or validation message on one or more elements in a previous step based on conditions from future steps with the Set Errors element. For example, an email address isn't required during the initial step, but in a future step, the user states that they wish to be contacted by email. The Set Errors element runs after the step and returns the user to the initial step with custom error messages.

          • The name of a Set Errors element must be unique within an Omniscript and all the reusable Omniscripts it uses.
          • The Set Errors action element doesn’t support File, Image, Messaging, and Formula elements and doesn’t support custom labels.
          • Use the Set Errors element if the validation depends on multiple steps in the Omniscript. If you want to use the required field or a formula or messaging element for validation, you can only set requirements and conditions on elements in the current step.
          • Avoid using the Set Errors element for validations in a repeat block. In such cases, use a Messaging element. See Display Messages in Omniscripts.
          Note
          Note When Set Errors is used, it results in two distinct behaviors. First, the error message on an input is transient, which means, it vanishes when the user clicks away from the field but reappears if they try to proceed by selecting Next, if not fixed. Second, if Set Errors is used on multiple inputs, the errors are shown sequentially rather than all at once. The subsequent set of errors will only be shown after the first set of triggered errors has been resolved.
          1. From the elements panel, drag the Set Errors element to the canvas.
          2. Add a conditional to control when the Set Errors message displays.
            Without a conditional the error persists in the Omniscript. See Conditionally Display Omniscript Elements.
          3. To set the validation for the Set Errors element:
            1. In the Element Error Map section, click Add Element Value.
            2. Select the name of the element for which you want to set up validation.
            3. In the Value field, enter the error message that displays to the user.
            4. If necessary, select an expression for the element value and enter the validation expression in the Value field.

              Expressions can include:

              • Merge fields from a previous step (%elementName%)

              • Literal value

              • Concatenated values

              • Results of formulas and functions

              • Expressions that combine the options, such as "Case Status: %caseStatus%"

           
          Loading
          Salesforce Help | Article