# Actions and tasks

> Tasks, follow-up actions from visits and trials, and dated project steps in a single to-do list.

A sales rep's to-dos come from four different kinds of records. The CRM shows them in a single list on the **Actions** (*Aksiyonlar*) page; in the API, [`GET /api/v1/actions`](/rest-api/actions/list) returns the same list.

| Kind (`kind`) | Source | Example |
|---|---|---|
| `task` | Task — created manually, by a workflow, from a form, or by a hook. | "Send the price list" |
| `visit` | The **next action** of a visit / phone call. | "Send quote · October 5" entered during the call |
| `demo` | The next action of a trial (product trial). | "Get the trial result" |
| `step` | A dated checklist step on an opportunity. | "Schedule a line trial" |

Each row's `key` field has the form `kind:id` (e.g. `task:26`). The complete, postpone, and close endpoints use the path `/api/v1/actions/{kind}/{rid}/…`, so you can handle every action with the same code, whatever its kind.

## Status

| `state` | Meaning |
|---|---|
| `overdue` | Past its due date. |
| `soon` | Due in 7 days or less. |
| `open` | Due later. |
| `done` | Completed. |

## Chain

When you close an action, you can open the next one ([Close and open next](/rest-api/actions/close)). This way, the work for a company forms a chain; the single-record endpoint returns the chain in the `chain_before` and `chain_after` fields. Logging an activity ([Log an activity](/rest-api/activities/log)) automatically closes matching open actions at the same company.

## Task fields

| Field | Type | Description |
|---|---|---|
| `id`, `rid` | integer, string | ID and permanent record ID (`00T…`). |
| `title`, `detail` | string | Title and details. |
| `due_date`, `due_time` | date, string | Due date and optional time (`HH:MM`). Tasks with a time appear at that time in the calendar. |
| `status` | string | `Açık` (open), `Devam Ediyor` (in progress), `Tamamlandı` (done). |
| `priority` | string | `Düşük` (low), `Normal`, `Yüksek` (high), `Acil` (urgent). |
| `assignee` | user | Assigned user. |
| `customer_id`, `opp_id` | integer | Linked company and project (both optional). |
| `result`, `completed_at` | string, datetime | Result note and completion time. |
| `source_key` | string | The source that created the task (e.g. `form:3`, a workflow). |

## Completion date

Completion endpoints accept a past date in `done_on`: when a user marks a task done today that they actually did yesterday, reports count it on the correct day. If you omit it, the current time is used.

## Notifications

The assigned user gets an in-app notification and, depending on their preferences, an email as well. A digest email of overdue items goes out every morning; users choose which events trigger email or in-app notifications under **Settings → Notifications** (*Ayarlar → Bildirimler*).