-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set action-specific "date added to group X" field on RapidPro contacts #902
Conversation
Note that we also don't have to actually run this script; on October 23, I modified our RapidPro flows so that we set the correct custom date field (e.g. |
Ok, I've changed things so that instead of just setting the custom date fields to the "created on" date field, we actually go through each user's history and figure out when they completed the flow that added the user to the relevant contact group. This means the date will be accurate and we can easily figure out what users were never reached because their "created on" date was so out-of-sync with the date they were added to a group. |
Ok, I've run this code and all our fields are migrated over, so I'm closing this PR. |
Note: this PR isn't intended for merging, I'm going to just run it locally and then close this PR to ensure that the code is recorded somewhere.
Currently our RapidPro campaigns trigger off the "Created On" contact field, which is fine when a user signs up with us and immediately pursues an action. However, if the user waits before completing an action, or if they pursue multiple actions, the campaign events may never trigger.
We're going to be migrating to a model where we have custom user fields that represent the date/time when a user was added to a certain group, and have our campaigns trigger off those instead. This does the data migration of making sure our current users still receive follow-ups once the switch-over occurs.
For more details see our private clubhouse ticket.