{
  "name": "Run CSAT follow-up & detractor escalation",
  "flow": [
    {
      "id": 1,
      "module": "zendesk:watchTickets",
      "metadata": { "designer": { "x": 0, "y": 0 } },
      "parameters": {},
      "description": "Trigger when a ticket is marked solved."
    },
    {
      "id": 2,
      "module": "util:sleep",
      "metadata": { "designer": { "x": 300, "y": 0 } },
      "parameters": {},
      "description": "Wait the configured delay (e.g. 2 hours) before asking, so the resolution settles."
    },
    {
      "id": 3,
      "module": "email:ActionSendEmail",
      "metadata": { "designer": { "x": 600, "y": 0 } },
      "parameters": {},
      "description": "Send the customer a one-click CSAT survey referencing the ticket and the agent."
    },
    {
      "id": 4,
      "module": "builtin:BasicRouter",
      "metadata": { "designer": { "x": 900, "y": 0 } },
      "parameters": {},
      "description": "On response: split detractors (low score) from passives and promoters."
    },
    {
      "id": 5,
      "module": "slack:createMessage",
      "metadata": { "designer": { "x": 1200, "y": 100 } },
      "parameters": {},
      "description": "Detractor path · post to #support-escalations with the score, comment, and ticket link for a same-day follow-up."
    },
    {
      "id": 6,
      "module": "google-sheets:addRows",
      "metadata": { "designer": { "x": 1200, "y": -100 } },
      "parameters": {},
      "description": "All paths · log score, agent, category, and comment to the CSAT sheet for the weekly report."
    }
  ],
  "metadata": {
    "generatedBy": "Spion",
    "instance": {
      "name": "Run CSAT follow-up & detractor escalation",
      "note": "Trigger · Zendesk, ticket solved."
    }
  }
}
