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

# Actions

An action definition describes a kind of work your platform performs. An action record is one accepted unit of that work.

For example, `orders.created` can be a definition. The order placed by one customer is a record under that definition. The definition supplies the contract and flow; the record carries the payload, tags, current state, and delivery history.

## Action definitions

A definition brings together the parts of Arklow that apply to one kind of work:

* The name work arrives under.
* The schema used to validate its payload.
* The sources that create records for it.
* The rules that tag, transform, route, skip, or terminate its records.
* The destinations where admitted work can be delivered.
* The metric policies associated with the work.

Definitions are reusable. You configure the flow once, then each accepted record enters under that definition's current contract.

### Variant

The variant is the definition's canonical name. Use dot notation to describe the domain and event or operation:

```text theme={null}
orders.created
inference.requested
calls.process
```

The variant is used by [HTTP ingress](/resources/sources/arklow/ingress), queue sources, rules, and SDK listeners. Treat it as a stable contract with callers.

### Schema

Schemas are optional. When you use them, you can ensure that work entering Arklow matches the required shape, or it is thrown away. We recommend that you rely upon existing schema checks in your pipeline, using this feature only for added protection.

### Aliases

Aliases can be used to temporarily associated new variant identifiers with the current action. Often this can be useful for migrations, or moving old work to new actions.

<Warning>
  Aliases are meant to be used for migration, or for maintenance reasons. They will take priority over existing Action Variant names. This can cause unintended effects, or deliver work to the work Action.
</Warning>

### Version

Definitions begin at version `1`. When incoming work omits the version, Arklow uses the current version for that variant. A caller can include the version to assert which current contract it expects.

If a version, for whatever reasons becomes invalid, or unavailable, Arklow will use the latest version.

## Flow configuration

Flow is a UI-only feature that visualizes the entire Action, and all how work moves through it. We recommend that you use it initially to configure your first actions, before moving to API/Terraform based configurations.

## Lifecycle

An action moves through a small set of public states.

| State | Meaning |
| - | - |
| `queued` | Arklow accepted the work and it is ready to be evaluated |
| `dispatch_wait` | The selected lane cannot admit the work yet |
| `scheduled` | The action is waiting until a requested time |
| `retrying` | A prior attempt ended and the next attempt is waiting to begin |
| `running` | Arklow admitted the action and is delivering it |
| `ack_wait` | The destination has the work and final settlement is outstanding |
| `succeeded` | The action settled successfully |
| `failed` | The action reached a permanent failure or exhausted its lifetime |
| `canceled` | The action was canceled before successful completion |

[Delivery guarantees](/fundamentals/delivery-guarantees) defines attempts, settlement, and redelivery for these states.

## Create a definition

<Steps>
  <Step title="Name the work">
    Create an action in the dashboard and enter a stable variant such as `orders.created`.
  </Step>

  <Step title="Set the payload contract">
    Add a JSON Schema, or leave the schema empty when any JSON payload is valid.
  </Step>

  <Step title="Link a destination">
    Open the action's **Flow** and link the destination that should receive the work. Set the fallback destination as default when the flow has more than one.
  </Step>

  <Step title="Add routing where needed">
    Add rules when payloads or tags should choose a different destination or control lane.
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create an action and deliver its first record.
  </Card>

  <Card title="Admission control" icon="road-barrier" href="/fundamentals/admission-control">
    See why an action waits before delivery.
  </Card>

  <Card title="Sources" icon="arrow-down-to-line" href="/resources/sources/index">
    Choose where action records enter Arklow.
  </Card>

  <Card title="Destinations" icon="arrow-up-from-line" href="/resources/destinations/index">
    Choose where admitted work is delivered.
  </Card>
</CardGroup>


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