02:16 Performing three callouts in a single transaction using HTTP callout framework 04:32 Creating and sending an HTTP callout to create a new account record. 06:48 Demonstrating checking and processing of Salesforce API response 09:04 Handling response codes for account creation 11:20 Handling multiple dependent apex HTTP callouts 13:36 Performing query and updating HTTP request method and body. 15:52 Performing three callouts with dependencies 18:05 Demonstration of performing multiple dependent apex HTTP callouts in a single transaction Crafted by Merlin AI.
Hello Rahul, suppose hypothetically there are many more dependent callouts, won't we reach CPU Timeout of 10 seconds. If yes then how ro handle such scenario? **Like the moment we make a request to a third party system till the moment we receive the response also consumes time, also considering the timeout set for each callout is justifiable
Hi Biswajit, I think the callout processing time is not included in that and even if there is a case you're facing issues, you can always opt for an asynchronous process.
I was just going through the video, though of checking the following questions I had (some options I felt could handle the same scenario): Why can't we use queueable apex for this, where we can chain one callout after the other asynchronously yet in a sequenced manner? Also, if it was a VF page calling controller, we can make use of the continuation framework with the promise feature enabled in JS to capture results one after the other callout.
Hi Preethin, I totally agree with you on this. You can definitely use queuable apex and continuation framework as well for performing callouts. The main purpose of this video is to specify how dependent callouts can happen in a single transaction. I have a separate video for continuation callout as well using HTTPCalloutFramework
Hi, this is too much of a code, if I use API in batch class for each single row will REST API request means too many callout! , How do you approach this scenario? I have suggestion for you, your English is not bad, but can you stop saying - 'And u', 'But u', 'That u' , 'Last u' try say word as it is, is not that difficult, just you need attention, don't take me wrong, when you are saying words like that, it is annoying.
Hey Jay, we use bulkified APIs to handle such scenarios, and this code is still less because we're using the framework here otherwise, this would have been doubled.