Skip to main content

Configure an Outbound Payload

Build a Payload that sends a request from Salesforce to an external API and optionally uses the response inside Salesforce.

Configure an Outbound Payload

Use an Outbound Payload when Salesforce needs to send a request to another system.

The request can be as simple as a webhook notification, or as detailed as a full API exchange where Payloads builds the request, sends it, reads the response, and writes selected response values back into Salesforce.

If you are still choosing between Payload types, start with Choose a Payload type.

When to use it

Use an Outbound Payload when you need to:

  • send Salesforce data to an external API

  • include headers, URL parameters, or URL modifiers

  • build a JSON, XML, or form URL encoded request body

  • pass runtime values into the request

  • read the API response body or headers

  • create or update Salesforce records from response values

The Stripe demo Payload creates a Checkout Session from a Salesforce Opportunity. It queries the Opportunity, builds the Stripe request, sends it to Stripe, and is ready to map values from the Stripe response back into Salesforce.

Payload structure

An Outbound Payload has a Request side and a Response side.

The Request side describes the request Payloads sends to the external API. It can include Dynamic Inputs, Data Queries, Body elements, Headers, Parameters, and Modifiers.

The Response side describes what Payloads expects to receive back. It can include a response Body model, response Headers, and Data Targets for writing response values into Salesforce.

An Outbound Payload showing the configured Stripe checkout request and response sections.

The Outbound layout keeps the request configuration and response handling together on the same Payload page.

Runtime fields

Start with the main fields on the Payload.

  • Type: choose Outbound.

  • Integration: choose the Integration this Payload belongs to.

  • Credential: choose the Credential Payloads should use when calling the API.

  • Endpoint: enter the external API URL.

  • Method: choose the HTTP method, usually GET, POST, PUT, PATCH, or DELETE.

  • Outbound Content Type: choose the format Payloads should send.

  • Inbound Content Type: choose the format Payloads should expect in the response.

  • Timeout: set the maximum callout time in seconds.

  • Response Failure Policy: choose how Payloads should treat the API response status.

For most production requests, Fail On Non 2xx is the right starting point. It keeps failed API responses visible in Job records instead of treating them as successful runs.

Dynamic Inputs

Dynamic Inputs are values supplied when the Payload runs.

Use them for values that change each time but are not stored directly on the Payload, such as a record Id passed from Flow, a session Id passed from another Payload, or a value selected by a user.

Once an input is referenced in the Payload configuration, Payloads shows it in the Dynamic Inputs tab. That gives admins a quick way to see what the Payload expects at runtime.

Data Queries

Data Queries fetch Salesforce data before the request is built.

Use a Data Query when the API request needs values from Salesforce records. In the Stripe checkout example, the Payload queries an Opportunity, then uses fields from that Opportunity to build the checkout request.

Each query should have a clear purpose. Keep the record limit tight where possible, and make sure the filter matches the way the Payload will be run.

Request Body

The Request Body tab defines the body Payloads sends.

For JSON and XML, the Body is usually a tree of Elements. Each Element represents a value, object, array, or attribute in the outgoing request. For form URL encoded requests, the Elements represent the name/value pairs Payloads sends to the API.

Each Body Element needs a source. Common sources are:

  • Static Value: a fixed value on the Payload

  • Field: a value from a Data Query

  • Dynamic Input: a value passed in when the Payload runs

  • Transformation: a calculated value based on another value

The Stripe demo uses all of these patterns. Currency is transformed to Stripe's lower-case format, amount is transformed into minor units, and Opportunity fields are used for the checkout session.

Headers, Parameters, and Modifiers

Use Headers for HTTP headers that are part of the request, such as Content-Type, Idempotency-Key, or custom routing values.

Use Parameters for query string values. Payloads appends these to the endpoint URL when the request is sent.

Use Modifiers when part of the endpoint URL itself needs to be replaced at runtime.

For example, an endpoint such as /customers/CUSTOMER_ID can use a Modifier to replace CUSTOMER_ID with a Salesforce value or Dynamic Input.

Credentials are normally a better place for authentication headers. Keep authentication in the Credential where possible, and use Payload Headers for request-specific values.

An Outbound Payload showing configured request headers for the Stripe checkout request.

The Stripe checkout example uses request headers for call-specific metadata, while authentication stays on the Credential.

An Outbound Payload showing configured request parameters for the Stripe checkout request.

Request parameters are appended to the endpoint URL when Payloads sends the request.

Response Body and Headers

The Response Body tab describes the values Payloads should understand from the API response.

You do not need to model every field returned by the external API. Model the fields your team actually needs to read, display, store, or use later.

Use Response Headers when the API returns important values in headers rather than the body, such as a request Id, rate-limit value, or pagination cursor.

An Outbound Payload showing modelled response body fields from the Stripe checkout response.

The response body only models the values Payloads needs later, such as the checkout session id, URL, and payment status.

Data Targets

Data Targets write values from the response back into Salesforce.

Use them when the API returns data that Salesforce should keep, such as an external Id, status, URL, error code, or timestamp.

A Data Target defines the Salesforce object, operation, identifier, and field mappings.

Keep the mapping narrow: write the values that are needed for operations or reporting, not every value the API returns.

What to check before testing

Before you run the Payload, check that:

  • the Endpoint and Method match the external API documentation

  • the Credential is attached and uses the right placement

  • the Outbound Content Type matches the request Body you built

  • the Inbound Content Type matches the expected response

  • required headers and parameters are present

  • Data Queries return the records you expect

  • response Data Targets only update fields you intend to maintain

  • the Response Failure Policy will mark failed API responses clearly

After the first test run, open the Job record and compare the outbound request, response status, response body, and any target updates.

Did this answer your question?