top of page

Round Robin Logic

The Round Robin Logic solution provides round robin logic that can be executed from apex or flow with minimal setup.

Components

- Round Robin Logic apex Action

- Round Robin configuration

- Round Robin Member configuration

Price

One-time $199

Sandbox: Use the installation link to install and test the functionality.

Production: Contact us for production trial keys or to purchase.

Create a Round Robin Queue

image.png

Name

Assign a unique name to the queue

Last Position Assignned

Establish a starting position for the Queue rotation

The Run Round Robin apex action

The Run Round Robin apex action will assign the next member(s) in the queue.

Inputs

Record

The record to run through the Round Robin

API Field To Update

The field (api field name) that will be updated with the queue member. This can be any field that is a user lookup. For ownership, use "OwnerId".

Round Robin Queue Name

The name of the Round Robin Queue.

Update Record

A boolean to indicate when or not the record should be updated. Setting the value to false, will return the record with the queue member assignments but not committed. Use this option when additional assignments are required.

Outputs

Record

The record returned with the queue member assigned. If Update Record = true, this record will have already been saved.

isSuccess

Set to True if the apex action was successful.  Set to False if an error was encountered.

Error Message

If status is “Fail”, the message of the error encountered

Create a Round Robin Queue Members

image.png

User

The user assigned as a queue memmber

Position

Assign a user to a position in the queue. 

For easier maintenance, separate positions by at least 10 (i.e. 10, 20, 30) so that edits are easily to apply.

​

isActive

Toggle the member from active to inactive

Start Date (Optional)

Set a start date for round robin assignments

End Date (Optional)

Set an end date for round robin assignments

Add a user to the queue multiple times to simulate a weighted round robin.

Sample apex script

List <Account> accounts = [SELECT Id, OwnerId FROM Account LIMIT 10];

 

// Paramters

// List <sObject> of records to process

// Round Robin Queue Name

// Field to Update 

// Save records True/False

roundRobinLogic.roundRobinHelper.processRoundRobin (accounts, 'Sample RR Queue', 'OwnerId', true);

Sample flow execution

This example demonstrates a Round Robin running on Account creation.

image.png
bottom of page