MailChimp Interested Value in “Group” always false after “subscribing”

馋奶兔 提交于 2019-12-12 04:49:38

问题


I send over proper json formatted code, according to v2 api docs:

lists/subscribe.json

"GROUPINGS":[{"id":removed_id,"name":"grouping_name","groups":["group_name"]}]

I get back information about a member... It does not say they are interested in that group name..

lists/member-info.json

"GROUPINGS":[{"id":removed_id,"name":"grouping_name","form_field":"hidden","groups":
[{"name":"group_name","interested":false},{"name":"other_group_name","interested":false},
{"name":"other_group_name2","interested":false},{"name":"other_group_name3","interested":false}]}]

I do not understand how I can get these users to show up as "subscribed" to a group within my grouping. I have been trying for nearly 5 hours now. I have tried:

  • making sure the groups: value is an [] array.
  • trying out making that value a string (which surprisingly did not throw errors)
  • capitalizing "GROUPINGS" when sending it in merge_vars
  • not capitalizing "groupings" when sending in merge_vars
  • using the lists/update-member.json method to update these groups
  • using the name of my interest group instead of grouping in the grouping array.
  • using the option replace_interests on both true and false

回答1:


In conclusion,

I had to email mailchimp a support ticket. Without changing my code at all - it works this morning. Interestingly enough, mailchimp was experiencing many issues yesterday with servers being down and alleged email hackings.

To be clear about which version of my code worked - following the API exactly for v2.

It was an error on mailchimp's end.

{
   "id":"MY LIST ID",
   "email":{
      "email":"THE EMAIL TO SUBSCRIBE"
   },
   "merge_vars":{
      "GROUPINGS":[
         {
            "id":THE GROUPING ID,
            "groups":[
               "THE NAME OF MY GROUP"
            ]
         }
      ]
   },
   "double_optin":false,
   "replace_interests":true,
   "apikey":"MY API KEY"
}

Also, in case you are curious, replace_interests is true when the groups you send are supposed to replace existing groups the subscriber is interested in. False indicates that the groups you pass should be added to the interest groups.

If you are updating a member (method: lists/update-member), it may be best to set replace_interests to false just to make sure it does not overwrite your existing interest groups (possibly with blank groups). The default value for it is true, so this could be another place prone to error.



来源:https://stackoverflow.com/questions/26621164/mailchimp-interested-value-in-group-always-false-after-subscribing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!