Loading
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
          Override an Omniscript Element with a Custom Lightning Web Component

          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 .xml file.

          • Review the base Omniscript LWC in the omni-base-templates folder to identify the correct component to extend.

          To override an Omniscript element:

          1. From the elements panel, drag an element that you want to override to the Omniscript canvas.
            For example, drag a Text element.
          2. In the Properties panel, enter the name of your custom component in LWC Component Override.
            For example, enter the name customText.
          3. 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.

          4. To close the property editor, click Close the JSON Editor.
          5. Save and activate the Omniscript.
          6. 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.

           
          Loading
          Salesforce Help | Article