function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Random Day Of Month That Stays Consistent For A Contact (For Task Assignment SControl)

Hey all,
I'm scratching my head a bit on a request from my users, and I thought I'd ping you guys to see if you have any insight.

I've developed a SControl that will query the group of contacts that a particular user is responsible for and will auto-create a task (phone call) for the user.  It is invisioned that this SControl would be invoked every 28 days.

The calls should be spread out over 28 days.  So, if I have 280 people that I'm responsible for today, I would have 10 people to call today, 10 tomorrow, 10 the day after, etc (I'm ignoring weekends at the moment).

My trouble lies here:
- I want the day that a contact is called to stay consistent within the 28 day window.  So, if the SControl assigns a call for Joe Smith on the 6th day of the cycle when I run it this month, I want it to assign him to the 6th day of the cycle when I run it next month.  This will help provide a relatively constant & consistent contact model.

For the life of me, I cant' think of a trigger for this.  I was thinking about using the day of the birthday, but there is a lot of variability in the number of birthdays.

Any thoughts?  Am I missing something easy?
Hi RK,

    I would suggest that you create a new field in Contact which will tell when to send this contact a notification. i.e. create a picklist with value from 1 to 28 and then you just have to setup the values once. Then create your S-control in such a way that you select the contacts adn group them by this new picklist field and then create a task or activity for the group.

    Let me know if this solution is ok or we can think of some alternative.
Hi Mojeeb,
Thanks for the reply.

Although the manual process that you suggested would work in theory, reality has proven to me that in cases similar to this where there is a human element involved, often times the tagging won't happen.

Plus, I don't want to put the burden of tagging the reps and maintaining the day of the month on the shoulders of my end users.

My current thought is that I some how use a summation of the digits associated with teh birthdate of the producer.  From that, I might be able to segment accordingly & automatically.  However, I still need to play around with this to see if it is feasible or not.


You could pull the DAY out of the b-day using a formula and then use that to report on who to call when. 

If you didn't want to do that then create a custom field to hold the date.  Use a random number generator to create the digits to put in that field and then update the records (you can do this .  You can then use an scontrol to query records without a value in that field and then use the random number generation to populate those records with values.  This will prevent you from having to do a huge call each month and focus on the new records only.  Let me know if you need further explanation.