Transformation reference
Transformations adjust values before Payloads sends, returns, or saves them.
Use this reference when you need to confirm which type, input type, or return type to use. For a walkthrough of creating and testing a Transformation, use the setup article instead.
For setup guidance, see Create transformations.
Transformation types
Salesforce Formula uses Salesforce formula evaluation for the transformation.
Payloads Formula uses Payloads formula behaviour and Payloads-specific options.
The older Formula value may appear in metadata for compatibility. Use the current UI options when creating new Transformations.
Choose the simplest Transformation type that can express the rule clearly. If the rule depends on Payloads-specific structured inputs or options, use Payloads Formula.
Input types
Input Type tells Payloads what kind of value the formula expects.
Supported input types are:
Boolean
Date
Date/Time
Number
Id
String
Time
Array
Object
Choose the input type that matches the source value. If the source is a structured inbound object or array, use Object or Array rather than forcing it into text. Matching the input type makes the formula easier to test and reduces type conversion surprises at runtime.
Return types
Return Type tells Payloads what kind of value the formula produces.
Supported return types are:
Boolean
Date
Date/Time
Number
Id
String
Time
Array
Object
Choose the return type that matches the destination value. A Target Field for a checkbox should receive a Boolean. A numeric API field should receive a Number. A Salesforce lookup id should receive an Id.
If the return type does not match the destination, the Payload may still be configurable, but the value can fail later when Payloads builds the body or writes the target record.
Where Transformations are used
Transformations can be used in mappings such as:
outbound Body Elements
outbound Headers
outbound Parameters
outbound Modifiers
inbound response Elements
Data Target fields
Use Transformations where the source value is available but not in the final format needed by the destination. Do not use them just to obscure a direct mapping.
Ordered transformations
Payloads can store transformation selections in an ordered structure.
When more than one transformation is configured on the same mapping, review the order carefully. The output from one transformation may become the input to the next.
Use multiple transformations only when the chain is easier to understand than one formula. If the order is not obvious, rename the Transformations or simplify the chain before handing the Payload to another admin.
Common examples
Use a Transformation to:
convert currency to lower case
convert a decimal amount to minor units
map an external status to a Salesforce picklist value
format a date for an API
derive a boolean from an inbound status
extract or reshape a value from an object
Troubleshooting
If a transformation returns the wrong value, check:
the source value on the Job
the configured input type
the formula
the configured options
the return type
the final output on the Job body, header, parameter, modifier, or Data Target
If a transformation is reused, review every mapping that uses it before changing the formula. A small change to a shared Transformation can affect several Payloads in the same Integration.
