> ## 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.

# Order Country Demand

> Orders and units per shipping country over rolling windows, each mirrored against the same window a year earlier — one row per country.

## What it is

Where the orders come from, and whether a country is growing. One row per shipping country: order and unit counts for the last 14 / 28 / 90 / 180 / 365 days, the **same windows one year earlier** (`_py` = prior year), and a look-ahead: how many orders the country produced in the **next 90 days of last year** — what the coming quarter looked like last time.

The headline number is **Momentum %**: orders in the last 28 days as a percentage of orders in the same 28 days a year ago. `152` means 1.52× last year; `100` means flat. From it the view derives a trend label and a confidence.

This is an aggregate designed for agents to **read a handful of rows**, not to walk thousands of orders. A country signal (*"NL orders 28d are 3.35× prior year"*) is one row here.

## How it gets data

**Computed view** — derived from [Orders](/for-agents/data-model/orders) (`shipping_country_code`, `placed_at`) and [Order Line Items](/for-agents/data-model/order-line-items) (units). Refunded / expired / voided orders are excluded via `financial_status`. Read-only; no ingest endpoint.

<Warning>
  Orders without a shipping country are grouped under `country_code = UNKNOWN` instead of being dropped, so the gap is visible. Bulk-imported historical orders can lack the country — when the `UNKNOWN` row is large in a window, the country split for that window is unreliable. Check `UNKNOWN` before comparing countries on the 90/180/365-day windows.
</Warning>

## Fields

### Identity & trend

| Field                     | Label                      | Type     | Description                                                                                                                                                                                                                    |
| ------------------------- | -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `country_code`            | Country                    | text     | ISO-2 shipping country, or `UNKNOWN`                                                                                                                                                                                           |
| `momentum_pct`            | Momentum vs prior year %   | number   | `100 × orders_28d / orders_28d_py`. Empty when the prior-year base is under 20 orders (too thin to compare). Note: on product views the same column name compares 28 days against 90 days — here it compares against last year |
| `momentum_delta_pct`      | Momentum Δ vs prior year % | number   | `momentum_pct − 100`, the same figure as a growth delta: +46 = 46 % more orders than the same 28 days last year                                                                                                                |
| `orders_forecast_next90d` | Orders next 90d (forecast) | number   | `orders_next90d_py × momentum_pct ÷ 100` — last year's coming 90 days scaled by this year's year-over-year momentum. **An assumption that the growth holds, never a truth.** Empty when `momentum_pct` is empty                |
| `trend_label`             | Trend                      | status   | `RISING` (momentum ≥ 130) / `STABLE` / `FALLING` (≤ 70) / `LOW_VOLUME` (prior-year base under 20 orders)                                                                                                                       |
| `trend_confidence`        | Confidence                 | text     | `high` (≥ 30 orders in 28d) / `medium` (≥ 15) / `low`                                                                                                                                                                          |
| `calculated_at`           | Calculated At              | datetime | When the view was computed — hidden by default                                                                                                                                                                                 |

### Current windows

| Field                                                                      | Label     | Type   | Description                        |
| -------------------------------------------------------------------------- | --------- | ------ | ---------------------------------- |
| `orders_14d` / `orders_28d` / `orders_90d` / `orders_180d` / `orders_365d` | Orders Nd | number | Distinct orders in the last N days |
| `units_14d` / `units_28d` / `units_90d` / `units_180d` / `units_365d`      | Units Nd  | number | Units sold in the last N days      |

`orders_28d` is shown by default; the other windows are hidden but selectable.

### Prior-year mirrors

| Field                                    | Label                   | Type   | Description                                                                                  |
| ---------------------------------------- | ----------------------- | ------ | -------------------------------------------------------------------------------------------- |
| `orders_28d_py` / `units_28d_py`         | … 28d (prior year)      | number | Same 28-day window, one year earlier                                                         |
| `orders_90d_py` / `units_90d_py`         | … 90d (prior year)      | number | Same 90-day window, one year earlier                                                         |
| `orders_365d_py` / `units_365d_py`       | … 365d (prior year)     | number | The year before the last 365 days                                                            |
| `orders_next90d_py` / `units_next90d_py` | … next 90d (prior year) | number | The 90 days that **followed today's date** last year — what the coming quarter did last time |

No revenue columns: the view counts orders and units only.

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_order_country_demand",
      "filters": { "trend_label": "RISING" },
      "select_fields": ["country_code", "orders_28d", "orders_28d_py", "momentum_pct", "trend_confidence", "orders_next90d_py"],
      "sort_by": "orders_28d",
      "limit": 20
    }
  }
}
```
