# Stats

> COD Order Calls stats - confirmation rate, confirmed, cancelled, unreachable, no input, pending and skipped orders over the last 7 days, how the rate is calculated, and the stats API.

Source: https://edesy.in/docs/order-calls/orders/stats

The Orders screen shows five cards for the last 7 days: confirmation rate, confirmed, cancelled, unreachable (with no input) and pending (with skipped). The confirmation rate is confirmed orders divided by orders that reached a customer decision or gave up: confirmed, cancelled, no input and unreachable.

## The cards

| Card | What it counts |
|---|---|
| Confirmation rate | Confirmed ÷ (confirmed + cancelled + no input + unreachable). Also shows how many orders were called or queued (every order except skipped ones) |
| Confirmed | Orders settled as `confirmed` or `confirmed_elsewhere` |
| Cancelled | Orders settled as `cancelled` or `cancelled_elsewhere` |
| Unreachable | Orders settled as `unreachable` or `expired`, with the `no_input` count underneath |
| Pending | Orders still scheduled or dialing, with the skipped count underneath |

Counts cover orders received in the period.

Orders that are still pending or were skipped do not count towards the confirmation rate.

## Reading the numbers

- A high **unreachable** count usually means calls go out at the wrong time. Try a different [calling window](https://edesy.in/docs/order-calls/call-rules/timing-and-retries) or more attempts.
- A high **no input** count can mean the question is unclear. Shorten the [script](https://edesy.in/docs/order-calls/scripts/hindi-and-english-scripts) and say the keys clearly.
- A high **skipped** count usually means orders are missing a phone number or don't match your [conditions](https://edesy.in/docs/order-calls/call-rules/conditions).
- Cancelled orders are the ones you avoided shipping. Compare them with your return-to-origin (RTO) rate before and after.

## Stats API

```
GET https://voice-api.edesy.in/v1/ivr/commerce/stats?days=7
Authorization: Bearer <api key>
```

`days` is 1 to 90 (default 7).

```json
{
  "data": {
    "jobs": 120,
    "confirmed": 74,
    "cancelled": 9,
    "no_input": 6,
    "unreachable": 18,
    "pending": 8,
    "skipped": 5,
    "confirmation_rate": 0.6916
  }
}
```

The numbers above are an example. `confirmation_rate` is a fraction from 0 to 1.
