---
schema_version: "1"
id: 0f2dd0bb605ab556bbd11282001c602dc97a557afdf10111e7350f80063c226b
title: Display Messages in Omniscripts (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_display_messages_in_omniscripts.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_display_messages_in_omniscripts.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8fa8334a1c0bc4f4d5263fd586ad10932433b0f213656fae315d6f6c94e5a736
description: For the managed package runtime, display comments, requirements, and success and warning messaging depending on whether the validate expression returns True or False. Configure the Messaging element after creating an element, such as a formula or aggregate, to display validation messages in the OmniScript. Merge fields are supported in messages.
products:
  - Omnistudio
release: "264"
---
# Display Messages in Omniscripts (Managed Package)

For the managed package runtime, display comments, requirements, and success and warning messaging depending on whether the validate expression returns True or False. Configure the Messaging element after creating an element, such as a formula or aggregate, to display validation messages in the OmniScript. Merge fields are supported in messages.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

1. From the Omniscript Designer, drag a Messaging element into the structure panel where the message must appear.
    
    LWC OmniScripts don’t support the Messaging element in an Edit Block.
2. For Validate Expression enter the expression to validate.
    
    You can evaluate any element or elements, including Formula and Aggregate. For more information about formulas, see [Create Formula Fields in an OmniScript](https://help.salesforce.com/s/articleView?id=xcloud.os_create_formula_fields_in_an_omniscript.htm&release=264.0.0&type=5 "For the managed package runtime, create expressions to set calculated values and evaluate data across multiple fields using a Formula or Aggregate element. For example, if you are accepting information for a qualifying life event you may want to create a formula that determines if the date entered for the qualifying life event is within thirty days of today's date."). For more information about setting up expressions, see [Dynamic Forms Using the Conditional View Property](https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_display_elements_using_the_conditional_view_property.htm&release=264.0.0&type=5 "For the managed package runtime, every step, block, or element supports at least one Conditional View. Conditional Views allow you to hide the element or the group of elements contained in a block or step based on certain conditions. Elements contain up to three conditional view options depending on the type of element. For example, an Action outside of a Step doesn’t have a Read-Only option since the action isn’t visible.").
3. In the Messages section, select message types for when the expression evaluates as True or False, and then enter messages.
    
    True and False messaging can be deactivated, and messaging is optional.

What’s next: In LWC OmniScripts, validation runs when a user clicks out of a field that uses the onBlur function. In Angular OmniScripts, validation runs when a user types in a field that uses the onChange function.

- **[Messaging Example (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_messaging_example.htm&release=264.0.0&type=5)**  
    For the managed package runtime, in this example, a Requirement message displays when a user is under the age of eighteen:
- **[Message Types (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_message_types.htm&release=264.0.0&type=5)**  
    For the managed package runtime, the LWC Omniscript messages have different styling than Angular Omniscript messages. The LWC Omniscript messages use pure SLDS styling. This table provides examples of both LWC Omniscript and Angular Omniscript messages.

## Enable the LWC Omniscript to Run Validation When a User Types

1. In the Setup properties, click **Edit as JSON**.
2. Add the property "commitOnChange": true.
3. Preview the behavior.
    
    In LWC Omniscripts, the onChange behavior runs after a half-second delay.