Page MenuHomePhabricator

Acoustic SMS stage 5 - update queue consumer support for SMS RML
Closed, ResolvedPublic

Description

Currently these are the expected steps (which could be sub-tasks)

  • update the donation form to take the recipient id from the rml and add it to the message
  • create 2 new custom fields in Civi extending the 'phone' entity - source and recipient ID (source options TBD - but probably similar to address)
  • in Acoustic create a custom field to denote the 'master record' - (would it hold contact ID, recipient ID or email?) to be populated with an RML phone has led to a donation & thus led to us linking it to a different contact - not done in this phab - we still need to figure out how queries will work on the Acoustic side to exclude in future
  • In the Message class normalization - when recipient_id is present add to the message array these 2 new custom fields (apiv4 style syntax) plus phone_primary.phone = 999999
  • In the WMFContact.Save class ensure the custom fields get saved
  • Create a job that looks for this 99999 phone number and sends a query to Acoustic to get the actual phone number based on the recipient ID.
  • At this point it would ALSO look up whether there is an existing record in Acoustic for the email of the contact. If there is not then if will 'claim' the phone-only record by pushing the email into it. If there is then it will soft-cancel the Acoustic record by pushing the master record value into it - not done at this stage -not sure this is the right approach
  • the tools repo export should be update to not push any records with a phone of 99999 - to avoid the nightly export doing anything before the reconcilitiation job has had a chance - not doing this at this stage as we do not push up the mobile number

Event Timeline

Eileenmcnaughton renamed this task from Acoustic, post db convert - update queue consumer support for SMS RML to Acoustic SMS stage 5 - update queue consumer support for SMS RML.Oct 8 2024, 4:35 AM

Change #1089935 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Add phone data fields

https://gerrit.wikimedia.org/r/1089935

Change #1089936 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Move addContributionTrackingIfMissing to queue consumer

https://gerrit.wikimedia.org/r/1089936

Change #1089938 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Simplify contribution tracking lookup

https://gerrit.wikimedia.org/r/1089938

Change #1089942 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Move another function to only caller

https://gerrit.wikimedia.org/r/1089942

Change #1089945 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Clean up existing phone save behaviour

https://gerrit.wikimedia.org/r/1089945

Change #1089946 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Add new phone data fields

https://gerrit.wikimedia.org/r/1089946

Change #1089935 abandoned by Eileen:

[wikimedia/fundraising/crm@master] Add phone data fields

https://gerrit.wikimedia.org/r/1089935

After discussion with @bsisolak I think we need to create a new table to store the consent data since it is attached to the phone, not the contact and we are likely to need to look it up & re-consent it - proposed table

id, phone number, consent_date, recipient_id, consent_source, opted_in

Change #1089936 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Move addContributionTrackingIfMissing to queue consumer

https://gerrit.wikimedia.org/r/1089936

Change #1089938 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Simplify contribution tracking lookup

https://gerrit.wikimedia.org/r/1089938

Change #1089942 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Move another function to only caller

https://gerrit.wikimedia.org/r/1089942

Change #1089945 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Clean up existing phone save behaviour

https://gerrit.wikimedia.org/r/1089945

Change #1089946 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add new phone data fields

https://gerrit.wikimedia.org/r/1089946

Change #1099838 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/crm@master] Update wikimedia/omnimail-silverpop to loosen a type hint

https://gerrit.wikimedia.org/r/1099838

Change #1099838 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Update wikimedia/omnimail-silverpop to loosen a type hint

https://gerrit.wikimedia.org/r/1099838