Run Flow
Breezz also allows you to launch flow as a Step. Let’s take a simple example of leads rating. We should take action when lead status is changed as probably something needs to be done. So we propose an example, if status was changed and any new information was provided, for that matter just a status change is enough, we will trigger flow that updates lead rating to hot to indicate that recently there was activity. To make this happen with a flow inside of Step create an autolaunched flow in Setup. Execution of flows inside of Breezz allows users to operate on SObjects gathered by trigger action in an orderly manner. Logic behind it, well it’s pretty simple. Breezz trigger collects records from trigger context, old versions of records as oldRecords and new as records. After work inside is done you can create a record collection variable inside the flow. Variables have to be named results. Breezz will update records that already exist and create new ones.
Step 1
Create 3 variables inside the newly created flow, records, oldRecords and results. All should be configured as record collection variables of Lead object type.
Step 2
Loop through the records and filter through old records for comparison.
Step 3
Make a decision block that will check if the status field in the lead record was changed.
Step 4
Lastly create an assignment block to save updated records to the results. At the end flow should look something like this.
After you save your flow head to Step Group setup. Create an after update trigger on the lead object if you don’t have it and configure Breezz trigger with auto generated group. To this newly created group we will add Step with flow type just like this one. After updating record to “Working - Contacted” if all conditions are met rating will be updated to “Hot”.