---
schema_version: "1"
id: 4e8bb093ab3beb2ae50f2318c11a0c171a79b4a39b29c6a4266eb127e7b16e61
title: "Callouts and Callbacks: Limits and Usage"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/external_services_schema_def_usage_considerations.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.external_services_schema_def_usage_considerations.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 085753bbcffaf927181973e152e895d55e53053d4265cdceadd08eb854e1cbe1
description: Limits and best approaches for callbacks and callouts to and from External Services.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Callouts and Callbacks: Limits and Usage

Limits and best approaches for callbacks and callouts to and from External Services.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

- External service callouts aren’t allowed when there are pending, uncommitted transactions.
    - In Flow, close your transaction, and resume Flow using the flow element Pause.
    - In Apex, perform the callout before any DML statement such as inserting, updating, or deleting objects. See [Callout Limits and Limitations](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_timeouts.htm) in _Apex Developer Guide_.
- Callouts to External Services time out after 120 seconds.

## External Services Asynchronous Callbacks

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note External Services' asynchronous callback operations are supported in Apex but not in Flow.

The timeout duration of a callback operation is configured in the Apex client, and can be set for a maximum of twenty-four hours.

Accepted callback HTTP methods are PUT and POST. All other methods are ignored.

One callback parameter must contain only one callback operation, as a one-to-many relationship isn’t supported. If one-to-many is detected, only the first callback operation under the callback parameter is processed.

In [Example API Specification With Callback Operation](https://help.salesforce.com/s/articleView?id=platform.external_services_async_ops_example.htm&release=264.0.0&type=5), the first callback parameter is `applicationOutcomeApproved`. It contains one callback operation `#ref/…/ApplicationApproved`. The third callback parameter is `applicationError`. It contains one callback operation `"{$request.query.callbackUrlForErrorCases}": {"post": {.....}}} 3.3`. We ignore the callback operation response declaration and always send 200, 404, 408 (timeout), or 500 HTTP response to the callback sender.

A callback URL can be defined as a query parameter or added to the request body parameter. A callback URL can be:

- a string type
- a property of an object type
- an element of an array

Some valid callback URL expression formats are:

- `'{$request.query.callbackUrl}'`
- `'{$request.body#/callbackUrl}'`
- `'{$request.body#/callbackUrl/1}'`

Other complex expressions aren't currently supported. For example, expressions with static text combined with variable references, or expressions that have multiple variable references. In these unsupported cases, the callback is considered invalid and the operation is attempted as a synchronous callout with a 120-second time out.

A callback operation can define an operationId. For example, in the [Example API Specification With Callback Operation](https://help.salesforce.com/s/articleView?id=platform.external_services_async_ops_example.htm&release=264.0.0&type=5), see:

`"operationId": "approvedCallback”`

This `operationId` can’t be duplicated with any other `operationId` – with a regular top-level operation

`"operationId": "SubmitApplication”`

or any other callback `operationId`.

If a callback operation doesn’t declare an `operationId`, Salesforce uses its callback component reference name as the `operationId` - in this case - `ApplicationRejected`.

If the callback operation is declared inline, then its `operationId` is constructed as

`parentAsyncOperationId_CB_callbackParameterName`

For example, `SubmitApplication_CB_applicationError`.