Skip to main content

Map Data Target fields

Map inbound values, outbound values, query results, static values, Credentials, global variables, and earlier target values into Salesforce fields.

Map Data Target fields

Target Fields decide which values Payloads writes into Salesforce.

The Data Target decides the Salesforce object and operation. Each Target Field decides one Salesforce field value. A clean target is usually a small set of intentional field mappings, not a copy of the whole API request.

For target setup, see Configure Data Targets.

Choose the Salesforce field first

Start with the Salesforce field you want Payloads to maintain.

Then choose the mapping source that should populate it. This order matters because it keeps the mapping focused on Salesforce behaviour instead of copying the external system's structure.

An API Push Into Salesforce Payload showing Target Fields that update an Opportunity from a Stripe event.

Each Target Field maps one runtime value into one Salesforce field.

Common mapping sources

Use Inbound Element when the value comes from an inbound request, response body, response header, or email field that Payloads has parsed.

Use Outbound Element when the value was sent earlier in the same Full Callout run and should be reused after the response arrives.

Use Static Value when Salesforce should always receive a fixed value.

Use Queried Field when the value should come from a Data Query.

Use Dynamic Input when the caller supplied the value at runtime.

Use Credential when the target updates or references the Credential used by the Payload.

Use Global Variable for system-generated values such as the current date and time.

Use Target Field when a later target needs a record id or value produced by an earlier target.

Map identifier fields carefully

For Update and Upsert targets, the identifier field is the lookup key Payloads uses to find the record.

If the target updates an Opportunity by Salesforce Id, map the Opportunity Id from a trusted inbound element, outbound element, query field, or Dynamic Input. If the target upserts by external id, map the external id field from the source system's stable identifier.

The Target Field modal showing an Opportunity Id mapped from a Stripe event body path.

Identifier mappings should use stable values, not names or display labels.

Use static values deliberately

Static values are useful when the integration should always set a known value.

In the Stripe event demo, the Opportunity StageName is set to Closed Won when the event confirms payment. That is clearer than expecting the external request to send the exact Salesforce picklist value.

The Target Field modal showing a static StageName value used by the Stripe event target.

Static values work well for controlled Salesforce values that should not come from the caller.

Use current array items in multi-record targets

When a Data Target is mapped to a source array, each Target Field runs once per item in that array.

A field mapped from an Element inside the same source array reads the current item. In the Stripe event demo, the Task target is mapped to $.data.object.line_items.data. The Task Description field maps to $.data.object.line_items.data.description, so each Task receives the description from its own line item.

If the Target Field maps to an Element outside the target source array, the value is shared across every target record. Use that only when the same value should be written to each record.

Use Target Field values from earlier targets

Target Field mappings can be daisy-chained across targets.

Use Target Field when a later target needs a value produced by an earlier target, such as a Salesforce Id. In the Stripe event demo, the Opportunity target runs first. The Task target maps WhatId from the Opportunity target's Id, so every generated Task is related to the Opportunity that was just updated.

The Target Field modal showing a Task WhatId mapped from the earlier Opportunity target Id.

Target Field mappings let later targets reuse values produced earlier in the same Payload run.

Credential target fields

Credential Payloads can use Data Targets to update the Credential that started the token refresh.

In the bearer token demo, the Credential target maps the returned access token and refresh token into the Credential record and stores the token update time from a global variable.

A Credential Payload showing target fields for access token, refresh token, and last updated timestamp.

Credential target mappings are created by Payloads when a bearer token Credential creates its refresh Payload.

Transform before writing when needed

Use transformations when the source value is not the value Salesforce should store.

Common cases include converting text casing, converting external statuses to Salesforce picklist values, formatting dates, converting numeric units, or extracting a value from a compound field.

Keep transformations close to the mapping they support. If a transformation exists only for one Target Field, make the field mapping and transformation name clear enough that another admin can review them together.

What to check

Before testing, check that:

  • each Target Field belongs to the correct target

  • required Salesforce fields are mapped

  • identifier fields use stable values

  • static values match Salesforce picklist values exactly

  • inbound Element paths match the request or response body

  • Credential and global variable mappings are intentional

  • transformations produce valid Salesforce values

After testing, review the Job target output to confirm the field values Payloads attempted to write.

Did this answer your question?