Sample Flow to Activate a Collection of Contracts on Approval

This page describes a sample flow to activate a collection of contracts automatically upon approval.

Warning:

This page does not give step-by-step instructions on how to create the sample flow. The information is intended for administrators who are already experienced at creating Salesforce flows. Refer to the Salesforce Help if you need information about how to create flows.

The Sample Flow

This sample flow is a Record-Triggered Flow that uses the Activate Billing Contracts Asynchronously action.

Diagram of Sample Flow to Activate A Collection of Contracts on Approval

An explanation of each numbered item is provided in the table below.

# Flow Element Sample Flow Suggestion Sample Flow Setup
1 Flow Element: Start

Create a new Record-Triggered flow. In the Configure Start window, set:

Object: Billing Contract

Trigger the Flow When: A record is updated

Condition requirements: All conditions are met (AND)

Then add the following conditions:

ffbc__Status__c Equals Draft

ffbc__ApprovalStatus__c Equals Approved

When to Run the Flow for Updated Records: Every time a record is updated and meets the condition requirements

Screenshot of Configure Start window in the Flow UI
2 Flow Element: Apex Action Add an Action element. Choose the Activate Billing Contracts Asynchronously action, then complete the input value.

Set Input Values

Billing Contract ID to be activated: {!$Record.Id}

Note:

Billing schedules will be generated for each activated contract according to the Billing Schedule Number of Months field in the Billing Central Settings custom setting. For more information about the Activate Billing Contracts Asynchronously action, see Custom Actions to Activate Contracts
.

Screenshot of Configure Start window in the Flow UI
3 Flow Element: End

End of flow.

 
  Activate the flow Remember to save and activate the flow to make it available for use.