In many organizations there are multiple individuals responsible for completing the same or similar tasks. Admins would like the system to auto-assign records to specific Staff members based on a set of criteria, in a round robin assignment. This Article covers how to create a Last Assigned Date/Time field on the Staff record to track when each Staff member was Last Assigned their Task/Re-Call/Marketing Opportunity etc.
This Flow example is for the "Processing" team who is responsible for evaluating Sale records, but this could be used to Assign Marketing Opportunities, Campaign Member Re-Calls or specific Tasks.
First, create a custom Date/Time field on the Staff member object labeled Last Assigned
Next, create a Record triggered Flow
Start Node:
when Record is created
No conditions
Use a Get action to query the Staff members which meet the criteria. In our example we are using a Position Title of "Processing" but you will want to set your own Criteria for which Staff members should be included in the round robin query. To ensure only Active Staff are queried, be sure to include criteria that the Staff End date IS Null.
Sort the records Ascending by the Last Assigned Date/Time
Store only the First record's data
Next add an element to Update the Triggering record
Use this action to Assign the Staff member Record ID to your custom field (or a native Assigned To field), using the Staff Record ID from the Get action
Next Add an Assignment element to the Flow.
Update the Last Assigned date/time Variable with the Current Date/Time (select Flow >)
And last, add an Update Records element to the Flow
Use the IDs and all values from a record or collection
Choose the Staff ID from the Get action
This Flow ensures that the appropriate staff member is assigned the next Record, based on their Last Assigned date/time being the oldest among the Staff members with the same qualifying Criteria.
The Flow will look something like this: