Subscribers

Subscribers and subscriptions are created by your application through the Notification Service APIs, or you can allow your users to manage their own subscriptions through the ADSP Subscriber App. Either way, your subscribers will be notified whenever your application triggers a domain event that is associated with the notification type.

Anonymous Users

To create a subscription you need subscribers, and subscribers are users that have logged in to your application and have known userId’s and email addresses. But what about applications whose users don’t log in, those that cater to anonymous users? You can still use the notification service. When you create a notification type you can configure it to notify subscribers, or to send the notification directly to an email address:

If you have a known user that is to receive notification, you can input their email address directly here. This is useful for situations where there is a single individual responsible for, say, reviewing submitted applications. However, you may not know the user’s email address until runtime. In this case you would want to be able to supply the email address dynamically. Here’s what you do:

Create a new event type with a payload that includes the user’s email address:

Then, when creating a new Notification Type you would add the name of the property to the Address Path input field, e.g. with the above example the Address Path would contain userEmailAddress.

Finally, when you want to trigger a notification you would POST the event with the following payload:

{
  userEmailAddress: "example@example.com"
}