{
  "format": "retrochat-flow",
  "version": 1,
  "name": "Northwind Bikes: sales and service",
  "exported_at": "2026-10-06T09:00:00.000Z",
  "graph": {
    "start": "welcome",
    "steps": [
      {
        "id": "welcome",
        "type": "message",
        "text": "Hi! 👋 Welcome to Northwind Bikes.",
        "next": "topic"
      },
      {
        "id": "topic",
        "type": "question",
        "text": "What can we help you with today?",
        "input": "choice",
        "variable": "topic",
        "options": [
          { "id": "o_buy", "label": "Buying a bike", "next": "budget" },
          { "id": "o_service", "label": "Booking a service", "next": "service_email" },
          { "id": "o_question", "label": "A quick question", "next": "ask_ai" },
          { "id": "o_person", "label": "Talk to a person", "next": "who_is_online" }
        ],
        "next": null
      },
      {
        "id": "budget",
        "type": "question",
        "text": "Great choice! Roughly what's your budget in US dollars?",
        "input": "number",
        "variable": "budget",
        "options": [],
        "next": "budget_check"
      },
      {
        "id": "budget_check",
        "type": "condition",
        "rules": [
          { "id": "r_premium", "variable": "budget", "op": "gt", "value": "1500", "next": "premium_email" }
        ],
        "else_next": "starter_tip"
      },
      {
        "id": "premium_email",
        "type": "question",
        "text": "Our specialists will help you choose the right model. What's the best email to reach you?",
        "input": "email",
        "variable": "email",
        "options": [],
        "next": "who_is_online"
      },
      {
        "id": "starter_tip",
        "type": "message",
        "text": "Good news: plenty of our city and hybrid bikes fit a budget of ${{budget}}, and every bike comes with a free first service.",
        "next": "anything_else"
      },
      {
        "id": "service_email",
        "type": "question",
        "text": "Happy to book you in. What's your email so we can confirm a time?",
        "input": "email",
        "variable": "email",
        "options": [],
        "next": "service_done"
      },
      {
        "id": "service_done",
        "type": "end",
        "text": "Thanks! We'll email {{email}} with the next free service slots."
      },
      {
        "id": "ask_ai",
        "type": "ai",
        "text": "Ask me anything about our bikes, delivery or servicing.",
        "instructions": "Keep answers short and friendly. Suggest a test ride when it fits.",
        "max_turns": 3,
        "on_unsure": "handoff",
        "next": "anything_else"
      },
      {
        "id": "anything_else",
        "type": "question",
        "text": "Is there anything else I can help with?",
        "input": "choice",
        "variable": "more",
        "options": [
          { "id": "o_yes", "label": "Yes, talk to a person", "next": "who_is_online" },
          { "id": "o_no", "label": "No, that's all", "next": "bye" }
        ],
        "next": null
      },
      {
        "id": "who_is_online",
        "type": "condition",
        "rules": [
          { "id": "r_online", "variable": "agents_online", "op": "equals", "value": "true", "next": "to_team" }
        ],
        "else_next": "offline"
      },
      {
        "id": "to_team",
        "type": "handoff",
        "text": "Connecting you with our team now. It usually takes a minute or two."
      },
      {
        "id": "offline",
        "type": "handoff",
        "text": "Our team is offline right now. Leave your question here and we'll reply by email first thing tomorrow."
      },
      {
        "id": "bye",
        "type": "end",
        "text": "Thanks for stopping by. Ride safe! 🚲"
      }
    ]
  }
}
