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.

WhoAgents can call this
RESTGET /v1/customers/win-back
MCP toolcustomers_winBack
Writesno
AreaShop

When to use it

Lead rules (requests.setLeadSettings, owner or office) decide what happens to a new request. With auto_reply on, Doing Work sends one first reply within a minute: a text only where the customer already agreed to texts or texted the shop, and the shop's own number is approved for business texting; otherwise an email; otherwise nothing.

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
shop_idstring (uuid)yes
monthsintegerno
job_typestringno
tagstringno
has_planbooleanno
titlestringno
limitintegerno
afterstring (uuid)no

Example

GET https://doingwork.work/v1/customers/win-back?shop_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
monthsintegeryes
customersarrayyes
customers[].customer_idstring (uuid)yes
customers[].namestringyes
customers[].last_visit_onstringyes
customers[].last_job['string', 'null']yes
customers[].lifetime_paid_minorintegeryes
customers[].on_planbooleanyes
customers[].can_emailbooleanyes
customers[].can_textbooleanyes
customers[].why_not['string', 'null']yes
next_cursor['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')']yes
can_emailintegeryes
cannot_contactintegeryes
previewobjectyes
preview.subjectstringyes
preview.bodystringyes
emails_onbooleanyes
next_actionsarrayyes
next_actions[].saystringyes
next_actions[].op['string', 'null']yes
{
  "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": "..."
    }
  ]
}

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.