Vlocity Facts #09 | Set Errors and Set Values
Set Errors In an OmniScript
Using the Set Errors action element, add error or validation messaging to one or more elements in a previous step based on conditions from subsequent steps. You can only set requirements and conditions on elements in the current step when using required fields and Formula/Messaging elements.
For example, on an application, I have 15 fields on first step in that three fields are [ Phone number, Email, Postal Code] and those fields are not required in the initial intake step, and in a future step, I have a three check box related stating may of communicating with [ Email, Phone, Address] if user choose through phone but user has not given any value to in first step in this case we can use Set Errors element, It runs after the step and returns the user to the initial intake step with custom error messages.
Note: File, Image, Messaging, and Formula these elements are not supported by Set Error element.
How to configure Set Error elements:
- Conditional View: The error will remain in the OmniScript without a conditional view so we need to mention conditional view.
- Element Error Map: In Element error map you can mention the field name where error message should be displayed.
Element Name - Particular Element name like [Email, Phone, Postal code]
Value - Custom Error message or We can use merge syntax.
Using the Set Values Action, you can set element values in subsequent steps, rename JSON nodes, create dynamic values, and concatenate data. When in a Step, action elements either render as a button or run remotely when in between steps. Set Values makes use of merge fields to gain access to the OmniScript's data JSON.
- Populating Elements with values, both Field and Set value elements name should same
- Set values sent into the data JSON from a response or parameter
- Access and rename data JSON by using merge fields.
- Make values using OmniScript Functions and Supported Formula Operators.
- Concatenate Values
Application Scenario with the Combination of Set Error and Set Values.
In Second Step we need to choose way of communication with the user
Now we need to create set values to check whether email, Phone, Postal Code fields are null or not
- For Email : IF(%Review:Checkbox1%=true&&%Information:Email1%=null,"Notok","ok")
- For Phone : IF(%Review:Checkbox2%=true&&%Information:Telephone1%=null,"Notok","ok")
- For Postal Code: IF(%Review:Checkbox3%=true&&%Information:PostalCode%=null,"Notok","ok")
For Email: Configuration/Conditional View
- For more Details about DataRaptors and Types check this link DataRaptors
- For OmniScripts elements refer this link OmniScript Elements -1
- How to launch Omniscript in difference ways Launch Omniscript
Comments
Post a Comment