 Okay, going live. Hello everyone, I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So we have one more session for you. And in this session, we are going to discuss about Omniscript scenarios. So this is episode 11 of season two. And I have Abhishek with me. Welcome Abhishek on the platform. So today also I saw like someone cleared Omnis Studio certification. So every time whenever anybody clear the certification and they tag us. So I really feel happy like through your efforts, people are learning this skill set and they are able to clear the certification and they are upskilling whatever knowledge they want to. So like really happy. And to continue this, like today we will be doing Omniscript script scenario session and then tomorrow one more session we will be doing on flex card. So that part will be completed. And then we'll focus on some projects so that everybody can understand end to end Omnis Studio. I think that will be a game changer. If fresher wants to learn, they can follow all the sessions and do the project. And similarly if any experienced candidate who is having all the development related knowledge and want to jump into Omnis Studio space or industry cloud space, so they can build that POC or project and they can just face interview in better way. Right. So with this note, I pass it on to you. Yeah, thanks. So hi everyone and glad to know that you guys are able to clear certifications with some knowledge due to this bootcamp that we are doing on the YouTube channel. So I mean, like it makes me really happy that I mean, like efforts are not just we are just doing the sessions and it's done. I mean, like people are really learning from it. And also I also get so many messages on my LinkedIn that appreciating my efforts. So that also gives me motivation. So thanks, Sanjay for giving this chance. So yeah, so myself publish it and I'm working as a Salesforce Velocity developer in this room in since five plus years now and I have done some certifications around Omnis Studio slash velocity as well as on Salesforce and few certifications on velocity is Omnis Studio developer industry CPU developer and then there is one also which is industries. Sorry that health insurance quoting developer also some some of the certifications which are on screen. Also I have that on scene first. So that's it about Okay, yeah, you very well said I be shake like whenever anybody grows due to our efforts, so it really helps. And here like we are doing everything for free of cost and the way we are explaining things. It is same like anybody is explaining in the premium classes. The only challenge which I can see is the communication like it is more like one way explanation because people can't ask questions. They can ask questions through chat. But I think if they do practice, then they will be having more doubts. So I'm I'm having lots of requests from people like can we have some premium classes where we can join on zoom and you guys can guide us and can we learn Omnis Studio by interacting with you and like we started one one batch from Australia also which you are dealing and few few batches I'm dealing those are part of development. So people are appreciating like whenever we deliver the session then also they are using this YouTube sessions as a reference, right? So the way we deliver it is like helping them in two different ways. So those who are good in self learning. So for them also it is helping and for those who are who need some mentorship for them also it is helping. Yep, so this is telegram group. If you want to join this group and you want to become part of the community where lots of folks are already connected, you can join this. And in the next slide, I just want to request like if you want to share some reviews or feedback do you can share on LinkedIn, you can share on YouTube, wherever you you think like it can be like be motivating us. So please keep sharing your reviews or feedback so that we can feel motivated and lots of other content we can bring for you. Okay, so I think with this note we can go to the next slide. So these are the two scenarios which Abhishek will be implementing in front of you. So type add he already explained. Now he will be using type ahead block with added block added block is another functionality. And other than that he will be explaining about aggregate and formal elements, so which are also important in on this script. Okay, so over to you Abhishek. Yeah, sure. So let's just jump on to the org directly and let's try to implement this scenario. Yep. So the first scenario what we will be doing it in the first screen, we will with the help of type ahead block, we will fetch some I mean, like we will select one account from the list. And on that account, we will be inserting a number of contacts, how many contacts that you want to insert. So and that will that we will achieve with the help of added block. So the main goal to understand on today's functionality is the added block, how added blocks works. So I'll create a new omniscript again. And let's call it as OS edit block. In the first screen. First of all, we will use a type ahead block to fetch the account record that we have already seen in the previous sessions. I think there is some issue on the UI. Let's name it as search account. So initially, we will be searching the accounts, right? Exactly. Yes. Okay. So basically, what we want to do is we want you to select the account and on that account, we want to insert few records of contact, we will use a data adapter. And I think I have already created one data adapter that we have created in the previous sessions. So in that we have to pass the account name and that will give the list of account records, we can select into the type ahead block. So we will pass the parameter, which is param. And in this, we will pass the select account, which is this one, your type ahead. And let's go to preview and just check if it is working. And then we will be inserting the list of contacts in the second screen. So let's GTS. So okay, so we have to give the key as well. Because right now we haven't given the key in the type ahead block, which is this one. So it will give me all the names of records and names of the account and then we can select any one of the account. Now we will add one more step. And we will call it as contact list. Let's call it add contacts. And again from the build, we're gonna get the edit block, which will come under your groups. So yeah, let's learn about this. So what is your edit block? So your edit block is something like that, that you want to insert, or you want to add multiple records into the Omniscript or on the UI. So basically, if I'll show you the preview of it, let me go and try to see the preview how it will look, how it looks like. So basically, it will look like this. But right now we don't have any input fields into my edit block. That is why nothing is coming. So okay, so now, so basically, what we can do here is I mean, like sometimes we want to create some sort of UI where we want user to insert multiple rules. Okay, so let's say I am adding one bro after that I want to ask user that if you want to add more, they can then you can click on new, then they can add few more rows, and they can enter as much as rows that user wants to enter by clicking on the new button, right? So this is how this edit block gives the functionality allow new allow edit, delete or clear. So let's say you have added one row, and now you want to edit it delete it or clear it. So there, these sort of functionality is achieved by the checkbox. So I'm going to call it as contact records. Let's call it contacts. Okay, and as soon as you click on this edit icon, right on the edit block, now you can drag and drop some drag and drop some sort of text element or any input elements that you want to take. So just drag and drop this text into this. So basically, what I want to get get from here is I want to get the first name and the last name. So I'm going to call it first name name. And similar to this, I will get last name as well. So I have one question, maybe you can answer it later on. So in this edit block, we have these text boxes. And without this edit block, also, we can have first name last name separately with the help of text input. So I just wanted to know the difference between both of these, which is better than why. Okay, I'll show you. So I'm going to have one text block outside this edit block. Okay, let's call it temp. And let's keep it the first name for this one. Okay. So as you can see, this element name is always a unique one. If you keep the same name, it will give you the error. Right now, I'm using the same name. So it is giving me the error. So that is why I have to update it with some some else. So this is a uniquely identifier for your any element in your omniscript. Now let's go to preview again. And I'm going to answer the question. And if I click next. So as you can see, this first name is coming only once I cannot add new records in it. And as soon as I click on this new one, I will be having a new dialog box open or model box open. And in that, let's say I have added one, I can click on the another one and I can add one more. Okay, got it. Right. And if you click on arrows, we can see the data as well, right? Okay, add it. If you click on edit and delete, I mean, we will be able to see the data on the glance as well. I will show you this functionality now. But I mean, like from the arrows, you can click on edit and then you can edit the record also. Exactly, got it. Yeah. So I'm going to delete this one, it's not required anymore. Let's go back to the added block again. And let's say I don't want user to delete the row once they have entered the data. Okay. So I'm going to uncheck that one. And from that dropdown, that delete option will be removed now. So they do it. And now you can see only edit button is gone. So this sort of functionality they have given on onto the configuration side. Okay. And if you want to update the button that is that which is called I mean, like which when you click on that one, then the model box is getting open. So you can edit the label for as well. So I'm going to call it as add contact, right? And delete label also you can edit edit label also you can add it. Then I'm going to click I will click on this one and then yeah, then we have some options around how you want to show the data when you are adding the multiple rows, you want to show in the inline form format, you want to show that table format, financial statement, cards, long cards. So basically you can change the design as well. So basically, if I select this cards, okay, then it will be coming like something like this. Okay. So they have given some, you know, designing as well by the configuration. So let's go with the, let's say cards for now so that it is more visible. I mean, like on the UI, it will look more good. And after I mean, like, if you expand this section elements inside the edit block, and if you check this first name and last name, okay, let's say I'm going to select only last first name for now. And if I go to preview and so the data which we provide will be visible, right? Yeah, onto the glance, you don't have to click on edit now. So that's, and if you click on set, so this first name will be visible onto the glance. And if you click edit, then you can edit the record. So I'm like the best functionality is like onto the, by the configurations only, you are able to do that many, that much of configuration, that much of customization if you go with the LWC side, right? Yeah. And in LWC, like lots of efforts will be needed to do this simple, like UI changes if you want to design this card style. So we need to write lots of code. And here we just need to select a pick list value and it is easily changing. Exactly. And some other options is like S object mapping. If you want to map with the S object also, then also it can be possible. So let's say if I go with the, I don't know if I can search, no, I can contact, contact, contact, then you can add the mappings. So basically your first name is your edit block mapping. And you can map the fields as well. First name, save and new. So basically, I mean, like this is just to, this will not insert your record, it's just that you, so that it will be mapped with your data. When you're inserting the record with the data actor help, our data actor post section. So that's it. This is not that much required. So you can skip it for now. I don't know how to, okay, I think that again, we need to search none maybe at the top. No, I think I have to deselect. No, it's not happening. And none we don't have it. So there are some bugs in the only studio. Okay, but if we select, so like it will, it will not work or what will happen? I think it will not work. I think so. What we can do is from, we can remove it from here. Okay, okay. So it should be, yeah, it should remove now. So, okay, now what will happen? I mean, like for now, I'm just going to get the first name and last name. And we're going to make this type ahead block required because we want contact to always have the account. And in this, in this contact, we will make the last name required because on contact lies last name is always required. And now if I go to preview, and now I have to, for sure, I have to select the account. So that's it. Yes. See, as soon as I, I mean, like, I have, I mean, like, if you have given the notice, I have changed the icon from user to contact. So the icon is coming as also the contact. Now, if I, if I'll try to click, if I try to save without entering that last name, because this is the required fill, it will give me the error. Test one, test one, last name, I'm going to click on save. So it will show me both the names, first name and last name, because I have selected both the names. And if I click, let's say, second, test two, test two, last name. So this is how you can add as much as records that you want to enter. Okay. And if you look at the data JSON as well, it is, it is creating the array, it's own, own its own. So basically your contact list is your step name, and your contact records is your added block name. So it will start adding your, all the records into the array by the point. And this array, then you can use it into your data rector and you can use the, you can insert the records. So now what we're going to do is we're going to call a data rector post action after this added block. And let's call it insert, contact, insert, just call it DRP, insert, copy the data JSON from there. Let me paste it into the JSON block so that I can refer it. And if I go back here, I'm going to create a new data rector. And now we all know the data rector stuff, how we do, how do we do, I mean, like how we do it. So contact, you can select the contact. And after that, you have to just create the mappings for first name, last name, and do not forget about the account ID that we have selected into the first screen. So if I go here, and if I click on preview, I'm going to just, I mean, like the way I have always told you, whenever you are creating some mappings for your data rector, execute your omniscript, take the input from the action debugger and mapping, map it with the fields. That is the best way that we can do. So SCTS, next, I'm going to add one, let's test, that's another one, test two, test two. And after that, if I click on next, if I go to the action debugger, it will call my insert contact data rector. And I'm going to copy the request data. And if you see the request data, in the request data, I have got all the data JSON that I have, which is your first, your search, I mean, like these are the default ones, which is created by omniscript. This is your first step output, and this is your second step output, right? So I'm going to copy the input, which is this one, copy this whole input, go to your data rector, put it into the input JSON, then click on the quick match, and then you can simply create the mappings. So first name will be mapped with contact first name, which is your this one. So drag and drop like this, the last name needs to be mapped with last name, which is here. And then your account ID, I think. And account ID, you will be having here search account, select account block then ID. So map it with this one. And as soon as you will click on save, it will create the mappings. And now if you go back to your omniscript design, you can activate your omniscript and let's add it to homepage. I mean, like by seeing this, you know, demonstration, it will be a bit confusing, but if you, when you will be practicing it and you will pause and if you try to see what things I'm copying and what things I'm pasting, you will be able to make sense. I mean, like all the all things will make sense to you. Yeah, exactly. For beginners, like it is too fast, but it is already recorded. So anyone can pause and then do the exercises. I will, I will show you, okay. There is some issue. No problem. I will show you once again what configurations that I did so that you can refer it one more time. Let's drag and drop this omniscript onto our homepage and a block, save it. I forgot to do one more thing. At the end of the day, at the end of the omniscript, we can use one more thing which is navigate navigation action so that we can redirect to the account ID. So I'll leave it to the audience when they will be practicing this scenario, they can use the navigate action and after contact, contact insertion data adapter, they can use the account ID to the navigate to the account ID. So I'm going to search for, I think you already explained that in previous sessions. Yeah. So I'm going to select the account when I click on next. I mean, like it is coming a bit weird because of the bid over here. But that is fine. Test one contact one. And if I click next and let's navigate to that account now, the two contacts created. Yeah. So as you can see, test one contact one and test two contact. Yep. Right. So I mean, again, I always say, I mean, like at the end of any explanation, I always say that if you will be building this functionality into the custom LWC, it would have taken four to five days at least for a mediator level developer. And with the only script, I just did it into the hop and a less than less than that's the burn benefit. And okay. So let me explain you again, what are the what all things I did for achieving this functionality. So first of all, I went into the type and it block, which is already been explained. I'll go to the edit block and in the edit block, I mean, like I have given name field label and after that into into the elements inside edit block, I have selected both of the things so that onto the card, it will be shown. And if I click on this edit icon, I have added two fields, first name and last name. And after that, I have called a data post action and in that data rector post action, I have created the mappings from the omniscript data JSON for first name, last name and the account ID, which is coming from your type. So that's it. You can again, practice it at your own and you can do the things. Okay, let's go to the second scenario, which is use of aggregate and formula elements in omniscript. So I'm going to create a new version of this omniscript. And I'm going to explain it. So basically, your aggregate and formula functionality comes under the functions section into the omniscript. And why do we use it? So aggregate as name suggests, if you want to aggregate some sort of values, let's say if you are inserting some sort of opportunities, and you want to aggregate the value of that opportunity by summing it, or if you want to take the average, or if you want to, you know, what aggregate functions that we have that you want to perform, then you can use the aggregate element. And if you want to create some sort of formula by using or by using operators like and or not all these things, then you can use the formula. So for explaining the aggregate functionality, what I'm going to do here into the edit block, I'm going to create a number field. Okay, so that I can explain it. And let's say I'm going to call it as contact budget. And from the build tool again, I'm going to get the aggregate thing outside the edit block. Okay. And if you can see, we have data type as default Boolean currency deep number, whatever data type you want to return from this aggregate field. So I'm going to call it as let's say average budget of contact. Okay. And in the expression, I can search for average function. What, what else do I have? If you click on this question map, you will be able to see all the functions like absolute number Boolean currency integer number power. I'm like all the things strong, random, all these things. So I'm going to use it, let's say for average. And in that average, I'm going to pass the contact budget. And I think I have to give the this edit block name as well. So this is how I will give if I click on save. And if I go to preview, so right now the average budget is coming as zero because we don't have any value right now into the edit blocks. Let's call it first will enter 1000 you are going to click on save. So this will give me automatically 1000 value. I'm going to enter one more. And let's give it 10,000. So 10,000 plus 1000 is 11,000. And if I if we average it, it should be 5500. So as soon as I click on save, this is now 5500. So basically, if you want to create some sort of aggregate functionality, or if you want to use aggregate formulas, then you can use the aggregate element into your own script. Okay. So and another thing is if you want to, I mean, like if you need this aggregate element, I mean, just for your purpose, you don't want to show it to you a user, what is your why you are using it. So you can click on this height. And when you will be previewing it, you will be not able to see, but this element will be available into your data JSON. So okay, so for back end calculation, it will be available, but on UI, it won't. Okay. So on UI, it's not coming. But let's say I'm going to add one save. As you can see, I can see this average whatever into the data JSON, but it's not on today. So it's kind of hidden. Yeah, sometimes we do. Generally, what we do, we create formula field for back end calculation, we don't put it on the page layout. So similar sort of things. Exactly. So this is your average, sorry, your aggregate. Now if we see the formula formula is also pretty much similar, but the best advantage of using formula is you can use operators in it. So let's let's call this contact list size. Okay. And also I don't want to show it to UI. And in the expression, I can use the list size. There is a function I think list size. I think let me click on this icon. I think we have a function called list. Okay. So you mean to say in formula, we use function and in aggregate, there are limited functionality available. Correct. And aggregate is most of the time, I mean, like they are interrelated to each other, but aggregate are most of the most, I mean, like most of the time it will be used for using the aggregate functionality, like some average and because I can see like on top of this pop up average is also available. So like through formula, we can do anything. And if you want to do just aggregate thing, you can use that aggregate component. Correct. And in formulas, you will be, I mean, like operators will also be available, like your end operator, your operator. So if I go, I think this count will give me the size. So what I'm going to do is count then in the percent we can get like contact, contact list, contact list, I think this is okay, contact records. Yeah, list is I think creating in contact records. Correct. So I think it would be contact records only. So if I save it, let's go to preview and let's see if this will give me the size of contacts. Yeah, variable is there in the JSON. It is having one. If you add one more, then I think it will be okay. It is already two, as we click on the ad context, so it is automatically increasing by one. Yeah, basically, I'm like, whenever you click on the plus icon, the blank area will get added to the data. If we click on cancel, so it will remove. It will be and I mean, what you can do here is, if you want to use, so basically you can say, so as I have mentioned, we can use operators in it. So we can say if it is more than zero, then only execute this data rector, otherwise don't. So I mean, like in the data rector, sorry, in the formula field we have said, if the list size is greater than zero, then give me a true value, otherwise give me a false one. And in the data rector calling, we can click on this conditional view and then we can say your list, sorry, your contact list size is equal to true, then only execute it. I mean, like this is, I have explained just to explain the functionality, but you can use it in this way by thinking any of the business analysis. So yeah, I mean, that's all for today's session. Okay, I think pretty much you covered different, different use cases that basically are like common whenever anybody will be working on the projects. And as you are already working on Omni Studio projects from past two to three years, dedicatedly. So I think you already covered the scenarios which you mostly use. So if anybody, yeah, go ahead. Yeah, I just wanted to say that, I mean, like the Omniscript scenarios that I have covered into the past two, three or four sessions. If you will go, I mean, like, I'll just take one more minute. So if you will go into your build section, and if you'll expand and see each and every element, now you will be able to relate that almost 90% of the elements we have explained into the, into our Omniscript scenario sessions. So I mean, like, you are not, I mean, like, we are not letting you letting you go without an explanation of any of the elements into the Omniscript. So that's a good thing that I want to raise. Yeah, that's why this bootcamp is unique across the Salesforce community. And I don't think in the depth you covered the topics in the season when you covered all the concepts theoretically, practically. And in this season, you are explaining all the scenarios in the depth. So I think this is appreciatable. And if anybody seriously watched all the sessions, so there is no doubt they will be learning all the things properly. Correct. Yeah. So we will be having one more session. So now Flexcard is remaining. So Data Raptor, we discussed a lot. IP, we discussed a lot. Omniscript, we discussed a lot. But now we just need to see like how we can place Flexcards also in this sequence, right? So guys, tomorrow, same time, we'll be having one more session. And that is very important, because in tomorrow's session, you will be having all four key components of Omnis Studio together, right? Yeah. So we will be picking an existing example where we explained you Data Raptor IP and Omniscript. So in the same example, Abhishek will be adding Flexcard so that you can understand it more better. Okay, so yep. So here there is one question from Prashantha. So how to use where product code in in. So basically, the question is how we can use in in Data Raptor. And I remember I asked the same question to you, like how to use in in Data Raptor. So I think you you said like we need to use our operator for that. Correct. Directly we cannot use in in Data Raptor, right? Exactly. Correct. Yeah. So Prashantha, you you just need to use our operator. So product code equals to ABC123 or product code equals to CDA123. So this way you just need to write all conditions or wherever that particular thing is matching. So this way you can because right now in operator is not available in Data Raptor to use. And this was the challenge with Flow Builder also. Nowadays Flow Builder is having in operator, but in Data Raptor it is not available. So maybe in future you will see that functionality, but right now it is a limitation. So you just need to use operate or operator to implement this scenario. Okay, so guys tomorrow we will be having one more session. And after that next month, we will be having two sessions on projects. So we will be having two different use cases that we will be guiding you like how you can implement as part of your project. So if you go through that session, so you will be able to understand Omni Studio end to end, right? And I'm sure like you won't find those kind of implementation project implementation anywhere, right? So we did lots of brainstorm. So we created business scenario. Then we converted that business scenario in a technical specification. And basis on that technical specification, you will be watching like how Abhishek will be implementing the solution in front of you. Okay, so I think this is it for today. Thank you Abhishek for sharing your knowledge. And again, like calling this out like he's in Australia right now. And in India it is 515 pm and here like where Abhishek is, I think it is 1045, right? Or 11? 1045. So like he's sparing his time. So I really appreciate because in between of the bootcamp, he moved to Australia and still he's able to maintain that consistency. So I really appreciate that. And you guys also need to learn this thing like if you started something, so you need to end it anyhow, whatever the situation is. So if you are following all the sessions, so just complete that. You don't know like whenever interviewer will ask you these scenarios and you will be able to relate like how Omniscript can be used, how IP can be used, right? So just complete all the sessions so that you understand it in well manner way. Okay, thank you. See you tomorrow in the next session. Bye everyone.