Skip to main content

Configure an Inbound Payload that writes to Salesforce

Build an Inbound Payload that receives data from another system and creates or updates Salesforce records.

Configure an Inbound Payload that writes to Salesforce

Use this pattern when another system sends data to Payloads and Salesforce needs to store or update records from that request.

In Payloads, this is configured as an Inbound Payload. The external system calls a Payloads endpoint, Payloads parses the request, and Data Targets decide what happens to the inbound values.

For a broader comparison with the other Payload types, see Choose a Payload type.

When to use it

Use this pattern when you need to:

  • receive webhook-style API requests from another system

  • parse inbound JSON, XML, or form URL encoded content

  • read inbound headers or URL parameters

  • create or update Salesforce records

  • keep field mappings visible in Payloads instead of custom Apex

  • return a structured response to the caller

The Stripe demo Payload receives a payment event and updates the related Opportunity from values in the incoming event body.

Payload structure

An Inbound Payload starts with the Request side.

The Request section models the inbound Body, Headers, Parameters, and Data Targets. Data Targets are the important part for this pattern: they decide which Salesforce records Payloads creates or updates.

The Response section defines what Payloads sends back to the caller after processing the request. It can include a response Body, Headers, and Data Queries when needed.

The Endpoint section connects the Payload to the API URL another system will call.

An Inbound Payload showing request mapping, response configuration, and endpoint setup.

An Inbound Payload starts with the inbound Request, then shows how Payloads responds after writing data into Salesforce.

Runtime fields

Start with the main fields on the Payload.

  • Type: choose Inbound.

  • Integration: choose the Integration this inbound API belongs to.

  • Inbound Content Type: choose the format the external system will send.

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

  • Allow Partial Success: decide whether Payloads can save some target records when another target fails.

Choose the inbound content type carefully. It controls how Payloads parses the request Body and how Body Elements should be modelled.

Request Body

The Request Body tab describes the incoming payload.

Create Elements for the values you need to read from the request. You do not need to model the full request body. Model the fields used for field mappings, decisions, transformations, or troubleshooting.

In the Stripe demo, the Payload models values such as event id, event type, checkout session id, payment status, and Salesforce Opportunity id.

Use Transformations where the external value is not the value Salesforce should store directly. For example, an event type can be transformed into a readable action label.

Request Headers

Use Request Headers when inbound header values matter to the integration.

Typical examples include tenant identifiers, source system names, request ids, or values used by downstream mappings. Only model headers your integration needs to read.

An Inbound Payload showing inbound request headers from a Stripe event call.

The demo models request headers that are useful for tracing the inbound event and mapping response values.

Request Parameters

Use Request Parameters when the external system sends values in the query string.

Parameters are common for lightweight API calls where one or two values control what the Payload should do. If the value is part of the business event, it is usually clearer in the request Body. If it controls routing or filtering, a Parameter can be a better fit.

An Inbound Payload showing an inbound request parameter.

Request parameters are best for small routing or mode values, not for the main business event.

Data Targets

Data Targets turn inbound values into Salesforce record changes.

Each Data Target defines:

  • Object: the Salesforce object to write to

  • Operation: whether Payloads should create, update, upsert, delete, or publish

  • Identifier: the field Payloads uses to find an existing record when the operation needs one

  • Record Count: whether the mapping handles one record or multiple records

  • Field mappings: which inbound values map to which Salesforce fields

For updates, make sure the identifier maps to a value that Salesforce can use reliably. In the Stripe demo, the inbound event contains the Salesforce Opportunity id, so the target can update that Opportunity directly.

Response Body and Headers

The Response section defines what the caller receives after Payloads handles the request.

A simple acknowledgement is often enough. For example, return an accepted status, a Salesforce record Id, or a message that confirms the event was processed.

Use response Headers only when the caller expects them, such as a correlation id or a content type value.

Endpoint

The Endpoint section defines how the external system reaches this Payload.

Create or review the Endpoint record, then give the external system the correct URL and method. Keep separate endpoints for separate integration behaviours. A payment event receiver and a customer update receiver should normally be different Payloads, not one overloaded endpoint.

What to check before testing

Before you test the endpoint, check that:

  • the inbound content type matches the external request

  • the Request Body Elements use the correct paths

  • required headers or parameters are configured

  • each Data Target has the correct object, operation, identifier, and field mappings

  • Allow Partial Success matches the business process

  • the Response Body gives the caller enough information

  • the Endpoint URL and method match what the external system will call

After a test call, open the Job record and check the inbound body, parsed values, target results, and outbound response.

Did this answer your question?