+

Build a Composer Flow

After you collect the information described in the preparation checklist, you can then build, activate, and monitor your flows. Building a flow involves creating a new flow or cloning an existing flow; adding and testing a trigger; adding and testing each action to be performed by the flow, in the order that you want each action performed; and finally testing the completed new flow before activating it.

Test each trigger and action as you add it to your flow.

Create a Flow

You can create a new flow (from scratch or from template) or clone an existing flow.

Create a New Flow From Scratch

To create a new flow from scratch:

  1. From the Composer Home page, click Create new flow > Create Flow from Scratch.
    Your flow is named automatically.

  2. To change the name automatically created for your new flow, click the pencil icon next to Untitled Flow and create a custom name using any of the characters A-Z, a-z, 0-9, space, hyphen ( - ), dot ( . ), and underscore ( _ ).

  3. Click Save.

Now you are ready to create a flow trigger.

Create a New Flow From Template

To create a new flow from template:

  1. From the Composer Home page, click Create new Flow > Create Flow from Template.

  2. Explore the template options and select the template you want to use.

  3. Ensure you meet the prerequisites and if so, click Use this Template.

  4. Configure your connections and information required by the flow.

  5. Click Create flow.

Now you are ready to use your flow. For more information about templates, refer to Build a Flow Using Templates.

Clone an Existing Flow

To clone an existing flow:

  1. From the sidebar, click Flows.

  2. On the Flows page, click the name of the flow you want to clone.

  3. Click Clone.

    Composer copies the existing flow and opens the copy in the Flow Details page. Notice that the flow is named Copy of original flow name.

  4. If you want to rename the flow, click the pencil icon next to Copy of original flow name and use any of the characters A-Z, a-z, 0-9, space, hyphen ( - ), dot ( . ), and underscore ( _ ).

  5. Click Save.

Refresh a Flow

When building a flow, you may need to refresh the flow to view updated data at either the object level or the field level.

To refresh a object:

  1. Open the flow.

  2. Click the refresh icon in the upper right corner of the trigger or action card that you want to refresh.

    Refreshing an object The cache for the object type is cleared and the new data is retrieved.

To refresh a field:

  1. Open the flow.

  2. Click the refresh icon in the bottom left corner of the trigger or action card.

    Refreshing a field The cache for the field is cleared. The new value providers for the field are retrieved.

Create a Flow Trigger

After you create or clone a flow, define the trigger: the event or time interval that starts the flow. A trigger step is required to test or activate your flow.

To define a trigger based on an event:

  1. Open a flow if it is not already open. The What Should Start This Flow? dialog is displayed.

    What Should Start This Flow dialog

  2. Select the connector where the triggering event occurs. Your existing connections are displayed.

    List of connections

    You can choose an existing connection or create a new one:

    • Click an existing connection to select it.

    • Click Add new connector name Connection to create a new connection and select it.
      You can rename or delete connections from this dialog by clicking the gear icon.

  3. After you choose a connection, the trigger step displays:

    Trigger step

    Your trigger is named automatically. All triggers are named by combining the event or operation with the system name. For example, "On new record in Salesforce".

    • Optionally, you can rename the trigger. Valid characters: A-Z, a-z, 0-9, space, hyphen ( - ), dot ( . ), and underscore ( _ ).

    • Choose an event that starts the flow. Supply additional information as requested.

    • Click Save.

Change a Connection

You can change connections in a trigger or action. For example, you can create a flow using connections to a Salesforce sandbox org, and then after your flow testing is complete, you can change the connection in your trigger and actions to use a production org.

You can only change to a connection accessing the same system type. You can’t change a Workday connection to a Google Sheets connection, for example.

To change a connection:

  1. Open the flow.

  2. Click the change icon in the trigger or action that connects to a sandbox:

    Change the connection control
  3. Choose a new connection and click Save.

Repair a Connection

If your OAuth connection is lost, you can repair the connection by refreshing the access token.

To repair a connection:

  1. Open the flow.

  2. Click Edit.

  3. Click the change icon in the trigger or action that requires repair, and then click Change Connection.

  4. Click Repair.

Delete a Connection

If you no longer need a specific connection, you can delete it.

To delete a connection:

  1. Create a new flow or add a step to an existing flow.

  2. If you create a new flow:

    1. Select the connector or system to start your flow.

    2. In the What Should Start This Flow? window, click the gear icon.

  3. If you add a step to an existing flow:

    1. Select the connector or system to start your flow.

    2. In the Next Step window, click the gear icon.

  4. In the Manage <Connector Name> Connections window, next to the connection that you want to delete, click the trashcan.
    A message appears ensuring that you want to delete the selected connection. A window appears, displaying a list of flows currently using that connection. If the connection is:

    • Not used in any flows, you can delete the connection.

    • Used in inactive flows, a list containing the name and count of inactive flows using this connection appears. Deleting this connection will affect the listed flows. If you reopen the inactive flow, you must select a new connection.

    • Used in active and inactive flows, a list containing the name, count, and status of active and inactive flows using this connection appears. If you choose to delete the connection, secondary confirmation appears. Prior to deleting the connection, Composer will first attempt to stop the flows.

  5. Click Delete.
    The connection is deleted.

