Utility Flows
-
Category
- Data Transformation
- Mappings
- Utility
Video: Utility Flows
Overview
Utility Flows in Plinqx are essentially standard Salesforce Autolaunched flows designed for specific functions in the context of data mapping and transformation. They play a crucial role in enhancing the data transformation capabilities within Plinqx by providing additional flexibility and functionality.
Purposes of Utility Flows
Utility Flows can be employed for the following purposes:
-
Transforming Input Data:
They can take input data, transform it as required, and pass back the output data to be used in Data Mapping.
-
Database Lookup and Logic Application:
Utility Flows can also be used to lookup data in the Salesforce database, perform logic operations on it, and return the output data for use in Data Mapping. This is particularly useful when referential data is stored on the Salesforce platform.
Parameters of Utility Flows
Utility Flows must contain the following parameters:
-
valueIn (Input):
-
Type: String, Number, Collection, Date, DateTime, Boolean, Decimal
-
Description: The value from the data mapping engine from the Source is passed into this parameter.
-
Note: Ensure the valueIn variable is marked as Available for input
-
valueOut (Output):
-
Type: String, Number, Collection, Date, DateTime, Boolean, Decimal
-
Description: The data mapping engine retrieves this value from the flow and writes it to the destination object attribute.
-
Note: Ensure the valueOut variable is marked as Available for output
-
objectJSON (Input): optional
-
Type: String
-
Description: The data mapping engine will pass the Source JSON into this variable if you have defined it correctly as a String and as an Input Variable. Use the JSON Parser component to extract the variables from the Source JSON.
-

Important Note: The output type of the utility flow determines the element type in the JSON. For instance, if a string is passed into the utility flow as the valueIn parameter and valueOut is an integer, the value written to the destination JSON will be an integer.
Example Scenario 1: Transforming a String Value to Integer Value
Flow Setup:

- An assignment in the utility flow writes the transformed value into the valueOut parameter.

- A formula field named toNumberValue in the flow is used to transform a string value to a Number (Integer) value.

Example Scenario 2: Concatenate 2 or more Source attributes to one output
The below is an example Utility-Flow that concatenates the Title, FirstName and LastName from a contact record. For this example, it is assuming a Contact Object is passed. Below a sample Contact record passed from Source:
{
"LastName": "Sample",
"FirstName": "Joe",
"Name": "Joe Sample",
"Title": "Purchasing Manager",
"AccountId": "001xxxxxxxxxxx",
"Id": "003xxxxxxxxxx"
"attributes": {
"url": "/services/data/v56.0/sobjects/Contact/003xxxxxxxx",
"type": "Contact"
}
}
Flow Setup:

- The JSON Parser component extracts Contact field values from the objectJSON passed.

- A flow formula named concatFields in the flow is used to concatenate the variables retrieved from parsing the objectJSON value.

- An assignment in the utility flow writes the transformed value into the valueOut parameter.

Conclusion
Utility Flows in Plinqx provide a powerful means to augment data transformation processes within Salesforce. By leveraging these flows, you can perform complex transformations and logic operations, ensuring that your data mappings are both versatile and accurate. This functionality enhances the overall capability of Plinqx in handling diverse data integration scenarios.