Creating, Managing, and Reviewing Notifications

In the Console, you can set up Notification Rules, which allow you to define a rule set that controls when a Notification is triggered with reference to an Event:

  • Event. Specify the system Event that the Notification will be sent for - for example, a Prepayment/Commitment created Event.

  • Calculation. Include a calculation that references the Event's fields. This allows you to define precisely the conditions that must be satisfied for the Notification to be triggered and sent when the specified Event occurs. For example, a Notification that will be sent only when a Prepayment created Event occurs and the Prepayment amount is equal to or greater that $5,000.

  • Always fire notification. If you want a Notification to be triggered simply by the Event occurring and with no further conditions having to be met, you can use a switch to implement this use case. No calculation is then required for the Notification Rule.

  • Active/Inactive. Switch the Notification on and off for the referenced Event.

Note: Notifications for Scheduled Events? As well as setting up Notifications for system-generated Events, you can also set up Notifications on the basis of any Scheduled Events you've created for your Organization. See Working with Scheduled Events for more details.

When you've created Notification Rules for Events, you can link them to Destinations you've created for integrations to complete your setup and create Notification Integration Configurations.

Important! Understanding a Notification Integration Configuration: When you link a Notification Rule you've configured for a system Event to an integration Destination, you create a Notification Integration Configuration. In m3ter, this can be understood as a special case of an Integration Configuration, one where the integration Destination is restricted to a webhook. This contrasts with the more commonly understood case, where the integration - for example, an outbound Bill Integration Configuration - is used for sending billing data for end-customer Accounts from m3ter to a 3rd-party invoicing system as Destination. For more details, see Creating and Managing Integration Configurations.

When you have completed the full setting up to create a Notification Integration Configuration, a Notification will be sent to a Destination if:

  • You have enabled the Notification Rule linked to the Destination to be active.

  • The system Event the Notification Rule references occurs.

  • Any calculation you've built into the Notification Rule is evaluated as true at the time the Event occurs.

After setting up your Notification Rules and enabled them as active in your production environment, any Events that cause Notifications to be triggered in accordance with those Rules are logged and recorded. You can then review and inspect these Notification Events as part of your routine operations.

This topic explains how to create a Notification Rule and link it to a Destination. How to view and manage your Notification Rules is also explained:

How to review the Events that have triggered Notifications according to your Notification Rules is explained:

Lastly, an example Notification payload is given in the last section:

Working with Notifications? Before you attempt to create and configure Notification Rules, we strongly recommend that you first review the previous topics in this section, which explain in detail the Events and Notifications framework and gives object definitions. See Key Concepts and Relationships and Object Definitions and API Calls.

Creating Notification Rules

To create a Notification Rule:

1. In the Console, select Alerts and Events>Notifications. The Notifications page opens and lists any existing Notification rules.

Warning! Note that if you've already set up Notification Rules with reference to any Events and these Events have triggered Notifications, the Events will be listed when you first open the Notifications page. In this case, select View all and the page adjusts to allow you to create a new Notification Rule.

2. Select Create Notification Rule. The Create page opens.

3. On the Notification Rule Details panel, enter:

  • Name and Code.

  • A Description for the Notification Rule.

Tip: When you enter a Name and click in the Code field, a default code is entered based on the name you've entered, which you can then edit as required.

4. Enter Notification Rule Settings:

  • Use the Event drop-down list to select the Event you want to create the Notification Rule for. Note that this field is searchable - simply start to type in the name of the Event and the list will be filtered automatically as you type:

Tip: Scheduled Events? If you've created any custom Scheduled Events for your Organization, these will also be available for selection in the Event drop-down list.

  • If you want a Notification to be triggered simply by the selected Event occurring and with no further conditions having to be met, enable the Always fire notification switch. No calculation is then required for the Notification Rule and this part of the Create form will be disabled.

  • Use the Active switch to enable the Notification Rule for the selected Event. Default is disabled.

  • In the Calculation edit box, enter the calculation that defines the condition you want to apply for the Notification Rule to be triggered when the selected Event occurs:

    • Note that you must ensure you reference fields that are valid for the Event. For details on how to obtain the fields available for different Event types, see Event Fields.

    • For more details on creating calculations for Notification Rules, see Creating Calculations.

