- 09 Sep 2021
- 3 Minutes to read
- Print
- DarkLight
Configuring Object Properties With Flow Steps
- Updated on 09 Sep 2021
- 3 Minutes to read
- Print
- DarkLight
Overview
Objects in Decisions represent the overarching DataType for any piece of Data in Decisions. By their nature, the Object DataType allows Data to remain generic and variable at Flow runtime.
By coupling the flexibility of the Object Type with the Flow Designer, users are able to apply additional Property configurations to an Object to define and adjust its values at runtime. The following document discusses some of the commonly used steps that can be used within the Flow Designer to handle Property Configuration on an Object in Decisions.
Additionally a Create String Data Pair step is used to define a DataPair; a DataPair represents a Data Value with its associated Name. This DataPair will be used to map Properties to and from the Object.
Data Pair to Object
The Data Pair to Object step (located under Steps > Data > Advanced > Data Pair) allows users to map a DataPair to a designated Object Property.
The step's Inputs are as follows:
Input Name | Expected Input | Function |
---|---|---|
Data Pairs | List of DataPair | Used to pull source Data that will be mapped to Property. |
Destination Names | List of String [System] | Used to dictate which Property the Data is applied to. |
Source Names | List of String [System] | Used to figure out which DataPair to pull information from; sourced from the Name Property of a DataPair. |
Target | Object [System] | Used to determine which Object the DataPair is applied to. |
The example below utilizes a Create String Data Pair step to create a DataPair that will serve as the determining agent for the MiddleInitial value for the Account Object. The Name from the DataPair ("Initial") is in turn used as the step's Source Name and the Destination Name is set to "MiddleInitial".
Upon debugging the Flow, the resulting INPUTS reveal that the Value affiliated with the DataPair Name (Source Name) has been applied to the MiddleInitial (Destination Name) of the Target Account Object.
The Step OUTPUTS a Done result to demonstrate that the Inputs have been successfully applied to the Account.
Object Properties to Data Pairs
Object Properties to Data Pairs (located at Steps > Data > Advanced > Data Pair) is used to convert the Properties from a designated Object into separate DataPairs.
The Inputs for the step are as follows:
Input Name | Expected Input | Function |
---|---|---|
O | Object [System] | Acts as the Object that the Properties are pulled from. |
In the example below, the previously created Account Object is mapped into the O Input. Upon Debug, viewing the Output Data for the step reveals that each Object Property has been separated into individual DataPairs.
Get Property On Object
The Get Property On Object step (located at Steps > Data > Advanced) Outputs the Value of a specified Property on an Object. Its Inputs are as follows:
Input Name | Expected Input | Function |
---|---|---|
Property Path | String [System] | Used to determine which Property the Output Value is pulled from. |
Target | Object [System] | Designates which Object the step sources the Property and Value from. |
The example below demonstrates a Get Property On Object step being used to find the Property Path "EmailAddress" for the Target Account Object.
Debugging the Flow and navigating to View Input/Output Data on the step reveals the expected Output Email from the Account.
Set Property On Object
The Set Property on On Object step (located at Steps > Data > Advanced) allows users to establish a Value for the designated Property (via Property Path) of a Target Object.
The step's Inputs are as follows:
Input Name | Expected Input | Function |
---|---|---|
Property Path | String [System] | Dictates which Property that the Value is applied to. |
Target | Object [System] | The Object that the Value update is applied to. |
Value | Object [System] | Updates the Data under the designated Property Path of the Target Object. |
The example below demonstrates a Set Property On Object step that is setup to update the FirstName Value of the Target Account Object.
After debugging the Flow, viewing the Input Data of the Set Property On Object step reveals that the step has applied the Value (in this case the String "Wilhelm") to the FirstName propertyPath of the Target Account.
Export Single Object
The Export Single Object step (located at Steps > Integration > Import-Export), is used to export a designated Object in Decisions as a .decObj file onto the Local File System. This file can then in turn be Imported to and from other Decisions environments.
The Inputs for the step are as follows:
Input Name | Expected Input | Function |
---|---|---|
Entity Id | String [System] | Designates which Object will be exported by the step. |
The example below shows an Export Single Object step that has had the Id for a preexisting Account in Decisions mapped to its EntityId Input. The step then Outputs the Object as a .decObj file to the default Export location on the Local File System.