Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2842 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm having trouble getting my head around this for some reason...

      In my solution my client has employees that confirm info, qualify a lead and then send an email out to the sales team.  Recently there has been some bickering about who's lead is who's... I'm looking to instead of sending a mass email ([email protected]) i need to send out leads to individual sales people on a rotation.  So if there are 5 sales persons it would send the first one to the first sales person, etc then the 6th lead go to the first sales person, etc.  Upon closing down for the day, the next day would pick up right where it left off as far as who to send the next one to.  I'm assuming this gonna be a face in palm for me... I cant seem to find a function that will generate numbers in succession and then restart after a predetermined amount. I've been stuck for weeks and would appreciate any input or help. 

Thanks!

Posted

I would create a table of sales people or, if you already have a table of employees, use that table. Load the sales people into a global variable and use the top email address each time you send out your lead. Move the top email address to the bottom after the email is sent.

This formula will grab the first email from a return-separated list:

GetValue($$Emails; 1)

This formula will move the first email to the bottom:

RightWords($$Emails; ValueCount($$Emails) - 1) &

& ¶ & GetValue($$Emails; 1)

You can run this as a Script Schedule on Server if you have an SMTP Server.

Posted (edited)

I am not sure I fully understand the context of your question.  Would it be correct to assume you create a new record for each lead as it comes in, and then want to assign it to one of the 5 sales people? This could be done by defining a LeadID field as an auto-entered serial number field, and a SalesPersonID field as auto-entering the following calculation:

Let ( [
ids = ValueListItems ( Get ( FileName ) ; "SalesPeople" ) ;
n = ValueCount ( ids ) 
] ;
GetValue ( ids ; Mod ( LeadID - 1 ; n ) + 1 )
)

where SalesPeople is a value list using values from the SalesPersonID field in the SalesPeople table.

 

Alternatively, you could make the field auto-enter =

Let ( [
ids = ValueListItems ( Get ( FileName ) ; "SalesPeople" ) ;
n = ValueCount ( ids )
] ;
GetValue ( ids ; Int ( Random * n ) + 1 )
)

This will pick one of the sales people randomly - and in the long run, the distribution of leads among the sales team will be just as even.

 

Edited by comment

This topic is 2842 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.