Email subscribers

The subscribers in Notification service are used to provide information to the notification message receiver. The Notification service contract requires an ISubscriberRequest to subscribe or unsubscribe a recipient of the messages. The system provides a SubscriberRequestProxy class that implements it.
For more information, see Working with subscriber's ID and ResolveKey.

Use the following sample to create a subscriber. The sample use ISubscriberRequest and ISubscriberResponse objects. In general, an ISubscriberRequest object contains all information needed for creating a subscriber. In case you want to work with an already persisted subscriber, you must use an ISubscriberResponse object, which contains all the information related to an already persisted subscriber.

Working with subscriber's ID and ResolveKey

The Notification service provides GetSubscriber() methods that you can use to obtain a persisted subscriber by subscriber.Id or by subscriber.ResolveKey.

There is a difference between subscriber.Id and by subscriber.ResolveKey. The subscriber.ResolveKey is a unique identifier used by external systems to synchronize notification subscribers to external entities. For example, one can use a username or login ID for resolve key to match external system membership user entity. The ID of the subscriber is unique across the notification system and is generated when creating the subscriber – it cannot be set with the subscriber request. 

How to get an existing subscriber by ID

The following sample shows how to get the existing subscriber by ID.

Getting an existing subscriber by ResolveKey

The following sample shows how to get the existing subscriber by ResolveKey.

Was this article helpful?

Next article

Email mailing lists