We are unsubscribing contact through client api and using custom url in email campaign message and calling custom method, we are using the below code :

 _clientApiService.UpdateListSubscription(new UpdateListSubscriptionMessage()
  ListSubscribeOperation = ListSubscribeOperation.Unsubscribe,
  ContactIdentifier = contactIdentifiers,
  MessageId = messageID

Above code is working fine and unsubscribed contact in contact list. However, it does not track unsubscribe contact data in EXM email campaign template item when we check through exm.

enter image description here

1 Answer 1


The official documentation has some useful details on the Unsubscribe process. Please find the link below :


The contact unsubscribes from a campaign by clicking an unsubscribe link in an email. This opens a tracking page on the CD role where an EXM unsubscribe handler does three things:

It creates an interaction with an Unsubscribe page event in the Session State database.

It stores an Unsubscribe message on the Message Bus.

It redirects the contact to a user-friendly unsubscribe page.

When the contact's session ends, the CD role passes the interaction with the Unsubscribe page event to the xConnect Collection Search role that stores it in the xDB Collection database. Sitecore uses this information for analytics and reporting purposes.

Please check this link - https://doc.sitecore.com/developers/exm/90/email-experience-manager/en/the-unsubscribe-options.html

You can check the Unsubcribe.aspx file as mentioned in the link to see how you can ensure this.

When you use the default email campaign templates in EXM, the email messages you send contain two links that allow recipients to unsubscribe from future email campaigns - Unsubscribe & Unsubscribe from all

The Unsubcribe.aspx and the UnsubscribeFromAll.aspx files do the following:

Use the ExmContext to validate that the request is valid, for example, that the request has a contact ID and a message ID.

Register the Unsubscribe from email page event

  • We are using custom link in email message instead of /sitecore%20modules/Web/EXM/Unsubscribe.aspx link. With custom link we are calling the code. Is it possible to track unsubscribe contact data through code?
    – User7864
    Jun 10, 2021 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.