Schedule a Flow

If you don’t choose a connection, you can schedule a flow to start at regular intervals.

To create a flow control:

  1. In a new flow, from the What Should Start This Flow? dialog, look in the Flow Control section and click Scheduler.

    What Should Start This Flow dialog

  2. Choose one of the time intervals, from 15 minutes to 30 days.

    New trigger with time interval
  3. Click Save.
    After creating the trigger, add one or more actions to the flow. To apply logic to an action, prepend it with an If/Else block or For Each loop.

Open Access for Flows

All users can view or manage all flows within your org.

This feature is enabled by default for new customers and disabled by default for existing customers. To disable this feature at the org level, contact Composer Support.

Limitations

  • To filter by owner of the flow, you must use the Flow Owner field and not the Owner field.

  • When filtering using the Flow Owner field, you can use only the starts with, equals, and contains operators. The starts with, equals, and contains operators all mimic the functionality of the contains operator.

  • In orgs of existing customers, Flow Owner is not visible by default in the list view on the Composer Flows tab. New customers, however, can see Flow Owner by default in the list view on the Composer Flows tab.

    • To add Flow Owner to the Recently viewed list:

      1. From the Composer Flows tab, select Recently viewed.

      2. Go to Setup > Search Layouts > Composer Flow > Default Layout.

      3. Add Flow Owner.

    • To add Flow Owner to All (or any other view list):

      1. From the Composer Flows tab, select All.

      2. Go to List View Controls > Select Fields to Display.

      3. Move Flow Owner from Available Fields to Visible Fields.

  • Bulk ownership transfer or changing ownership to a user other than yourself is not supported.

View Flows

You can view all flows within your org and view flow details, such as the status to see if a flow is active or inactive, the last modified date to see flow changes (not activation or deactivation), the flow owner, or the run history.

To view all flows within your org:

  1. Go to the Composer Flows tab. You can now view all flows within your org and view flow details, such as Flow Name, Status, and Last Modified Date.

Manage Flows

You can manage all flows within your org. You can activate or deactivate all flows within your org, delete all flows within your org, edit all flows within your org, or change ownership of error email notification flows within your org.

To manage all flows within your org:

  1. From the Composer Flows tab, select a flow.

  2. Click on the desired button, for example, click Delete to delete a flow or click Transfer ownership to change flow ownership (for error email notification flows only).

Create an Action

To create an action:

  1. After the trigger in your flow, click the large plus sign to open the Add Action dialog.

  2. Click or create a connection for the action.

    For example, if your trigger is "new records created in Salesforce," and you want your action to be "copy new record to a Google Sheet," then you would choose or create a Google Sheet connection.

  3. Select an action, and any other values displayed. What you have to specify for an action depends on system type you are connected to for the action.

  4. If you want to edit a field, and that field is enabled for a custom expression, click the pencil icon.
    Note that you can only enter text or select a single data pill for a field. If you want to enter a complex expression (including functions, math operators, concatenation of text, and special tokens), you must use the Custom Expression Editor.

  5. Click Save.

When there are null values in custom expressions and are:

  • Fields without attributes, the null value is ignored. If the value in a required field, an error message occurs. If the value is in an optional field, the value is ignored and not sent to the connector.

  • Fields with attributes, the value is ignored and not sent to the connector.

Create a Picklist Mapping

Using Picklist Mapping, you can map data from one application to the corresponding data needed by another application and then reuse those mappings in different flows in your organization. This enables you to connect two applications that have different values for similar fields and to align the values in those fields across applications. You can then determine how the possible values of an output field (data pill) map to the possible values of an input field.

For example, you can map a data pill from the Country field in a Salesforce record and provide the same values in the Country field of the NetSuite record.

Country (Salesforce) Country (NetSuite)

US

_unitedStates

CA

_canada

DE

_germany

AR

_argentina

In this example, the Status field in a case in Salesforce is mapped to the Status field in a ticket in Zendesk to create continuity in field values across systems.

Status (Salesforce) Status (Zendesk)

New

New

Working

Open

Waiting on Customer

On-Hold

Escalated

Open

Closed

Closed

When mapping source data fields:

  • The source field must be a data pill with a fixed list of values.

  • The target field must be an enumerated data type field.

  • If any other unmapped value from the source system is found, the default mapping specifies the value in the target system . If you do not specify a default value, the original value from the source field is passed to the target field.

  • The mapping is stored at the organization level and can be reused across flows.

  • The mapping must have a unique name.

  • Mappings are available to everyone in your organization.

To map source data fields to target fields:

  1. From the Composer Flows tab, open a flow and click Edit.

  2. In an action card, in a field that supports Pick from List, select Picklist Mapping from the drop-down menu.
    The Picklist Mapping window appears.

  3. In the Picklist Source section, in the Source field, select the value from the drop-down list that you want to map to the value in the Target field, and then click Next.

  4. In the Global Picklist Selection section, create a new picklist or choose an existing picklist.

