Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Problem

When the user accepts Iberia's terms, we must save the acceptances for both Burger King and Popeyes on Braze.

Therefore, the customer must receive email/push notifications from all Iberia markets.

Proposal of Solution

When a new user is created, we must replicate the user's acceptance settings to the other configured markets.

If the user accesses their account data and changes the email/push settings, these settings must only be applied to that market, and must not be replicated to others.

But if the modal appears informing the privacy changes and the user accepts the terms, the notification settings must be replicated to all configured markets

Technical Problem

intl-packages:

1 - Option (used in this refinement)

  • We should create a new secret (crm-events) to save settings.

  • Update CRM Event (mparticle) to use secrets and send message to another markets .

2- Option

We can use LaunchDarkly, but I think that setting is not good to stay here, but is an option

POC: https://github.com/rbilabs/intl-packages/pull/938/

intl-user-service:

  • New User

    • We must add two new fields to be sent to the particle trigger.

      • email_subscribe

      • push_subscribe

  • Update User to call logCrmEvents

  • The user update routine is done via HTTP request, here we must integrate with CRM Events, currently it only updates in DynamoDB

API - User Update - To test

Technical Solution

intl-packages:

Task 1 - create a new secret in dev

  • table: rbi-account-secrets

  • pk: rbi/dev/plk/crm-events

{
  "replicateAccount": {
    "active": false,
    "urls": [
      "https://sqs.eu-west-3.amazonaws.com/326165771931/rbi-dev-bk-mparticle-events-queue",
      "https://sqs.eu-west-3.amazonaws.com/326165771931/rbi-dev-th-mparticle-events-queue"
    ]
  }
} 

https://eu-west-3.console.aws.amazon.com/dynamodbv2/home?region=eu-west-3#item-explorer?filter1Comparator=CONTAINS&filter1Name=pk&filter1Type=S&filter1Value=crm-events&operation=SCAN&table=rbi-account-secrets

Task 2 - create a new secret in QA/Prod

  • Open new ticket to create secrets

Task 3 - create a new definitions secret

  • Should create a new definition secret to crm-events

  • Should work to PLK and BK brands and countries ES and PT

Task 4 - Change mparticle-service.ts to replicate message to mparticle

  • Should change AllowedEventNames type and added new “User Account Updated” type.

  • This replicate should occur only when event name is “User Account Created” or “User Account Updated”

  • Must update the sendMParticleCustomEventToQueue function to read secrets and send messages to other markets.

https://github.com/rbilabs/intl-packages/blob/938/packages/crm-events/src/mParticle/mparticle-service.ts

intl-user-service:

Task 1 - Add new proprieties in new user event trigger

  • Should add email_subscribe and push_subscribe to send to mparticle

https://github.com/rbilabs/intl-user-service/pull/294/files#diff-88263c0c9b7bf042baf866b1601897a900695d9b087e2c36e1d68c3332f57682

Task 2- Update User

  • Should change “users-update-service” to call logCrmEvent.

  • Should only call logCrmEvent if the request comes from the Acceptance Agreement

https://github.com/rbilabs/intl-user-service/pull/294/files#diff-16c30acb1319788d9f98e57369f216f74b1ef5017c6c7b73c5c9ff675e12d7e1

POCs:

  • No labels