Introduction
Last updated
Was this helpful?
Was this helpful?
say {
"attachment": {
"type": "template",
"payload": {
"template_type": "airline_checkin",
"intro_message": "Check-in is available now.",
"locale": "en_US",
"pnr_number": "ABCDEF",
"checkin_url": "https:\/\/www.airline.com\/check-in",
"flight_info": [
{
"flight_number": "f001",
"departure_airport": {
"airport_code": "SFO",
"city": "San Francisco",
"terminal": "T4",
"gate": "G8"
},
"arrival_airport": {
"airport_code": "SEA",
"city": "Seattle",
"terminal": "T4",
"gate": "G8"
},
"flight_schedule": {
"boarding_time": "2016-01-05T15:05",
"departure_time": "2016-01-05T15:45",
"arrival_time": "2016-01-05T17:30"
}
}
]
}
}
}do channel_type = _metadata._channel.type
// whatsapp can not display clickable buttons
// so we must provide a number to select instead
if (channel_type == "whatsapp-messagebird") say Button("1 - Pick me!")
else if (channel_type == "webapp") say Button("Pick me!")