1. Home
  2. Cookbook
  3. Unsubscribing customers

Unsubscribing customers

When sending emails to customers, it is often necessary to unsubscribe customers from mailing lists. There can be various reasons for this, be it customer wish not to receive emails, or issues with deliverability of the emails to the customer. This article provides some guidance to different approach of unsubscribing customers. Exponea handles some of them by default. Please see some of the attributes automatically stored per customer below

unsubscribed

Attribute unsubscribed

Exponea by default creates and uses an attribute unsubscribed. Its boolean by nature, allowing true and false as values. If a customer has unsubscribed set to true, no emails will be sent to him from Exponea. Using this attribute in conditions is not necessary, as Exponea checks for this attribute automatically. Attribute unsubscribed has no value by default, unless some is set. Exponea automatically sets this attribute to true if an email fails to be delivered, returning with status either bounced or dropped. This serves to prevent undeliverable emails from being sent, protecting the sender’s reputation and spam score. It is possible to change this attribute manually in the edit customer,imported,  via set attribute or using an API call, however this should NOT be done at all, unless 100% sure that the email address is correct and should be used.

Campaign groups

Each campaign sent has to belong into a predefined campaign group. By default, there is only one campaign group called All Communication. Campaign groups can be added, changed and removed in project settings. Campaign groups with their names and descriptions will be shown as options to subscribe to/ unsubscribe from in the unsubscribe page ( the link to it can be sent via {{ email.unsubscribe }} , or a customized unsubscribe page can be created following this guide). Once a customer chooses to unsubscribe from a campaign group, an event subscriptions_changed will be generated, and an attribute unsubscribed_changed will be updated. It is a list attribute and will be updated with all groups the user has unsubscribed from. This Attribute can also be changed manually in the edit customer, or can be imported. Please note that when importing a list attribute, you can import multiple values in JSON. Please see below how these data should be imported (format needs to be set to JSON {} and respective data are in [] array in quotes “” separated by comma). Please be careful not to include spaces in the name, as having a campaign group of “Newsletter” and unsubscribing from “Newsletter ” will not work (and vice versa).

example below is imput:

registered;unsubscribed_from;

tomas.sucha@exponea.com;[“test”,”Špeciálne znaky”];

Imports unsubscribed

Custom attributes

If you also track unsubscribed states in different places on your webpage or in other systems, it is advised to use custom attributes, and do not overwrite the system attributes manually. This allows for creating segments of people who can receive newsletters based on several your custom rules. However as Exponea does not check for custom attributes automatically, it is needed to include this attribute in every campaign that is being sent, and a possibility of human error rises.

 

Updated on August 31, 2017

Was this article helpful?

Related Articles