I overestimate my model and the way I try to solve a specific problem. I have Contacts that may belong to the Campaign, which is a series of actions, such as phone calls and emails, each of which is assigned within a few days as an attribute that determines when it should be sent.
I want cron to look at and view emails that should be today (or maybe expired), and discard those emails.
All contacts have their own start dates.
Once a call, which should take place, say, in 6 days from the very beginning, is not made up to 10 days. This means that e-mail in the same campaign, which must be completed 8 days from the beginning, should be postponed for another 4 days, up to 12 days from the beginning, but only for this specific contact if the deferred call was for the contact.
I would like people to come closer to modeling this and, in particular, to come up with the right emails any day to send.
Some issues that I encountered with my approach:
1) When there is no email to send, I am mistaken with zero. I try to catch him wondering if there is a better way to check. How do people deal with this?
2) How do you calculate the cascade delay? I use a sophisticated way to first check the last date of everything that has been completed (completed elements have their own entries in ContactEmail or ContactCalls, for example). Then I find the difference in interval versus the days attribute. Then I add this interval to the end date of the last item.
source share