You’re integrating Salesforce with an external ERP via REST API. The ERP’s endpoint can take up to 12 seconds to respond. How do you architect it?
TechnicalSenior Salesforce DeveloperSalesforce DeveloperSalesforce EngineerI would implement an asynchronous integration using Salesforce's Platform Events or Queueable Apex. This allows Salesforce to send a request to the ERP without waiting for a response, which is crucial given the 12-second potential delay.
Once the ERP responds, I would leverage a callback mechanism to update Salesforce with the response data. This architecture ensures that Salesforce remains responsive and can handle multiple requests efficiently.