Logic: JSON Transform

Knowledge Center > Workflow > Workflow Tasks > Logic: JSON Transform

Logic: JSON Transform

Table of contents

The JSON transform task extracts and reformats data in the workflow data payload.

The task uses JSONata as the processor for JSON data query and transformation. With JSONata expressions, you can filter and aggregate data, and reformat data into any JSON structure.

To learn more about the JSONata syntax and available functions, see JSONata.

After the JSON transform task, the original data is kept in the data payload and the reformatted data is added to the data payload. 

Task Settings

The payload placement identifies the object that will be used for storing the reformatted data. The specified object name will appear in the data payload. JSONTransform is the default placement for this task.

Examples

If an upstream task exports data from Account, Subscription, and BillToContact, you can use a JSON transform task to reformat the results into a single object. 

{
"AccountNumber": Account.Number
"AccountBalance": Account.Balance
"SubscriptionID": Subscription.Id
"ContractEffectiveDate": Subscription.ContractEffectiveDate
"AccountCountry": BillToContact.Country
}

In the expression above, "AccountNumber" is a data field of the new object, and Account.Number points to a value from the export task.

Last modified

Tags

Classifications

(not set)