Using appRules® to Implement Round Robin Lead & Case Assignments in Salesforce

Assigning leads and cases to users using a formula that works for your company is a common requirement for most sales, marketing and customer service departments.

While most CRM and customer service solutions provide a rudimentary implementation of lead and case assignment, they do not offer support for the advanced schemes that most companies require.

appRules includes several workflow activities that can be used to implement a variety of advanced assignment schemes.  In this post, we will explore how you can implement round robin lead and case assignments in Salesforce without writing code.

Using the basic activities in appRules, the project below shows how you can implement a round robin lead assignment solution for Salesforce.


The activities below are executed once to initialize the sources and targets used in the project.

# Activity Description
1 PreloadSalesforceUsers This activity is the InitializeSalesforceSource activity configured to load selected records from the User entity.
2 SalesforceLeadsSource This activity is the InitializeSalesforceSource activity configured to fetch selected records from the Lead entity one at a time.  These are the records to be assigned in a round robin fashion.
3 SalesforceLeadsTarget This activity is the InitializeSalesforceTarget activity configured for saving records in the Lead entity.



Record Iteration

The activities below are executed in a loop to assign the leads in a round robin fashion.  (Looping is implemented using the While activity with a simple App.Result condition.)

# Activity Description
1 AssignLead This activity is the UpdateSalesforceRecord activity configured to update the Lead OwnerId using the preloaded User.
2 GetNextUserFromList This activity is the GetNextPreloadedSalesforceRecord configured to get the next User record from PreloadSalesforceUsers.

Note: The EndOfListAction property is set to RestartList.  This is what implements the round robin scheme since it will continue cycling through the preloaded users.

3 GetNextLeadRecord This activity is the GetNextSalesforceRecord configured to get the next lead record.


By configuring only six out-of-the-box activities, we are able to compose a solution for implementing round robin lead assignment for Salesforce.  This solution can be run on premise or in the cloud.

You can download this project at:

Author: appStrategy Team

appStrategy Support Team blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s