You are here:
Launch Lightning Web Component URLs with vlocityLWCWrapper (Managed Package)
For the managed package runtime, add the vlocityLWCWrapper to make Lightning web components in a Lightning page URL addressable. Lightning web components are not URL addressable by default. The vlocityLWCWrapper wraps the Lightning web component in a URL addressable aura component.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
Required Versions |
|---|
Available beginning with Vlocity Insurance and Health Summer '19 and Vlocity CME Fall '19. |
-
To configure the URL to launch the LWC, perform the following tasks:
-
Add the wrapper by copying the relative path in the example and replacing the NS variable with the namespace of the Vlocity package.
lightning/cmp/NS__vlocityLWCWrapper? -
Target the component by adding c__target= to the URL.
lightning/cmp/NS__vlocityLWCWrapper?c__target= -
Set the URL to target the component by adding c: to indicate a component and add the component name without dashes using camelCase. For example, to add a component with the name <c-demo-button> use the syntax c:demoButton.
lightning/cmp/NS__vlocityLWCWrapper?c__target=c:demoButton -
(Optional) When using the wrapper in a console app, add a Console Tab Icon and a Console Tab Label by setting the c__tabIcon and c__tabLabel parameters. The c__tabIcon accepts an SLDS Icon , and c__tabLabel accepts plain text. For example, &c__tabLabel=Custom Label&c__tabIcon=standard:account renders the console tab shown in this example image.

-
(Optional) Assign additional attributes by passing parameters that match the attribute names. Parameters must use the c__ prefix.
Example Button Component Code:
<c-button label=”Dynamically Generated” variant=”outline-brand”</c-button>Example Button Component as a URL addressable component:
lightning/cmp/NS__vlocityLWCWrapper?c__target=c:button&c__label=Dynamically Generated&c__variant=outline-brandExample Image:

-
-
To launch an LWC from a Layout action, perform the following tasks:
-
From Setup, enter Object Manager into the Quick Find search.
-
Select an Object, and click Buttons, Links, and Actions.
-
Click New Button or Link.
-
Set Display Type to Detail Page Button.
-
Set Content Source to URL.
-
In the URL value, add a vlocityLWCWrapper URL.
lightning/cmp/NS__vlocityLWCWrapper?c__target=c:demoButton
-

