oroinc / OroCRMMailChimpBundle

OroCRM package, integrates marketing functionality with MailChimp.
https://mailchimp.com/
9 stars 8 forks source link

OroMailChimpBundle

This Bundle provides integration with MailChimp for OroCRM. It allows to link Marketing List to MailChimp service and receive MailChimp Email Campaign statistics back in OroCRM.

Setting Up the Connection

First of all, a new Integration with type "MailChimp" must be created.

Go to the "System -> Integrations" and click "Create Integration" button.

Connecting Marketing List to MailChimp

After integration is created and Enabled Marketing Lists may be connected to MailChimp.

Only Marketing Lists with Email fields can be connected.

If the Marketing list is suitable for the connection, "Connect To MailChimp" button will appear on Marketing List view page. One Marketing List may be connected only to one MailChimp integration. OroCRM Marketing Lists are represented in MailChimp as Static Segments of some List.

Lists creation is not allowed by the MailChimp API, so at least one List must be present to load the members to MailChimp. Create a New List

When "Connect to MailChimp" button is clicked, the following form will emerge:

After the connection has been saved, a new Static Segment will be scheduled for creation along with the members synchronization job.

Job Queue Daemon has to be running.

Marketing Lists connected to MailChimp must contain the Email field. Connection settings of the lists are added as a MailChimp action on their view pages. Available options are "Connection Settings", "Disconnect" and "Synchronize". Synchronize option is available only for lists in the Synced status.

MailChimp Campaign Creation

Marketing List members may be used to send MailChimp campaigns. OroCRM Marketing list is mapped to Static Segment of MailChimp List. Campaign statistics are collected in OroCRM ONLY when Campaign is sent to a Static Segment connected to OroCRM. More about MailChimp Campaigns

Import Synchronization Logic

Import is performed with oro:cron:integration:sync cron command.

A new Email Campaign will be created in OroCRM for a MailChimp Campaign and synchronized during the following imports.

Each member activity is mapped to OroCRM Marketing List Item and Email Campaign Statics by Email. So more than one Marketing List Item and Email Campaign Statics record may be create if there are several entities with the same Email in the Marketing List. Activities 'open', click', 'bounce', 'unsub', 'abuse' increment corresponding counters of Email Campaign Statics. The 'sent' activity will increment 'contacted times' counter and set 'last contacted at' variable of Marketing List Item.

Export Logic

Export is performed with oro:cron:mailchimp:export cron command.

The following steps are performed in the course of the Marketing List members synchronization with MailChimp: First, all the Marketing List members are checked for subscription to the MailChimp List. Members not subscribed are scheduled for subscription. After that, all the Marketing List members absent in the Static Segment are scheduled for a mass add to the segment. All the members present in the Static Segment but absent in the Marketing List are scheduled for removal from the Static Segment.

During segment export we have 4 steps

Extended Merge Vars

Extended Merge Vars is a functionality to add MailChimp Merge Vars. Merge Vars creates from the definition of the Segment of the MarketingList. Merge Var is equal to column in the Segment definition. Then Merge Vars could be used to personalize MailChimp email templates. During export next steps executes:

Predefined cart item Merge Vars adds if Segment built on Shopping Cart entity. For now it limits to 3 cart items.

Known Issues

Email Campaign Statistics and MailChimp Statistics may differ. Email Campaign Statistics is calculated based on Export API data which at the moment contains only clicks and opens. MailChimp Statistics contains summary statistics for MailChimp Email Campaign.