Data Transformation
The Data Transformation Activity converts data from one JSON format or structure into the desired JSON structure. It enables you to reshape API responses (such as those from the HTTP Callout V2 Activity) into a desired structure for improved analysis, integration, and usability. You can extract specific data, select structured output fields directly using the resource picker, apply expressions, and generate a new JSON output for use in subsequent workflow activities.
- Group: Data
- Nature: Non-Blocking
Properties and activity information
|
Field |
Description |
|---|---|
| Details | |
| Display Name | Enter the name of the activity. |
| Reference Name | The unique technical name of the activity within the workflow. This name identifies the activity output in subsequent workflow steps. The reference name appears under Activity Outputs in the IntelliSense resource picker. Expand the structured output to navigate nested objects, view the complete response hierarchy, and select the required fields. |
| Description | An optional field where you can enter a custom description of the activity to explain its purpose. |
| Properties | |
|
Is Input Collection |
Enable this option if the input is an array or contains multiple records. |
|
Bulk Input Source |
Select the source of input data (for example, the output of a previous HTTP Callout V2 Activity). This field is mandatory when |
|
Is Output Collection |
Enable this option if you want the activity to produce multiple records in the output. |
|
Output DataType |
Defines the type of the transformed output data. Supported types include String, Int, Decimal, Boolean, Object, Array. |
| Field Mapping Section: This section allows you to define the mapping between input data and the desired output structure. You can add multiple mappings as needed. | |
|
Name |
The name of the output field that will appear in the transformed JSON. |
|
Data Type |
The type of the output field. Supported types include String, Int, Decimal, Boolean, Object, and Array. |
Expression | Defines how to populate the output field. Select activity outputs directly from the resource picker instead of manually typing the full expression path. You can:
|
Validate | Validates the expressions to ensure they are syntactically correct before saving. |
Example 1: Transforming HTTP Callout Response from Salesforce
{
"totalSize": 2,
"done": true,
"records": [
{
"Id": "006Dy00000CwqBOIAZ",
"Name": "Opportunity 1",
"Probability": 10.0,
"CreatedDate": "2025-05-23T08:51:04.000+0000"
},
{
"Id": "006Ey00000CwqBODAF",
"Name": "Opportunity 2",
"Probability": 20.0,
"CreatedDate": "2025-05-20T08:51:04.000+0000"
}
]
}
To configure the Data Transformation Activity:- Extract the records array
Set Input to
$ActivityOutput.GetSFDCOpportunities.records.Set Is Input Collection to False.
Set Is Output Collection to True.
Set Activity Name to Opportunities.
- In the mapping section, configure the following fields:
Set Name to
$ActivityOutput.Opportunities.Name.Set ExternalId to
$ActivityOutput.Opportunities.Id.Set Description to
$Variables.WorkflowVariableName.
For the output:
Set Is Input Collection to True.
Set Is Output Collection to True.
Set Activity Name to OpportunityRecords.
- Pass the transformed output to the next HTTP Callout V2 activity by setting the Body field to:
Body = $ActivityOutput.OpportunityRecords
Example 2: Expression Configuration with Mixed Sources
{
"Id": "001ABC123",
"Name": "Acme Corp",
"IsPrivate": true
}
And you have workflow variables defined as:DiscountPercent = 12.5
Quantity = 3
OrderDate = 2025-09-18
Country = "USA"
To configure the Data Transformation Activity:Set Input to
$ActivityOutput.GetCustomerDetails.Set Is Input Collection to False.
Set Is Output Collection to False.
Set Activity Name to CustomerOrder.
| Output Field | Data Type | Expression | Sample Output Value | Explanation |
|---|---|---|---|---|
| Name | String | $ActivityOutput.GetCustomerDetails.Name | "Acme Corp" | Gets the customer name from the API response. |
| ExternalId | String | $ActivityOutput.GetCustomerDetails.Id | "001ABC123" | Gets the unique identifier from the API response. |
| TotalAmount | Decimal | $Variables.DiscountPercent + $Variables.Quantity | 15.5 | Adds workflow variables for a calculated field. |
| OrderDateString | String | $Variables.OrderDate.ToString() | "2025-09-18" | Converts the workflow variable date into a string. |
| IsEligibleCustomer | Boolean | $ActivityOutput.GetSFDCOpportunity.IsPrivate | true | Maps the customer's active status as a Boolean value. |
Body = $ActivityOutput.CustomerOrder
Example 3: Using Index-Based Expressions in Collections
{
"records": [
{
"Id": "ORD-001",
"ItemName": "Laptop",
"IsShipped": false
},
{
"Id": "ORD-002",
"ItemName": "Monitor",
"IsShipped": true
}
]
}
And you have a workflow variable:Warehouse = "India"
To configure the Data Transformation Activity:Set Input to
$ActivityOutput.GetOrderItems.records.Set Is Input Collection to False.
Set Is Output Collection to False.
Set Activity Name to FirstOrderItem.
| Output Field | Data Type | Expression | Sample Output Value | Explanation |
|---|---|---|---|---|
| Name | String | $ActivityOutput.GetOrderItems.records[0].ItemName | "Laptop" | Extracts the item name from the first record in the array. |
| Description | String | $Variables.Warehouse | "India" | Maps the workflow variable value. |
| IsPartner | Boolean | $ActivityOutput.GetOrderItems.records[0].IsShipped | false | Gets the shipment status from the first record. |
Body = $ActivityOutput.FirstOrderItem
