Vlocity Facts #08 | How to launch OmniScripts?
After completion of developing omniscript we need to launch omniscripts to provide access to the users.
These are the different ways to launch the omniscript
- We can embed the component into any Aura or LWC component.
- By using Action, Menu elements in flex cards we can launch the omniscript from flexcards.
- We can launch the omniscript from community page or lightning record page.
- By using buttons, links and Actions we can launch launch from object detail page.
- We can use custom links or URL's for launching omniscript.
- From Flows also we can launch we can launch omniscript.
- By using Vlocity actions for launching omniscript.
Create flex card or using existing one for launching omniscript.
From Build drag and drop Menu Element.
From Build drag and drop Action Element.
To configure the Vlocity OmniScript component Community Builder:
{!recordId}
parameter.-> You can Choose the Layout [ Lightning, Newport].
-> inline - Check box is used for to display the omniscript in a button format.
-> Choose inlineVariant , dir [ltr, rtl] according to your requriment.
To create custom button navigate to object manger from setup and choose the object according to your requirement and follow these steps.
-> Setup -> Object manger -> Object -> select the buttons, links and actions ->click on "New Button or Link".
-> Display type
- Detail Page Link - Use this option to create a link that you can add to the links section of any Account detail page. Links can display other pages or websites.
- Detail Page Button - Use this option to create a button that you can add to the heading of any Account detail page. Detail page buttons take action on the record that the user is viewing.
- List Button - Use this option to create a button that you can add to the heading of any Account list view or related list. List buttons allow users to select multiple items in the list and perform an action on all of them at once. To add list buttons to list views, edit the list view layout in search layouts. To add list buttons to related lists, edit the related list properties on the page layout where the Account related list appears.
We can launch omniscripts from URL's also by using the following syntax.
<a href="#/OmniScriptType/AAA1
/OmniScriptSubType/AAA2
/OmniScriptLang/AAA3
/ContextId/[ContextId
]/PrefillDataRaptorBundle/[BundleName
]/[verticalMode
]">Launch OmniScript</a>
- AAA1—OmniScript Type
- AAA2—OmniScript Sub Type
- AAA3—OmniScript Language
- [ContextId] (Optional)—Context Id for example {!Account.Id}or {!Case.Id}
- [BundleName] (Optional)—DataRaptor Bundle name used for pre-filling fields into the script. While this functionality is still supported, Vlocity recommends using the Data Raptor Extract Action within OmniScripts to prefill.
- [VerticalMode] (Optional)—/true or /false. Default is True. If True, all the steps are vertically stacked. If False, all the steps are horizontally navigated.
By using Vlocity action also we can launch the omniscript for that first we need to create Vlocity action. In Vlocity action you need to mention the Vlocity Action Name, Target URL, URL parameter, Display Label, Open URL in, Link Type, Active, Application Type, Application User Profile.
Vlocity Action Name, Label Name, Open URL in mention and choose according to your requirement, make the Vlocity action active and choose on which object, profile this vlocity action can avaliable.
URL Parameter: Copy the lightning URL from "How to launch" in omniscript.
URL Preview: Id
Link Type: OmniScript
Now at the end you need to mention &c__ContextId={0}
/lightning/cmp/omnistudio__vlocityLWCOmniWrapper? c__target=c:demoWorkEnglish&c__layout=lightning&c__tabIcon=custom:custom18&c__ContextId={0}
You can embed the component into any Aura or LWC component using the component tag. The component attribute "prefill" accepts string or javascript object.
Examples:
<c-type--sub-type-english prefill={prefill} layout="lightning"></c-type--sub-type-english>
<c-type--sub-type-english prefill='\{"ContextId":"abc","otherParam":"FAQ"}' layout="newport"></c-type--sub-type-english>
=========================================================================
In upcoming post i will let you know how to use flow for launching omniscript.
For more Details about DataRaptors and Types check this link DataRaptors
For OmniScripts elements refer this link OmniScript Elements -1
Best Practices of OmniScript, Integration Procedure, Data Raptors
Debugging Angular OmniScript.
Comments
Post a Comment