-
-
Save sharpred/9004271 to your computer and use it in GitHub Desktop.
{ | |
"title": "External Link Example (Get)", | |
"alert": "Sample Alert", | |
"icon": "little_star", | |
"badge": "+1", | |
"sound": "circus.wav", | |
"vibrate": false, | |
"callToAction": { | |
"action": "B", | |
"uri": "http: //www.example.com", | |
"type": "GET" | |
}, | |
"urgent": "true", | |
"homeScreenMessage": "true" | |
}, | |
{ | |
"title": "External Link Example (Post)", | |
"alert": "Sample Alert", | |
"icon": "little_star", | |
"badge": "+1", | |
"sound": "circus.wav", | |
"vibrate": false, | |
"callToAction": { | |
"action": "B", | |
"uri": "http: //www.example.com", | |
"type" : "POST", | |
"form" : [{}] //an array of key/value pair objects to pre-populate an HTTP post form | |
}, | |
"urgent": "true", | |
"homeScreenMessage": "true" | |
}, | |
{ | |
"title": "In App Example Flights", | |
"alert": "Sample Alert", | |
"icon": "little_star", | |
"badge": "+1", | |
"sound": "circus.wav", | |
"vibrate": false, | |
"callToAction": { | |
"action": "P", | |
"uri": "flights", | |
"link": {"flightNumber":"BA176"} | |
}, | |
"urgent": "true", | |
"homeScreenMessage": "true" | |
}, | |
{ | |
"title": "In App Example Excursions", | |
"alert": "Sample Alert", | |
"icon": "little_star", | |
"badge": "+1", | |
"sound": "circus.wav", | |
"vibrate": false, | |
"callToAction": { | |
"action": "P", | |
"uri": "excursion", | |
"link": {"code":"1008991350"} | |
}, | |
"urgent": "false", | |
"homeScreenMessage": "false" | |
}, | |
{ | |
"title": "In App Example Currency", | |
"alert": "Sample Alert", | |
"icon": "little_star", | |
"badge": "+1", | |
"sound": "circus.wav", | |
"vibrate": false, | |
"callToAction": { | |
"action": "P", | |
"uri": "foreignCurrency", | |
"link": {"type":"travelmoney"} | |
}, | |
"urgent": "false", | |
"homeScreenMessage": "false" | |
} |
renamed entrypoint and endpoint to action and display respectively, to (hopefully) make their usage more human readable/ obvious :-)
This structure will need to change to accomodate deep linked pages, so should not be considered final.
Hi Paul,
Looking at the documentation again, I see that messages will always be shown in the 'Customer Inbox' (CI) and Home Screen Biscuit (HSB) so the only optional place is the Home Screen Message (HSM). If this is the case, we could remove the display array and replace it just with an extra boolean field which indicates if the message should be shown in the HSM (this should make the implementation simpler). If we remove the display array, probably we could rename "inbox" to "cta" or "call_to_action". The resulting json will be like this:
{
"title": "Inbox Example",
"alert": "Sample Alert",
"icon": "little_star",
"badge": "+1",
"sound": "circus.wav",
"vibrate": false,
"call_to_action": {
"action": "B",
"uri": "http: //www.example.com"
},
"urgent": "true",
"home_screen_message":"true"
}
What do you think?
I have updated this to reflect Fede's comments and given sample deep links
"customerInBox", "home", "holidaySummary", "holidayCountdown", "holidayChecklist", "weather", "flights", "hotel", "destination", "excursions", "gettingToAirport", "extras", "travelMoney", "importantInformation", "contactUs"