DoSomething / voting-app

☑ Voting app for DoSomething.org campaigns.
MIT License
6 stars 4 forks source link

Transactional Payload Update #437

Closed deezone closed 9 years ago

deezone commented 9 years ago

What are the values currently being sent in the Message Broker transaction request? The values will need to be updated to support changes in the Message Broker system for changes in email and SMS.

Changes / updates / additions to the "first vote" transactional request payload:

Updated US Values Example:

  "application_id" => "CGG"
  "user_language" => "en" (based on logic in Drupal app)
  "user_country" => "US"
  "email_template" => "mb-votingapp-vote-US"
  "mobile_opt_in_path_id" => "170071"
  "mailchimp_list_id" => "f2fab1dfd4"

Notes:

Current Payload Example:

(
    [first_name] => Test Dee
    [birthdate_timestamp] => 929232000
    [country_code] => US
    [candidate_id] => 2
    [candidate_name] => Brigitte Kuphal
    [mobile] => 3479886705
    [mobile_tags] => Array
        (
            [0] => agg
            [1] => 2
            [2] => GENDER_X
        )

    [application_id] => AGG
    [mc_opt_in_path_id] => 180170
    [mailchimp_grouping_id] => 10677
    [mailchimp_group_name] => AGG2015
    [mailchimp_list_id] => f2fab1dfd4
    [activity] => vote
    [activity_timestamp] => 1447199936
)

Related:

DFurnes commented 9 years ago

Hey @DeeZone! Here's the current payload we're sending. Right now we're varying the payload based on whether or not a user is US... I'll be putting up a PR soon to vary that based on whether it's in our array of "cellular" countries (so the domestic payload will apply to US, BR, and MX).

deezone commented 9 years ago

@DFurnes Updated issue description with details for your review.

DFurnes commented 9 years ago

Could default to en considering the CGG app is only English.

Agreed, we aren't translating the UI for Celebs Gone Good like we do in Phoenix, so it probably makes sense to still send all messaging in English to keep the experience consistent.

DFurnes commented 9 years ago

Updated payload seems good to me! Will let you know once the app is sending those along.

DFurnes commented 9 years ago

@DeeZone Should user_country be the normalized user country (e.g. US, BR, MX, or global) or the actual country code stored on that user object?

DFurnes commented 9 years ago

@DeeZone Another Q! Should the opt-in path ID key be mobile_opt_in_path_id or opt_in_path_id? I see both in the examples. :grin:

deezone commented 9 years ago

@DFurnes

Should user_country be the normalized user country (e.g. US, BR, MX, or global) or the actual country code stored on that user object?

  • The user_country can be the actual country code, no need for the value to be normalized.

Should the opt-in path ID key be mobile_opt_in_path_id or opt_in_path_id? I see both in the examples.

  • Opps, should be mobile_opt_in_path_id.
DFurnes commented 9 years ago

Thanks! Updated the PR.

DFurnes commented 9 years ago

Done, and deployed to both Cats Gone Good and Celebs Gone Good (although CGG is "closed" so not ideal for testing). Both share the same environment variables so should be identical for testing purposes.