Automatically assign leads to an agent

:bullseye: What is your goal?

My current goal is to assign each incoming lead (recorded in Notion) to an agent and send them an email, but in turn, for example, the first incoming lead to agent 1, the second to agent 2, and so on, repeating the loop.

:thinking: What is the problem & what have you tried?

I don’t know how to distribute leads fairly among agents (3 agents).

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

1 Like

Hey Dominique,

record externally how many leads each agent had so far and always send the next lead to the agent with the least amount of leads.

You can do this in a data store in Make for example - search the data store to get all of them, sort them by the amount of leads and pick the last one and then +1 his count.

Optionally - have an automation reset the data store Monday morning or on the 1st each month.

Thanks, I’ll try your solution and see how it goes.

1 Like

Hi @Dominique_Djagbassou

It depends on your concept of “fair”. :sweat_smile:

I would go with @Stoyan_Vatov’s answer, but with a simpler algorithm: Round robin.

Create a simple Data Store with one column and one entry, the number 1. Get that value in your scenario (Search Records or Get records with hardcoded ID), divide by the number of agents and use the remainder. If you have 3 agents, it’s something like this:

(Of course you can omit this module altogether and use the calculation everywhere. It’s here for the sake of explaining.)

Then use the resulting number to route the email to the correct agent (0, 1 or 2). Don’t forget to update the record with the last used value.

@damato

2 Likes