Header Ads Widget

Ticker

6/recent/ticker-posts

How to use Lookup Element in Vlocity Omnistudio

  Lookup Element

Run a query using text input to retrieve Salesforce data using the Lookup element. The retrieved data is returned in Value/Label pairs and becomes available for selection in a dropdown list.

The Lookup element calls the DataRaptor Output service to query SFDC tables based on the parameters configured in the Properties section. To avoid performance issues, it is recommended to keep the number of value results under 150. Select the Custom type to run a custom Apex class. Lookup elements display values from Salesforce based on a standard SOQL query built using the parameters of the Lookup elements.

SObject Type

To query for SObject data:

  1. Set the Data Source Type to SObject.
  2. Under Input Parameters, configure these fields:
    • Data Source: Select an Element Name from the dropdown to send that element's JSON value in the lookup request.

    • Filter Value: Enter a name for the JSON value to use in the lookup query configuration.

3.Configure the Lookup Query Configuration

4.In the Populate Lookup Element with Query Results section, set a label and a value for the Lookup results by configuring these fields:

  • Label: Set the label for a Lookup Element's dropdown list to a JSON Value returned by the query. Because the query returns the values in the Lookup Element's JSON Path, you must set the full path. For example, to display an Account Name as a label in a Lookup Element named Company, the full path is Company:Name.

  • Value: Set the Value to an Object field that populates the Lookup Element's JSON Node using the full path. When a user selects a label, the value populates the Lookup element's JSON Node. For example, to use an Account Id for a JSON value when a user selects an Account Name from the Lookup element, the full path is Company:Id.

5.Preview the OmniScript to ensure the query is working and the value is being set correctly.

Agenda:

 SELECT NAME FROM CONTACT WHERE Account.Type='Prospect' AND Account.Rating='Hot'

These are the accounts having Type as Prospect or Rating as Hot





First aim is to get all accounts having Type=Prospect

So,first create an omniscript and then add lookup to the step.

Set the value of Type to Prospect.


Then select the Data source Type as SObject.



Then add the Input Parameter as shown in the picture.



Then add the Lookup Query and click on save.



We have to use JSON Path ,so that Id will be stored in the backend and name will be shown in the lookup filter.




 
After Preview:




When we click on lookup we'll see those Accounts where Type = Prospect 




Second aim is to achieve Contacts of these Accounts.



 
Now,we'll add another Lookup Query.






We'll change the path also because now we want to show the Contacts of those Accounts.



Now we can see the Contacts of those Accounts.





Third and last aim is to achieve all Contacts whose Account Type = Prospect and Rating = Hot

Set the Value of Rating as Hot.




Set the Input Parameter.



Add another Lookup Query.


We'll give the Lookup Order as 1 only, so that it will not override the Account Type filter where 
Type = Prospect 

Now, if we preview we'll get only that Contact whose Account Type = Prospect and Rating = Hot i.e 
Contact 1.



































Post a Comment

0 Comments