
Introduction
Sitecore Send has announced a new feature: the Preference Center (check this article to learn about the advantages of this feature).
In this article, I'll describe in detail how to create, manage, and use preferences in Sitecore Send.
Managing Preferences
Preferences are managed under each mailing list. A new field has been added (visible under the Create custom fields section):
After clicking on the field, all preference options can be managed:
In the settings, you can define the page where subscribers can manage their preferences.
Preferences Management Page
The preferences page, where subscribers can manage their preferences, is defined in the settings. It can be created using Sitecore Send landing pages.
A new component has been added for this purpose:
The preferences view can then be configured in the component settings:
Using the Preferences Page in Email Campaigns
A link to the preferences page can be added using a personalization tag:
Alternatively, you can use the #updatePreferences#
syntax:
The preferences page for a subscriber looks like this:
Preferences in the API
A new field has been added to the subscriber API endpoints:
You can use it in the update or add endpoints as well:
Mailing list preferences can also be updated using the API:
If you're using the SitecoreSend.SDK NuGet package, you can use the following methods to manage preferences:
// Update mailing list preferences
var updateListResult = await _send.Lists.Update([LIST_GUID], new MailingListRequest()
{
Name = "Test Name 2",
Preferences = new MailingListPreferencesRequest()
{
Options = ["Option1", "Option2"],
SelectType = PreferenceSelectType.MultiSelect,
},
});
// Create subscriber with preferences
var response = await _send.Subscribers.Add(listId, new SubscriberRequest()
{
Email = email,
Preferences = ["Technology"],
});
For more examples, refer to the tests, where you can find how to use the SDK.
Conclusion
The Preference Center is a great feature that enhances the user experience for your subscribers. It allows for personalized content, making emails more relevant and providing a better alternative to unsubscribing.
If you have any questions or suggestions, feel free to reach out to me.