DoSomething / legacy-website

:moyai: The DoSomething.org legacy website.
https://www.dosomething.org/
MIT License
50 stars 22 forks source link

Campaign Language value in transaction message request #5036

Closed deezone closed 9 years ago

deezone commented 9 years ago

Campaign signup / reportback transactionals:

The language of the specific campaign the user signed up for or reported back to defines what language the transactional message should be in.

Also: The country code value for the user needs to be available to dosomething_mbp.module here: https://github.com/DoSomething/phoenix/blob/dev/lib/modules/dosomething/dosomething_mbp/dosomething_mbp.module#L218-L233

BLOCKED by: Currently dosomething_settings_get_affiliate_country_code() takes care of defining the affiliate value. This issue is blocked by the need for the functionality within the Drupal App to gather the campaign country as well as the user language.

Sample payload:

{
  "activity": "campaign_signup"
  "email": "xyz@geemail.com"
  "uid": "123456789"
  "merge_vars":
    {
     "MEMBER_COUNT": "4 million"
     "FNAME": "Bob"
     "CAMPAIGN_TITLE": "School Insider",
     "CAMPAIGN_LINK": "https://www.dosomething.org/campaigns/school-insider",
     "CALL_TO_ACTION": "Provide tips and information to new students at your school.",
     "STEP_ONE": "Make Your Sheet!",
     "STEP_TWO": "Snap a Pic",
     "STEP_THREE": "Deliver the Sheet"
    }
  "email_template": "mb-campaign-signup-mx"
  "user_language": "CH",
  "mailchimp_list_id": "133qwer456"
  "birthdate": "916876800"
  "subscribed": 1
  "email_tags"
    {
      "MX",
      "drupal_campaign_signup"
      "drupal_campaign_signup_MX";
    }
  "activity_timestamp" 1432086537
  "application_id": "DRUPAL";
}

Related:

mshmsh5000 commented 9 years ago

@blisteringherb Can we close this?