Individual Timelines
Created by: artfulrobot
Currently while a contact may be put on a journey at any time, all users on a particular journey are processed at once. So for example if the journey steps forward on a Monday, someone who joins on Tuesday will wait 6 days whereas someone who joins the journey on Sunday will be moved on after 1 day.
We would like timelines to be unique to the contacts, with each step having a time interval configured that must elapse before it triggers. So if each step’s wait time was 1 week, the person who joined on Tuesday would next be progressed on the following Tuesday, and the person who joined on Sunday would be processed on Sundays.
The wait time would be configurable on each step. e.g.
-
Step 1: Wait is not applicable because some other process starts this.
-
Step 2: after 7 days: send template A, move them onto step 3.
-
Step 3: after another 14 days: send template B, move them onto step 4.
-
Step 4: after 2 days: send template C, journey ends.
Technically this would work by:
-
Storing a “not before” date on a contact’s record. This will be an absolute date, e.g. 29 March 2019.
-
Calculating the not before date when moving the contact to the next step based on that step’s delay.
-
When processing steps, only process contacts for a given step if today’s date is equal to or before the “not before” date.
-
This requires a code loop to process the contacts one by one, instead of the current SQL based update.
-
We also need to make this backwards compatible: for each journey you should be able to select whether you want to use individual timelines or not. An upgrader should set the config for existing users’ journeys not to use individual timelines. Nb. The current functionality is still valuable because some organisations choose the time and day of their mailings based on statistical analysis of when it’s best for people to receive them.
-
This code needs automated tests to document proper functioning since there will be a lot of variables and it might not be easy to reason about / there could be different assumptions about the implications of certain configurations.