 Okay, so hello everyone, I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. And I have Abhishek with me. So welcome Abhishek on the channel. So we have one more session on Salesforce Omni Studio Bootcamp. And this is the last session for data adapter scenarios. So this is session number five. And along with this session, like if you go through all five sessions. So one by one, like you will be able to implement all the scenarios that you understood as a concept in Omni Studio Bootcamp season one. Right. So if you have followed all those sessions, and if you follow these sessions, then like theoretically and practically you will become expert in Omni Studio. Okay. So with this note, like I want Abhishek to introduce himself. And then we will start the session. Yeah. So everyone, I hope you all are doing well. So myself Abhishek and I'm working as a Salesforce velocity developer in this community since five plus years now. And I have done some certification around velocity as well as the Salesforce. So some velocity certifications are like our Salesforce industries, certifications like Omni Studio developer industry, CPQ. And also I have one health insurance quoting developer certification as well. And some certification I'm done around Salesforce as well. And I'm a trailer double star ranger as well. So yeah, that's all about. Okay. So after this, like if you want to follow a telegram group where lots of folks are already connected so you can scan this QR code. And here you can find more than 4000 folks who are preparing for Salesforce or maybe already working in some organization. And along with that, like if you want to share any feedback or review, so you can share in the comment section. Okay. Okay. So with this, like, we can start with the scenario implementation. So in previous session, we understood like how we can apply insert operation using data rector load. So today you will learn how we can do update and absurd operations. Okay. So I think we can start. Thank you. So as I mentioned in the previous session for data rector load or data rector post, we have covered all the scenarios for insert operation. In today's session, we're going to see some implementations around update scenarios and absurd scenario where we will be updating a single single object record as well as the related objects as well. And also how we can absurd into the data rector load. There are various techniques by techniques and tricks by that we can absurd any record. So let's just jump on to the practical part and first, the first example that will execute is updating updating an account record with the help of data rector load. So we're going to create a record where we'll say, sorry, we're going to create a data rector and it would be like data rector load for update account records. Is it caught? So if you are following all the sessions, first step that we need to do is we have to select the object, which object you want to update. And in the fields section, you have to get the domain object field mapping. So let's say I want to update the account active field. And it will be mapped with active. And as we all know, whenever we want to update any record into the Salesforce, we have to pass the ID field mapping for it. So like if you're not passing the ID field, and if you want to try to update any record, then it would be not possible because if we do not have any ID, we cannot update any record. In that case, I think that record will be inserted instead of dating, right? Correct. So I mean, what we're going to do is we're going to create one more mapping for ACC ID and it would be mapped with the ID field. So as an input for this data rector, we have to pass ACC active and ACC ID. Okay. And if I go to preview, let's say first is active. Where we're going to say, let's say I want to update the value to yes. Second is ACC ID and ID. We're going to copy it from the any account record. Let's say I'm going to update this account. It was taken some time. So we can do instead here. We'll go to developer console and run a query. Okay. It can't open. Okay. So from the URL, we can get the ID of the record. And if we see the active field for this account right now, this is blank. So after our data rector execution, it should get updated with a yes value. And if I click execute, and if I go back to account and I'll refresh this record. So yes, we can see that the active field is got updated with the yes value. Right. Right. So yeah, this was single record update. Right. Right. So for example, let's say if you want to update multiple account records at the same time that also we can do. So first of all, what we're going to do is we're going to get all the, I mean like from this data rector, we're going to get the account records with their IDs as well. So guys, this is data rector extract. So what Abhishek is doing, he's basically running our data rector extract so that we can have some JSON created and that JSON he will be using for our data rector load. Correct. So and if I'll say I'm going to fetch the mapping for active field as well. So if you see list active, so that we will be knowing that what right now what value these are these records contain. So like no, no, and so yeah, I mean like there is only one record for that activities. Yes. So I'm going to copy this and if I go here and I'm going to paste this all the JSON data over here. And now we have to update the mappings into the field that because the JSON format changed now. So now what we're going to say here is a CCC list colon active. And for the ID, for the ID, what we have to do is a CCC list colon ID. And if I go to preview, so as we can open active is coming into the active underscore underscore C. So we have to create this map. And the ID is into the ID. And if I click execute, it will update all the accounts. And if I go back to the data rector extract and click execute. Oh, let's check into the. Okay. Because what happened the values are here. I mean like whatever value we are passing from the the preview tab that will show into the I mean like that will all that is that is the values that gonna get updated. Right. So we are passing no, no, no. So what I'm going to do is I'm going to change the all values to yes. So this is the part. I mean like these sort of data we always get from the either from Omniscript or flex cards. But right now we are just testing the data rector. That is why we are doing it manually. And now I click and execute. So one question Abhishek. Can't we modify in this input block manually. Yeah, we can do that. Okay. But I mean like I prefer Jason block because it's kind of easier. But we can do from this input block as well. Yeah, definitely. And now if I go to preview and click execute all active should be as right. Right. So this is this is the one for when you want to update bulk bulk records in a single transaction. And now if you go to the third and fourth scenario which is kind of relate similar to each other, we want to update the related related records as well. So for that, what we can do is again, we're going to get one data rector extract from which we can get the data for related records and number four, like a counter contact records. Yeah. Yeah, this parent to child. Yeah, child to parent. Yeah, it would work. I mean, okay. But child to parent. We won't be. Okay. Yeah, that also like account name we can modify. Right. If I click execute here. Yeah, it is giving. So we can apply some filter like account ID not null. I think there is some contact. Okay. It's my bad. It should be added filter. Yeah. And condition where account ID not equals to should work with this. Yeah. So these all accounts we got. Also we can do one thing in the output mapping. We can get the contact ID as well. So that if you want to update contacts, we can do that as well. Contact ID execute. Okay. So as part of output, what we are receiving here, account name, account ID, contact last name and the contact ID. So I'm going to copy this one. And you go to the same. Yeah. Now whatever we modify in this output that will be like in this data after load, whatever we modify in this Jason, it will reflect in the org. Right. Right. So for updating the related record, we're going to create one more ad object of step. And let's say now my output is like, it's kind of like that. So for example, let's say I want to update. So what I'm going to do Sanjay, I'm going to just remove some records from here. Right. We can focus on specific ones. Yeah. So for these two records, what I'm going to do here, or let's say. Maybe you can add something in the account name. Yeah. So here we have two accounts where first is this. And I'm going to add the test for accounting. And for the contact last name, I'm going to do, let's say. Test call. Okay. I think one. So these two curly bases, they're line number nine. If you see. Yeah. Okay. Yeah. So we are updating account name and last name. Yeah. Account name and the last name. And if I go to preview, I'm going to paste it over here. So again, we have to update the mappings. So for the account, what we have to do here is account name and all data is coming into the contact node. Contact colon account name. And it should get updated with the name. And for the ID, what we have to do is contact colon. So I think it's account ID, right? And into the contact one. We're going to, first of all, we're going to create the mapping for ID. ID. And the other one is for the last name. So total four mappings will be required. Yeah. Last name. So what will happen? I mean, like in this array, we have to record two objects. So this will execute for twice and separately it will execute the account and all the contact for each. So as we can see, two contacts and two account has been updated. And if I go to again, this data actor. And if I click on execute. So this edge communication become test. Oh, my dive. So this edge communication become test. And this other one is also became test. And if you can see this Rogers became the test con. And for this one as well, the mapping have been updated to test. Right. Yeah, I think it is very simple. We can have Jason and if in Jason, we modify some data. So this we are doing for testing purpose in real time. In data after load data will be coming from either IP omiscript or flex card. And that will be in recent format. So whatever data we will be having basis on that it will work. Okay. So I mean, kind of we have covered this four scenarios for the update. Right. Where we have just hard coded the ID field for all the records. And we are updating the records. Now let's say I don't have the ID field. I mean, this, this is not possible. This is not possible into the apex. The functionality which, which I'm going to explain now. But it is possible into the data actor and how it is possible. It's, so we're going to create another data actor. Before, before that, Abhishek, I have one more question in my mind. So we are, we are putting Jason in the input. So when we will be receiving input from IP omiscript. So do we need any input parameter kind of thing that we implement an extract or extract into the load, like key value pair we need to create, or we will just expect the Jason, whatever mapping we are creating. So if I'm in like answer to your question, Sanjay would be like, so for example, here we, we have created this map, this map colon account. Right. So my question is if I, if I have a Jason, we are ID name and any other field is also included. So what will happen? How it will work. ID. Okay. Other than this ID and name. I'm passing a Jason where three fields are available. Two are this and one is other than this. So there will be no impact. If you're not creating the mapping of it, it will, it will do nothing. Okay. It will be ignored. So whatever mapping we are having here, those will be impacted only. Correct. Okay. And if we, if you go to preview ones. Okay. Okay. So here we don't have any key value pair mapping it, it is totally dependent on the Jason input. Right. Okay. So whenever we will be creating, I mean, like, we will be using this data rector into the IP or open script. Right. So we have to pass the data in this format only. Right. Otherwise, if you pass the data in some other format, then you have to edit the data after according to that format so that it would be compatible. Right. Right. Understood. Yeah. So, yeah. So coming back to the absurd scenario where there is a new feature that have been introduced by data after load where let's say, for example, in your input Jason, you don't have the ID field. Okay. You don't, you don't have any ID field in your input Jason, but still you want to update the data. And if, for example, let's say I want to update the data. If I found the similar name. So for example, I don't have this ID field, but I have this account name and according, according to that account name, what I want to do is I want to update the name of this account, a basis on this account name. If I will be able to find any account with this name, then it should get updated. And if I'm not able to find any sort of account with this name, then it should get inserted automatically. Okay. So instead of ID, other than ID, we are picking any other field. Right. So that sort of functionality is available into a data after load. So if we see the example for this one. So let's say I'm going to call it data after absurd account. So basically the functionality which you are going to explain, it is not available in Apex. It is only available in Datarector. Yeah. I mean, what we can do is, I mean, we can build some logic into the Apex for achieving this sort of functionality, but that would be a custom solution out of the box functionality is only available into the Datarector. Right. So here I'm going to say from the data input, I will not pass any sort of ID for this account. Okay. And let's say I want to update the active field for this account as communications test. Yes. And I'm going to remove this one because we don't need it. And what we're going to do is we're going to open this account and see the actual value for active right now. What is it? We're going to go to accounts. And for the active right now we have done yes value. So from the data after we're going to update it to no. And now the question arises if we do not have the ID field into the input parameter, how we can update so the technique or the trick is you go to your mappings, create the mapping for your account, I mean like account name and here it would be name. And there is a checkbox called absurd key. Okay. If you check this checkbox, okay, so what will happen? Data Raptor will first try and find account with the name of this as communications test. If data Raptor will be able to find the account with this name, then it will update that account. And if data Raptor will not be able to find the account with this name, then data Raptor will create the account with this. Right. So at the back end kind of there are two things are happening. This data Raptor load is I mean like executing a data Raptor extract first, then it is executing the data Raptor load. I mean like we haven't created any sort of data Raptor extract for this one, but at the back end for this data Raptor load, this is happening. So I'm going to create the mapping for this one and I think we enabled that checkbox. So I can see a symbol. Yeah. This one. And there is one more thing. Okay. First we'll execute this one, then we'll see that. And if I go to edge communications and refresh it, you can see it's an owner. Okay. So let me go here. And also you can see into the debug logs as well. It has executed a query first. I mean like if you do a normal data Raptor load for the update or insert, there will be no queries. But as soon as you check this checkbox, the data Raptor will execute the query first and we'll try to get the ID for it at the back end. Okay. Okay. So there is one more checkbox for this absurd thing is required for absurd. So for example, let's say if I have selected this checkbox as well, now what will happen? If I will not pass this mapping into the input parameter, then absurd will never happen. Okay. So although we have the account with this name, but absurd will never happen. It will always answer. Okay. Yeah. So this is yeah. It is required. So it should be there in the JSON. Correct. And there is there is another functionality for this absurd thing. I mean like right now we have checked this checkbox only for one mapping. If you will select any other mapping also and check this checkbox absurd key, then it will create a combination of those two mappings and we'll try to find a unique account with this combination. Okay. So account name and this active if both are same, then only it will absurd otherwise it will insert. Okay. All right. Yeah. Interesting. Yeah. I mean like this will be a bit confusing when you will see the session, but if you try to practice yourself, then it would it will make sense to you. So now we have the last last scenario for the data rector load, which is absurd using the lookup. Upset using it is lookup. So when you are upsetting an account or when you are upsetting any sort of record. So first feature we have seen with the ID field, you can update with this checkbox you can absurd. There is another feature also called which is called as is lookup. And what does that mean? So let's say for example, okay. I want to update the contact as well. So give me a second. I'm going to make it to this to contact and in the field parameters remove all the mappings and in the preview we're going to copy this past all of this and let's say I have this and I have this. So basically you can assume that you want to update the contact record but you don't have the account ID and also you don't have the contact ID. Okay. So in that case, what we can do. So for example, now I want to update the last name to test on one for this contact. So what I can do over here is I'll go to fields. First of all, I'm going to create the mapping for the last name for obvious reasons. And after that, I'm going to create a mapping for getting the contact ID. So here what I'm going to say is so first of all, I'm going to check this checkbox is lookup. So what it will do is what I'm going to do is like with this account name, I'm going to get the record ID of contact and how it will happen. So in this account name what I want to do here is okay, sorry, not is lookup. Here I'm going to say which lookup field you want to check is account.name and which field you want to get the ID. So it would be a bit confusing but now what will happen this account name will get passed to this mapping which is account name and then it will execute a query where the query would be like the query would be like it would be like this select ID from contact where account.name is equals to the name which is the name which we are passing. So this is lookup is going to query this one. We are passing the account name and we are querying the contact ID with the help of this account and whatever field we are getting as an output of this query we are mapping with the domain object. Okay. And if I go and execute it it won't devise that. In select it is duplicate record. No, I think duplicate record. So let me delete one. Or maybe we can pick any other account record. Yeah, that also we can do but let's just do this one. But I have only one record. Okay. Just two more seconds. Related IDs. Oh, okay, okay, okay. On this account I have two contacts actually. Okay. So through contact it is searching multiple times. Right. So let's say I'm going to delete this contact for just now. Okay. This is also and now we're going to delete this Sean Forbes and if I go here and I execute it now the contact has been updated and if I go here and if I refresh this so the last name is updated with the test convert. Right. But it is a little bit tricky. Yeah. So you just need to understand understand the concept of inner query. That's all. Yeah. So basically I mean like whatever input you are getting you are passing you are kind of searching and record with the help of that input. Right. So object can be anything. So it should be related to that. So, okay. So basically what what is happening Sanjay here is when we use the is absurd key. Right. So finding the ID value data rector was doing is his job. Right. Now we are doing. Now we are doing that job. So that's the only difference. Yeah. So yeah, I think that's the last scenario for today's session. Okay. Yeah, I think it was good. And I think now we have five sessions where we just focus on the scenario implementation. So it will really help folks. Those like in previous season we we explained very less scenarios. Now in this season we explained all the scenarios. So I think it will brush up their knowledge and it will help experience folks as well. Those who want to like work in industry cloud area. Because only studio is demanding there. Okay. So yeah. So guys if you are following all the sessions, please share a review or feedback. And sometimes like I take a screenshot and I share with Abhishek as well so that he can feel some motivation. And yeah, along with these sessions, like we are doing some in person trainings also. So like here we are we are explaining things, but there might be chances like you are not getting things. So in in SZTS like job readiness training program. Omni studio is a part. Right. So they're like Abhishek is partnering me. So he's also delivering those sessions along with me. So they're like we are we are guiding you if you're if you're having any questions. So immediately we help you to resolve those questions. So if you are good in self-learning, so I think these sessions are enough for you. But if you need some mentor who can guide you, then you can join those job readiness training programs. Okay. So thank you Abhishek for delivering the session. And next week I think we can focus on IP. And after that we can do some projects. Okay. So this is it for today. Thank you.