Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So this is day 61 of Salesforce Learning Bootcamp and today we are going to discuss more things related to integration. So I have Ankit Jain with me. Welcome Ankit on the platform. So Ankit will be delivering the remaining topics of integration. So I hope you attended yesterday's session or if you missed you watched the recording and now you are good with the introduction to integration. So I invite Ankit to introduce himself. So Ankit please go ahead. Thanks Sanjay. Hello everyone. Hope you all are doing well. Again good morning, good afternoon. Based on your geographical location. Quick introduction of mine. My name is Ankit Jain. I am a Salesforce architect. Moreover I am also a certified instructor as well as I am a corporate trainer too. I do have more than 10 plus years of experience in the Salesforce ecosystem. Moreover I do have the experience to deliver the trainings to the corporates for more than 20 or 30 plus clients. I deliver the trainings on integrations as well as on the PD1, PD2 and on the numerous topics. In addition to that I am quite active on the stack exchange as well as on the developer community. I would appreciate if you guys please connect with me on the LinkedIn and follow it to me on the LinkedIn. I do share the good takeaways on the LinkedIn too. Thank you. Okay. So thank you Ankit for introducing yourself. So moving forward, Ankit please next slide. So if you want to become part of Salesforce community where lots of business are connected and helping each other solving their problem. So you can just scan this QR code and you can join the telegram group and become part of that community. And as you can see this week is dedicated for integration. So this week and next week Ankit will be covering all the aspects related to integration. And after those two weeks we'll be starting next phase of this bootcamp that is front end development which will be containing lightning aura component as well as lightning web component sessions. Okay. So please follow Sanjay Gupta Tech School on YouTube, LinkedIn, Instagram, Telegram and all the important links are available in the video description. And do follow Ankit because Ankit is learning new things and if you follow him so maybe you will get to know lot more things through him. So he is active on LinkedIn. So please follow him and you can just learn whatever he is doing for the community. Okay. So over to you Ankit. Just start the session and thank you Sanjay. So folks yesterday we talked about what is integration, moreover we discussed what are the different benefits that we get with the integration. Of course that we talked about the different approaches that we can use on the integration. We talked about the data level integration, process level integration as well as the virtual integration. Moreover we also talked about the different patterns available in the integrations as well. We discussed the different patterns available in the integration. Of course that we also discussed the timings that are important in the integration. So we do have the synchronous as well as the synchronous timing that also we discussed. In addition to that yesterday we also discussed the slow of integration. As I mentioned yesterday there can be two directions of integration. One is outbound integration and second is the inbound integration. So based on the outbound integration and the inbound integration, the approach that you have to follow and the timings that you have to use for the integration, you have to decide which pattern will be suitable for your integration. Right. Now we'll take one step further. We'll go and discuss about the web services. Yesterday also we understand a few of the terminologies that we frequently used in the integration where we discussed the web service. Now let's go and take one step further and talk about two very common web services that we very frequently used when we perform the integration. First one is the top web service and second one is the rest web service. Now the question comes when to go for the SOAP and when to go for the rest. Another question is what is SOAP and what is rest. So let's try to decode this. SOAP basically stands for simple object access protocol. Again I'm repeating SOAP stands for simple object access protocol. As the name says it's a protocol. However rest it stands for representational state transfer. Again rest is not a protocol. It's an architectural style that we use to perform the integration. SOAP is a protocol. REST is an architectural style that we use to perform the integration. As SOAP is a protocol SOAP is considered more secured as compared to the rest. If you are dealing with highly secured transactions then you should use the SOAP. Then you should use the SOAP. However there are few limitations that we do have with the SOAP. One of the limitation is SOAP only works with the XML language. SOAP only works with XML language. However REST is quite flexible. REST works with both JSON, XML and multiple other formats like HTML as well, Linux as well. However the SOAP only works with the XML language. It does understand the data in XML format only. Next thing is SOAP it is bit bulky because of which the processing time of the SOAP is bit higher as compared to the rest. And that is the reason SOAP is considered as slow as compared to the rest. However REST performance wise is much better. As in most of the times when we send the data on the REST we either use the JSON format or the LintTest format. There are multiple parsing methods which are available in both JavaScript as well as in the Apache classes with the help of which we can easily perform the operations on the REST. However for the SOAP also we do have the methods but the support is quite limited as compared to the rest. And because of all these different factors most of the organizations perform the integration they choose REST over the SOAP. But again as I said different architectures have the different requirement. If your architecture demands high security definitely the architecture can go and prefer to use the SOAP over the REST as well. It is completely up to the architectural decision that is coming up whether you should go for the REST as well as for the SOAP. Moving toward the next part let's go and try to understand few configuration things in the Salesforce with respect to the integration. Let's go and try to understand few configuration things in the Salesforce with respect to the integration. The first one that we'll be talking about here is the remote site setting. What is remote site setting? Whenever you have to perform the integration either you are doing the integration from the visual for pages or you are doing the integrations from the JavaScript file of a Thora or you are doing an integration from the JavaScript file of a Lightning Web Component or you are doing an integration from the Apache classes. Whenever you are doing any type of integration from any of the different mediums you have to go and register the endpoint where you are making the integration. It is mandatory in the Salesforce whenever you are making the integration with the third party system you have to go and register that URL. Where you will go and register that URL under the remote site setting. Where you will go and register the URL under the remote site setting. Moreover in case you are doing the integration specifically from the Lightning Web Component or from the Thora in addition to remote site setting you also have to go and configure one additional thing that is referred as the CSP trusted site as well. Although Salesforce does not recommend that we should go and perform the integrations from the JavaScript file because of the security results. And because of this most of the architectures they do prefer to perform the integration from the Apex only. Moreover it is also considered as the best practice to perform the integrations from the Apex and not from the JavaScript end. Let go and see how we can go and configure the remote site setting and what all the different parameters that we do have while configuring the remote site setting. So again I am in my org here this is a test org that I have created here and I am on the setup page here. To configure the remote site setting you have to go to the quick find and here you have to search for the remote site setting. Here you have to go and search for the remote site setting. To create the new remote site setting here you have to go and click on new remote site. Here the first thing that you have to provide is the remote site name. Again you can give any name here. Elseforth does not take this name although it is mandatory but you can go and provide any name here. Let's say I am putting the name here here. You can go and put any name here. Another thing that we do have here is the remote site URL. In this remote site URL you have to put the end point of the system with which you are making the integration. In the remote site URL you have to put the end point of the third party system with which you are making the integration. Let's say here I am making the integration with the API layer. This is my end point so I am putting this end point here. Again you do not have to put the complete path even though you put the platform will trim and keep only the home path for the end point. Even though you put the path will automatically trim and put the home path for this end point. Another thing that we do have here is the disable protocol security. If you go and enable this enable protocol security, right? Salesforce will not check whether the data is coming up from the HTTP or STTPS. Salesforce will not check whether the data is coming up from the HTTP and the STTPS and there will be security implications. If you over over this information icon, Salesforce clearly mentioned that we should check this check box only when we completely understand the security implications of the disable protocol security. Because it does compact the security of an integration that is the reason Salesforce does not recommend that you could go and check this. But again if you do have that kind of a requirement where the user connection can be over the HTTP or over the STTPS definitely you can go and check this check box. By default the user connection if you are not checking this the user connection will be considered over the secured HTTP that is nothing but the STTPS. Another thing that we have to go and specify here is the description. You can write down the purpose for which you are making the integration. Let's say the purpose that I am putting here is to integrate with API layer system. Let me show this in case you guys are not getting it all the different parameters that I have put here. I have put the remote site name followed by that I have put the remote site URL also I have put the description as well. This is how you go and configure the remote site settings. If you can zoom in more so it would be more clear. Yes, now it is better. Let's go and talk about the further topics. The next one that we do have here is the name credential. The next one is the name credential. What is name credential now? We understand the remote site setting that we have to configure to avoid or to white space or to whitelist the endpoint so that we can do the successful integration. Now what is name credential? You can say name credential is an advanced form of a remote site setting. You can say that the name credential is an advanced form of a remote site setting. With the remote site setting we can only go and put the endpoint which we are connecting. However, with the name credential along with the endpoint we can also pass the authentication parameters as well. With the name credential we can also pass the authentication parameters as well. And you can go and do this in one single operation. Before the name credential, what used to happen? The developers will be using the remote site setting. And in case they have to put the username and password, they are either putting the username or password in the custom metadata or they are putting the username or password in the custom label. As they are putting the username or password either in the custom metadata or a custom setting or a custom label as the password will be visible to the admin and it does raise the security flag. When you come this again the name credential will be very helpful. Whenever you are configuring the username and password in the name credential the password will be encrypted automatically. The password will be encrypted automatically. Again, in case you are using the name credential there is no need to use the remote site setting. In case you are using the remote site setting for the authentication you might have to write down the additional logic but in case you are using the name credential and you are implementing the OAuth authentication or the password authentication or different types of authentication, in such scenarios you do not have to go and write down the additional logic. You just have to go and define all those configurations in the name credential only. You just have to go and define the name credential only. Since in the latest release Salesforce have introduced the improved form of the name credential as well. In the latest release Salesforce have introduced the improved form of the name credential as well which is considered as a more extendable as well as the more customizable too. Which is considered as the more extendable as well as the more customization too. Now the question comes in what all scenarios the name credential will be helpful. The name credential will be helpful whenever we are making the call out from the Apex, whenever we are accessing the external data resources or we are accessing the external services as well. In such scenarios, we definitely use the name credential. In such scenarios, we could definitely use the name credential. Now, how to define the name credential? Let's say you have created the name credential. Now, how to use the name credential in the best classes? To use the name credential, you have to follow this approach. You have to first specify the call out, followed by the colon, followed by the name credential name. This is your name credential name, followed by the path, whatever the path that you have to provide. In the name credential, we only specify the home path, but in case you want to access a specific path, then you go and put all those path here. In case you have to pass any parameters, you can also go and put the parameters here. This is how we go and refer the name credential in our Apex program because we have to perform the authentication as well as authorization in the Apex classes with the help of name credential. So we have to specify which name credential we are using and how we will do that. We will specify the call out, followed by the colon, followed by the my name credential, followed by the whatever the name credential that you have to define here, followed by the slash, followed by the end point with which you want to integrate and followed in case you have to pass any parameters, you can pass those parameters here. Let's go and find out how we go and define the name credential in our system. To define the name credential, what you have to do here is here, you have to go and use the name credential. In the setup menu, you just have to search for the name credential. As I said, this is the latest one that Salesforce have introduced in the latest list, which is considered as the more extensible and the more customizable. But for this demo, I'll be using the legacy one only, that is the old one. To access the old one, you have to just click on this button and click on the legacy one. So here, what you will do, you will go and specify the label. Let's say here I am specifying the label as the my credential, right? Again, it's a label you can put without namespace as well, it's completely up to you. Again, here, what you can do, you can go and specify the endpoint where you have to make the integration. Let's say I have to go and make the integration with the gmail.com. So I can go and specify that complete endpoint where I have to go and make my integration. So here, I am putting the gmail.com. Now, the next thing is here, you have to specify what kind of authentication that you have to do. We do have the different types of authentication here. We do have the anomalies. In case for each user, you want to set a specific authentication, then you can go for the per user. In case for the system authentication, you can use the name principle as well. In case your system is dealing with the certificates exchange, then you can go and upload the certificates from here. And after selecting the name or principle, again, you do have the multiple authentication protocol that you can use here. Again, in case your integration system, it is not using any authentication, then you can use the no authentication. In case they are using the OAuth 2.0, you can go and specify the OAuth 2.0. In case of OAuth 2.0, you have to go and specify the authentication provider. You have to define the different scopes. I'll be taking a separate example for this when we do the demo session, or integrating the two different Salesforce org. Moreover, you can also go and define the password authentication as well. In the password authentication, you can go and put the username and password. And as I said, if you are using the username and the password, if you are using here, the username and password, the password that you are putting here, it will be stored in the Salesforce in the encrypted form. So that admins, they can see the username, but they also cannot access the password, right? This is one of the reason that the name credential got famous in the past. Definitely, authentication is the one way, but the additional functionality it does offer is, it stores your password in the encrypted way. So you do not have to go and put the username and password in the custom settings, or in the custom metadata, or at the custom label level, right? Moreover, there are two different call out options that you do have. Based on your requirement, you can go and select these different options from here. Once you go and define all those parameters, go and click on here, your name credential will be, right? Let me take a pause and open up for the question. Let me check which question we do have. So guys, if you have any question, you can just ask in the chat. Asif asked, where we'll get the endpoint? Again, whenever you are making the integration with any third party system as it, we generally get the documentations from the third party system, and they will let you know what endpoint that you have to connect, what type of API that you have to use, whether you can use the REST API or SOAP API, they will share all those details with you. Switching, URL mapping we do when we go and create the OPEX REST service. OPEX REST service, it is for the inbound integration. Whenever we go and configure the remote site setting and the name credential for the outbound integration, right? So in the case of inbound integration, there is no need to go and define the remote site setting or the name credential. Whenever you are making the outbound integration, then and then only you have to go and define the remote site setting and the name credential. Next one is name credential, and they are used when we call from a software. When I already answered it, sorry, sorry, it's available. Now, Phyrus, which protocol you have to use? Again, whatever external system that you are using, we will give you the proper documentation, which protocol that you have to use, right? In Salesforce, to make the connection, generally we use the OAuth protocol. Each and every integration that we have to do, they generally provide a complete documentation. What is the endpoint? Whether you have to use the REST API or the SOAP API, what kind of authentication mechanism that you have to use? Generally, we do have the different types of authentication mechanism. We talked about the OAuth, we talked about the username and password. Generally, people also do use the API key authentication as well. Moreover, if you're accessing the public API in such scenarios, there is no authentication. So they will put all those details in those documentation. You have to use the, again, to answer the youngest question, we have to use the name credential and the remote site setting whenever we are making the outbound integration. That means, for example, let's say we do have one system as the Salesforce and another system as the Oracle. If we have to call any third-party service from the Oracle, then we have to go and put the endpoint of the Oracle. We have to go and define what kind of authentication mechanism we are using for the Oracle. So that is where the remote site setting and the name credential will come up. Yes, Vinay, we have to use the name credential for callouts or when we need any type of security whenever we are making the third-party integration. So community portal also considered as integration. No, community portal, they are integrated inside the Salesforce. It is not considered as an integration. But from the community portal, if you are making any integration with the third-party system, then you have to do all those configurations. I'm not understanding your question, Vishal, how to enable the external credential. I think we'll be talking about the tool that we have to use as we move forward. But we'll most probably cover the portman as the tool. Yes, Sanjay. Yeah, I guess Vishal is asking about the second tab, which is beside named credentials. Okay, external credential. No, I have no idea on this one, Vishal. I never used it as of now. I do not have any clue on this. Okay, let's take further. There is one more question. I will share the few APIs that you can definitely use for the testing. If I had to take one API, for example, let's go and talk about one API because most of the people do have a confusion. How we'll come to know what kind of authentication mechanism that we have to use, what type of API that we have to use. So for the demo purpose, let me take one of the API, that is the NumVerify API. Okay, whenever you have to make integration folks, generally you will get this kind of a detail where you always have a documentation about the integration that you have to perform. Trust me folks, each and every integration that we do, all integrations are unique. First, you have to understand their documentation, what they are asking in their documentation, and after that, you have to go and start implementing the integration. In case you are making the integration with your enterprises applications, then you have to ask another team to provide the enough information before you go and initiate your integration. So for the demo purpose, I am showing you one of the API, that is the NumVerify API. What this API will do, this API will validate the phone number. In case you are passing the phone number, if phone number is correct or not, this API will do. Let's take one example here. Okay, so in Salesforce, at the contact object, let's say the user have put the, for example, let's say here we do have the contact object, in the contact object, user have put the phone number. But in Salesforce, we do not have any mechanism where we can go and validate whether the phone number is a valid phone number or an invalid phone number, right? So how you will come to know whether the entered phone number by the user, it's a valid phone number or an invalid phone number, right? Let's say you are taking these entries either from the digital experience or you are a sales rep, they are putting all those details here. One of the details that they are also putting here is the phone number, right? How you will come to know the phone number that the sales reps are putting, it's a valid phone number because in Salesforce, I can go and store the phone number, something like this as well. I will not get any validation error though. You can see here, I am saving the phone number, something like this. It's completely an invalid number. So how we can validate? So let's say business have proposed that you go and use this API to validate the phone number. So what is this API? It's a NumVerify API. For the first thing that you have to do here is you have to navigate to this API and create an account. Again, if you go over the pricing, this API is free for the practice as well. You can see it is free for the lifetime. You can make the hundred request monthly on this API. Again, no credit card is required. So you can directly go and create your account on this API, right? Now, what this API will do? This API, it is using the REST API. You can see here, everything is written in the documentation. This API, what it will do? It is using the REST API, right? Again, what they are dealing with, they are dealing here with the JSON type of information. If you move to, if you move downward, here you will see, they will first talk about the authentication. So whenever you are using this API, how you will do the authentication? Here, they are using the authentication as an API key authentication. What they are doing here, the authentication as an API key. So when you go and register for this one, what you will get first is the API key. Like this is the API key that I am getting after I go and sign them, right? So whenever I have to make the integration, what I have to do, I have to go and use this API key for the documentation. Now, I can go and store this API key either in the custom settings or in the custom metadata or in the custom label. That's completely up to me. Or I can also go and hard code. Generally, we don't hard code. We go and store this information in any of the admin tools that we do have. Again, if you follow their documentation, they further say that, what endpoint that you have to connect. If you see this, right, here they have put the endpoint where you have to make the connector. This is the endpoint where you have to make the connection. It is the complete path that you have to follow. It is the complete path that you have to follow. This is the endpoint and at this home path, validate is the location where they have posted their service and here you have to pass the authentication key that we are getting after we go and sign them. So this is where I do have the authentication. Moreover, in this documentation, they have also provided how to use this service, right? What all the different parameters that you have to pass. Everything is written very well in this documentation. You just have to follow the documentation and understand what all parameters that we have to pass. For example, here we have to go and use this validate along with that the first parameter that we have to pass here is the access key followed by that the next parameter that we have to pass is the phone number. So what it will do, it will go and hit this API and it will validate the phone number. Moreover, these are the few mandatory parameters that you have to pass, right? In addition to that, you can also pass these optional parameters as well. In case you want to validate this phone number for a specific country, in case you are expecting the value in the specific format, you can go and put all those details here. You can see here, once you go and hit the API, you will get the response of this type, whether the entered phone number is a valid phone number or not, right? You will get the response of this type, right? In case your authentication is filling, then you will get the response, something like this, where you will be getting the code as false. In case the phone number is missing or the phone number is having some special characters or if the service is down, then you will get the error code here. Again, I'll be talking about the error codes separately, but this is how generally we do have a documentation. You can go and pick any API. Let me pick another API for the demo purpose. Let's say this is another API that we do have. It's a spinocular API. This API, what it will do? Here, the API will suggest a recipe for the different items that you want to cook, okay? Again, like every documentation, like every API, this API also have a documentation. You just have to go over their documentation. You have to understand what kind of authentication mechanism that they are using. They will be putting the different endpoints here. You can see they will be putting the different endpoints. What kind of content that this API can access, like the JSON content, what are the different parameters that you can pass? All those details are available here, right?  Again, this is also an API key authentication. This is also an API key authentication. So again, this is your endpoint that you have to go and hit. Everything is available in this documentation. If you follow this, this is the endpoint that you have to hit. This is the API key that you have to use to perform the validation, right? And whatever the different endpoints that you have to hit, for example, you have to go and search the recipe, right? And while searching the recipe, you have to specify the cuisine or you have to specify the diet. You can go and pass all these different items, right? Whatever the items that you have to pass. Again, they are specified here, what all the different items that you have to pass. They have given an example. In case the field is closed, close means we have to go and pass the specific values that also we can figure out from here, right? And what it will return, it will return you the list of items, right? So this is the kind of an API that we have to hit. For example, if I'm hitting this API, again, this will not work because, this will not work because I have to go and sign in for this API. But if you go and create a sign in and you are hitting this API, you will get the response something like this, where they will be talking everything about this recipe, right? What is the title of the recipe? What is the image of the recipe?  You have to hit the API. Once the integration is successful, they will return you the JSON. Now the next job is to pass this JSON and get the information out of the JSON and put it on the UI or store in the database according to your integration requirement. I hope now most of the concepts are clear to everyone, right? What is endpoint? How to identify the authentication? You pick any type of integration. For example, you have to go and use the car API search or you have to make an integration with the LinkedIn or Twitter. Go and pick any integration. Every integration, you will see the documentation where they will specify the kind of authentication that you have to use, the endpoints that you have to use, what all the different methods that you have to use, what type of integration that you have to use, whether you have to use the REST integration or the SOAP integration, they will put everything in their documentation, right? So in case you are making an integration in your enterprises applications as well, like one of the folks has been asked, like if you are making the integration with the ERP, right? Then Sachin, you have to go and sit with your ERP team and understand what type of request that they are expecting, right? What type of integration that they want you to build? What type of, what is the endpoint where they have to go and hit your system? You have to ask all these questions to your ERP team and once you have the answers for this then and then only you can start building your integration. Again, I'm repeating folks, every integration is a unique experience. In every integration, we have to go and do something differently. And the key thing for, to build any integration under their documentation, you can try with these different APIs that I have referred, like the Punacular API or the NumVerify API, or you can search for the public APIs. There are different public APIs that are freely available. Just go, Google this public API, you will get the lots of public API that you can use for your testing. I'll just share the few with you, but if you go over this, just look for the public API here and go over this GitHub link, you will get one number of public APIs that are available that you can directly use. For every API, they will do all the different types of details that you have to build. You can see that there are different types of APIs that are available.  You can see your authentication is the API key, API key, API key. If you observe, it does not require any authentication. Just go over that API and you can understand their documentation and start building it. Moving toward the next one, that is the connected application. As of now what we are doing, we are making the integrations with the third party system. Right? Now let's say there's a third party system that wants to make an integration with your system. What you will do in such scenarios? In such scenarios, you will go and create a connected application in your system. In the connected application, you can go and define what type of authentication as well as the authorization mechanism that the third party system should use. Right? In case you are implementing the single sign-on for your org, then also you have to go and use the connected application. So there are primarily four different use cases where you generally go and use the connected application. First one is if you have to integrate the external app with the Salesforce. Right? Let's say the V2 have the external app available. Let's say Oracle is the external app. And now this time Oracle is sending the request to the Salesforce. Right? Now what kind of data that Oracle can access? What kind of authentication mechanism that Oracle should use? You have to go and define all those details in the connected application. Right? The next thing is you have to go and define the, another use case is you can go and use the service provider. You can, your connected application can also be act as a service provider. There are different types of provider like we do have the authentication provider, we do have the service provider. Right? You can also use the connected application as the service provider. For example, let's say you have created one application and you want that user should login into that application with the Salesforce credential. In such scenarios, we go and create the service providers in the Salesforce. I will show you how to, we can go and create the service provider in the Salesforce as a part of demo. Right? Moreover, what kind of data that a system can access? As a given example, Oracle system wants to connect with your system. Now Oracle could access what kind of a data that also you can define in the connected application. And the last thing is to provide the authorization for the external API gateways. External API means basically, let's say you are using the Mulesoft as an external API. Provide the authorization to the external API gateway. Like we'll be using the Postman. Postman is nothing but again, an external API gateway. To provide the authorization for these different applications also, we go and create the connected applications in our system. Right? So how we can go and create the connected application in our system? So to create the connected application, what you have to do here is again, you have to go to the setup here. Sorry, you have to go and search here for the app manager. My bad. Like from the app manager, we go and create the Lightning application. Similarly, from the app manager, you can also go and create the connected application from here. You can give any name to the connected application. Let's say I want to create this connected application for the Oracle ERP. So I am giving the name here as the Oracle ERP. Right? Contact email. You can go and define your contact email here, whatever the contact email that you want to use. Make sure you're putting the correct email address because as soon as the connected application will be created, Salesforce will send an email to you on the email address that you are configuring here. Next thing is the phone. Again, it is optional. You can skip that part. In case you want to have the logo, you can upload that logo from here. You can either upload your own logo image for the application or you can choose one of the sample logos that Salesforce is offering. Let's say I want to use here the logo of an Oracle. So I can go here and search for the Oracle. I'm not sure whether we do have the logo for the Oracle available in their sample, but let me quickly check. We can use any of the different logo. Let me check if we do have the logo for the Oracle system available here. Or let's say for the time being, I'm using the logo of the SAP. So these are the two URL that I have to use. I'm just renaming my application name from Oracle to SAP as I'm using the SAP Oracle. Okay, and here I'm putting the logo URL. Moreover, you can also go and put the icon URL as well. Again, completely optional, but I'm just showing you how to do it. The next key thing that we do have, let's say I want this integration to be done based on the OAuth because whenever we are making the integration with the Salesforce, we have to do the OAuth integration only. So here you have to go and specify the callback URL. What is callback URL? Whenever the successful authentication has been done, where the control should navigate that is defined in the callback URL. So let's say for the time being, I am using this one of the dummy URL as the callback URL. Again, I'm repeating what is callback URL whenever the successful authentication have been done, where the control should navigate that will be driven based on the callback URL. Next thing is, as I said, the Oracle system is connecting with your Salesforce. Now what kind of features that they can access whenever we are integrating that you can define from here, right? Whether they should have the full access of an integration or not. Another key thing that we do have here is the refresh token. So whenever we are performing the integration with the help of OAuth, basically we use the token-based systems. And this token-based systems do have an expiry type. If your OAuth mechanism, it is implementing the refresh token, then automatically the refresh token will be generated as soon as the token has been expired. So we use this refresh token. In case you want the integration that you are doing, they should only access the data via the API when you go and provide this kind of an access, right? So here you go and define the different types of authorization that you want to provide whenever we are making the integration. Again, there are a few additional fields which are a few of them are specific to the service provider or the authentication provider for the time being I'm just clicking on the field. Whenever you go and create the connected application, it generally takes around 10 minutes to create that application. And once the application is created, you will get an email from the Salesforce. Whenever you go and create the connected application, Salesforce do provide two key important things. First is the client secret key, and second is the client key. So Salesforce do provide two important things whenever you go and perform any kind of an integration that is the client key as well as the client secret key. So let me check an email for the authorization code that Salesforce has sent. So authentication code here is, so what you have to do here is, you have to go and share this client consumer key as well as the consumer secret key to the third party system. Let's say Oracle systems comes to you or the developer from the Oracle comes to you and he asks you for the authentication details. What you will share with him, you will share this unique key that is the consumer key as well as the consumer secret key. Whenever they have to go and perform the integration, they have to go and specify the consumer key as well as the consumer secret key. And in return, you have to ask them for the callback URL. In return, you have to ask them for the callback URL. Callback URL is where the control will be transferred as soon as the connection has been successful. You can go and define this callback URL here. Again, I'm repeating, if you are making an integration with the Oracle system, then with this Oracle system, you have to go and share this consumer key as well as the consumer secret key. This key as well as this secret key is specific to the connected application that we have created. So whenever they have to make the integration with the Salesforce, they have to go and specify this consumer key as well as the consumer secret key. Ankit, can you please zoom in once so that people can see? Sure. Right? This is where you have the consumer key as well as the consumer secret key. If you go and create connected application in your own, you will get a unique consumer key as well as the unique consumer secret. All right? Your job is to save this and share with the Oracle system. I hope I'm making sense. I believe that's where today, here only we have to wrap up because there are few remaining topics that we have to cover from tomorrow onwards that we will be seeing these four different types of APIs that is the REST API, SOAP API, PubSub API as well as the Bulk API. As of now, we understood the theory part. We understood how we can do the configuration in the Salesforce, how we can go and configure the remote site setting or the name credential or the connected application. Tomorrow, we will see how we can use two things. First, REST API in the Postman, how we can use the Postman to make the calls to the standard APIs that Salesforce do offer. Moreover, we will also see how we can go and create our own REST services. In the REST services, I'll be taking the simple one as well as the few complex one, like you have to pass the different types of data or you have to return the different types of data from your web service. That also I'll be covering two complex scenarios. Definitely I'll be covering the easy one, but I'll also be covering the big complex one as well. Moreover, we'll also see how we can do the call out from the Salesforce too. These are the different topics that we have planned for the upcoming session. So tomorrow, we'll be starting with the REST API and as the session goes forward, we'll be covering these different APIs too. So let me take a few questions. Again, from the chart window, first question is from the ACID. ACID, you can taste this definitely from the Postman tool as well, right? But in case, again, for the testing, definitely you can use the Postman tool, but in case you have to go and perform some automation, then you have to either use the flows for the integration or you can use the PIX classes or you can write down the PIX classes to perform this integration as well. Connected app. RSJ, I have repeated multiple times. Let me know if you still have the questions on this one or not. Inbound integration, basically, whenever the Oracle system is making the call into the Salesforce, whenever from the third party system, we are getting the calls into the Salesforce, it is referred as the inbound integration. Whenever from the third party system, if we are getting a call into the Salesforce, it is referred as the inbound integration. First, yes, we use the connected apps for the inbound integration. Not only for that, there are a few additional cases that we discussed. Like we also use the connected app to act as a service provider. We also use the connected app to define the type of authorization that we have to do. Moreover, we also use the connected apps to provide the access to the external API gateways like the MuleSoft or the Postman. Moreover, we use the remote site setting and the name credential definitely for the outbound integration. Salesforce do recommend that we should use the name credential over the remote site setting. But in case you are making an integration with the API key or you are making an integration with the public API, then definitely you can go and use the remote site setting too.  Your job is to send the request, your job is done. Now they have to send the response, they will initiate the new integration and send the response to you. Sorry, your message is not clear to me. For the outbound integration, definitely we use the remote site setting and the name credential, right? And for the inbound integration, we use the connected apps, yes. Yeah, that's all for today, folks. Okay, so I hope guys, you understood whatever Ankit explained and if you still have any question you can ask, otherwise we are wrapping the session for today. Right, again, thank you for the audience for attending the session. I hope you got a few understandings or few learnings from this session, right? And this session definitely, I hope this session will be an add-on in your knowledge too. Again, thank you, Sanjay, for providing me this opportunity and providing me this platform to helping the community. Yeah, surely, Ankit and your hard work is appreciated. I can see a few questions, so if you can see if they are relevant, so you can answer them. Right, Archana said, is remote site setting optional in case we are using the name credential or vice versa? Vice versa is not true, in case you are using the remote site setting, then in case you are using the name credential, there is no need to define the remote site setting, right? Because name credential, it will done the both jobs for you, it will perform the authentication as well as it will also help you to define the end points as well, right? The next question is, can you please elaborate with using two Salesforce orgs? Yes, Shiva, we'll be taking that scenario where we'll be integrating the two Salesforce orgs with the help, where we are creating the rest surface in one of the org and we are making the call-outs from the another org. Most rarely in the next week, we will cover that scenario. Permission sets for the name credential, generally admins do configure the name credential, Vinay, but generally in the real world, we do not provide this setup access to the end users, right? As we are using the day walk, you might see this access, but when the end users, they are using this Salesforce application, they will not see the setup icon, okay? So end users are not supposed to do any type of configuration in the Salesforce, not only the name credential or the remote site setting, although they are not able to, they are not supposed to go and create the new objects or change any configuration in the real time. I hope I answered your question, Vinay. Yeah, that's all from my side. Again, thank you, folks. Thank you for your time. Yeah, thank you. Thank you, everyone. So thank you, Ankit, for sharing the knowledge once again. So guys will be connecting tomorrow, same time, and tomorrow I think Ankit will be doing some demo, right? Right, tomorrow we'll be covering how we can connect the postman with the Salesforce moreover, we'll also go and create a few rest services as well. Okay, great. So with this, we are taking a leave now and we'll be connecting tomorrow, same time. Thank you guys for being wonderful audience and thank you, Ankit, once again. See you guys tomorrow. Thank you all. Bye-bye.


