Push Notifications
Content Outline
Real-Time Push Notification on API
Real-time notifications set with any criteria filter or even for every response(when criteria set is generic match-all such as ‘Any Rating : Less Than 6’) collected can be forwarded to your own API for further processing. For example you can react to a real-time rating event from a customer in store that needs to be further pushed using your central CRM for action from the right call center staff. Set the URL of the controller/script that can receive the complete answer as JSON POST by creating a new notification in the dashboard, with the URL as the target (in-place of email destination), this will trigger a notification to your server.
Example Call Posted to your Server/API/Code
POST http://yourserver.com/api/receivejson
Content-Type: application/json
Example Body
{
"notification": "Answered With Less Than 12",
"answer": {
"LocationId": "Downtown",
"ResponseDateTime": "2014-12-20T14:34:08.426Z",
"Responses":[{
"QuestionId": "547ef11244ed4d230088b981",
"QuestionText": "Rate The Service You Received",
"TextInput": null,
"NumberInput": 3,
},
{
"QuestionId": "547ef11244ed4d230088b982",
"QuestionText": "Would you like us to contact you",
"TextInput": “Yes”,
"NumberInput": 0,
}...],
}
}
Reply after receive expected by API is a HTTP OK(200), if the API does not receive a successful response from your API or receives a error(404) it may stop sending any more notifications to that URL.