Multi Object Distribution System – Wrapping Up

Updated 04/09/2022

Now we have finished all the main flows. There are just three smaller flows to build. The first will number the the users in a distribution container. It is a record triggered flow when the distribution container is set to active.

Numbering Flow

The criteria for record triggered is when updated and set to an after save with the criteria of when Active Equals True and only when it is changed to meet criteria.

Get All Records

We need to get all the distribution users related to distribution container. So we will set Distribution Container to equal the record id of what has been triggered. We only need retrieve the id and the number field the latter is the field we will be updating.

Looping Records

We will pass the collection of distribution users. We need to create a number variable with a default value of 0 named NumberCount. Each time we loop through this we will update the NumberCount by one each time it loops round. We will also assign the incremented number to the current record from the collection and then add this record to a new record collection. I have set them out as three individual assignment elements as pictured below.

After the above has been done. On loop exit add a update records and assign the second collection variable named UpdatedDistributionUser. This will now update all records added to it with the numbers which will allow looping when assigning records.

Testing Flow

Create a Record Triggered Flow set the object to Case. Leave it as when it is created. Add the subflow for distribution system. Map the inputs and outputs as follows. This will find the test distribution container this will put the output to the record.ownerid.

At the end of the flow create a update on record triggering. Now save the flow and activate it with all the rest of the flows. Create a case and save it this will distribute to one user. Next clone or create a new case and save that this will update the record. Check the distribution container for it updating the number of times ran and current distributor. Also check the case owner if everything is correct the two records will have different owners.

As the final part of the puzzle create another flow based on a edit. Select a criteria to suits your needs. Then set up the flow the same and test that from there you can build as many trigger points or include it in existing flows. This concludes this tutorial happy building and stay tuned for more content.

Published 30/08/2022
Category: Distribution, Tutorials

Other Posts