> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnilinker.pl/llms.txt
> Use this file to discover all available pages before exploring further.

# Runs and activity

> See what your automations did on an order and why some didn't run, retry a failed step, hold automations, and work through problems on the Activity page.

Each time an automation acts on an order, Omnilinker records a run: what started it, each step and what it did. You
see runs in two places: on the order card, for one order, and on **Automations** > **Activity**, for every order.

You need the **See what automations did** permission to see runs, and **Retry and stop automation runs** to retry or
stop them. See [Permissions](/automations/overview#permissions).

## The order card's Automations section

Open an order and go to its **Automations** section: "What ran here, what didn't, and why." Each entry is something
that happened to the order, newest first, with when it happened and who started it: **by a person**, **through the
API**, or "after “…”" when another automation started it. **Not looked at yet** means Omnilinker has not checked the
automations for it yet.

Under each entry are the automations that ran, each with its result and its steps:

| Result | What it means |
| - | - |
| **Done** | Every step went through. |
| **N of M steps done** | A step failed. The failed step is marked, with why. |
| **Trying again** with a time | A step failed for a passing reason and is tried again by itself. |
| **Trial: nothing was changed** | The automation is in trial. Its steps say what they would have done. |
| **Waiting: held** | Automations are held on this order. |
| **Waiting: the rule is paused** | The automation is paused. |
| **Waiting to run**, **Running** | The run is about to start, or under way. |
| **Stopped by the loop guard** | Automations kept starting each other. See [Loop protection](/automations/overview#loop-protection). |
| **Stopped** | The run was cancelled, with the reason below it, for example "Cancelled: the record no longer matches the conditions." |

A step tried more than once says so, for example "(after 3 tries)". Click an automation's name to open it in the
editor.

### Why an automation didn't run

Below an entry, **N rules didn't apply here** lists the automations with that trigger that did not act, and why:

* "didn't run: it runs only when" followed by the condition, and what the order had there;
* "didn't run: it was off then";
* "didn't run: it tests something no installed module offers any more".

For an automation in trial, the line says "wouldn't have acted". Click **Hide the rules that didn't apply** to fold
them away again.

### Retry a failed step

When a step has failed for good, the top of the section says "One step needs you:" with what failed and **Try again**.
Each failed step also has its own **Try again**. "It will be tried again in a moment."

A retry is refused, with the reason, while the order is held ("Automations are held here. Release the hold, then try
the step again."), while the automation is not on, or while automations are running on the order.

Retrying never repeats what a step has already done: a shipment is never booked twice, a trigger never pressed twice.

A **Create a shipment** step whose carrier didn't answer clearly says "An earlier try may have bought this shipment
without it being recorded, so it isn't tried again." Retrying it is refused for good: check the carrier's panel, and
if nothing was bought, create the shipment from the order card.

### Hold automations on an order

Turn on **Hold automations** at the top of the section. You need the **Hold and release automations on a record**
permission.

The section then says when it was held: "Nothing starts on its own until it's released. Buttons and scans still work,
because a person chose them." Type a **Reason** so the others know why.

Turn the switch off to release the hold. Each run that waited checks its conditions again on the order as it is now,
and runs only if the order still fits; the others are cancelled with "Cancelled: the record no longer matches the
conditions."

An order can also be held by an automation's **Hold automations** step, and by **Hand to a person** in floor mode.

### Live updates

The section updates by itself while runs on the order change, so you can keep the card open and watch a press finish.

## The Activity page

Open **Automations** > **Activity**: "Every run on every record. Problems are grouped by what caused them, so one
outage is one line."

Choose the time range at the top: **Last hour** (the default), **Last 24 hours** or **Last 7 days**. The page updates
by itself as runs change; **Refresh** looks again at once.

To see one automation only, use **See its runs** from the **Automations** list or a problem. The filter shows as
**Only** followed by the automation's name; **Show every automation** removes it.

### The figures

| Figure | What it counts |
| - | - |
| **Ran** | Runs in the time range, and on how many records. |
| **Failed** | Runs that failed, and from how many causes. |
| **Loops stopped** | Runs the loop guard stopped. |
| **Paused automations** | Automations that are paused: "their runs wait until you resume them". |

### Needs attention

**Needs attention** groups failed runs by their cause: the automation, the step and the reason. For each problem you
see how many runs, since when, on which orders, and whether some are retrying by themselves, with the next try and
how many tries are left.

* **Retry it now**, or **Retry all N now**, tries the failed runs again. You need **Retry and stop automation runs**.
  One click retries up to 100 runs; when more are left, the page says so and you click again. Runs whose order is
  held, whose automation isn't on, or that are running are skipped, and the page says how many.
* **Pause the automation** stops new runs from going ahead while you fix the cause. "Paused, it holds new runs and runs
  them when you resume it. Nothing is skipped." You need **Create and change automations**.
* **See its runs** lists the failed runs of that automation.

When nothing needs you, the page says "Nothing needs attention: every run went as it should."

### Stopped loops

Each loop the loop guard stopped is listed as "A loop was stopped on" the order, with the automations that "kept
starting each other". Click **See the run** for its details, or **Open the record**. Change one of the automations, for
example with a condition, so they no longer start each other.

### Runs

The **Runs** list has the tabs **All**, **Failed**, **Stopped** and **Trial**, with the columns **When**, **Record**,
**Automation**, **Started by** and **Result**. **Show more** loads more runs.

Click a record to open the run's details: what started it, each step with what it did, and **Technical details** for a
failed step. From there:

* **Retry now** tries a failed run again.
* **Open the record** opens the order.
* **Stop this run** cancels what the run has not done yet: "What it hasn't done yet, it won't do. The record's runs
  waiting behind it go on."

## Notifications

When a step fails for good, the person who made the automation gets a notification, "“…” couldn't finish on #…", and
so do the people and role chosen under **If a step fails**. When the loop guard stops a run, the person who made the
automation is told: "“…” was stopped on #…". Notifications arrive in the Notification Center, one per run, grouped by
automation. See [Inbox](/notifications/inbox).

## How long runs are kept

Omnilinker deletes old automation history once a night, for each organization separately. Two settings decide how
long it is kept:

| Setting | Key | Default | What it keeps |
| - | - | - | - |
| **Keep finished runs for (days)** | `Automation.Retention.RunDays` | 90 | Finished runs with their steps: the order card's **Automations** section and **Activity**. |
| **Keep what happened for (days)** | `Automation.Retention.OccurrenceDays` | 30 | Triggers that no run was made for: the editor's 7-day preview and "why didn't it run" on the order card read them. |

* A value of `0` keeps them for good.
* A run that has not finished, for example one that is held, paused or waiting to retry, is kept however old it is,
  with what started it.
* A finished run is counted from when it finished, not from when it started.

To change them, open **Administration** > **Settings**, choose the **Automations** group, set the two values and click
**Save**. You need the **Change automation settings** permission. A shorter window takes effect the next night.

If you run Omnilinker yourself, the host's values apply to every organization that has not set its own, and the
`Settings` section of `appsettings.json` sets the defaults below them.

<Note>
  **Keep what happened for (days)** is 0 or at least 7: the editor's preview looks at the last 7 days, and with less it
  would see fewer of them. The settings page refuses 1 to 6 for both values: a custom trigger's split of its presses
  reads a week of runs too.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.