How to Pass Data from OmniScript to Flexcard in Salesforce
Hi , guys if you are beginner on vlocity and curious about how to pass data from omniScript to flexCard or vise-versa, so you are on right place.
Here one situation, where we have multiple steps in OS and suppose having Review Page at the end to show what user filled all data in each steps & need to show all data on Review page .
So in such case scenario we generally use FlexCard's to show all user data .
Now what we gonna do , we create on Single Flex Card and show each step data using single flexcard.
Let's get Started.
For each step there will be each state need to create in FlexCard for summary Page. |
Passing Data in FlexCard from its OS Fc element's properties.
Set Values for Passing data from OmniScript to FlexCard
Suppose You need to pass many attributes from OS or input , in such case need just single string, passed from OS in parent-attribute.Ex:-
parent-attribute - %attributeName%
But in our case we need to get data from step or records .So the properties of Element will be.
parent-data : true
records : %attributeName%
parent-attribute : %conditionalStepNameAttribute%
Firstly we need to set Data value in Set Value element before steps.
getAccountInfo : %Account% - We are Storing Account Step Data record as String Json
same as with getOpportunityInfo
By declaring :-
AccInfo : {"stepName":"Account"} , this will pass in parent-attribute .
(Here we can send multiple attribute in a single string like this:-
AccInfo : {"stepName":"Account" ,"Type":"New","Condition":"Red"}
OR
(If your data is coming from Any IP Or Extract Dataraptor you can send that values as well like this approach.)
AccInfo : {"stepName":"%stepName%" ,"Type":"%type%","Condition":"%condition%"}
These set value we will pass into records section. (getAccountInfo : %Account%)
Now for showing each steps in flexCard , we need to set parent-attribute to show steps as conditionally.
Mapping will be like this:-
Now, we will get these data into Flexcard by having prefix :- parent.attributeName
Just add Condition on each state in FlexCard as Parent.StepName =Account /Opportunity
Also , make sure in FlexCard the fields output Name will be Step's Field Name , so it will get Step value in flexCard.
Imp :- Make sure you set your Set Value just Before Review Page So you will get Data in your set Values , otherwise json node will be empty if you set before steps.
Hope , this will helps you , thanks for reading this article .
0 Comments
Your valuable feedback !