List customers
list_customersRetrieve brewery customers, leads, and suppliers with order history, predicted next order, cadence, and churn/overdue probabilities to find who needs reordering or is at risk.
Instructions
Trade customers, leads and suppliers (Breww keeps them in one list) with last order date, predicted next order, ordering cadence, average order value and Breww's nightly churn and overdue probabilities. Good for 'who is overdue to reorder?' (next_expected_order_before today) and 'who have we lost?' (min_prob_churned). Contact details only with include_contact_details. Uses GET /customers-suppliers/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Only customers with this tag: the tag's name (assumed; API parameter `tags`, which the spec does not describe) | |
| page | No | API page to start from (use next_page from a previous call, with the same max_results) | |
| ordering | No | Sort order (API parameter `ordering`): a field name, - in front for descending, several separated by commas. The API's default is ascending id. | |
| entity_type | No | Only records with this entity type flag set (API parameter `entity_type__bitand`) | |
| max_results | No | Most records to return in this call; whole API pages only (up to 200 per page), so fewer may come back with a next_page to continue from | |
| name_contains | No | Part of the customer name (API parameter `name__contains`) | |
| sales_person_id | No | Only customers of this sales person (API parameter `sales_person`) | |
| min_prob_churned | No | Churn probability at least this, 0 to 1 (API parameter `prob_churned__gte`) | |
| min_prob_overdue | No | Overdue probability at least this, 0 to 1 (API parameter `prob_overdue__gte`) | |
| last_ordered_since | No | Last order on or after this date/time (API parameter `last_order_date__gte`) | |
| last_ordered_before | No | Last order before this date/time (API parameter `last_order_date__lt`; a date alone means 00:00 UTC) | |
| include_contact_details | No | Include each customer's primary email, phone number and delivery address, the sales person's name, and stop redacting emails and phone numbers typed into names. Off by default. | |
| next_expected_order_before | No | Predicted next order on or before this date (API parameter `next_expected_order__lte`) |