 Hello everyone, I am Sanjay Gupta, I welcome you on Sanjay Gupta Tech School. So today we are having one more session on Salesforce Omni Studio and the topic is Omni Script and it is day 13 so I have Abhishek with me so welcome Abhishek on the channel. So Abhishek demoed you the basics of Omni Script yesterday so today he will be covering one small scenario which will be having different screens where he will be connecting data raptor with Omni Script. So the data raptor which we implemented in previous sessions so you will get to know how we can use that data raptor in Omni Studio and in tomorrow's session you will get to know like how we can relate IP right so all three features you will get to know how we can connect all together okay so this is the agenda for today so before starting the session I want Abhishek you to introduce yourself over to you yeah thank you Sanjay so hi everyone myself Abhishek and I am working as a Salesforce and velocity developer in Salesforce domains and domain and I have I have all overall around five years of experience and I am at a trailer double star ranger and I have done some certifications on Salesforce like as you can see on the screen Omni Studio developers if you especially service cloud PD 1 and admin and I have done several projects around Salesforce sorry Omni Studio slash velocity and I mean I have majorly worked upon industries like health insurance telecommunication and industries cloud so that's all about me okay this is something great so moving on to the next slide so if you want to become part of a community where lots of freshers and experienced professionals are connected so you can scan this QR code and you then become part of this group and if you want to receive timely notifications so on next slide like you can see social media handles so you can just follow and if you want to have all the session links all together so session tracker link you can find in the video's description and please provide some feedback or reviews so that we can improve upon if there is any improvement needed okay so with this note like Abhishek let's start with the demonstration on Omni script yeah sure Sanjay so let me go to the slide where we had our scenarios created yeah so in today's session basically what we're going to cover is we're going to create a Omni script where we will be fetching where we will be taking an input from the user and that can be your account name and then we will fetch the account information related to that whatever name input user is giving to us and after that in the second screen we will be showing the prepopulated values for that account so for example we will be showing name as prepopulated value we will be showing active as a prepopulated value right and when the user is clicking the next button then we will be updating the account as well so basically not only we are fetching the account we will be updating the account as well and in the second scenario what we can cover is we will be taking some inputs from user for account information and with the help of data rector we're going to create one account okay perfect so I think three major operations get update and insert so let's see how much we can cover in today's session yeah so let me switch it switch to my org and open the omni script I don't know why this is taking time so if you remember we have created one omni script yesterday so I'm gonna open the second version of it so what we what we did it we just added a step in it that's it and this step is already created by omni studio we haven't dragged dragged and drop this step so as per our scenario in the first screen what we're gonna do is we're gonna take a input from user right so I mean what we can do is for this step name we can say let's say so this is the label that will be shown and this is the name of this step account input and now in the from the build build structure panel we're gonna take a input which is a text which is of text type I'm gonna go here drag and drop this and let's say I'm gonna call it as accounting and we will say enter name we can say label and if you want to make this form as I mean this field is required in this step you can just simply click on this required if you want to make it as read only that also you can do it and if you want to mask it there are so many other options that we can configure with the help of point and click tools only okay so so this is this is our first step okay so if you remember if you want to fetch some data from the database then every time we use a data app and that the type of data that should be data app extract or turbo extract so let's say now what I want is so user have populated one value or filled one name of account that user want to update or see the information then up when the user clicking on the next button right then we want to fetch the account information for the input that user have been submitted correct so now here are two things that we can see if I drag and drop a data rector into the step it will come in it will be coming as like a button so let's say if you want to use our data rector into your step that will be shown as a button until and unless user is not clicking on that button that data rector that data rector will not get executed okay but as soon as you drag and drop any data rector or integration procedure outside the step and let's say you are switching from one step to another step and you have a data rector in between them then that data rector executed automatically it's a back-end process then right right what we're gonna do is we're gonna pull a pull one more step in it in here and one question here I wish I could like which approach we prefer most like this one like in between two steps or like on the step itself so it depends on requirements and okay so some there is one requirement where we where we wanted to fetch the records itself onto the step only then I use the data rector on the step only but if you want to do some sort of back-end you know back-end process so let's say if you are having some information in the first screen and you want to create some records in the back-end and you don't want user to know that you that record is getting created then you can have the IPO DR in between the steps okay yeah so what we're gonna do is we're gonna name this step name because what will happen in the first screen we're gonna enter the account name from the data of the extract action we're gonna fetch the account information and whatever values we are fetching we're gonna show it into the second step I'm gonna say account information for this step name and again from that again from the input what we're gonna do is right now we're gonna show only the account name and another thing that also we can do is we can show the check box which is your which will be our accounts active yes or no I think on that account record it is a pick list actually but what we're gonna do is we're gonna see a functionality in the director where we will be converting the yes to true and no to false okay yeah so now I'm gonna go to this data that extract action which is which is as simple as that we used into the IP we will be just selecting our data actor so I think I have created one data for me so I think now you are going to apply some usability like already implemented yes I'm not creating a whole new data actor just bear with me I'm I forgot the name of the director okay just a second I'll go to the data of the list view and it was this no countercords I selected the correct one this time no this one this one okay extract the cards yeah so basically what we are doing is what we are doing in here I'm gonna delete the contact one right now because what we don't need it we are passing and name param and let's say I just want only one account note not more than one account if there is similar account with the same name and in the output what I'm getting is I'm getting the ID of account name of account and active of that account right okay and now if I go to preview and if I click execute I'll be getting active as yes ID and account name right yeah so this I just want to yeah this was the right only dear only dear and we have tested it from the preview right so I just want to refresh a memory on the data actors I mean if folks are have folks have been practicing on data actors so if I if I want to convert this yes to as a true or no to as false so what I can do is in the active in this one I can create some transformation this will be coming as true and this will be coming as false and now if I go to preview and if I click execute I think I think this data actor Dean got saved okay yeah no as false as you can see this spinner is not yeah it is getting hanged right no no what's the issue yeah but now it is working yeah it is showing true yeah so I mean this is this is that yeah in output like we don't need to select the Boolean data type right earlier you selected correct yeah we don't need to select right so I mean this is the these these functionalities we have provided to a data actor sessions so if you want to get to know more about it you can go to the data actor session in the only studio put cap and now what we gonna do is I'm gonna go back to my only script and I'm gonna select my this data actor okay and it is expecting an input which is param right I'm gonna pass the param over here and what I want to pass as a actual value which is this one accounting sorry no accounting we are using for output this account input yeah maybe we can just check it yep no this is a count yeah correct accounting only we're gonna pass the accounting okay so whatever we will be passing into the first screen it's gonna get passed to the data actor and it will give us the output and output where output will be stored yeah so first we're gonna see that so I'm gonna I'm gonna go to preview so there will be two new things we're gonna I'm gonna introduce in today's session first is data json and second is action debug okay so basically this data json you can call it a data model of your own script so basically let's say you are having 10 input elements in your data in your own script so whatever values you will be typing in there where it's gonna get saved into the omniscript this is the place where it's gonna get saved so this data json called as omni omniscript data json or also it is known as omniscript data model okay so for example if I type something over here let's say I wish it in if I click outside as you can see my step name was account input and my element name is account name and it is coming as a bishop if I change this to a bishop one it's gonna change it to one so basically whatever you will be input whatever input you will be giving to your omniscript it's all gonna save into your data json okay and what is this action debug so whatever backend process you are calling in between your steps if you want to check what input is going on so if you remember in the IP we had the debug logs at the very right correct so this is that this is kind of a similar thing in the omniscript if you are having any sort of backend call in between your steps and if you want to debug it what input is going to the data report output is coming from the data all we can track it from the action debugger so for example right now what we are doing is we are entering some information in the first step and when we click on the next button a data rector call has been executed if I click on X right I mean the UI is not proper I don't know why but it's a product issue but if I expand it in the request data as you can see param is going as null I mean we'll we'll see why this param is going as well and from the output there is nothing which is coming right let's go back to the design and let's try to figure out why that param is going as null I'm not sure but it this is this might be possible let me go to preview again do we need to activate the version or it default no for debugging we don't need to activate it okay click again next it will again okay let me open another omniscript I have used this example over there just give me a second so what we are doing over here is account name only that's how we have passed the spelling is correct we have to do directly if I go to preview again here at the logs and open those request yeah now as you can see I don't know what yeah maybe it is like cash issue it could be possible so as an input Abhishek is going and if I go to response I'm getting the output account name ID your active is true or false right so now if I go back to the data just you will be able to see all the information over here over here as well so as you can see we have this active as true we have that ID as whatever account ID we have fetched and account name we already have yeah right so now what we gonna do is and I know why that account name is also didn't came because then this node name is same similar to whatever node name we have for this one right account name okay correct so for example if I'm gonna make it like account name for example let's say one okay and if I go back to that omniscript I go to preview clear the cache Abhishek next now let's see this account name is also coming all three nodes are coming right right so now what we're gonna do is whatever data we are receiving from the data after it's getting saved into our omniscript data JSON right now whatever data we are receiving we're gonna map it to this these elements okay let's say I'm gonna call it as account name one okay this is the label so we show it as a company and this is the checkbox so we want to call it as active okay and now if I preview so I'll explain why what I exactly did right now but let's just look at the UI thing first next so this account name is coming as coming by default right and now why this active okay I got it why this didn't came because the value you're gonna give the default value for this I haven't checked this checkbox that's why so default whenever you it will pick automatically from that response right exactly so basically for this is for just a box only so if I go to the text field there is no default checkbox is there okay so for this text box like it is fetching that name automatically because we provided this name as account name one correct so basically what is happening as a output of this data after what we are receiving is account name one ID and active correct right and if we go to the second step and we see the element name of this accounting that is also account name okay so from data after whatever data we are receiving and whatever like API name we are using there so same API name we need to use here with these elements yeah so I mean this is one way of doing it for pre-populating the values there is another way also that we're gonna see okay perfect so I mean like but this another I mean for this checkbox also we are receiving active as true from here right and we have checked the step book default value should be there which says select to enable the checkbox by default so now if I go so basically now if I go to the another way of doing it is like let's say I am keeping the name of this as like account name to okay and now if I go to preview so this account name will not get pre-populated because now the mapping is mapping is not correct see this is not pre-populated so the another way of doing it is this this checkbook this option default value here I'm gonna say whatever whatever is coming in account name one just make the well the the value should be of account name to will be coming from account name one so if I go to preview now and I'm gonna try to shake again next see this appreciate is coming now right right and so this is another way of doing how to pre-populate pre-populate values from data request yeah so one more thing like we checked it for text and like pick list we converted into textbox like what what will happen like if we receive pick list values from data raptor as a response and here we create a pick list so it will be same like no in omniscript so basically that in that case we have to drag and drop the pick list pick list input yeah and that will be filled automatically that will be pre-populated yeah so as you can see yeah as we are receiving responses basis on that type we need to create input elements exactly yes so I mean like if you are receiving any sort of email email field right then there is one there is one email as well right input understood so so data raptor response type should match the input element type then exactly okay so like this is this is your pick list type and where what you have to do is you will be always like giving the name and field label right and option source will be manual or it can be it can be from S object as well if I select like this S object and I'm gonna say this source this source will be containing the S object name account and controlling okay I think the account then active underscore underscore C I think okay it should be taught not look and now if I go to preview right that yes and no will come by the point next it's taking the values from S object and data raptor is returning yes so how we can pre-populate it with us so for this one you don't have to do anything just type in the name okay API name we are receiving from data raptor as response correct I'm gonna change the name for this one because otherwise it will be the same active okay preview yeah I think it is very simple we just need to do some practice so that we can understand the whole concept right yeah so now what we're gonna do is I'm gonna delete this typebox because it's not required now into the next step whatever data we are updating so let's say I want to change the name of this Abhishek right with with some other name and I want to change the active from yes to no no to yes so we're gonna have a data actor we're gonna post it to the database with the help of data action I'm gonna have a data actor over here and let's say we'll use this data actor I don't know whether it will work or not but we modified we have the name we have the phone we don't need the phone mapping we will need the mapping of active right active will be coming from active from our omniscript name will be coming from our account name and ID will be coming from the ID and this ID will be the upset okay so what will happen now if I go to preview and just give me a second clear logs I'm gonna type again the same name it next so till now in our omniscript what are the things that we have we have the ID right we have the account name and we have the active correct right so now what will happen this ID will get passed to this data after post action in the ID ID node only because as you can see it's a parent order but whatever we are changing in the name or the active is equals to yes or no it's comes it comes under account information correct which is your statement so what we're gonna do is we're gonna go into here we're gonna paste this and we're gonna call it what's the account name to so this will be our account name to and similarly for active also this so it is input json path earlier we used to receive input from the preview of data raptor only now it is input from omniscript yeah that's what basically whatever you will be entering in your input json path it will be it will be a json format which you will be receiving from the omniscript or flex card or anywhere else right now if I go here and you can also debug it from the action level so like I'm doing is I'm keeping the name as yes but I'm gonna change the active to know and I'm gonna click the next button and if I go to this debug and the request data I'm gonna copy this here and I'm gonna put it into the json blob so that it will be easier to see so if you if you can see ID is going into the very parent node of the json right and account name oh sorry this one is going into this account information and active right and if I go here and if I see the response it should tell me that your account has been updated so now if I go to accounts and if I see that account the active should be known now yeah active is known now right this is there now what we're gonna do is we're gonna activate this version and activate this version and we're gonna use this version on to the home page okay and we will be seeing that things from them so meanwhile it is like activating there is one question from my side right now we provided limit as one for first data rector what if like if we want to fetch more than one records so how we can pre-populate them into different input elements so basically when you are having that when we are receiving the let's say more than more than one records from your data rector then you cannot use okay these things directly okay because right now this name element and this checklist element is independent there is a thing there is a thing called in your own script which is called as edit block okay and this edit block can can be repetitive so basically let's say if you are receiving five records of the accounts in from your data rector you will be having you will be having only one edit block into your own script but it will get repeated it according to your data rector okay so it will automatically create those many elements those are required basis on the number of records so I mean if you want we can we can go through one of the example for this one as well in the next yeah okay yeah so let's jump on to the home page as of now and even though the omniscript is very powerful that if you place this omniscript onto you know some record page it will get the idea of that record automatically and in the background you can run the data rector loop as the information and show it to it to the show it to your omniscript this is automated from here also we can do our things Abhishek next all things are have populated automatically I'm gonna call it Abhishek as CTS active will be yes again I'm gonna click next and your data that component has gone from your home page and name is updated and your active is updated right I don't know I mean if time permits I just want to show one more thing there is also one thing which is called as navigate action into your omniscript so basically as soon as you are clicking on the finish button right you can navigate to some record as well okay okay yeah maybe we can we can see that as well and yeah remaining things we can cover in next session exactly yep so from your build panel you can just drag and drop one navigate action and if you go to properties for this navigate action you just say page reference reference type is record object API name will be your account and context ID so on which record you want to transfer the user or navigate the user so the ID we have into the ID node if you remember right right into our own data decision so this ID and if I click activate version okay so from home page after updating the record it will automatically redirect to that that particular account right right let's just get activated it takes a bit of time because it's creating the handle now I go to home page and if I'm gonna reflash it once again search for the issue next what oh now it's as it is right yes okay am I on the go to the home go previous I don't know why name is not coming maybe it is a cache issue again let me let's go to the data after and see if this data after is given that data or not yeah this is giving us the data so it should work I wish it as it is go to next yeah now it's coming and again I'm gonna say no let's call it I wish it as it is next and see you are navigated to your account record automatically right and your activities okay so here I have one more question like in data after we provided input into that param like Abhishek and then from here Omniscript also we are providing some input so this input parameter will be overridden right this one you're saying yes so you can consider it like as a anonymous window of developer okay testing purpose only yeah so this is just for testing actually input is gonna get passed from your Omniscript right so I think with this whole demonstration what I understood like data after we are just using as SOQL or DML and yeah in those steps we are just creating some elements where we can receive some input or we can some we can show some responses that we are getting from data exactly so I mean again I mean in our first session we talked about model view controller MVC right right so it's the same functionality that every technology is following you could you talk about LWC of Salesforce you talk about Angular you talk about Omni Studio the MVC is working all of their model view controller so Omniscript is view then IP is our controller and data rector like as objects these are like model model yeah exactly okay so I think a few more concepts we can cover in tomorrow session then I think this is more on practice like how many scenarios folks will be practicing because majorly we just need to know like how we can get record update record that we saw today and maybe tomorrow we can focus on create or delete or something like that so rest I think different actions so that I think will be covered through IP so tomorrow I think we can incorporate IP as well in the Omniscript yeah yeah I mean and the another thing is we cannot cover all the all the functionalities that Omni Studio Omniscript provides the reason is if you if you go into any sort of one element of your Omni script right there are n number of options that you can configure right so it's as you said Sanjay it's more on practicing and rather than learning right so we already have an exercise sheet and I just need to update it because till session number six I provided some scenarios there so guys I will be beating that exercise sheet for IP Omniscript and Flexcard so that you will be having lots of scenarios to practice and with this Omniscript like what you can do whatever screen flow scenarios you implemented try to recreate those screen flow scenarios with the help of Omniscript so I think it will enable you as a developer in Omni Studio right so I think Abhishek whatever we can do through screen flows we can just recreate that in Omni Studio using Omni script IP and data rector as well right yep yep I mean more than that okay okay so I think we can wrap our session here only so tomorrow we'll be having some more demonstrations sure okay thank you Abhishek for sharing all the insights and I think it is quite interesting but it requires practice so those who are following the bootcamp so do practice and like remember Omni Studio will be the next mandatory skill that should be available in your CV because Salesforce is targeting a lot on industry specific clouds and all industry specific clouds basically uses Omni Studio as a tool okay so anyhow you need to master it and with Abhishek's effort we have all the sessions here so I think you can practice so scenarios are there concepts he already explained so the thing is you just need to do some hands-on so that you can remember the things okay so thank you Abhishek for today's session and we'll be doing one more session tomorrow on Omni script and then we'll be jumping on to the flex card okay see you guys tomorrow thank you