So, this last few lectures we have been looking at convergence of iterative schemes for solving linear algebraic equations. Starting from the basic equation for where the error evolves, so we had this iteration scheme, we had this iteration scheme to solve A x equal to b and A was written as s minus t and we said that the error which is defined as iterate x k minus the true solution x star this evolves according to e k plus 1 this is a linear difference equation it evolves according to this linear difference equation. Now from this we abstracted from this we abstracted a linear difference equation problem we said essentially we have to look at equations of this type and z0 is initial condition z0 is the initial condition and then we wanted to come up with the way of analyzing asymptotic behavior of the solution as k tends to infinity. So, we came up with with analysis based on Eigen values we came up with a condition that if rho b is nothing but max over i lambda i that means if lambda i are Eigen values of matrix b lambda i are Eigen values of matrix b we find out its absolute value well Eigen values can be complex. So, you find the absolute value and rho b this is called as spectral radius this is called as spectral radius and we said that or we showed that the necessary and sufficient condition if rho b that means spectral radius of matrix b is strictly less than 1 we said that the if the spectral radius of matrix b is strictly less than 1 then the sequence zk norm of that will tend to 0 as k tends to infinity. So, and from this we again connected to our original problem we said which means that if spectral radius of S inverse t is strictly less than 1 then this is necessary and sufficient condition for convergence of error for convergence of error the error will the error of between the true solution and a guess solution will diminish to 0 if this condition is satisfied. I am just doing a recap of what we have done till now. So, from this point we again had some difficulty because we have to compute Eigen values. So, we said well Eigen value computations are difficult and then we used one more result to come up with a sufficient condition. So, we said that spectral radius of matrix b is always less than or equal to any induced norm of matrix b spectral radius of matrix b is less than induced norm of matrix b what is induced norm induced norm this is induced norm induced by the norm defined on the range space and the domain space. So, this norm of a matrix is nothing but amplification power or something like a gain of a matrix if you can think about it as a gain or amplification power. So, if and then we came up with a sufficient condition that if induced norm is less than 1 obviously spectral radius is less than 1 and convergence is guaranteed. If induced norm is greater than 1 we cannot say anything if induced norm is less than 1 we are sure. So, we had a another condition that if induced norm is strictly less than 1 then spectral radius of b is strictly less than 1 and then this implies that asymptotically norm this means asymptotically norm of iterate z k or difference equation z k will go to 0 as k goes to infinity. So, this we can say without actually having to solve it ok. Now in particular we talked about infinite norm or one norm which are more convenient for doing calculations ok and now based on this I wanted to derive some results which are even more simpler I do not probably have to even compute the norm I can compute what is called as diagonal dominance. So, in my last lecture I talked about diagonal dominance. So, I wanted to further catch on this result that if the induced norm is less than 1 then of course, the spectral radius is less than 1 induced norm is very very easy to compute particularly one and infinite norm as compared to computing the spectral radius. So, checking whether a particular iteration will converge or not is very very easy. Now let us move back to the thing that we have done in my last lecture. So, this was overview of the entire stability arguments that we have been giving well I wanted to derive something more specific from the previous result. So, we come back here we are trying to solve for a x equal to b and a has been split as s minus t. So, for Jacobi method I in particular I analyze Jacobi method for Jacobi method s is equal to well we are also writing s as we are writing a as l plus d plus u this is strictly low triangular part of a this is diagonal part of a and this is strictly upper triangular part of a. So, s is equal to d and t is equal to minus minus l minus u and then I defined the concept of strict diagonal dominance. If you take some of absolute values of elements of matrix a in a row except the diagonal element and if that sum is strictly less than the sum is strictly less than you know the diagonal element then the matrix is called as diagonally dominant matrix. Just to give you a simple example well any you just write any matrix in which let us say this is my matrix a this is my matrix a this is the diagonal these are the diagonal elements these are the diagonal elements here. Just have a look if I take absolute sum of this this it is smaller than this I take absolute sum of this smaller than this. I just look at this matrix I look at its diagonal elements this particular matrix will obey this condition this is a strictly diagonal dominant matrix. Just look at this just look at this this is 2 plus 4 plus 3 plus 1 is always less than 15 same thing here 5 plus 3 plus 1 plus 9 is less than 23. So, I am taking absolute values. So, for this particular matrix can you calculate what is going to be what is going to be Jacobi matrix which is what is S inverse T can you calculate that just do it what is S inverse T well mind you again that Jacobi matrix when you actually do computations you never compute S inverse you do row by row calculations. This is for analysis is for getting insights, but what you will realize is that you just look at the diagonal elements you look at the sum of the off diagonal elements you can say whether the iterations are going to converge or not which is very very powerful result you do not have to actually solve it and this is true for 5 cross 5 for 10 cross 10 for 1000 cross 1000 if this condition holds iterations will converge. So, you are guaranteed convergence if you if this condition is satisfied. So, what will be S inverse T what will be Jacobi matrix let us call this Jacobi matrix S inverse T or for Jacobi matrix S inverse T what will it be this will be 0 it will be minus 1 minus 1 1 0 2 divided by minus 5 minus 5 minus 5 then this will be 1 0 3 minus 2 2 divided by 9 9 9 9 9 minus L minus U then what is this 2 4 0 3 minus 1 this divided by 15 15 15 and 15 then the next one is 1 minus 5 minus 3 0 and minus 9 divided by minus 23 and the last row is minus 1 by 5 minus 1 by 5 1 by 5 0 0.   So, if a is diagonally dominant the Jacobi matrix which you get by S university has spectral radius strictly less than 1 which means Jacobi iterations will converge without having to solve it for arbitrary initial guess very very important for an arbitrary initial guess. So, any initial guess I give even if it is completely wrong my solution will my iterations will converge to the true solution if diagonal dominance condition is met. So, you can just check diagonal dominance of a matrix very very easily and then you know whether the solution is going to be obtained or not that is that is straight forward. Now, there are many more results of how do you analyze the convergence behavior and all of them I am not going to prove I have stated those results here in the and I am just going to state them and show you how to apply them and the proofs for each one of them or at least most of them some of them you can derive yourself for most of them are included at the end of the chapter that is end of the notes in the appendix. I do not want to go over it in the class you got the philosophy of how it is done and you have to look at the proofs in the appendix to understand more of this because we cannot spend time on this beyond a certain point as long as you get the philosophy it is fine. Now, what are the more results there are some more results which exploit the structure of matrix A one one structure that we exploit is diagonal dominance right. The other thing we will show is that if matrix A is symmetric positive definite if matrix A is symmetric and positive definite then Jacobi and Gauss-Seidel methods Gauss-Seidel method converges also you can show that if matrix A is diagonally dominant Gauss-Seidel method will converge the proof is the proof is little more involved and you should look at the proof given in the appendix I have given details of the proofs in the proof in the appendix. So, if matrix A is diagonally dominant Jacobi iterations will converge it is also true that if matrix A is diagonally dominant then Gauss-Seidel iterations also will converge. So, you just have to check for diagonal dominance you know that Gauss-Seidel iterations will converge and in fact a heuristic is that most of the times Gauss-Seidel iterations converge faster than Jacobi iterations. So, if you know that a matrix is diagonally dominant your preferred choice of using the method should be Gauss-Seidel method not Jacobi method. There are other theorems. So, the first theorem that you should know about convergence of iteration scheme is that if matrix is diagonally dominant A matrix then Jacobi method as well as Gauss-Seidel methods will converge to the true solution. The next result is by the way remember this is the sufficient condition this is not a necessary condition what does it mean that if this condition holds Jacobi and Gauss-Seidel methods will converge. If this condition does not hold even then this you cannot say if this condition does not hold you cannot say anything about convergence you have to go back and check something else you have to go back and check spectral radius. So, this is only a sufficient condition if this happens you are guaranteed convergence will occur if this does not happen we do not know we cannot say anything. So, this is sufficient condition not necessary condition. The other result is so the second result I would say the first result was very very important result. So, this symmetric positive definite line seems to be something very very nice it seems to help us everywhere we go and I will just show you how you can now you might start saying well I have been given this matrix I have been given this matrix A and you know only in very very special cases this A will be symmetric positive definite is not it A is a square matrix A is a square matrix I am not talking about now this square where we had a you know a tall matrix I am just talking about A is a square matrix and my given problem the problem which is given to me is such that A is not symmetric positive definite. But I know that Gauss-Seidel method or Gauss-Seidel method will converge sufficient condition for convergence is that if the matrix in my problem is symmetric positive definite is there something that I do to solve this problem to convert this problem into symmetric positive definite matrix very good excellent I just pre-multiply this equation with A transpose. So, this gives me A transpose A I do not have to solve for A x equal to b I can instead solve for A transpose A is equal to A transpose B I am guaranteed convergence. So, I am using my theory to change the problem in such a way that I am guaranteed to get converge solution. I am going to solve this problem using Gauss-Seidel iterations making use of this theorem how do I make use of this theorem to modify my calculations I pre-multiply both sides by A transpose this becomes a symmetric positive definite matrix. Now if I apply Gauss-Seidel method to this matrix and this problem this transform problem I am guaranteed to get a solution this solution is obviously a solution of if it is a solution of this it is also solution of this you have no problem with that. So, I could solve this transform problem instead of solving this problem I get a symmetric positive definite matrix here I am using theory to modify my calculations to I will just give you an example here I will start with. So, I want to solve for A x equal to b and my A matrix is 4, 5, 9, 7, 1, 6, 5, 2, 9 and my b vector is 1, 1, 1. Let us say I want to solve this by Gauss-Seidel iterations. So, well what I will do is I am now I am not this is not a solution procedure this is analysis from analysis what I know is that if I write this matrix as if I write this matrix as A matrix if I call this s and if I call this as t if I call this as s and if I call this as t then doing Gauss-Seidel iterations is equivalent to then my s inverse t my s inverse t will be 4 0 0 7 1 0 this is my s inverse t if I were to use the raw matrix A if I were to use raw matrix A and in this case the spectral radius of s inverse t turns out to be 7.3 which is strictly less than 1 if I use Gauss-Seidel iterations are not going to converge because if I just use the raw matrix A that matrix is neither diagonal dominant just check it is diagonal dominant it is not is it symmetric matrix it is not a symmetric matrix forget about positive definite it is not symmetric matrix. But if I know this little bit of information if I do this transformation that is A transpose A x is equal to A transpose B then this A transpose A matrix it turns out to be 90 37 and this A transpose this is A transpose A A transpose B becomes 16 8 24 and now if I apply Gauss-Seidel method to this matrix to this equation transformed then then the s inverse t spectral radius of s inverse t it turns out to be 0.96 okay. So for this for the transform problem for the transform problem I am guaranteed conversions of Gauss-Seidel method this is a symmetric matrix just see this symmetric matrix it is a positive definite matrix by definition A transpose A is always positive definite even if A is not positive definite you have seen this several times okay. So this is positive definite matrix symmetric matrix convergence is guaranteed just pre-multiplying both sides by A transpose I can ensure that I will get conversions by iterative method okay. So in the case where obvious things like diagonal dominance are not there if you want to ensure that you get conversions just pre-multiply by A transpose both sides and then use Gauss-Seidel you are guaranteed conversions very very powerful result yeah all the drivers. So this that spectral radius should be less than one is necessary and sufficient condition it necessary if the convergence occurs spectral radius should be less than one if spectral radius is less than one convergence will occur that is not the case with the norm if induced norm is less than one convergence will occur but if induced norm is greater than one convergence may or may not occur you do not know okay. That is not the case with spectral radius spectral radius is the absolute measure which will necessary and sufficient condition for okay. So it is possible to transform there are more results of this type again I am not going to go into the proof for relaxation method well we have this result for relaxation method what you can show again is the proof is again given in the appendix you should go and look at it I will look at it if omega is chosen between 0 and 2 well actually for relaxation method we want to choose it between 1 and 2 because we showed that omega equal to 1 is equivalent to Gauss-Seidel iteration so we want to choose it between 1 and 2 but in general if omega is between 0 and 2 okay we are this is a necessary condition for convergence okay so you cannot choose omega you know how to choose omega you have a guideline here okay so this again remember this is only a necessary condition this is not sufficient if you choose less than 2 that does not mean convergence has to occur but if convergence occurs only when you choose omega is less than 2 and well the this necessary condition the the this is result 3 and the necessary condition becomes necessary and sufficient conditions if extension to this theorem is another result that if this is for an arbitrary matrix okay this is for an arbitrary matrix now if a is symmetric and positive definite so if matrix a is symmetric positive definite okay then this condition necessary condition becomes a necessary and sufficient condition okay now you know how to transform the problem which is originally not symmetric positive definite to symmetric positive definite matrix okay so what I want to do the take home message is that all these results all these theorems are very very useful in shaping your calculations you should know how to make sure that convergence occurs convergence is very very important and then whenever you are not sure in a in a arbitrary large-scale problem you are not sure above a matrix how it's going to be if you want to use iterative schemes for solving a x equal to b it's better to use it's better to use you know a relaxation method in which you transform the problem because in general relaxation method will will converge faster than Gauss-Tiedel method I'll just show you in a very small example that Jacobi method is the slowest to converge typically Gauss-Tiedel method is faster and if you choose omega properly then the relaxation method will even converge faster okay now how do you choose omega such that you get very very fast convergence is very difficult to tell the priory you probably have to compute eigenvalues but that is not desirable you don't want to really compute the eigenvalues so you have to develop some kind of you know experience in beyond the point you have to use all these theorems and understand the theory and then develop experience to tweak with the calculations that's very very important okay so I'll just show you one simple example this is taken from Strang's book but it is very very illustrative very simple problem so I want to solve and such a simple problem of course you don't need any of the iterative methods 2 cross 2 systems you can sans solve it by hand so my a matrix is 2 minus 1 minus 1 2 well we'll say that this is Jacobi and Gauss-Tiedel will converge by symmetric diagonally dominant okay so anyway but that is on the point the point is the Jacobi method S inverse T will be 0 half half 0 and the spectral radius is equal to half for Gauss-Tiedel method S inverse T this turns out to be 0 0 half 1 by 4 and spectral radius is S inverse T okay a spectral radius is given by this actually spectral radius maximum magnitude eigenvalue of S inverse T is an indicator also of the performance okay now there are two aspects it should be less than one okay now how much it is less than one how close it is to 0 that also matters in terms of the rate of convergence whether the convergence is guaranteed or not is decided by whether it is strictly less than one okay that is a stability criteria the performance is given by how much it is less than one okay so this method Jacobi method in which spectral radius is half okay converges slower than converges slower than the Gauss-Tiedel method okay because the spectral radius here is one fourth in fact it you can almost if you start doing calculations you will see that one step of Gauss-Tiedel will be almost equal to two steps of Jacobi okay so the Gauss-Tiedel can move much faster because the spectrum this is you cannot show it for every matrix there is no proof that Gauss-Tiedel always converges but in general in general Gauss-Tiedel converges faster than and the reason is typically spectral radius of S inverse T for Gauss-Tiedel is less than okay that is the that is the reason now what if I formulate the relaxation method so you can almost show that because of this one GS iteration is equivalent to two one Gauss-Tiedel iteration is equivalent to Jacobi iterations okay because spectral radius in this case is even smaller now for relaxation method you know for relaxation method S inverse T turns out to be inverse of this matrix 0 omega minus omega here 2 inverse 2 into 1 minus omega omega 0 2 into 1 minus omega and of course we should choose omega between we want to choose omega between 1 and 2 we want it to be greater than 1 because if it is equal to 1 it is nothing but Gauss-Tiedel method okay we want to be greater than 1 now actually now for this simple case 2 cross 2 matrix you can actually find out what is the best value of omega that will enhance the convergence what is the optimum value okay for different choices of omega you will get different spectral radius okay we can actually find out which value of omega will this is this is just again to tell you a emphasize this is only to get insight okay in the real real problem I am not going to compute optimum omega by doing some I have to tune give a guess for omega okay so if you use some properties of matrices then you know that lambda 1 and lambda 2 if these two are eigenvalues of S inverse T then that is equal to determinant of S inverse T which turns out to be in this case if you take determinant of that it will be 1 minus omega 1 minus omega whole square okay and you know the other property you know this property multiplication of eigenvalues of a matrix is same as determinant and then what is the other property trace so lambda 1 plus lambda 2 is equal to trace of so this will turn out to be 2 minus 2 omega plus omega square by 4 now if you plot if you plot this that is if you plot S inverse T versus omega if you plot spectral radius using these two these two relationships you can find out lambda 1 lambda 2 and a spectral radius and if you plot this you will find that well getting the optimum is not very difficult if you plot this you will find that the optimum value if you plot this the optimum value for which the spectral radius is minimum you know you will get an you will get a point where you will get a minimum value of the spectral radius okay so that value turns out to be omega optimum is equal to 1.07 okay and the spectral radius of S inverse T for this omega is 0.07 okay I am skipping some steps you can see here in the notes that is not important what I want to point out here is that if you are able to choose omega properly then this is 0.07 so we had we had three situations you know Jacobi method then Gauss-Seidel method and relaxation method the S inverse T spectral radius in this case was half this was one fourth and this is you know 0.07 which is almost one fourth of this so one we said one iteration one iteration of Gauss-Seidel was two Jacobi iterations what can what can you say about one relaxation iteration it's like one relaxation iteration is like four Gauss-Seidel iterations okay and almost like eight Jacobi iterations so relaxation method can converge even faster typically values close to one one point one point one one point two are used this is thumb rule and not substantiated I think Strang gives some clue that you can use it close to one point two but it's hard to say generally what what value of omega will make conversions very very fast okay but so the tricks that you should use is first of all make sure that either the matrix is diagonally dominant check whether the matrix is diagonally dominant if it is not okay to ensure convergence you should pre multiply both the sides by a transpose that will make it symmetric positive definite I'm guaranteed convergence okay but I want convergence faster than Gauss-Seidel Gauss-Seidel is better than in general Gauss-Seidel is better than Jacobi so I will apply Gauss-Seidel and I can make convergence faster even going to relaxation method so probably I should all use all these tricks and use relaxation method to enhance my convergence that's how I should proceed with arranging my calculations so this brings us to end of this analysis what is important here is that there are many take home take home messages one of one of the thing is that eigenvalues is one of the prime tools for analyzing behavior qualitatively asymptotically I don't have to solve that is the beauty of this tool I don't have to solve the problem I can just look at eigenvalues or I can in this case it turns out finally I can just look at diagonal dominance I can see whether the convert the problem to a symmetric positive definite matrix I am guaranteed conversions of my iterative scheme very very powerful result in fact eigenvalues are used for convergence analysis in engineering literature in many many many ways okay well most of you I think have done the first course in chemical engineering on chemical process control right and in process control if you well you may not have connected it to the eigenvalues in the first course but actually what you can show is that if you write a differential equation for a local linear differential equation for evolution of the system dynamics then the so-called roots of the characteristic polynomial are nothing but eigenvalues of certain matrix which governs the system dynamics okay and if eigenvalues are on the left half plane and then you know what was the what was nice thing about eigenvalues there or roots of the characteristic polynomial you don't have to solve you just look at the roots whether they are lying in the this half of the plane or this on the plane you can tell how the system is going to behave asymptotically without having to solve okay same thing is here without having to solve I can tell whether my iterations will converge or not okay also using necessary sufficient conditions I can go and modify my problem to make sure that convergence will occur okay this is more important than the algorithm per se algorithm you will learn you will learn to program it or nowadays I think these algorithms might be available on the net you might download it okay algorithm might be very well written that doesn't mean the convergence is going to occur okay you should know why convergence occurs and then make sure that you transform the problem in such a way that convergence occurs that is important okay so this brings us to end of this now there are two more things that I need to do well because we missed one lecture some timetable is disturbed but I will try to make up make up for it we will I will try to cover gradient based or optimization based iterative methods for solving ax equal to b okay so now till now I formulated iterations in one particular way by splitting the matrix and in fact row by row calculations not really splitting the matrix the way the iterations were derived were doing row by row calculations okay my next aim is going to be instead of doing that can I iteratively solve this problem well can I solve if I want to solve ax equal to b okay if I take a guess solution the true solution is let's say x star okay and if xk is my guess solution then obviously ek now my ek has a different definition ek is b minus axk okay this is not going to be 0 when this is equal to x star it will be equal to 0 if xk is equal to x star this is equal to 0 the way I want to solve this problem is is minimize objective function scalar objective function phi is defined as e transpose e that is ax minus b transpose ax minus b with respect to x okay I don't want to solve this I don't want to solve this well you will say that if you apply the necessary condition for optimality you will get you know dou phi by dou x equal to 0 that will give you a transpose ax if you apply this condition dou phi by dou x equal to 0 then you will get a transpose ax is equal to a transpose b I don't want to solve this I don't want to go by this route I want to go iteratively okay I want to guess I want to guess x0 and by some method I want to go to x1 then I want to go to x2 and so on and then I want to see whether this iteration converges we are going to use what is called as the gradient search okay one of the fundamental methods in optimization gradient based search so we look at gradient search and then there is one more method called conjugate gradient search which we will look at next okay that is one thing which I want to do after having done that we have talked about iterative schemes for solving ax equal to b and then we move on to a very very fundamental issue matrix conditioning which problems are inherently ill conditioned which problems are well conditioned how do I classify and say that this is a ill conditioned problem whatever I do I am going to end up into some trouble this is a well conditioned problem if I am getting wrong solution I have made a mistake okay so well conditioned problems you know absurd solutions you have made a mistake ill conditioned problems absurd solutions well you can't do much how do you classify ill conditioned from well conditioned is the next thing that will bring us to end of this module


it should have all of our attention. I really love that. One of the projects we're working on here, I do real estate development. One of the things we're doing is creating a market called Juntos. And it's the idea of Los Angeles has a lot of Asian influence and a lot of Latin American influences. And so we're partnering up with the Taiwanese chef. And so he draws a lot of inspiration from the Asian cultures. I'm from Peru. And so naturally there's a lot of Latin American cultures. And in the LA there's both. And so we're starting this project that it's a way to sort of introduce the blending of the food. You know, we're calling it Juntos market. And of course we'll have products that we'll sell in the market. But it's really just like a time. And I think obviously I can speak to it in LA, but it's also a time I think in America in general where to your point, I mean, the addressable market of introducing Latin foods, Mexican products is massive. And there's a massive opportunity there. It seems like that's what you're aligning to, which makes a lot of sense.