Right now when you are using Profile2 to add custom profile fields to your site there is no way to add these to Mailchimp list merge fields, instead you are presented with just a single item named for the profile, e.g. if the profile name is "Personal Information" then you see a field named "Personal Information profile". Ideally each field from the profile set should be provided, and for UX purposes it might also help to put them in an optgroup.

CommentFileSizeAuthor
#2 profile2-tokens-1243952.patch2.47 KBthebuckst0p
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thebuckst0p’s picture

Subscribe. Is anyone working on this already? I have a client who wants this so I might patch it in soon, if no one else has already done so.

thebuckst0p’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
2.47 KB

This patch adds Profile2 token handling to the Mailchimp merge field mapping.

levelos’s picture

Title: Profile2 support » Add hooks for implementing merge tokens and values

I'm not a Profile2 user. Any idea why it doesn't store it's tokens as user tokens. Seems to be standard, no? I'm also not keen on adding specific module support, at least for Profile2.

I did change the code to call and implement 2 hooks allowing other modules, like Profile2 or a custom one, to add additional merge tokens and values. Ref mailchimp_lists_mailchimp_lists_merge_tokens() and mailchimp_lists_mailchimp_lists_merge_values() in mailchimp_lists.module.

levelos’s picture

Status: Needs review » Fixed
jlab’s picture

Is this fixed in the mailchimp-7.x-2.x-dev version?

Or should I still apply the patch in #2?

Because the patch currently fails when I try to patch the mailchimp-7.x-2.x-dev

I also don't see any mappable profile2 fields to map to the merge fields.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

the_g_bomb’s picture

You have to enable the Entity token module that ships with Entity API, once that is done all the profile2 tokens should become available to MailChimp.

fossie’s picture

I enabled entity tokens, the tokens are available and I mapped them, but only the email adress is passed to mailchimp, the profile fields aren't sync'd during this action.

Do I overlook some setting?