Hacking Sitecore and Life one pipeline at a time!

Managing the Unsubscribe: Part 1

Managing the Unsubscribe

Welcome to Day 17 and the last mini-series in 25 Days of Sitecore EXM, titled Managing the Unsubscribe. This is one of the most important aspects to Email Experience Manager as managing unsubscribes helps keep your email domain reputation in check. This mini-series will be exploring the various ways to manage subscription lists and processing unsubscribes.

The elements in this series include:

  • List Exclusions
  • Global Opt-Out
  • Marketing Preferences (Sitecore 9.1+)
  • Sending Limits (Sitecore 9.1+)
  • Sitecore EXM Client API

Sitecore 9.1 Notice

Examples and screenshots in this series are going to be coming from both Sitecore 9.1 and Sitecore 9.0.2 references. However, it should be considered that this series is tagged to Sitecore 9.1. While most of the concepts will work in 9.0.X and to some extent even EXM 3.5, screen shots and code examples will be from Sitecore 9.1.

Introduction to Unsubscribe

Out of the box, Sitecore provides an example of all of the various links that can be included in emails to help manage subscription. By examining the Sample Newsletter we see the following links.

  • Unsubscribe
    • Url: /sitecore%20modules/Web/EXM/Unsubscribe.aspx
  • Unsubscribe from all
    • Url: /sitecore%20modules/Web/EXM/UnsubscribeFromAll.aspx
  • Update subscription preferences
    • Url: /sitecore%20modules/Web/EXM/SubscriptionPreferences.ashx

There is no other query parameters or anything that needs to be add to the Email Message, as Sitecore EXM will adjust this url to include various parameters such as message id and contact id. 

Keep in mind, that these URL’s should NOT be used outside of EXM and should not be linked from the website, as they will not contain the proper query string information that needs to be present in order for them to work.

Email Subscription in EXM is About Being On Lists

If you find yourself trying to create custom contact facets to track whether or not a user is subscribed, you’re doing it wrong. As Sitecore’s methods for subscription are really about List inclusion and List exclusion. All of this is available as out of the box methods that should not require any custom development effort. The caveat is if you are looking to create more customized subscription pages, then using the EXM Client API provides simple endpoints for managing that list inclusion.

Part 1 – List Exclusions

Part 1 of this series, this post, is intended to introduce the concepts that are out of the box with respect to how List Exclusions (and inclusion in the case of Global Opt-Out) work with Sitecore Email Experience Manager in Sitecore 9.1.

Unsubscribe Link

When this link is clicked out of an email, Sitecore will process the Redirect URL and redirect to the Unsubscribe linked above. This page has no styling and no layout. It will actually just return blank if it succeeds correctly. But there’s actually magic happening behind the scenes

1. The Contact is Removed From Contact List

The Unsubscribe Link is specific to a single message, which is tied to specific Manager Root. When this link is clicked, Sitecore EXM will search for the first Contact List in the Inclusion List on the email and attempt to remove the user from it. 

If ONLY Segmented Lists are used on the message or the contact can NOT be found on the first list, then to prevent accidentally sending this contact a message again, this user is added to the Global Opt-Out List defined on the Manager Root.

2. The Contact is redirected to the Final Confirmation Page

On the Manager Root under Subscription Control there is a field for Final Confirmation Page that the Contact/visitor is redirected to when the unsubscribe completes successfully.

Out of the box, this field is blank. However, by specifying it to a branded page on your website, the Unsubscribe link will redirect the user to here.

3. If contact is already unsubscribed, redirected to Already Unsubscribed

If the contact has already unsubscribed (maybe they clicked on the Unsubscribe Link in their email a second time) then Sitecore will redirect the contact to the Already Unsubscribed page/item. This is helpful, because it could provide the user the ability to resubscribe.

Unsubscribe From All

This is a full unsubscribe from all messages being sent from a selected Manager Root. The Manager Root is identified because the query parameters going into this link provide the Message ID, which is needed to know which Manager Root to use.

If you recall from our Introduction to the Manager Root, there is a field that specifies the Global Opt-Out List. This List Manager Contact List, is evaluated every time an email is dispatched (automated or regular). If the contact exists in this list, they will be automatically excluded from the delivery of the message.

Processing the Unsubscribe From All URL performs the following actions.

1. The Contact is Added to the Global Opt-Out List

The contact is immediately added to the Global Opt-Out List. They are NOT removed from the first Contact List on the message, as described above.

2. The Contact is redirected to the Final Confirmation Page

On the Manager Root under Subscription Control there is a field for Final Confirmation Page that the Contact/visitor is redirected to when the unsubscribe completes successfully.

Out of the box, this field is blank. However, by specifying it to a branded page on your website, the Unsubscribe link will redirect the user to here.

3. If contact is already unsubscribed, redirected to Already Unsubscribed

If the contact has already unsubscribed (maybe they clicked on the Unsubscribe Link in their email a second time) then Sitecore will redirect the contact to the Already Unsubscribed page/item. This is helpful, because it could provide the user the ability to resubscribe.

Update Subscription Preferences

New in Sitecore 9.1 is the addition of the Marketing Preference Center functionality that allows contacts to manage their own subscriptions. One of the options on this page is to Unsubscribe From All which performs the same action as clicking the Unsubscribe from all link above. 

Using Marketing Automation

Marketing Automation also provides a lot of flexibility for managing List Manager Contact Lists. The two actions specifically are Add contact to a list and Unsubscribe from a list. However, these are very discrete actions, as they ONLY augment a List Manager Contact List. 

Add contact to a list

Simply adds the current Contact to the selected Contact List in List Manager, if they are not already added.

Unsubscribe from a list

Simply removes the current Contact from the selected Contact List, if they exist. Otherwise, nothing happens.

Sending an Unsubscribed Confirmation in Marketing Automation

In my Corewarts EXM demo site, I created a small marketing automation flow that demonstrates how I’m using Marketing Automation to not only remove (or unsubscribe) a contact from a list, but to also send a Unsubscribe Confirmation message.

  • Step 1: Send the Email, as shown here I have selected my custom branded Unsubscribed Confirmation email.
  • Step 2: Removes the Contact from the Corewarts Enrollment List which will remove the user from future emails. 
    • Not as easily viewed, but the other side of Step 2 is coming from an Activity Listener. In this example, if the contact does not interact with my emails or the site within a specific time period, I remove the user from the List Manager Contact List but do not send the unsubscribe email.

Part 2 Tomorrow

We continue Managing the Unsubscribe series tomorrow with Part 2 where we take a quick look at how Sitecore uses the Global Opt-Out list.


Did You Miss EXM Live!?

You’re in luck!  You can now view EXM Live! On-Demand on YouTube!

Tagged as: ,

Categorised in: EXM, Sitecore

2 Responses »

Trackbacks

  1. Managing the Unsubscribe: Part 5 | Sitecore Hacker
  2. 25 Days of Sitecore EXM | Sitecore Hacker

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 993 other followers

Blog Stats

  • 74,825 hits
Follow Sitecore Hacker on WordPress.com
%d bloggers like this: