Lead Distribution
Precious Leads allows leads to be assigned to appointment setters or sales people so that they can follow up with them.
This is a category setting (every category can have different users and configurations).
There are 3 options:
Unassigned: New leads will not be assigned to any user.
Automatic: New leads will be evenly distributed among users of that category.
Custom: New leads will be assigned to users based on custom percentages.
Before setting these options on the front end, you might need to first get the users that can be assigned to that particular category.
You can do that by doing a GET request to the following endpoint:
/users/?organization_id=1&category_id=1
By specifying the category id in the query params, the backend will return those users belonging to that category in specific.
Next, if you want to change the category settings, you can PUT the category endpoint with a JSON like this:
{
"lead_distribution_mode": "custom",
"lead_distribution_map":
{
"1": 20,
"2": 30,
"3": 50
}
}
lead_distribution_mode has 3 possible values: unassigned, automatic, custom.
lead_distribution_map is a JSON that maps user ids to their probability of being assigned a user. This is only used if the mode is “custom”.
Something to consider:
The probabilities specified in the JSON are “weights”, which mean that:
Values of 33.3% and 66.6%
Will give the same outcomes as
Values of 1 and 2
This means that we could give the end user the option to choose whether he wants to specify percentages or weights.
It might be easier or preferable for some users to specify weights. Also, weights don’t need to add 100, as is the case with percentages.
We could add a third property to categories such as:
lead_distribution_unit: percentage
Where the 2 possible options are percentage and weight.
Something to consider.