Providing you are a LUSID user with sufficient access control permissions, you can create an email notification to send to people when an event you have subscribed to occurs. For example, you could email all the portfolio managers when the LUSID PortfolioCreated
event occurs.
Using the LUSID web app
Sign in to the LUSID web app as a user with suitable permissions.
From the top left menu, select Notifications Management > Subscriptions.
Locate the subscription you wish to create a notification for, and click the Create Notification icon.
Select Email as the notification type.
Specify:
A Display name to uniquely identify the notification.
An Email subject and Email body.
Note: You can use the Add template field dropdown to insert runtime values from the event subscription as mustache templates, making the text more meaningful.
The email addresses of the intended notification recipients. You can specify up to 10 direct recipients, 10 carbon copies, and 10 blind carbon copies in their respective fields.
Click Create to save the notification.
Note
You must ensure the notification’s subscription is enabled in order to receive notifications for the event.
Using the Notification REST API
Currently, you can create one notification per API call. Note you must have already subscribed to the event you want to attach the email notification to.
Call the CreateNotification API, passing in your API access token and:
The
scope
andcode
of the subscription to attach it to.A
displayName
and uniquenotificationId
.A
Type
ofEmail
.A
Subject
. You can use attributes of the subscribed event in mustache templates to make the text more meaningful.A
PlainTextBody
and aHtmlBody
. As above, you can use attributes of the subscribed event in mustache templates.A comma-separated list of email addresses. You can specify up to 10 direct recipients, 10 carbon copies, and 10 blind carbon copies in their respective fields.
For example, to attach an email notification to a subscription with the scope
PortfolioEvents
and codePortfolioCreatedEvent
:The response is as follows. Note you can use the
id
of the notification to reference it again in subsequent API calls: