You are here:
Override an Omniscript Element with a Custom Lightning Web Component
Override an Omniscript element with custom Lightning web components (LWCs) to add custom behavior and styling to the Omniscript element.
Before You Begin
-
Ensure your custom LWC is deployed with
<isExposed>true</isExposed>in its.xmlfile. -
Review the base Omniscript LWC in the
omni-base-templatesfolder to identify the correct component to extend.
To override an Omniscript element:
-
From the elements panel, drag an element that you want to override to the Omniscript
canvas.
For example, drag a Text element.
-
In the Properties panel, enter the name of your custom component in LWC
Component Override.
For example, enter the name customText.
-
In the Setup panel, click Edit Properties As JSON and add this
property:
“useCustomLMS”: true.This allows your custom components to communicate with the Omniscript standard runtime components.
- To close the property editor, click Close the JSON Editor.
- Save and activate the Omniscript.
- To preview the Omniscript, click Preview.
Points to consider:
-
Your custom LWC should extend the correct base Omniscript component. For example,
OmniscriptDate. -
Override specific methods in the parent component as needed. For example,
setElementFormattedValue(). -
After overriding, test the Omniscript in Preview mode to verify styling and behavior changes.

