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. The calculation is evaluated as either true or false, and 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 than $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 Outgoing webhooks you've created and complete your setup to create Webhook Notification integration configurations.

Once this setup is complete, a Notification will be sent to an Outgoing webhook if:

  • You have enabled the Notification rule linked to the Outgoing webhook 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 an Outgoing webhook. 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 provides guidance on object definitions and API calls. 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 notifications:

The Alerts and notifications section opens at the Alerts page.

2. Select Notifications:

The Notification rules page opens and lists any existing Notification rules.

3. Select Create notification rule. The Create page opens.

4. 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.

5. 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. Default is disabled.

    • Note: No calculation is then required for the Notification rule configuration and the Calculation section of this panel 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.

6. 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.

7. 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 Calculation passed = True.

Tip: Can't create or update a Notification rule? If you enter an invalid calculation and the Test calculation returns False for Calculation passed, then you'll receive an error and you won't be able to save the Notification rule.

8. Select Create notification rule. The Notification rule details page opens:

You can now link the Notification Rule to an Outgoing webhook to complete the setup - see the next section for details.

Linking Notification Rules to Outgoing Webhooks

To complete your setup for a Notification, you can link a Notification rule to an Outgoing webhook - see Creating and Managing Outgoing Webhooks for more details:

  • When you link a Notification rule to an Outgoing webhook, this creates a Webhook Notification integration configuration, which will then be listed on the Integrations>Configurations page under List view.

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

To link a Notification Rule to an Outgoing webhook:

1. In the Console, select Alerts and notifications. The Alerts page opens.

2. Select Notifications. The Notification rules page opens and lists any existing Notification rules.

3. Select the NAME hotlink text of the Notification rule you want to link to an Outgoing webhook. The Notification rule details page opens.

4. Scroll down the page and on the Outgoing webhooks panel, select Link webhook. A Select outgoing webhooks dialog appears, and lists the Outgoing webhooks created for your Organization.

5. Select the Outgoing webhooks you want to link the Notification rule to and then select Confirm. The dialog closes and the selected Outgoing webhooks are listed:

In this example:

  • A single Outgoing webhook has been linked to a Notification rule.

  • You can read off the URL for the the webhook.

  • If you have not yet created the Outgoing webhook you want to link the Notification rule to, you can select Create outgoing webhook. This takes you directly to the Create page - see Creating and Managing Outgoing Webhooks.

6. If you want to review the Outgoing webhook details, select the NAME hotlink text. The Outgoing webhook details page opens:

7. If you navigate to Integrations>Configurations and select List view, the new Webhook Notification Integration Configuration is listed:

You can then select the NAME hotlink text to open the Integration details page for the new Webhook Notification:

  • Note that the Entity ID here is the ID of the Notification Rule used to create the Webhook 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 notifications. The Alerts page opens.

2. Select Notifications. The Notification rules page opens.

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

4. Make your changes, and select Update.

5. If you want to view details of the Notification, select the NAME hotlink text. The Notification rules details page opens.

6. If you want to delete a Notification rule, select Delete:

A confirmation dialog appears.

7. 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 notifications. The Alerts pages opens.

2. Select Notifications. The Notification rules page opens.

3. Select the NAME hotlink text of the Notification that you want to check for triggering Events:

The Notification rule details page opens.

4. Scroll down the page and the Latest events panel lists recent Events which triggered the Notification giving the DATE 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.