{
"version": "6.0",
"screens": [
{
"id": "SELECT_SERVICE",
"title": "Book Appointment",
"layout": {
"type": "SingleColumnLayout",
"children": [
{ "type": "TextHeading", "text": "Select a Service" },
{ "type": "TextBody", "text": "Choose the service you'd like to book." },
{
"type": "Dropdown",
"name": "service",
"label": "Service",
"required": true,
"data-source": [
{ "id": "consultation", "title": "Consultation" },
{ "id": "follow_up", "title": "Follow-up Visit" },
{ "id": "assessment", "title": "Assessment" },
{ "id": "general", "title": "General Inquiry" }
]
},
{
"type": "Footer",
"label": "Next",
"on-click-action": {
"name": "navigate",
"next": { "type": "screen", "name": "SELECT_DATE" },
"payload": { "service": "${form.service}" }
}
}
]
},
"data": {}
},
{
"id": "SELECT_DATE",
"title": "Pick Date & Time",
"data": {
"service": { "type": "string", "__example__": "consultation" }
},
"layout": {
"type": "SingleColumnLayout",
"children": [
{ "type": "TextHeading", "text": "When would you like to come in?" },
{ "type": "DatePicker", "name": "date", "label": "Preferred Date", "required": true },
{
"type": "Dropdown",
"name": "time_slot",
"label": "Preferred Time",
"required": true,
"data-source": [
{ "id": "09_00", "title": "09:00 AM" },
{ "id": "10_00", "title": "10:00 AM" },
{ "id": "11_00", "title": "11:00 AM" },
{ "id": "14_00", "title": "02:00 PM" },
{ "id": "15_00", "title": "03:00 PM" },
{ "id": "16_00", "title": "04:00 PM" }
]
},
{
"type": "TextInput",
"name": "notes",
"label": "Additional Notes",
"required": false,
"input-type": "text"
},
{
"type": "Footer",
"label": "Confirm Booking",
"on-click-action": {
"name": "complete",
"payload": {
"service": "${data.service}",
"date": "${form.date}",
"time_slot": "${form.time_slot}",
"notes": "${form.notes}"
}
}
}
]
},
"terminal": true,
"success": true
}
]
}