 Okay, going live. Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So friends, this is day three of Salesforce Omni Studio Bootcamp and I have Abhishek with me. Welcome Abhishek on the channel. So as you already you are attending all the sessions of this Omni Studio Bootcamp. So in continuation to that today also we'll be having one more session. So last week we started explaining data rector that is one of the tool of Omni Studio. So we'll be continuing with that. So today one more feature Abhishek will be explaining with the help of proper demonstration. So I see like people are liking the way we are conducting the bootcamp. So what we are doing we are explaining the concept first and then we are doing some demonstration and then we are giving some exercises as well. So if you do all the exercises you will become export in Omni Studio and this way like you can add on this tool or this knowledge to your CV as well. And it will help you to switch your job for those companies which are working in industry clouds. Right. So with this note I would request Abhishek to introduce himself because I know in every session lots of new folks are joining in. So please let them know who you are and what you have done so far. Over to you. Thank you Sanjay. So hello everyone myself Abhishek and I am a Salesforce and velocity developer and I'm working. I'm working in Salesforce community for like five plus years now. And I'm a trail it double ranger also and I have got some Salesforce certifications which are like Omni Studio developers EPQ specialist service cloud PD 1 and administrator. And I have worked upon several several Omni Studio projects where where you know I have worked upon multiple industries with velocity supports like insurance cloud telecommunication and industries. Okay, great. So I hope like the sessions which Abhishek delivered you are liking and I can see it clearly with the with the help of views view count and it is increasing day by day. So I'm sure it will increase in upcoming days as well. And as you know like we started giving you some exercises so if you face any difficulty any challenge and if you want to discuss it with other learners. So you can scan this QR code and become part of this Sanjay Gupta Tech School telegram community. So more than 3000 folks are already connected their learning Salesforce on daily basis. So you can also join this and you can follow Sanjay Gupta Tech School on YouTube LinkedIn Instagram and Telegram. So so that you don't miss any notification or reminder and all the important links are available in the videos description. So there is a session tracker which is having all the bootcamp related information so you can just find it. And I just want to request you like if you if you're liking the way we are conducting the bootcamp so just share a review or feedback. Right so you can share your review anywhere. Maybe it is on YouTube or LinkedIn so that other other folks can also get benefit get benefited with the work we are doing free of cost for the community. Right so with this note I hand over session to Abhishek so that he can explain a few more things about data raptor and can do some hands-on implementation. Okay so over to you Abhishek please start. Yeah sure Sanjay. So I mean in previous sessions we have seen the data raptor turbo extract which is a type of data raptor. So data raptor turbo extract was used for getting the data from single object and it's direct variance. So and in today's session we're going to see how data raptor extract is working. So there is a difference between data raptor turbo extract and data raptor extract. So data raptor extract is used when you want to fetch your fetch the data from multiple objects or you can use with the single objects as well. But mostly it is used for multiple objects. And it used to provide the data to your UI tools. UI tools like omniscripts flex card right. So these sort of things you can do with the help of data raptor extract. And if you want to do some you know transformation like when you are getting some data right like for example if you are getting the account data where the activity equals to yes right. Then if you want to do some sort of logical implementation in your data raptor that also you can do in the data raptor extract that feature was not available in the data raptor turbo extract. So this formula we will see in action as well in today's session. So as you can see except extracting data from single object multiple objects. And if you want to use some wear clothes and all these things we can do all in the data raptor extract. Right. So if we see one of the example of data raptor extract with the single object right like fetch account information where activity equals to yes. So we're going to see in action how we can create a data extract for fetching the account information where the activity equals to yes. Okay. Let me go again as we have seen we will be opening our only studio app. Right. Which is a console app. And for creating the data raptor we will go to the only studio data raptor. Just give me a second. I think it's getting loading. Yeah. So this is your data raptor list from where you will be creating your data raptor. I'll click the new buttons. Right. Now we're going to give that data raptor name. So as we have seen for data raptor turbo except we we have given the name is data raptor turbo extract like the RT. But for the data raptor except we will be having only DRE and whatever name you want to get like account records. Right. And interface type we selected for turbo extract as turbo extract now we will be selecting as extract. And this is your input and output type which is we will be accepting the input in Jason and we will be giving the output in Jason. And if you want to give the description so let's say get all accounts where active is is yes. Right. This is a simple description that you can add on for the for your data raptor. So now you can see that there there is a there is another another tab that we have in the data raptor extract. So like if I go to the data raptor turbo extract right as you can see we have only extract options and preview right. And if you see in the data raptor extract you will be seeing two more tabs which is formulas and output. So we will be seeing each and every tab in detail. So first step will be your extract extract step where you will be giving where you will be giving your object name. So in our case we're going to have in a have it in accounts and similar to data raptor turbo extract we will be giving a we will be giving a Jason node name. Which is equivalent to your apex list name. Right. So let's say I'm going to call it as account records. And in the in the filter we're going to select active is equals to yes. Right. We will we will skip this formula as an output for now we will come it come on this later on. So if I go to options it is similar to data raptor turbo extract. Where you will be having the Salesforce platform cashier type where you can select where you can store your data into your cashier and how many minutes you want to store the data into your cashier you can set it from here. And if you want to apply the fee level security while fetching your data from data raptor then you can just click on the check this check box. And if I go to preview it is similar to the data raptor turbo extract where you will be clicking the execute and you will be testing your data right. Now we will go to the output app. So before going to the output app let me go to the data raptor turbo extract again. So in data raptor turbo extract. This step it is seen similar to data raptor extract. But in the data raptor turbo extract you you are just directly selecting your fields like active name rating and only all these fields. But if you want to fetch or if you want to get the fields in your data raptor extract right then you have to create the output mappings. So for example if I click on this plus icon right so in the extract Jason path. Like we have given the name as account records right so in the extract Jason path what we will be doing is this is all the account information which is getting fetched from this data raptor is getting saved into the into this account. Records right now if I want to get the active field right so I'm just going to click on this one and. So this is your this is your output path from your extract step right but in your preview where you will be having your output right so in what Jason node you want to get your data. So for example let's say if I'm going to call it as like active right. So it will give me all the output in this active active output Jason. So like similar to this if I'm going to create one more mapping. Like for example let's say I'm going to take the account name right so this output mapping is getting created by you. This is not auto generated and you can you can give any sort of name in whatever format you like. So like I have I'm I'm fetching the active field and the name field and now if I go to the preview right and if I click execute. So as you can see we have three accounts which is an object format Jason object format. So this data raptor is giving us a list which is having three accounts in the object format. Right now let's say I want to give a name to this list as well because this list is unnamed right now. So what I'll be doing is I'll just go here and I'm going to say account colon right. So all the output right now which is coming which is coming as unnamed list right now it will come as an account list. Now if I go again back to preview and click execute. So now as you can see we have the account account list in which we are having three account records in the object format right. So that unnamed list is now having a name which is a count. So this is how you can this is how you can fetch your all the data from your data raptor extract. So that till now what difference that what difference we have seen first difference is there are two more tabs in data raptor extract. Which which we do not have in data raptor turbo extract. And if you want to if you want to fetch your fields in your data raptor turbo extract you have to create the output mappings manually by yourself. And in data raptor turbo extract you don't have to create the output mappings you just need to select the fields. And why this difference is there by the studio because in your data raptor turbo extract there is only one one object. So data raptor turbo extract will not get confused right right from which object we are getting the fields but in the data raptor extract we can have multiple objects that we will be seeing. So that is why we have to create the all the output mappings by ourselves. Perfect I think this this difference we should remember always and I think it is one of the interview question as well. Now if I go to the formula tab right so what does formula do if let's say I'm going to say is like give me all the accounts where active is not active is equals to not equals to none. I mean active is not blank and if I go to execute it will give me all the account records where active is either either yes or either no right. And now if I go here and what we're going to do is so this is the requirement right. I want to get all the account records now I want to filter out all those records with the help of formula tab. So what does formula tab do if you want to filter out your data if you want to do some modification if you want to add some business logic to your data retrieved by the data raptor. Those all sort of things you can do in the formula tab. So as soon as I click on this ad formula right what I'm going to do is I'm going to say like all the records I'm fetching in this account records right. And colon and I'm going to say active is underscore underscore C. So you can write the conditional statements in this and I'm going to say as yes. So how this if will work. So in the first part we will be giving the condition and in the second part we will say what if it is true. And in the third part we're going to say what if it is false. So if account active is equals to equals to yes right then what we're going to do is I'm going to say give me the accounting. Just a second. I'm going to say give me the accounting. Right. And if account is active is equals equals is not yes right then what I'm going to do just give me nothing the blank one. Okay. And what I'm going to do is I'm going to save. So whatever wherever account is accounts active is equals to yes. I'm going to save it into the account records. Okay. Now if I go to preview and click execute as you can see just a second. Yeah. So okay. Active I'm going to disable for now preview execute. So yeah as you can see we have only the accounts whose active starts with a right. Now let's say if you want to get all the accounts right. I mean right now I am just having the name field only with the help of formula right now now I want to get the active field also right. So how can I how can I do that. I'm just I don't know why this is behaving weird. Let me refresh it. When I mean go to formula. So what I'm going to do is I'm just going to get all the account records where active is equals to yes and put it into the account records right now if I go back here and if I enable this mapping again. And if I go to preview and click execute. I'll get. I think name should be different. Yeah. Name should be different. I will tell you why the name should be different. And guys for this exercise like you really need to practice. So whatever Abhishek is demonstrating so if you do practice by following all the steps then you will be able to understand. Yeah. Okay. So I think what we have to do is just a second. So if you are filtering the data with the help of you know and if you if you are filtering the data with the help of formula right. Then you have to add all the mappings by manually. So I want to say here active underscore underscore C and copy this. Give me the name field. Give me the active field. I'll go to the output and again add the S over here. And I'm going to preview execute. So now you as you can see we are having only the accounts which is active is equals to yes and we are having a name field along with it. Right. And let's say if you want to get the ID field also then you again have to create the new mapping in the formula and new mapping in the output. So this this type of example I have just given you for the demo purpose. But if you want if you really want to get all the accounts whose active is equals to us then we will be adding into the filter criteria. We will never use the formulas. Right. So can you can you also explain the differences like in extract we have filter criteria and in formula also we applied. So so the main purpose of using the formula is so like if you see we are having a lot of formulas over here like filter. Right. For my date time. So particular condition like particular function if you want to use so that will be available here only. Exactly. Got it. With the help of with the help of any any predefined function. If you want to do some business logic if or if you want to implement some business logic then we will be using the formula tabs. Right. So can you please quickly recap whatever we have done because steps were too fast. So yeah it is. I think it is complex as compared to data right. So if you can like revise whatever you have done from the beginning. Yeah. So first of all we are getting all the accounts where active is not equals to OK. And in the formula tab what we are doing is whatever whatever data we are having in this account records. We are checking if account records colon active is equals equals. Yes. Right. Then give me the name otherwise give me the null value. Right. And whatever we are having what whatever we are having in this one we are saving the result path result path of this formula is account records. Right. So if I go to again accept first this data actor will give the data to this account records and in the formula. We are filtering out on that account records and the result part of path of this formula is this account records school and name. So right now the extract output path and formula result path are same. If you want to change it, you can do it. It is like if I do the name one right and let's say I'm going to say it account records colon let's say active one right and if I go here and if I change the okay I have to do this now. Account records name one and if I go to execute again I think I have to do this one as well one and review and execute. So if you want to if you want to change the result path of formula that also you can do it. And this account list can be considered sorry this account records can be considered as a list. Yeah exactly so that that is what I was about to come so let's say in your so like if I go to preview right so this query is giving me 24 results from accounts correct. So this formula will execute for 24 times so you are not writing any sort of for loop you are not writing any sort of any sort of code in your apex class but you are still able to loop through all your account records records which is fetched by your data right. So actually it is two level filtering first we applied like if active is not null correct if it is not blank so it might be having yes or no whatever value is available once those records are fetched then with the help of formula we applied one more layer of filter if active is yes in both the both the formulas so it will give us name and active field values. Exactly and then we updated our account records list again so that it will give us the specific records that we want correct and one more thing formula is optional right formula is optional you don't have to use it formula I mean if you want to do it add some business logic then you will be using the formula right got it like if I give you one more example we have this formula list size okay and if I go if I copy this and if I paste this one here right I will remove this and so this account records is a list right it is holding multiple account records and if I will in the result path I am going to say let's say account list size right and if I create a mapping of this one so like as you can see I mean in data after turbo extract we never created output mapping but in the data of the extract we have to create the output mapping because you can get result from anywhere from your extract path from your formula or from anywhere so that's why we have to create the output mapping manually so let's say if I am going to create a mapping for this account list right and if I go to preview and if I click execute right so it is giving me the list of 24 right and then that 24 records filtered because we applied formula exactly okay so yeah I think this this people can understand when they will be implementing yep so yep and there is one more thing I just want to I just want to tell around this requirement only so as you can see there is activity equals to yes right if I go to output again and if I go here so we have a few more things available in this output mappings right like output data type value is disabled is it is disabled means let's say you have created one mapping but later on you realize you don't want it so rather than deleting this mapping what you can do is you can just disable it so that in future if you require this mapping again you can just click this button and it will be enabled right so which what this output data type is you can let's say if you are patching some some date value right and you want to convert it into the string so you can select the output data type as string so if you want to do the parsing of data types that you can do with the help of output data type and if you blank null then it will be so let's say if your field is string then it will come as string if your field is numbered then it will come as number right and there is one more thing which is which is default value right so for example what we're gonna do is okay so let's say I am having some output from let's say active 2 so we don't have anything for active 2 right like if I go here and say active 2 so we don't have any value for active 2 and if I click the execute you can see nothing is coming because we don't have any sort of mapping for active 2 right but if I go here and if I let's say I'll write test in it okay and now if I go back and click execute so I'll be having active 2 as test so why this feature is given by the uvnie studio because let's say if you want if you're patching some records from account and on a particular field you don't have any sort of value populated on it but you still want some sort of default value then with this feature you can enable if there is no value on the record on that particular field still we will be getting this default default value with this mapping okay yeah there is there is one last thing that we will be seeing so in active 1 we have just value right now right and there is transform map values what it will do is so right now what we are getting is as yes right and what I want to transform it is active yes so what will happen is if you see in the in the active one we are getting the yes value so if you want to do some sort of you know pre transformation so whenever whenever this mapping will execute in the active one we are getting as yes and you want to transform your yes into active here so like if I go and execute it right I will get it as active here yeah so in in so in place of yes it is showing some different value different value so if you want to do some sort of transformation in your output mapping you can do it with the help of this transform map map values yeah it is okay it is useful I think yep so I mean these sort of things used when you are so for example let's say you are fetching you are fetching the country country codes from your account records okay and for example your country code is IND but in the output you want as india right so what you can do is you can just write over here is IND and over here is like India exactly you can create one more mapping like US USA and you can write here is like United States of America so that sort of transformations you we can do with the help of output mappings in data extract great I think it is it is very useful yeah so and and I mean with this example like I saw like for one field we can have more than one mappings as well right yeah exactly yes we can go I mean right now this example we have seen with the hard coded values right like if I again go where and if I type as just right and I'm going to disable okay we can we can keep it and if I go to preview click execute as you can see we are we have hard coded this way but what we want is we don't want to hard code this value because let's say if you are falling any sort of apex class from your LWC you pass some sort of dynamic value from your LWC you never hard put any sort of values in your apex class right so what I'm going to call it as active parent active parameter and from the preview now what I'm going to do is I'm going to pass the this parameter value from here and if I click execute I'm still getting the value as I mean all the accounts whose activity equals to us yeah I think it is similar to turbo extract that you explained earlier exactly because we should never use any sort of hard coded values over here the reason is if you will be using this data rector as a hard coded values in your filter criteria then if you are calling this data from your different two ip's from one ip you want to get the data whose activity equals to yes from one ip you want to get the data whose activity equals to no then you have to create a different data rector for getting the for getting the accounts whose activity equals to home but if you are using the parameter then what you can do is you can just pass the value into this active param and it will give the data accordingly whatever value you will be passing like if I execute it right now okay so it is here for no and formula we have yes so 21 records it fetched but because of this formula nothing displayed exactly so like if I go here and if I say no okay and similarly in the bottom one as well so okay so what we can do is what we will be doing is we will be using the same parameter in the formula as well okay so so that we will not not hard code this value over here as so input parameter can be used in extract filter as well as in formula exactly so it is kind of a variable that we can use any correct it is a it is a variable correct so if I go to preview you see we have all the accounts with no great yep and I think it is useful whenever someone wants to implement any data rector so they should use this input parameter instead of hard coding values exactly and I think in extract also you updated the filter so that's why account list size is three because here like at the time of extract we are applying active equals to yes so it is not querying 24 records it is just querying three records and those are shown here right so maybe in this case like if you remove the formula disable the formula then also result will be same exactly but in that case we just have to update the mapping record count mapping we need to keep yeah record count will be the same but like if you want to get the values now because previously it was coming from the formula now we don't have any sort of formula then we have to update the mappings right so mapping is important like if if you have formula then different mappings if we don't have formula then different mappings yeah exactly so like as you as you as you can see I have disabled both the formula then if I go to preview I'll still get down right so I think Sanjay for today I mean we have seen getting the data from your data rector extract with the single object and we have seen the difference between data rector turbo extract and data rector extract so I mean if if you have any sort of doubts and any sort of confusion that you want to know I think we already discussed all the things that people should know and maybe if you go to the slide so we can ask them like what examples that they can implement so do you want to show something else today or you want to cover them tomorrow I mean if we want to create one more data rector data rector we can do that say similar kind of example if we can quickly implement so that will help so from from this list like which which one they will be able to complete I mean I think all I think they can they can implement any each and every one okay so this this sorting can we add sorting in the existing data rector which we implemented yeah so let me go back to the arc again so you don't have to do anything you will be just going we'll go to your extract step and into your filter criteria you just have to add the order by and over here you just need to write ASC or DMS is similar to ascending on ascending order yeah ascending and ascending order yep I think it is yeah it is very simple and if we if you want to apply two conditions so I think you have to give the field name as well yeah exactly okay would see yeah yeah so name united is first then gen point and then abhishek yeah so it is in descending order perfect and if if I do the ASC then it should be the reverse order now right yeah it is it is showing data in ascending order now great and for multiple condition like if you want to apply and or so that is also similar to turbo extract you just need to click on and or and whatever condition we want we can apply right okay and I can see like if you go to the slide so I can see one more example fourth one so it says fetch id account name annual revenue of accounts were active equals to us it is same also fetch first name id of contacts where email not equals to null both will be fast and separate list so I think so this you want to demo today or tomorrow like yes I mean this thing I just want to demo it tomorrow because I mean tomorrow we will be seeing yeah multiple objects in the extracts got it got it so guys yeah if you can share the slide again so guys if you are following the sessions and if you want to practice so other than fourth one like first second third you can try and fifth one as well for fifth one I just provided some hint so you can just use that and fourth example like we'll be discussing in tomorrow's session because it is having two objects and it will be a little bit complicated so we'll be explaining it tomorrow so till the time if you practice remaining four examples and whatever demonstrations abhishek has done in today's session so that will help you out to understand how data raptor extract basically works and it is very much important right data raptor whole data raptor functionality is very much important if you want to become export and only studio right so do proper practice and I will try to create an exercise sheet as well that I promised you right so like give me a couple of days so by end of this week you will be having properly crafted exercise sheet so you can follow that you don't need to like pause the video so that separate document you will be having and session wise whatever we are demoing and whatever you have to practice everything will be have available in that sheet right and abhishek if you go to next slide so that we will be covering tomorrow as well like multiple objects right so lots of scenarios and it will help you out so tomorrow we'll cover multiple objects and then we have some more examples related to formula input parameter so everything I will be like providing you in additional exercise sheet so that you can practice okay so keep keep doing practice so abhishek there is one question Amar is basically asking can you say about default value one more time yeah why not okay so what we're gonna do is I will just go into my org and on the account records okay I mean that country thing we're gonna implement it so on the account object I'm gonna create a field where I'm gonna say there is like a and I'm gonna create this list as a pick list and like I'm gonna call it as country country and enter the values so for now I'm just gonna keep as IMD USA that's all I'm gonna click as next save it let's go back to the data adapter and I'll just refresh it one so that I'll get that field okay and now we go to the output we'll create the extract json count records and it should be country this one and account colon country okay so what will happen right now so whatever records that we have in our sales in my in this Salesforce environment right I don't have any sort of value on the country field right like if I go to this this account abhishek let me open the accounts this is I think this is the one and on to the details I'm gonna I'm gonna save the country as IMD save it go to go back here click execute so as you can see for the abhishek account the country is coming as IMD right now correct for the rest jenny point test and united oil and gas no country is coming right but what I want is my my business logic says if country is populated on the account record then give me that country if country is not populated on the account record then it should be a default country it should be defaulted to the India okay so what I'm gonna do is I'm gonna just simply write I and A in this default value okay and if I go to preview and click execute I'll get the country as IMD for the jenny point and the united oil and gas as well correct so there should there can be a business scenario where business will say if country is populated then give me that country if country is not populated then it should be defaulted to the India so this is the actual business logic that that can be in your any sort of claims requirement okay there is one more question some brahm is asking is extract jason path is sfdc field no extract jason path you can give anything this is your list name it is similar to your apex list yeah this is actually extract output path which is similar to list and in output I think we have jason output just extract jason path yeah so you will be using your extract jason path and then after colon you will be you will be using the api name of your sfdc field so this account records actually we created in this data rector only an active country name these are field apis exactly and at right inside in out under output jason path this active country name this name can be anything these are not exact api fields yeah I mean you can think it think it off it as wrapper class if you have worked upon wrapper class in your apex then what you have done is whatever is coming into your active you are giving the name as active whatever is coming into your country underscore underscore c you are having the output into your country only not underscore underscore c right and this active country and name which is available at right inside in second column under output jason path that is actually coming in the preview exactly meaning active and I think this will clear tomorrow in more appropriate way because we will be having two objects and like folks will be able to understand why this one one more jason is required right because in turbo extract we have direct list and that is being previewed but here we have extract list as well as we have jason output jason path so these two things are available here okay okay so just just watch the whole recording if you are following the videos because in today's session there was there was some catch where you just need to focus like you just need to implement it correctly so that you will receive the correct outputs so just follow video properly and try to do some exercises so abhishek can you just show those exercises once again so please take a screenshot of that and soon like I will be creating a document then you don't need to worry about the screenshots so today you can take this screenshot and you can skip number four and rest you can practice and if you face any sort of difficulty by implementing these so in tomorrow's session first we'll be covering those and then we'll moving to the multiple objects yeah okay so I think this is it for today thank you abhishek for sharing insight and I think people are really excited to learn omni studio I can see like asking questions relevant question and so I hope they are practicing as well last we guys are like someone was asking like is there anyone who completed all the exercises so people are doing practice as well and once this bootcamp will be completed so I I'm sure like it will be having huge number of views and people will be benefiting a lot with this okay so thank you abhishek keep on doing whatever you are doing for the community see you see you guys see you guys tomorrow same time with new things so do practice because if you are consistent then only you will be able to understand till last so data raptor is very important so do practice for all the examples so after data raptor we'll be picking ip and in ip also we will be using data raptors right so do regular practice so that your knowledge can be increased okay so with this note I take your leave see you tomorrow thank you everyone thank you abhishek once again thank you so much