Update additional basket methods to talk to CTMS
Closed this issue · 0 comments
jwhitlock commented
Update additional basket methods to talk to CTMS:
- confirm_user - Called when a user confirms a newsletter subscription. Add a parallel update to CTMS.
- fxa_delete - Called when an FxA account is deleted. Add a parallel update to CTMS.
- fxa_email_changed - Called when a user changes their FxA account emailed. Add a parallel update to CTMS.
- process_donation - Called when processing a donation to the Mozilla Foundation. Add a parallel update to CTMS.
- process_petition_signature - Called when processing a petition signature. Add a parallel update to CTMS.
- record_common_voice_update - Called when processing a Common Voice update, which may include subscribing to the newsletter. Add a parallel update to CTMS.
- update_custom_unsub - Called when a user gives a reason for unsubscribing from all newsletters. Add a call to populate unknown email_ids from CTMS, or to update by basket token.
- update_user_meta - Called from
/news/user-meta/{token}/
. Add a call to populate unknown email_ids from CTMS, or to update by basket token. - amo_check_user_for_deletion - Called when removing the relation between an author and an add-on. If a contact is no longer an author of any add-ons, the AMO data is removed from the contact. Add a call to clear the CTMS AMO data as well.
- fxa_direct_update_contact - Generic function to update a contact by FxA ID. Only called by
fxa_delete
. Either update this to update CTMS by FxA ID, or updatefxa_delete
. - get_fxa_user_data - Get user data and validate the FxA data. The comments suggest this function did more in the past. Add an update to CTMS.
- upsert_amo_user_data - Calls by the AMO sync background tasks. Add an update to CTMS.
These were updated as part of issue #674:
- get_user_data - Call CTMS to attempt to fill in a missing email_id.
- upsert_contact - Call CTMS to create new contacts, or update (only if the email_id is known).
- sfdc_add_update - Run add / update tasks queued during maintenance mode.
These functions will need to be updated again as we transition to CTMS and away from SFDC, so it may be useful to add common functions to centralize changes.