Using a Composite Type as Flow Input Data
  • 27 Oct 2020
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Using a Composite Type as Flow Input Data

  • Dark
    Light

Article summary

Overview

The Flow Designer is able to receive entire composite types to use as Flow Input Data. When the composite type is received, the Mapping Editor can be used to breakdown the properties of this type, so that individual values can be exposed. Regular Flow Input Data would contain data members like name, email, and address, which are values of a type like string, int32, or boolean. Using a composite type for input data receives the entire object for that type. 

Example

This example will show what it looks like to use both a default Decisions type and a custom user-defined type as Flow Input Data. 

Default Decisions Type

This example uses the default Decisions type called Account as Flow Input Data. In the GIF below, a Flow with an unconfigured Show Popup step is shown. The Flow is configured to receive a [Account] type object, which will contain values for each property in the type. The Message input of the Show Popup step expects a [String] type value, so a [Account] type value cannot be mapped in. Instead, the properties of the [Account] object can be exposed and mapped individually, so that the property with the appropriate type value can be selected.

  • In the Flow Designer, either select the start step or click some blank workspace so that the Flow properties appear. Under the Flow Input Data section, select the Show Editor button. In the window, enter "Account Data" for the name, then expand the drop down list and use the All/Search function. Enter "Account" into the search bar and choose the datatype at the top of the list called Account.
  • Add a Show Popup step to the Flow from the Favorite Steps section of the Steps tab. Select the Edit Input Mappings button at the top of the Properties tab for this step. In the Mapping Editor, select the Unknown mapping type for the values on the right (except for Message), and choose Ignore from the list. Expand the Account Data object that is received as input data to the Flow, which will reveal all of the corresponding properties. The value shown will depend on the selected account and property. For this example, the account email address is mapped to the popup message.


  • Once the Message input of the Show Popup step has been defined, the Flow can be debugged. Select the Debug button from the top Action Bar. When the window appears, the three-dot symbol is used to choose an account for which the property values will populate. In this example, the EmailAddress was mapped to the Message input because the exposed [Account] property was a [String] value. 
  • Run Capturing All to see that the Show Popup step will display the email of the selected account as intended, despite this value ultimately coming from an [Account] object, which is a different datatype than the step input expected.




Was this article helpful?