> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/administration/rules-engine/rules-engine-introduction.md).

# Rules Engine Introduction

The Rules Engine is a powerful and flexible tool for performing actions based on itineraries and intelligence items (such as alerts) automatically. It runs constantly in the background, monitoring your data and alerting you based on rules you set up.

There are two types of rules:

* Itinerary Rules (that fire based on itinerary data)
* Alert Rules (that fire based on alerts)

Each rule includes conditions (what causes it to fire) and actions (what should happen as a result).

Rules apply to the tenant in which they reside. If you have multiple sub-tenants, you'll need to set up appropriate rules for each. The only exception is rules to approve or decline alerts - these should only be set up in the top-level tenant.

Rules can be either enabled or disabled.  Optionally, rules can also have effective dates, determining when they do and do not run.

## Itinerary Rules

An Itinerary Rule fires based on updates to itinerary data.  Common usage scenarios include:

* Send an email to an administrator if an itinerary is added with a risk level of high
* Send a document to the travellers if their itinerary includes car hire
* Send an SMS to the administrator if an itinerary includes travel to Egypt or Sudan
* Approve an itinerary automatically if an itinerary's risk level is insignificant
* Decline an itinerary if an itinerary duration is longer than 14 days and notify an administrator by e-mail
* Send a travel briefing for the countries included in an itinerary to the travellers if the risk level is medium, high or extreme
* Send an email to the administrator if an itinerary includes a flight departing from Dubai

## Alert Rules

An Alert Rule fires based on receipt of alerts from approved providers (e.g. Riskline).  Common usage scenarios include:

* Notify all travellers within 100KM of a high priority alert by SMS
* Notify an administrator by e-mail of all alerts for Indonesia, East Timor and Papua New Guinea
* Notify all travellers in the same country via a phone call
* Request a check-in from all travellers currently in the country upon receipt of a high priority alert and mark them as overdue after 30 minutes if no response is received

<br>
