---
title: "Actions"
description: "OQL field reference for actions. Tasks and next actions linked to contacts. Core to the Action Stream methodology."
canonical_url: https://developer.onepagecrm.com/oql/entities/actions/
source: Markdown mirror of https://developer.onepagecrm.com/oql/entities/actions/
---

Actions are the tasks and next actions linked to contacts. They are
core to the Action Stream methodology that OnePageCRM is built around.

**Default sort:** `weight` descending. When you omit `order_by`,
actions return in [Action Stream priority
order](/getting-started/data-model/#how-the-stream-sorts), the same
order the OnePageCRM app uses.

## Fields

Legend: **F** filterable, **S** sortable, **A** aggregatable, **G** groupable.

| Field | Type | F | S | A | G | Description |
|-------|------|:-:|:-:|:-:|:-:|-------------|
| `id` | ID | Y | — | — | — | Action ID |
| `text` | string | Y | — | — | — | Action text (max 140 chars) |
| `contact_id` | ID | Y | — | — | Y | Associated contact ID |
| `assignee_id` | ID | Y | — | — | Y | Assigned user ID |
| `completed` | boolean | Y | — | — | Y | Whether the action is completed |
| `status` | string | Y | Y | — | Y | One of `asap`, `date`, `date_time`, `waiting`, `queued` |
| `date` | date | Y | Y | — | Y | Due date (in assignee's timezone) |
| `exact_time` | time | Y | Y | — | — | Exact time on time-scheduled actions |
| `waiting_since` | time | Y | Y | — | — | When a `waiting` action started waiting (auto-set; read-only) |
| `completed_at` | time | Y | Y | — | Y | When the action was completed |
| `weight` | number | — | Y | — | — | Action Stream priority weight. Default sort field. |
| `created_at` | time | Y | Y | — | Y | Record creation timestamp |
| `modified_at` | time | Y | Y | — | Y | Last modification timestamp |

## Notes

- **`status`** controls how the action behaves in the Action Stream:
  - `asap`: do immediately, top of stream.
  - `date`: scheduled for `date`.
  - `date_time`: scheduled for `date` at an `exact_time`.
  - `waiting`: waiting on the contact, below dated actions.
  - `queued`: in the queue with no specific date.
- **`waiting_since`** is stamped automatically the moment `status`
  becomes `waiting`; it is read-only. Sort or filter by it to surface
  the actions that have been waiting longest.
- Completed actions have `completed: true` and a `completed_at`
  timestamp.
- **Lookups:** `contact` (via `contact_id`). Pull the contact's fields
  inline as `contact.<field>` — for example `contact.last_name` or
  `contact.owner_id`. See [Concepts › Lookups](/oql/concepts/#lookups-related-fields).

## Example queries

Today's open actions for me:

```json
{
  "from": "actions",
  "where": {
    "assignee_id": "ME()",
    "completed": false,
    "date": "TODAY()"
  }
}
```

Overdue actions:

```json
{
  "from": "actions",
  "where": {
    "assignee_id": "ME()",
    "completed": false,
    "date": { "<": "TODAY()" }
  }
}
```

How many actions did the team complete this week:

```json
{
  "from": "actions",
  "select": ["assignee_id", "count()"],
  "where": {
    "completed": true,
    "completed_at": { ">=": "THIS_WEEK()" }
  },
  "group_by": ["assignee_id"]
}
```

All open actions on a specific contact:

```json
{
  "from": "actions",
  "where": {
    "contact_id": "507f1f77bcf86cd799439011",
    "completed": false
  }
}
```
