Skip to end of metadata
Go to start of metadata

How subscription preferences are kept up-to-date

Your store customers may subscribe and unsubscribe in different ways. Here is how newsletter subscription preferences are synchronized between MailUp and Magento, depending on where the subscription preference is changed.

Preference changed in the Magento-powered store

EventActionData transferred

Customer registers (i.e. creates an account outside of the checkout process)

If customer opts to receive the store newsletter, it is added to MailUp immediately after the customer account is created in Magento. Specifically:

  • Customer account is created in Magento
  • The MailUp extension makes a real-time call to MailUp to add the customer to the List associated with the store.
  • Customer is added to MailUp as pending
  • Customer is sent the subscription confirmation request message (this is sent immediately)
  • Customer is subscribed when subscription has been confirmed

Note that the extension does not wait for the next, scheduled data transfer. It contacts MailUp immediately.

Customer email only.

The rest of the customer data is transferred during the next, scheduled data transfer.

Customer places an order

If customer opts in during checkout, it is added to MailUp at the time the order is placed

  • Customer is added as pending
  • Customer is sent the subscription confirmation request message
  • Customer is subscribed when subscription has been confirmed

Note that the extension does not wait for the next, scheduled data transfer.  It contacts MailUp immediately.

Customer email only.

Note that the extension does not wait for the next, scheduled data transfer. It contacts MailUp immediately.

Customer views newsletter tab of customer account area

Customer's latest subscription status is retrieved from MailUp:

  • If customer is subscribed, checkbox is checked
  • If customer is unsubscribed, checkbox is unchecked
Latest subscription status retrieved from MailUp
Customer updates subscription preference in newsletter tab of customer account area

Customer's latest subscription preference is updated in MailUp

New subscription preference pushed to MailUp

Preference changed in MailUp

When a customer unsubscribes from a newsletter or other message in the footer of the message, that subscription preference is not immediately transferred to the Magento-powered store, unless you are using Webhooks (see below).

However, when the customer logs into his/her account in the storefront, the latest subscription preference is retrieved from MailUp and displayed correctly to the customer (see table above).

This means that the subscription preference in the admin area of Magento may not be in sync with MailUp:

  • if the customer has not recently logged into his/her account
  • and webhooks are not being used

Using Webhooks for near real-time unsubscribe in Magento

With version 2.2 and above of the MailUp Extension for Magento, you can leverage Webhooks in MailUp to update a customer's subscription preference in Magento.

The callback URL that you will enter when you create the Webhook in MailUp changes depending on the action that you want Magento to perform.

ActionEndpoint
Subscribehttp://[store_URL]/mailup/webhook/subscribe
Unsubscribehttp://[store_URL]/mailup/webhook/unsubscribe

... where [store_URL] is the URL of the Magento storefront.

The parameter to pass to the callback URL is "customerEmail", with the customer's email as the value. Here is a visual example of how an unsubscribe Webhook would be set up in MailUp. In this example, the store_URL is http://mailupcommerce.com (a fictitious store).

 

Multiple stores, same subscription preference

Icon
Version 2.3 and above of the MailUp Extension for Magento supports multiple stores: if somebody subscribes on Store A and Store A is linked to List A in MailUp, they will be subscribed to that List (and not in another list). However, unlike in MailUp, in Magento the newsletter subscription preference is a "global" setting. This means that if you unsubscribe a customer in Magento via a Webhook, that same customer will appear unsubscribed in all stores managed through that instance of Magento.

Multi-List Subscription in Magento

Icon

We are making additional changes to the Magento integration to support multi-list subscriptions, including "hidden" lists (i.e. the same customer is added both to a "Newsletter" list and to a "Triggered Messages" list). There is no ETA on this release yet.

Notifying Magento of a subscriber's email update in MailUp

MailUp handles a change in a subscriber's email as two connected events:

  • Unsubscribing the old email
  • Subscribing the new email with the "old" subscriber's data

In other words, the "old" email is unsubscribed from the List(s), the new email is added as a new subscriber to the same List(s), and the data stored in the custom fields is transferred over to the new subscriber's profile.

For this reason, there is no "email changed" Webhook that can be triggered. That said, because a "subscribe" event does indeed occur when there is a change in the email address, you can pass this information to Magento together with Magento's customer ID and, if the ID exists in Magento, the email will be updated.

The first step, if you haven't already set it up so, is mapping Magento's Customer ID to a MailUp recipient field (you can use MailUp's default "Customer ID" recipient field or any other field of your choice). Then, you only need to trigger a "subscribe" Webhook that passes to the external system's callback URL:

  • "customerEmail", with the customer's email as the value
  • "CustomerID" with MailUp recipient field mapped to Magento's "customerID" as the value

Back to an overview of the MailUp Extension for Magento.

  • No labels