Omnistudio Omniscript

lightning-omnistudio-omniscript

A wrapper for Omniscripts that allows you to use Omniscripts in custom Lightning web components.

For Use In

Lightning Experience, Experience Builder Sites

Create dynamic customer interactions with low code and deploy them to multiple channels and devices with Omniscripts. To create Omniscripts, use Omniscript Designer. Omnistudio is available to select Industry Cloud customers. After you create an Omniscript, you can use the lightning-omnistudio-omniscript component to display your Omniscript in your custom LWC component.

The lightning-omnistudio-omniscript component is a wrapper for the Omniscript component that’s available for use in Lightning App Builder and Experience Builder.

To use an Omniscript in your custom component, pass in the Omniscript’s type, sub-type, and language attributes.

1<lightning-omnistudio-omniscript
2  type="RFC"
3  sub-type="Omniscript"
4  language="English"
5></lightning-omnistudio-omniscript>

LWR Compatibility 

To use an Omniscript on a Lightning Web Runtime (LWR) site for Experience Cloud, include the lwr attribute like this:

1<!-- LWR-compatible omniscript -->
2<lightning-omnistudio-omniscript
3  type="RFC"
4  sub-type="Omniscript"
5  language="English"
6  lwr></lightning-omnistudio-omniscript>

To make your component available in Lightning App Builder, see Configure a Component for Lightning App Builder in the Lightning Web Components Developer Guide. To make your component available in Experience Builder, see Configure a Component for Experience Builder in the Lightning Web Components Developer Guide.

Attributes 

NameDescriptionTypeDefaultRequired
directionText direction.string'ltr'
displayString translated label to identify if we need to display as button.string
inline-labelLabel when displayed as button.string'DefaultLabel'
inline-variantButton variant when displayed as button.string'brand'
languageLanguage in which the omniscript was created.string'English'
lwrDetermines which component to use for rendering. When true, uses runtime_omnistudio-generated-omniscript-lwr for LWR compatibility. When false or not provided, uses the standard runtime_omnistudio-generated-omniscript.booleanfalse
offlineWhether this omniscript should use the offline renderer. When true, delegates to runtime_omnistudio_offline-offline-renderer which is suported runtime for offline usagebooleanfalse
prefillPreload Data JSON.Object
record-idRecordId of the Salesforce Object.string
sub-typeSubtype of the omniscript.string
themeUI Theme of the omniscript.string'slds'
typeType of the omniscript.string