Tip: Add Calculation later? You can omit a calculation when you first create a Notification Rule and edit the rule later to add the required calculation.

5. When you've entered a calculation, in the Rule Calculation panel, select Test Calculation. The calculation is evaluated for correctness with respect to:

  • The fields you've referenced are valid ones for the selected Event type.

  • The syntax, functions, and operators you've used are valid for the m3ter calculation engine - see Creating Calculations.

6. Check the result of the calculation evaluation:

  • If the calculation is valid, Calculation passed will show True.

  • If the calculation is invalid, Calculation passed will show False:

In this example:

  • The Notification Rule is set to be Active.

  • Because we want to apply conditions for the Rule, we leave the Always fire notification switch in the default off position.

  • A calculation is used that references the new.amount field for a configuration.commitment.created Event.

  • The calculation has been tested and evaluated as True.

Tip: Can't Create or Update Notification Rule? If you enter an invalid calculation and the Test Calculation returns False, then the Create or Update buttons will be grayed out and disabled.

7. Select Create Notification Rule. The Notification Rule Details page opens:

You can now link the Notification Rule to a Destination to complete the setup - see the next section for details.

Linking Notification Rules to Destinations to Create Notification Integration Configurations

To complete your setup for a Notification, you can link a Notification Rule to a Destination you've created for integrations - see Creating and Managing Destinations for more details:

  • Note that only webhook Destinations can be created for integrations, but you can link your Notification Rules to these.

  • When you link a Notification Rule to an integration Destination, this creates a Notification Integration Configuration, which will then be listed under Integrations>Configurations in the Console.

  • If an Event of the type specified in a Notification Rule occurs and any conditions you've defined using the calculation in the Rule are satisfied, then the Notification is triggered and sent to the webhook Destination you've linked it to.

To link a Notification Rule to a Destination:

1. In the Console, select Alerts and Events>Notifications. The Notifications page opens and lists any existing Notification rules.

  • Note that if you have already set up Notification Rules with reference to any Events and these Events have triggered Notifications, the Events will be listed when you first open the Notifications page. In this case, select View all and the page adjusts to allow you to link a Notification Rule to a Destination.

2. Select the NAME hotlink text of the Notification Rule you want to link to an integration Destination. The Notification Rule Details page opens.

3. On the Destinations panel, select Link destination. A Select destinations dialog appears, which lists the integration Destinations created for your Organization.

4. Select the checkboxes for the Destinations you want to link the Notification Rule to and then select Confirm. The dialog closes and on the Destinations panel the selected Destinations are listed:

In this example:

  • A single Destination has been linked to a Notification Rule.

  • You can read off the details of the Destination.

  • If you have not yet created the Destination you want to link the Notification Rule to, you can select Create Destination. This takes you directly to the Create page where you can create a new integration Destination - see Creating and Managing Destinations.

5. If you want to review the Destination details, select the NAME hotlink text. The Destination details page open:

If you navigate to Integrations>Configurations, the new Notification Integration Configuration is listed:

You can then select the ENTITY TYPE hotlink text to open the Integration Details:

  • Note that the Entity ID here is the ID of the Notification Rule used to create the Notification Integration Configuration.

Tip: Reviewing and Managing Integration Configurations? See Creating and Managing Integration Configurations.

Tip: Review Integration Run Details for a Notification? For detail on how to do this, see Reviewing Notification Integration Runs.

Managing Notification Rules

To manage Notification Rules:

1. In the Console, select Alerts and Events>Notifications. The Notifications page opens and lists any existing Notification rules.

  • Note that if you have already set up Notification Rules with reference to any Events and these Events have triggered Notifications, the Events will be listed when you first open the Notifications page. In this case, select View all and the page adjusts to allow you to manage your Notification Rules.

2. If you want to make any editing changes to a Notification, select Edit:

3. Make your changes, and select Update.

