Configuring Flows for Motion Policies

The purpose of this article is to provide direction for configuring a Flow in Salesforce for a Fullcast policy. Configuring a flow in the Salesforce environment for each policy to trigger it when needed is one of the essential steps in the execution of any motion policy. 

Figure 1 Flow Builder Configuration Page

Configure Flow for Policies

Follow the below steps to set up a flow:

  1. Log into the Salesforce environment, click the Settings icon (gear), and select the Setup option from the drop-down menu. 
  2. Search “Flows” and select Flows beneath Process Automation. 
Figure 2 New Flow Screen
  1. Click the New Flow button and select how you would like to build your automation: from scratch, or a template. 

Note: For this article, we selected the “start from scratch” option. 

Figure 3 Select Type
  1. Select the “Record-Triggered Flow” option for the Type and click Create. 
  2. Select the object whose records trigger the flow when they’re created, updated, or deleted. This is the object you select when creating a record-triggered flow. When a record of this object is created, updated, or deleted, the flow will automatically initiate. For example, if you are configuring this flow for account routing policies, you would select the Account object from the dropdown menu. 
  3. Configure Trigger. Identify what trigger should be used to initiate the flow: 

Trigger Description
A record is created When the record is created, the flow will execute. 
A record is updated When the record is updated, the flow will execute.
A record is created or updated When the record is created or updated, the flow will trigger. 
A record is deleted The flow only triggers when the record is deleted. 
Figure 4 Set Entry Conditions Example
  1. Set Entry Conditions. Specify the entry conditions to reduce the number of records that trigger the flow and the number of times the flow is executed. Figure 4 is an example condition where changing the value in the custom domain field will run the flow every time a record is updated and meets the condition requirements. 

Note: When creating a flow triggered by record updates, it is best practice to first define entry criteria. Then, choose the “Only when a record is updated to meet the condition requirements” option to ensure the flow runs when the updated record meets specific conditions. 

Figure 5 Record-triggered Flow Example

The example in Figure 5 illustrates a record-triggered flow that is triggered on the account object when a record is created or updated on the custom domain field. This flow will run every time a record is updated and meets the condition requirements. 

Figure 6 Adding Policy Handler Action
  1. Click the plus sign between “Run Immediately” and “End” on the process flow. 
  2. Select Action from the dropdown menu. 
  3. Search Actions for “Policy Handler” and select Policy Handler. 

Note: All the above steps are common for configuring a flow for all policies. Only the Apex input values change for each policy. Refer below sections to check the Apex variable input values to complete the flow configuration, for the policy that you want to execute. 

  1. Click Save. 
Figure 7 Save Flow
  1. Provide a Flow Label, Flow API, and Description, then click Save. 

Note: An API name unique for each policy is automatically generated when you name the process. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us