You are here:
Messaging Framework for Omniscripts
Communicate between an Omniscript, windows, Lightning web components, and Omniscript elements with window post messages, session storage messages, and PubSub messaging.
Determine which object or component needs to handle and use data, and use the corresponding property.
Property |
Description |
Object or Component |
Example |
|---|---|---|---|
Window postMessage |
Send information from an element to a window object in key-value pairs. |
Window object |
Message with Window Post Messages and Session Storage Messages |
Pub/Sub |
Communicate with Omniscript from a custom LWC by sending key-value pairs. Use the events passed in the key-value pairs to trigger custom behavior in a component. |
Lightning Web Components |
Communicate from Omniscript to a Lightning Web Component This topic is part of creating custom Lightning web components for Omniscripts. |
Session Storage |
Send information to a Session Storage object using key-value pairs. A session storage object clears when a page session ends. |
Session Storage object |
Message with Window Post Messages and Session Storage Messages |
Message with Window Post Messages and Session Storage Messages
Communicate between Omniscript, windows, and components with window post messages and session storage messages.
Pass element information and data JSON from Omniscript elements containing the window post message, session storage message, and LWC Pub/Sub message. For information on using the pub/sub message in Omniscript, see Communicate from Omniscript to a Lightning Web Component.
-
To add window post messages or session storage messages:
-
In the element, check the Window Post Message
checkbox or the Session Storage Message checkbox.
Default Messaging:
{ Type: <element_type>, OmniEleName: <element_name> }When enabled, the default messaging sends the name of the element and the type of the element.
-
(Optional) In the Messages property, add additional
messaging to the node by entering a Key/Value pair.
The Value field accepts merge syntax. For information on merge fields, see Access Omniscript Data JSON with Merge Fields.
- Pass a value in the c__messagingKey URL parameter to change the node that stores the messaging payload for window.postMessage and session storage message.
-
In the element, check the Window Post Message
checkbox or the Session Storage Message checkbox.
-
To add messages to a Step:
- In the Step's properties, click Edit Properties as JSON.
-
Paste in the following JSON before the closing curly bracket:
"wpm": false, "ssm": false, "message": {} -
Enable WPM or SSM by setting the value equal to true.
"wpm": true -
Add additional key/value pairs inside the message object.
"message": {"Account":%AccountId%, "Status": %AccountStatus%}

