Support

Home Forums MailChimp Integration Get Event Details from EE4 in Mailchimp using API Key

Get Event Details from EE4 in Mailchimp using API Key

Posted: July 21, 2017 at 9:07 am


akra

July 21, 2017 at 9:07 am

Hi there,

I want to send registration pending payment mails to registered attendees using Mailchimp. I’ve connected EE4 with MC using the API Key. I get the merged variables into MC (but unfortunately only if one person registers. In case of more than one person, MC does not receive any information) but no event details.

How can I transmit the details into Mailchimp?

Thanks
Tarek


Tony

  • Support Staff

July 21, 2017 at 2:48 pm

Hi there,

Are you requesting the ‘Personal Information’ question group for addition registrants on your event?

What details are you sending over to MailChimp?

Can you link me to an event so I can view how you have this set up, please?


akra

July 24, 2017 at 11:03 am

No, I want the event details like event date, time, location, event title, price, venue, attendees, address, etc. send over to Mailchimp. Just like the information displayed in the registration pending payment e-mail template.

Unfortunately I can’t send you an link because the website is still not live.


Tony

  • Support Staff

July 24, 2017 at 5:30 pm

You’ve got a mixture of datetime, event, registration and attendee information listed above, not just ‘event data’.

You can pull the info you need for the subscription call via code, within the MailChimp add-on is this hook:

apply_filters('FHEE__EE_MCI_Controller__mci_submit_to_mailchimp__subscribe_args', $subscribe_args, $registration, $EVT_ID );

From that you can add your own additional ‘merge_vars’ and include whichever details you prefer. You can find examples of this hook in action here:

https://eventespresso.com/topic/map-ticket-name-in-maillchimp/

and

https://eventespresso.com/topic/issue-with-submitting-mergefields-to-mailchimp/

Because the filter passes the EVT_ID over to the function you can pull the event using:

$event = EEM_Event::instance()->get_one_by_ID($EVT_ID);

Then you have the EE_Event object within $event to pull all of the required details for the event.


akra

July 27, 2017 at 11:41 am

Thank you for your quick response! 🙂
Now the merge tags get transmitted to Mailchimp without problems.

However, is there a way to update the merge tags on approval or cancellation of a registration? I would like to send all event espresso system mails via mailchimp (approval, pending payment, cancellation, etc.) Is it possible?


Tony

  • Support Staff

July 27, 2017 at 11:57 am

It might be, but its not what MailChimp is intended for, you would be better with a transactional email service.

Can I ask why you want to send the messages through MailChimp?

The support post ‘Get Event Details from EE4 in Mailchimp using API Key’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso