Alert Example - Shipment Laycan Authorisation

This example triggers an alert when a shipment laycan is created, to tell applicable users that the laycan requires authorisation.

The alert needs to be enabled and executed every minute, checking every distinct despatch and laycan history record. The relevant object field type, which is one of the fields in the query string, is DespatchID. The object to which this despatch relates is a Shipment object. The alert message needs to be displayed as a warning for 10 seconds to any user within the Administration user group. If the laycan is not authorised within 15 minutes, the alert is to be re-issued.

The alert Message Text is:

The laycan period for shipment {Shipment} requires authorisation.

The table below lists the recommended settings for the alert. Other settings may depend on system configuration and configured user groups.

Field

Suggested Value

Name

Laycan Authorisation Alert

Enabled

True

Frequency Type

Every n Minutes

Query Frequency

1

Relevant Object Field

DespatchID

Relevant Object Type

Shipment

Message Duration

10

User Groups

Administration

Message Severity

Warning

Redisplay Triggered Alerts

True

Redisplay Frequency

15

Key Identity Data Fields

DespatchID, LaycanHistoryID

The SQL Query for the alert is:

Copy
SELECT desp.DespatchID, desp.name Shipment, lc.LaycanHistoryID
FROM Despatch desp, DespatchRoutePoint drp, LaycanHistory lc
WHERE desp.DespatchID = drp.DespatchID
  AND drp.LaycanHistoryID = lc.LaycanHistoryID
  AND lc.AuthorisationState= 'None'