4. If you want to view details of the Notification, select the NAME hotlink text. The Notification Rules Details page opens.

5. If you want to delete a Notification Rule, select Delete:

A confirmation dialog appears.

6. Select Yes to confirm the deletion.

Reviewing Events for Notifications

When you have created and configured Notifications Rules for system Events and enabled them as active in your production environment, you can review any triggered Notifications and the Events that triggered them.

To review Events for Notifications:

1. In the Console, select Alerts and Events>Notifications. A Notifications page opens and lists any Events that have caused a Notification to be triggered and sent:

In this example, two Events have triggered Notifications and the number of Notifications triggered by each Event is given under TRIGGERED EVENT COUNT, together with a LAST SEEN timestamp.

2. To review Notification Rules that are based on an Event, select the EVENT NAME hotlink text. The page adjusts to show the Notification Rules that are configured to be triggered by Events of that type:

In this example, we've selected the configuration.commitment.created Event.

3. Select the NAME hotlink text of the Notification Rule. The Notification Rule Details page for the Rule opens and the Latest Events panel lists recent Events which triggered Notifications according to the Notification Rule with a DATE shown for each triggering Event for the Rule:

Example Notification Payload

The following is an example of the payload sent on a webhook when a Notification is triggered. The example is for a Notification triggered by a billing.bill.created Event:

1
{
2
"orgId": "30de0543-b025-4e4f-87cb-76edfcb6a37f",
3
"entityId": "ee2b80ed-a064-42cb-8bc8-4ecee84b10f3",
4
"requestType": "NOTIFICATION",
5
"name": "Webhook Create",
6
"description": "Webhook bill create",
7
"sourceEntityId": "384973f7-c83a-45d2-a509-26bf8c7a7d3b",
8
"event": {
9
"new.lastModifiedBy": "m3ter_server",
10
"new.orgId": "30de0543-b025-4e4f-87cb-76edfcb6a37f",
11
"new.dtCreated": "2024-05-17T14:28:14.511170Z",
12
"new.billJobId": "4eec6950-2c32-43cd-ac1c-b1d29dc5c985",
13
"new.endDateTimeUTC": "2024-05-01T00:00:00Z",
14
"new.startDate": "2024-04-01",
15
"new.dtLastCalculated": "2024-05-17T14:28:13.911668Z",
16
"new.id": "384973f7-c83a-45d2-a509-26bf8c7a7d3b",
17
"new.currency": "USD",
18
"new.startDateTimeUTC": "2024-04-01T00:00:00Z",
19
"new.billingFrequency": "MONTHLY",
20
"new.accountCode": "customer_ing",
21
"new.billDate": "2024-05-01",
22
"new.createdBy": "m3ter_server",
23
"new.accountId": "a5ef843e-a0ce-4e56-8ede-9345591aae86",
24
"new.status": "PENDING",
25
"new.billFrequencyInterval": 1,
26
"new.endDate": "2024-05-01",
27
"new.version": 1,
28
"new.locked": false,
29
"new.statementUpdateOnly": false,
30
"new.timezone": "UTC",
31
"new.dueDate": "2024-05-15",
32
"new.dtLastModified": "2024-05-17T14:28:14.511170Z"
33
},
34
"accountId": "a5ef843e-a0ce-4e56-8ede-9345591aae86",
35
"originalEventId": "90dc31eb-3ee4-4e7d-a7c8-18312505ed5e",
36
"eventName": "billing.bill.created",
37
"notificationEventId": "2dd1741c-6d9e-4439-b55d-91876ebd6a55",
38
"notificationCode": "webhook_create",
39
"entityType": "Notification"
40
}
41

NOTE: entityId, sourceEntityId, and event:

  • entityId is the ID of the Notification Configuration that was used to send a Notification to a webhook.

  • sourceEntityId is the ID of the entity that the Notification is about. For example, for a configuration.account.updated Event, sourceEntityId would be the ID of the Account.

  • event contains the details of the Event that triggered the Notification.

Next: Example - Notification Setup for Commitment Updated Event



Additional Support

Login to the Support portal for additional help and to send questions to our Support team.