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

# Automations

> Create, manage, and monitor automation rules — with a detail view for trigger configuration, action steps, and execution traces.

The Automations screen is the central hub for creating and monitoring automation rules (triggers + actions) and is available at `/fw/automations`.

## Overview

This screen renders a tabbed layout with four tabs: a rules list (`AutomationRulesList`), an analytics dashboard (`AutomationAnalyticsDashboard`), an execution monitor (`ExecutionDashboard`), and a log viewer (`AutomationLogViewer`). FW module settings are loaded via `useFWModuleSettings`; when the execution worker is not enabled, an alert notice is displayed. New rules are created in a slide-over `AutomationRuleBuilder`. Existing rules can be edited from the list. Execution records can be viewed, debugged, or replayed via `ExecutionDetailDialog`.

Note: There is no dedicated `/fw/automations/new` route. The creation experience launches from the **New Automation** button on this page.

## Who it's for

Access follows your organization's role and module configuration.

* The execution worker must be enabled (`fw_execution_worker_enabled = true`) in FW settings for automations to run.
* If the worker notice is shown, contact your administrator.
* An organization must be selected. If no organization is active, the new-rule flow is unavailable.

## Finding and managing automations

1. Navigate to `/fw/automations`. Review any worker configuration notice at the top.
2. The default tab lists all automation rules for the organization.
3. Click **New Automation** to open `AutomationRuleBuilder` and configure a trigger and action set.
4. Click a rule's edit action to reopen `AutomationRuleBuilder` with existing configuration.
5. Switch to the **Executions** tab to view the `ExecutionDashboard`.
6. Click an execution record to open `ExecutionDetailDialog` in view, debug, or replay mode.

* **Automation rule** — a named rule pairing a trigger with one or more actions.
* **Execution worker** — the platform service that runs automations; controlled by `fw_execution_worker_enabled` in `fw_module_settings`.
* **Replay** — re-runs a past execution record; requires `fw.workflow-executions.replay` permission.
* **Trigger type** — determines when the rule fires (e.g., `form_submitted` and other event-based or date-relative triggers visible in `useAutomationRules`).

## Viewing an automation

The Automation Details screen (`/fw/automations/:id`) shows the full configuration and most recent execution trace for a single automation rule.

This screen loads the automation rule matching the `id` URL parameter from `useAutomationRules`. For rules with a trigger type of `event` or `date_relative`, an inline trigger configuration panel (`EventTriggerConfig` or `DateRelativeTriggerConfig`) is shown and can be edited directly. The most recent execution is loaded via `useRealtimeExecutions` and displayed as an `ExecutionTrace`. Domain events are listed via `useDomainEvents`. Action steps are managed through `AutomationActionsBuilder`.

Before you start: navigate here from the Automations list (`/fw/automations`) or from a direct deep link. A valid automation ID must be present in the URL.

1. Navigate to `/fw/automations/:id` or click a rule name in the Automations list.
2. For `event` or `date_relative` rules, the trigger config panel is displayed and editable inline.
3. The `AutomationActionsBuilder` section lists the configured action steps.
4. The last execution is shown in the `ExecutionTrace` panel with status and step details.
5. Click save in the trigger config panel; changes are persisted via `useEventTriggerConfig`.

* **Trigger type** — `event` (domain event fired) or `date_relative` (scheduled relative to a date field); other types do not show the inline config panel.
* **Execution trace** — the step-by-step record of the most recent run of this automation.
* **Domain events** — platform events that can trigger automations, loaded via `useDomainEvents`.

## Related

<Columns cols={2}>
  <Card title="Forms & Workflow" icon="diagram-project" href="/fw/overview">
    Forms & Workflow core overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/fw\.tsx
  * src/cores/fw/pages/Automations.tsx
  * src/cores/fw/pages/AutomationDetail.tsx
  * src/cores/fw/hooks/useAutomationRules.ts
  * src/cores/fw/hooks/useFWModuleSettings.ts
  * src/platform/permissions/constants.ts
</Accordion>
