JSON Transformation is a step that facilitates the manipulation and transformation of JSON data between different systems and applications. It is an essential resource for ensuring data consistency and compatibility between various APIs and data sources.
To transform the JSON, you will use the JSONata language. For support, the JSONata Exerciser can be accessed directly from the step form. In it, you can:
NOTETo understand this language in detail, consult the official JSONata documentation.
Below, learn how to add JSON Transformation to the canvas and configure its form.
Click the
icon in the left editing menu.
Select JSON Transformation to add it to the canvas.
You can use the search bar
to find it.
NOTEYou can add it more than once. In this case, each time the tool is added, a number is appended to the name (JSON Transformation 1, JSON Transformation 2, JSON Transformation 3).
Connect JSON Transformation to the flow steps. This tool can connect with one previous step and one subsequent step.
TIPTo copy the step, click the
button. If the step form is already configured, the settings will be copied as well.
To delete JSON Transformation from the canvas, select it and click the
button.
Select JSON Transformation on the canvas.
Click the edit icon
.
Fill in the following form fields:
Click the GO TO JSONATA button
.
You will be redirected to the JSONata Exerciser.
Request the data model from the application provider for your input mapping.
Insert the data model on the left side of the screen.
Build your expression in the upper right corner of the screen using the JSONata language.
Use version 2.0.x. You can find it in the upper right corner of the screen.
NOTESee an example of how to create an expression in a flow that integrates E-commerce and CRM.
If you have questions, you can consult the JSONata documentation.
Copy the completed expression.
Return to the JSON Transformation screen in Sensedia Integrations.
TIPIf the expression has any errors, you will see a red message in the lower right corner of this field.
Click SAVE.

NOTETo use the response in connectors, access the Data Mapping with Full Body documentation.
See an example of how to use JSONata Exerciser to transform a JSON:
Let's consider a flow that integrates an E-commerce platform with a CRM system.
In this scenario, when a new order is placed on the E-commerce platform, the order details need to be transformed from the E-commerce platform's JSON format to a format compatible with the CRM system.
Thus, we have the initial data from the E-commerce platform:
Input data (E-commerce)
And the data in the desired format for inclusion in the CRM:
Output data (CRM)
NOTEThe data is the same, but the nomenclature and the way of organizing the information are different for the two systems.
To achieve the desired result, we will map the source JSON format to the destination JSON format.
This mapping can involve renaming fields, restructuring data, and performing calculations.
For example:
"orderId" to "order_id"."customerName" to "customer.name"."email" to "customer.email"."items" array to the corresponding structure in the "products" array.In this specific case, the expression we will use to obtain the mapping above will be:
JSON transformation expression
After applying the JSON transformation expression, the resulting JSON data will be compatible with the CRM system and can be sent as a request to create a new order record.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more