Connecting your Omniscript with LWC

Pranav Bhatia
3 min readJun 30, 2021

--

In this article, I will be talking about how to connect your custom LWC component with an Omniscript. We will be building a very basic application to get price of your crypto coin.

Assumption — you have a Salesforce Org access with Vlocity installed.

A. Creating your Omniscript

  1. Drag and drop a step component as shown and add an input component as shown

2. Create a Set Values component for the input

3. Add another step to send the crypto name to LWC and then display the information of it’s price.

So we are done with the Omniscript. Click Activate on top right and the click Preview.

B. Creating an LWC

  1. Search for LWC in the portal and open LWC Designer

2. Create a new LWC and name it cryptoLWC

3. Select cryptoLWC.html and add the following code

4. Select cryptoLWC.js and add the following code

5. Select cryptoLWC.js-meta.xml and add the following code

6. You can also add styling by adding the following code

C. Activate and preview the Omniscript

D. (Additional Step) Adding API to CSP Trusted Site

  1. Search for CSP in Setup

2. Add New Trusted Site

3. Add the following information in the Setup Wizard

That is the end of the article — please let me know in case you encounter any issues.

--

--

Responses (1)