Monitor rule - document overdue

Use this monitor rule to verify if two related documents succeed each other. The time interval to monitor starts at one of these moments:

  • The moment the first document is sent
  • The Date and Time value from a specified attribute of the first document

The duration of the time interval is specified in a time offset.

This table shows the syntax of the Document Overdue rule:

Syntax {[Reference Document][optional Condition]}{[Time Offset] [Since]}{[Overdue Document][optional Condition]}
Reference Document The first document to be monitored.
Condition (optional) A monitor condition from the list of predefined conditions. The condition must only contain attributes of the first document (the reference document).

The monitor only runs for documents for which the condition is True.

Time offset The time the monitor must wait for the occurrence of the second document (the Overdue Document).

The time interval to monitor starts at one of these moments:

  • The moment the first document is sent, expressed as CreationDateTime in the document header
  • The time in the [Date and Time Attribute] in the first document if this was specified
Since (optional) A Date and Time attribute from the reference document. This attribute has been pre-selected in the list of document attributes to monitor. The time value in this attribute marks the beginning of the monitoring time interval. If the date is in the past, the timer starts immediately. The monitor waits for the related document until the time offset expires.

If no attribute is specified, the time interval to monitor starts at the moment the first document is sent.

Overdue Document The second document, expected to occur within the time offset specified.

The overdue document must be related to the first document through a reference. You must pre-select this reference in the monitor references.

Condition (optional) A monitor condition from the list of predefined conditions.

In this condition, you can use attributes from the document that is selected as the overdue document.

The monitor evaluates this condition for each document that is related to the reference document. The monitor ignores documents for which this condition is false.

Evaluation The evaluation starts when an instance of the reference document is received by ION.

If a condition was specified for this document, the evaluation starts only if the condition evaluates to True.

When the reference document is received, the monitoring time interval is calculated. The interval starts at one of these moments:

  • The moment the first document is created by the source application (CreationDateTime)
  • The time in the [DateTime Attribute].

The interval ends after the specified time offset.

During the specified waiting time, the monitor verifies if an instance of the overdue document occurs. This document instance must be related to the reference document instance.

If the overdue document arrives within the time interval, first the associated condition is evaluated.

If this condition evaluates to True, or if no condition was specified, the monitor rule evaluates to False.

If the condition evaluates to False, the monitor keeps running until the time offset expires.

If the time offset expires and no valid occurrence of the overdue document is detected, the rule evaluates to True and an alert is sent.

So the rule evaluates to True when the related document is too late or when this document never arrives. The rule evaluates to False if the document is in time.

Example 1 WITHOUT ATTRIBUTE

You want to verify whether an invoice is issued within 24 hours after a shipment. To achieve this, you define a monitor rule of type Document Overdue for the SalesOrder and Invoice documents. These two documents are related to each other through the reference from Invoice/InvoiceLine/SalesOrderReference/DocumentID/ID to the SalesOrder Document ID.

You are only interested in SalesOrder documents with status Shipped. Therefore, you use a condition of type Attribute-Value Comparison for the reference document.

This table shows the syntax of the rule:

Reference Document SalesOrder
Condition SalesOrder.Status = 'Shipped'
Time Offset 24 hours
Since <empty>
Overdue Document Invoice
Condition None

Example 2 WITH ATTRIBUTE

You want to monitor if a Shipment document for a specific product occurs within eight hours from the shipped sales order's Promised Delivery Date. To achieve this, you define a monitor rule of type Document Overdue with Attribute.

You want to monitor only sales orders with status Planned and Shipments with status Shipped. To check the status of the documents, you use conditions of type Attribute-Value Comparison.

The Shipment and SalesOrder documents are related to each other. The relation is based on references from the Shipment to the SalesOrder Document ID. For example, you can use the reference from the Shipment/ShipmentItem/SalesOrderReference/DocumentID/ID to the SalesOrder Document ID.

This table shows the syntax of the rule:

Reference Document SalesOrder
Condition SalesOrder.Status = 'Planned'
Time Offset 8 hours
Since SalesOrder.PromisedDeliveryDate
Overdue Document Shipment
Condition Shipment.Status = 'Shipped'