Notification Rules, filter-rule-set-reports

Introduction

Client Sites in the TrackTik portal have a tab called Notifications. These are to configure the destinations and triggers of reports notifications.

image-20220712-185842.png

image-20220712-190338.png

And for each of these, triggers and destinations can be defined (for who they should be sent to). These two are known as Filters and Recipients, respectively.

API endpoints now exist to allow for the creation, editing and removal of these notifications along with their filters and recipients.

Terminology

Web Portal vs API

TrackTick Web Portal

API

Definition

Notification Rule

VIEW
[GET] /filter-rule-set-reports

CREATE
[POST] /filter-rule-set-reports

UPDATE
[PATCH] /filter-rule-set-reports/{id}

The title and email type + body content of the notification.

Filters

VIEW
[GET] /filter-rule-set-reports?extension=filters
BOTH: filters,recipients

CREATE/UPDATE
[POST] /filter-rule-set-reports/{id}/actions/add-filters

The triggers and context of when to generate a notification, like report templates, severity, flag types and flags (categories).

Recipients

VIEW
[GET] /filter-rule-set-reports?extension=recipients
BOTH: filters,recipients

CREATE/UPDATE
/filter-rule-set-reports/{id}/actions/add-recipients

Who should receive the notification, like site contacts, site employees, site clients and zone employees.

 

Payload Examples

Create a Rule Notification

[POST] /filter-rule-set-reports

{ "trigger": "TRIGGER.APPROVAL", "ruleName": "Scenario 2 - Scenario 1 but from API", "account": 687, "applyToSubSites": false, "emailTemplate": "CUSTOM", "emailSubject": "default subject", "emailBody": "default body", "emailIncludeAttachment": true }

Add/Update Filters to a Rule Notification

[POST] /filter-rule-set-reports/{id}/actions/add-filters
{id}: the id of the filter-rule-set-report record

{ "id": {id}, "incidentSeverity": [1,2,3,4,5], "incidentFlagType": [10,12,13], "incidentFlag": [52,50,56], "sendAll": false }

Add/Update Recipients to a Rule Notification

[POST] /filter-rule-set-reports/{id}/actions/add-recipients

{ "id":{id}, "siteContacts": [id1,id2,id3,..,idn], "siteEmployees":[id1,id2,id3,..,idn], "siteClients": [id1,id2,id3,..,idn], "zoneEmployees":[id1,id2,id3,..,idn] }

Was this article helpful?
0 out of 0 found this helpful

Articles in this section