# Rules

Automation is important for proactive monitoring & immediate actions. Users can create automation logic and monitor the history here.

Users can create rules here and enable/disable/delete them.

![](/files/N4RTm50Hrqe8WGGoygSF)

Basic table features&#x20;

* Search: for a rule applied on a specific SIM via EID/ ICCID of the SIM or via Tags&#x20;
* Filtering/Sorting: the table allows filtering/sorting where applicable and resetting of the filters&#x20;
* Column selection: select the columns to be displayed&#x20;
* Pagination: select how many rows of data should be displayed & navigate multiple pages

The Transactions detail summary table is explained below.

| Item          | Explanation                                                                                                                                                                |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name          | Rule Name created by user                                                                                                                                                  |
| Event         | The event type triggered by the rule                                                                                                                                       |
| Target Count  | Count of SIMs/ Profiles targeted by the rule - either via ICCIDs or EIDs                                                                                                   |
| Actions       | Summary of actions to be executed by the rule, there can be multiple.                                                                                                      |
| Status        | Describes if the rule is currently Enabled or Disabled. ‘Completed’ indicates a rule that has been set to be executed only once and is now completed & therefore disabled. |
| Change Action | Users can toggle between enabling/ disabling a rule and can also delete a rule.                                                                                            |

Rules are a compilation of 4 elements along with some configurations.&#x20;

* Trigger
* Target&#x20;
* Setup
* Actions

## Header&#x20;

Header allows the user to create a rule with a Short name and description to identify the rule.

<figure><img src="/files/gTFMeQIjPVCTA64dKiu7" alt=""><figcaption></figcaption></figure>

## Trigger

What triggers the rule? The available triggers in the platform are:&#x20;

* Usage Monitoring &#x20;
* Events&#x20;
  * IMEI change
  * Country change
* Service change
  * SIM profile state

### **Usage Monitoring**&#x20;

This trigger allows a user to select conditions for the usage type to have breached. These are broken down into the amount of usage and the period of the usage.

There are various combinations of periods the user can select - some are static (e.g. calendar month) and some are to monitor a moving period (past months).

![](/files/uKv8BvT0EczhcKOc3KIa)

### **Events**

#### IMEI Change

This allows a user to select the “From” and “To” IMEI types with “Any” triggering the rule for any device change.

![](/files/cwC57OufmbglrvAvZvU0)

#### Country Change

This allows a user to select between entering/ leaving geofence or Any location changes for specified countries.

<figure><img src="/files/h3VleIFQItnUl2OxdqVn" alt=""><figcaption></figcaption></figure>

### Service Change

This allows a user to trigger a rule due to a SIM-profile (ICCID) state changing (to Active/ Suspended/ Terminated/ Any).&#x20;

<figure><img src="/files/sV2cJBYnXpQw1pf3lNav" alt=""><figcaption></figcaption></figure>

## **Target**

The rule trigger will only happen for the SIMs/ Profiles (ICCIDs/EIDs) selected in the target section. User has a choice to select apply to all or a selected few.

![](/files/P6GqAzpYFjch74HaREpc)

The target options change between allowing EIDs or ICCIDs depending on the type of rule trigger.&#x20;

## Setup

The Setup information carries the following and can change in terms of options depending on the trigger type:&#x20;

* **Re-Evaluate**: This defines if the rule will run only once or forever. It is not applicable for certain triggers and is set to NEVER by default.&#x20;
  * **Always**: The rule will be evaluated each time it is triggered for the specified target indefinitely.&#x20;
  * **Begining of next calendar day**: If the rule has been evaluated in the calendar day (UTC), it will be disabled until the next calendar day starts when the rule will be evaluated again if triggered.
  * **Begining of next calendar month:** If the rule has been evaluated in the calendar month (UTC), it will be disabled until the next calendar month starts when the rule will be evaluated again if triggered.
  * **Never**: The rule will be marked as COMPLETED after one successful evaluation.&#x20;
* Enable/ Disable Status: Users can create rules in an Enabled (default) or disabled state.

<figure><img src="/files/ryEtlY8uzRPSF9frT58x" alt=""><figcaption></figcaption></figure>

## &#x20;**Actions**

A user can select up to 10 actions triggered for a rule. They will be triggered in the order created (if applicable).

The Action types available in the platform are:

* Email: user can enter up to 10 recipients in an email action

![](/files/xQMUqyHEqhmPWTT46K0h)

* Billing State Change: user can activate/ suspend/ terminate a SIM either of a particular connectivity profile profile or “Any”. (!!) Exercise caution in targeting the “Terminated” State with automation as this is an unrecoverable state.

![](/files/gk4fvvz2zwnoI3ql2iLx)

* Webhook: user can set up a webhook URL and optionally add header name and value for the action

![](/files/OWgpHCxd1CQ6X8BzMfJO)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.connectedyou.io/knowledge-base/connectedyou-platform/user-guide/automation/rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
