--- title: customers.winBack | Doing Work API description: Win-back list: customers with no visit in `months` (default 18; imported visits count), leaving out anyone with an open job or a visit coming up. url: https://doingwork.work/docs/reference/customers-winback/ --- # customers.winBack Win-back list: customers with no visit in `months` (default 18; imported visits count), leaving out anyone with an open job or a visit coming up. Filter by job type words, a tag, or whether they have a maintenance plan. Each row has the last visit day, the last job, lifetime paid and whether they can be emailed or texted. Also counts who can't be contacted and shows the email they would get. Owner or office. Read only; customers.winBackQueue sends. | | | |---|---| | Who | Agents can call this | | REST | `GET /v1/customers/win-back` | | MCP tool | `customers_winBack` | | Writes | no | | Area | [Shop](https://doingwork.work/docs/reference/#shop) | ## When to use it Win-back list: customers with no visit in `months` (default 18; imported visits count), leaving out anyone with an open job or a visit coming up. Filter by job type words, a tag, or whether they have a maintenance plan. ## What to tell the owner Tell them what you found in plain words. Don't read back raw fields. ## Input | Field | Type | Required | |---|---|---| | `shop_id` | string (uuid) | yes | | `months` | integer | no | | `job_type` | string | no | | `tag` | string | no | | `has_plan` | boolean | no | | `title` | string | no | | `limit` | integer | no | | `after` | string (uuid) | no | ## Example ```http GET https://doingwork.work/v1/customers/win-back?shop_id=00000000-0000-4000-8000-000000000000 ``` ## Output | Field | Type | Always there | |---|---|---| | `months` | integer | yes | | `customers` | array | yes | | `customers[].customer_id` | string (uuid) | yes | | `customers[].name` | string | yes | | `customers[].last_visit_on` | string | yes | | `customers[].last_job` | ['string', 'null'] | yes | | `customers[].lifetime_paid_minor` | integer | yes | | `customers[].on_plan` | boolean | yes | | `customers[].can_email` | boolean | yes | | `customers[].can_text` | boolean | yes | | `customers[].why_not` | ['string', 'null'] | yes | | `next_cursor` | ['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')'] | yes | | `can_email` | integer | yes | | `cannot_contact` | integer | yes | | `preview` | object | yes | | `preview.subject` | string | yes | | `preview.body` | string | yes | | `emails_on` | boolean | yes | | `next_actions` | array | yes | | `next_actions[].say` | string | yes | | `next_actions[].op` | ['string', 'null'] | yes | | `next_actions[].when` | string (one of now, later, check, tell_human) | yes | | `next_actions[].due_at` | ['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')'] | no | | `next_actions[].args_hint` | string | no | ```json { "months": 1, "customers": [ { "customer_id": "00000000-0000-4000-8000-000000000000", "name": "Ruiz Plumbing", "last_visit_on": "...", "last_job": "...", "lifetime_paid_minor": 50000, "on_plan": true, "can_email": true, "can_text": true, "why_not": "..." } ], "next_cursor": "00000000-0000-4000-8000-000000000000", "can_email": 1, "cannot_contact": 1, "preview": { "subject": "...", "body": "..." }, "emails_on": true, "next_actions": [ { "say": "...", "op": "...", "when": "now" } ] } ``` ## Errors | Code | Status | What to do | |---|---|---| | `invalid_input`, `invalid_token`, `rate_limited` | | Can happen on any call. See [errors](https://doingwork.work/docs/errors/). |