Create a new picklist

To create a new picklist:

  1. Click Create new picklist.

  2. In the Global picklist name field, enter a unique name for the picklist.

  3. Optionally, in the Description field, enter a description for the picklist. The following description is populated automatically based on your source and target systems:
    This maps [Source Field Name] from [Source Connection Name] to [Target Field Name] from [Target Connection Name]

  4. In the table, select the source fields and their target mappings.

  5. Optionally, to add additional field mappings, click Add Row and enter the source field values manually (with a row representing each value) and select the target mappings from the drop-down.

  6. Once you have added all applicable field mappings, click Create Picklist.

  7. Click Apply.
    The <Picklist Name> section appears, displaying a table of values and their mappings.

Choose an existing picklist

To choose an existing picklist:

  1. Select a picklist from the list. Note that all edits made to an existing picklist will impact all flows in which that picklist is currently used.

  2. Optionally, in the <Picklist Name> section, to edit the values, click the pencil. Once you have edited the values, click Save Picklist and then click Apply.

  3. Optionally, in the <Picklist Name> section, to delete the picklist, click the trashcan. Note that deleting a global picklist will affect all flows currently using that picklist.

  4. Click Apply.
    The action card appears.

Create a Flow Control

If you need to perform some logic before an action, select a flow control first:

  1. After the trigger in your flow, click the large plus sign to open the Add Action dialog.

  2. Click either If/Else Block or For Each. An If/Else block is good when you need to do different actions depending on one or more conditions. A For Each loop is good for processing a set of records.

  3. Complete the flow control, which usually includes adding an action.

  4. Click Save.

Add an If/Else Block

You can create an If/Else block to set conditions and execute actions only when specific criteria are met. This enables you to create flows that cover more than one linear branch, without the need to create separate flows.

Branches are logic-based steps that run vertically in a flow. You can add multiple steps inside each branch. Each branch is then executed in sequential order.

When adding decision steps, the values in the Field list are populated based on values selected when you designate the previous steps of your flow. After the Field value is selected, all compatible value options appear in the Operator list. If the selected Operator requires a second data pill to complete the condition, then the Value field is enabled and the list is populated based on the values you selected when defining the trigger. In the Value field, you can either enter a value manually or you can set it using the existing data from your flow.

For the purposes of comparing flows, if you initiate a date comparison when building a flow and there is no value in one of the date fields, the missing value is updated to 0001-01-01 by default.

The following operators are supported when building conditions in an If/Else block:

Function Supported Data Type Value Required? Notes

Equals/Does not equal

All

Yes

The value in this field is case-sensitive for strings.

Contains/Does not contain

Array, String

Yes

None

Greater than/Less than

Date, Number

Yes

In the Date field, the Greater than value is equal to a later date and the Less than value is equal to an earlier date.

Greater than or equal/Less than or equal

Date, Number

Yes

In the Date field, the Greater than or equal value is equal to a later date or the current date and the Less than or equal value is equal to an earlier date or the current date.

Is empty/Is not empty

Array, String, Object

No

None

Starts with/Ends with

String

Yes

A string value for this field is required.

Is true/Is false

Boolean

No

None

Is present/Is not present

All

No

If the value in this field is null or if there is no value selected, then the value in this field is set to Not present by default.

To create an If/Else block:

  1. Click the plus sign after the trigger or the last action in your flow.

  2. Click Add Action.

  3. Click If/Else Block to define the first branch.

  4. Enter the requested criteria. You can specify that all conditions should be met (AND), any condition can be met (OR), or customize the order and grouping of your conditions.

  5. Click + to add an action to that branch. Every branch must have an action, also called a step.

  6. If you want to add another branch, click Add If and repeat the previous steps for every If/Else branch you create.

  7. If you want to set criteria for how the flow executes if none of the criteria for the existing branches are met, click Add Else and repeat the previous steps for the final branch.

  8. If you want to add additional conditions to your If/Else block, click Add condition.

  9. After you add all the branches, click Save.

Use Custom Logic

Custom logic uses the row number for each condition in the If statement block of an If/Else statement and OR, AND, and NOT to create complex expressions. When you select the custom logic option, each condition is assigned a number and you can then use that number to customize the order of operations for the conditions.

When using custom logic, all conditions defined must be referenced in the expression for the expression to be validated. For example, if there are three defined conditions and you enter “1 and (2 or 1)”, the expression is invalid because “3” is not referenced.

Using custom logic, you can have up to 20 conditions and a condition can be referenced more than once.

Create a For Each Loop

To create a For Each Loop:

  1. Click the plus sign after the trigger or the last action in your flow.

  2. Click Add Action.

  3. Click For Each.

  4. Choose a data pill from the Input list. You must have a trigger or action that returns a set of records or there won’t be anything to choose here.

  5. Click the plus sign to add an action.

  6. After you complete the action, click Save.

You can add logic and actions in different patterns, depending on what your flow needs to do.

Was this article helpful? Thanks for your feedback!
View on GitHub