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

# Customer Reorder Due

> Repeat customers who are due for their next purchase, benchmarked against typical reorder gaps.

## What it is

Customers with at least two purchases who are due for the next one. The benchmark is the median gap of all customers at the same purchase number — the step from second to third is not the step from first to second. First-time buyers are deliberately not here: before a second purchase there is no rhythm to measure. Filter `needs_action = true` for the working list.

`needs_action` means the customer is due **and** nobody has contacted them yet — the outreach columns (`outreach_status`, `outreach_at`, `outreach_note`, `outreach_channel`) show right in the row whether and how a customer was already approached. The outreach log itself is written by the retention agent.

## How it gets data

**Computed view** — derived automatically from [Orders](/for-agents/data-model/orders) and [Customers](/for-agents/data-model/customers), joined with the agent's outreach log. Read-only; no ingest endpoint.

## Fields

| Field                   | Label           | Type     | Writable  | Description                                                                       |
| ----------------------- | --------------- | -------- | --------- | --------------------------------------------------------------------------------- |
| `needs_action`          | Needs action    | boolean  | read-only | Due for reorder and not yet contacted — the working-list filter                   |
| `customer_email`        | Customer        | email    | read-only | Customer email                                                                    |
| `reorder_status`        | Status          | status   | read-only | Reorder state (due / overdue / on-track)                                          |
| `overdue_days`          | Overdue (d)     | number   | read-only | Days past the expected reorder date                                               |
| `orders_so_far`         | Orders          | number   | read-only | Purchases so far                                                                  |
| `next_purchase_no`      | Next purchase   | number   | read-only | Which purchase number is due next                                                 |
| `last_order_date`       | Last order      | date     | read-only | Date of the most recent order                                                     |
| `due_from`              | Due from        | date     | read-only | When the next purchase became due                                                 |
| `median_gap_days`       | Typical gap (d) | number   | read-only | Median gap of all customers at the same purchase number                           |
| `gap_observations`      | Based on        | number   | read-only | How many gap observations back the benchmark                                      |
| `days_since_last_order` | Days since      | number   | read-only | Days since the last order                                                         |
| `outreach_status`       | Outreach        | status   | read-only | Whether/how outreach happened                                                     |
| `outreach_at`           | Contacted       | datetime | read-only | When the customer was contacted                                                   |
| `outreach_note`         | Note            | text     | read-only | Outreach note                                                                     |
| `outreach_channel`      | Channel         | text     | read-only | Outreach channel (e.g. email)                                                     |
| `calculated_at`         | —               | datetime | API only  | When the view was computed (not a registered app column, but returned by queries) |

All columns are read-only. The view also carries `tenant_id` / `workspace_id` for tenant isolation — filtered automatically, never selected.

## Query it

```json theme={null}
{
  "method": "tools/call",
  "params": {
    "name": "data_query",
    "arguments": {
      "view_slug": "v_customer_reorder_due",
      "filters": { "needs_action": true },
      "select_fields": ["customer_email", "orders_so_far", "overdue_days", "last_order_date"],
      "sort_by": "overdue_days",
      "limit": 50
    }
  }
}
```
