Clone
4
Creating a notificaion
cowch edited this page 2026-04-06 16:51:09 -05:00

When creating a new notification we need to make sure 2 files are created at min.

The below files are what you need and there places they belong.

NOTE: all "name" must match what you name the alert to keep things simplier

  • The notification - notification.{name}.ts
    • This will go into the notification folder
  • The sql - {name}.sql
    • This will go into the prodSql or gpSql depending on what query it is
    • when utilizing lsts own db for querying this will go directly into the notificaion
  • The email template - {name}.hbs
    • This will go into the utils/mailViews

The notification.master.ts will also need to be updated with the new data

below is an example.

{
	name: "qualityBlocking",
	description:
		"Checks for new blocking orders that have been entered, recommend to get the most recent order in here before activating.",
	active: false,
	interval: "10",
	options: [{ sentBlockingOrders: [{ timeStamp: "0", blockingOrder: 1 }] }],
},

options is an array of what ever you want in here that relates to the notification

The only exception to the files is the query portion as it can be directly inside the notification.