Use Apex to create, test, and monitor asynchronous callbacks. Callbacks are right for
integrations that require potentially delayed responses of more than 120 seconds from an
external source. For example, a mortgage application API, a shipping notification API, or a
payment confirmation API.
Required Editions
Available in: Lightning Experience
Available in: Enterprise, Performance,
Unlimited, and Developer Editions
Note External Services' asynchronous callback operations are
supported in Apex but not in Flow.
How External Services Asynchronous Callbacks Work External Services asynchronous operations are described in an OpenAPI 3.x compliant specification with a callback operation. Asynchronous operations are registered by the system as a special type of invokable action that allows for longer response times. In contrast, External Services synchronous operations time out after 120 seconds. With asynchronous operations, you use Apex to define the callback and the time out for the delayed asynchronous response.
Use Apex to Create an Asynchronous Callout to an External Service When you register a schema containing a callback, External Services creates an invocable Apex operation with an automatically generated Apex class. Salesforce creates a callback URL on the asynchronous callout (initial callout) that’s read-only. Create an Apex client that’s capable of handling the callback by using the generated Apex interfaces. The client waits for an asynchronous response from the external system for an extended time (up to twenty-four hours).
Monitor and Debug Asynchronous Callouts Asynchronous callouts are monitored as jobs using the Background Operations app or with Apex log lines in the Developer Console. To debug your code at runtime, use Apex log lines.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.