How to use type ahead block in Omniscript | How to fetch data from extract DR and pass into typeahead in Salesforce
Hi, friends welcome back once again, today in this blog will see how to use type ahead block in omniscripts and fetch data from dataraptors and pass into type ahead block and fetch data according to selection of typeahead.
What is type Ahead blocks in Omniscripts ?
First we have to understand what we can do with typeahead blocks in Omniscripts , generally from type aheads we can use for selection of records like drop down , or for searching any records , just like global search in our salesforce it retrieve data from back end , same we can do with this type ahead.
A very useful element we can say in OmniScripts to fetch or search data or acts like a lookup field, that is nothing but Type Ahead Block in OmniScripts.
Scenario / Use case :- User wants to get all information of account as he selects account names from step , on next step all account details should be displayed.
For this we generally creates one OmniScript and create one Step for Selection of Accounts.
Now , how we can get the all account list into type Ahead drop down. For getting this list we need one extract dataraptor.
How extract dataraptor is use in Vlocity?
So, for fetching the data , we will use one Extract dataraptor and use it before the step.Now , we have to get this response of dataraptor into omniScript.
How to get reponse from Extract dataraptor into omniScript.
Now using set values we can define that response and get the full response of dataraptor in Omniscript.
We can set the values like :-
allAccNames : %Result:accName%
Now we can use our Type Ahead block in Step and into properties , just check the Use Data JSON checkbox , and provide node path into the field as we already have in our set value as allAccNames , so will use it.
How to pass input parameter into Extract dataraptor from OmniScript?
Now we already set our set value ,need to pass that accountName as an parameter of extract dataraptor from OmniScript itself.
Important :- If you need to get the data from extract data raptor into step , means all field value should be populated into step then make sure your stepName and fields value are same as per your output path of your dataraptor.
I'm adding output for you guys!
0 Comments
Your valuable feedback !