Transform JSON Object
Overview
The Transform JSON Object component in Plinqx is engineered to facilitate the transformation of a JSON object into another format or structure, based on predefined mapping rules. This component leverages the data transformation mappings created using the Data Transformation Designer in the Data Transformation module, allowing for sophisticated and dynamic JSON data manipulation.
Inputs
-
Config Id:
The unique ID of the Data Transformation Record in Plinqx.
-
Config Name:
The API Name of the Data Transformation Record.
-
Destination JSON:
A string variable to store the output of the transformed JSON.
-
Ignore Nulls?:
A boolean to indicate whether to ignore null values in the transformation process.
-
Mapping JSON:
A JSON string containing the mapping details (optional, not required if Config Id or Config Name is provided).
-
Mock?:
A boolean to indicate whether the transformation is a mock run (useful for testing).
-
Source JSON:
The JSON string that you want to transform.
Outputs
-
Transformed JSON:
The JSON string resulting from the transformation process.
Example Scenario - Customer Data Normalization
Scenario Overview:
A Salesforce org needs to normalize incoming customer data from an external system before processing. The data arrives in JSON format but needs to be transformed to align with Salesforce’s account and contact object structures.
Implementation with Transform JSON Object Component:
-
Flow Setup for Data Processing:
- Create a Salesforce flow that triggers when new customer data is received in JSON format.
-
Adding Transform JSON Object Component:
- Incorporate the Transform JSON Object component to handle the incoming JSON data.
-
Configuring Inputs:
-
Use either 'Config Id' or 'Config Name' to reference the specific data transformation mapping previously set up in Plinqx.
-
Set 'Source JSON' to the incoming customer data JSON string.
-
'Destination JSON' is defined to store the transformed data.
-
'Ignore Nulls?' is set based on whether null values in the source data should be considered in the transformation.
-
-
Executing Data Transformation:
- The flow processes the source JSON using the defined mapping, transforming it into the desired format.
-
Utilizing Transformed Data:
- The 'Transformed JSON' output, now in a format compatible with Salesforce objects, is used in subsequent flow steps for record creation or updating.
Results:
By implementing the Transform JSON Object component, the Salesforce org can efficiently normalize and process external customer data. The transformation ensures that the incoming JSON is restructured to align with Salesforce data models, enabling seamless integration and data consistency.