Extend the OmniScriptBaseMixin Component (Managed Package)

For the managed package runtime, enable a custom Lightning web component to interact with an Omniscript by extending the OmniScriptBaseMixin component. The OmniScriptBaseMixin includes methods to update an Omniscript's data JSON, pass parameters, and more.

Managed Package app icon This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.

  1. Requirements for Extending OmniScriptBaseMixin (Managed Package)
    For the managed package runtime, review and complete the requirements before you extend the OmniScriptBaseMixin component.
  2. Extend the Component (Managed Package)
    For the managed package runtime, learn how a custom Lightning web component extends the OmniScriptBaseMixin component to wrap a Salesforce Lightning Element.
  3. Validate the Component (Managed Package)
    For the managed package runtime, learn how to add validation to the OmniScriptBaseMixin component by redefining the checkValidity() function.
  4. Navigation Between Steps (Managed Package)
    For the managed package runtime, beginning with Vlocity Insurance and Health Winter '20, learn which mixins you can set on the steps of an Omniscript so that users can navigate between those steps.
  5. Data Save Inside of a Custom Component (Managed Package)
    For the managed package runtime, when the custom component doesn’t exist in the DOM, store the data in a state. To store data in a state, use the omniSaveState() function. The omniSaveState function accepts three arguments: a data object, a key, and a boolean.
  6. Retrieval of Custom Component Data from an Omniscript (Managed Package)
    For the managed package runtime, use the omniGetSaveState() function to retrieve custom component data from an Omniscript.
  7. Clear a Saved State from a Previous Step (Managed Package)
    For the managed package runtime, beginning with Vlocity Insurance and Health Winter '20 , when a Custom LWC's saved state relies on data from a previous step, you can conditionally clear the saved state of the Custom LWC whenever a user navigates to a previous step. After configuration, the Step element passes a boolean flag to the custom LWC. The code in your Custom LWC must use the boolean to determine whether to instantiate a new saved state or continue using the existing saved state.
  8. Access the Layout of the Omniscript Base Mixin (Managed Package)
    For the managed package runtime, call the Layout for your Custom LWC by passing the data-omni-layout parameter to the getAttribute method.
  9. Remote Calls (Managed Package)
    For the managed package runtime, beginning with Vlocity Insurance and Health Winter '20 , enable users to make remote calls from a Custom LWC by using the omniRemoteCall() method.
  10. Data JSON Update (Managed Package)
    For the managed package runtime, update the custom Lightning Web component element, map responses to the Omniscript’s data JSON, and create and map data inside the custom Lightning Web component element.