Skip to main content

List Customers Missing Orders

GET 

/api/crm/missing-orders

Paginated list of the customers you can see who are late to reorder against their own usual interval.

Required scope: customers:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token with the customers scope and the customers.index permission.

The CRM activities feature must be switched on for the account; otherwise every CRM endpoint returns 404.

Customers covered: the active (not archived) customers you can see. Without permission to view all customers, that is only the customers whose default sales rep is your own sales rep (plus the reps in the sales rep groups you manage, with team access).

How lateness is worked out: a customer's usual interval is the average number of days between their order dates over the lookback window (24 months by default), and needs at least three order dates; customers with fewer are not listed. With the tolerance T from CRM Settings (missing_order_tolerance, default 1.5), days since the last order D and usual interval I: on_track when D < I, due from I, late from I × T days (rounded up) and very_late from twice that. Days are whole days in the account's timezone and are judged against today, so statuses move daily; intervals are recalculated nightly with the customer segments. average_order_value is the typical order (value at stake).

Filters: filter[status] (comma-separated: on_track, due, late, very_late; default late,very_late), filter[segment], filter[sales_rep_id], filter[search] (name, company, email, or exact id). Advanced filters with operator suffixes (for example filter[average_order_value.greater_than]=500): customer, sales_rep, last_order_at, last_activity_at, average_order_interval_days, average_order_value.

Allowed sorts (prefix with - for descending): customer, sales_rep, last_order_at, days_since_last_order, average_order_interval_days, late_by_days, average_order_value, last_activity_at. Default: -average_order_value.

Pagination: page, per_page (1-200, default 25). An unknown filter or sort returns 400.

last_order.id and number are null when that order has been deleted since the last recalculation; expected_by is the day the customer became (or becomes) late; late_by_days is negative while they are not late yet; last_activity_at is the last logged CRM activity (null = never).

Request​

Responses​

OK

Response Headers
    Content-Type