Nextel Chat Flow API (webhook)
Nextel Chatflow API feature allows you to fetch User chat and information into your software or CRM. Below are the detailed documentation on how you fetch user info without / with chat conversation messages.
FETCH API : Fetch information from chat flow without Conversations
Allowed HTTPs requests : POST
End Point : Your url
HEADER: Content-Type: application/json
BODY : EXAMPLE DATA
{
"phone": "91XXXXXXXXXX",
“Name”: “Siddharth Ray”,
“Company”: “Nextel"
}
FETCH API : Fetch information from chat flow with Conversation.
Allowed HTTPs requests : POST
End Point : Your url
HEADER: Content-Type: application/json
BODY : EXAMPLE DATA
{
"data": {
"conversations": [ {
"type": "IMAGE",
"tag": "IMAGE",
"content": {
"text": "",
"file": "https://wa.s3.ap-southeast-1.amazonaws.com/c0a87002-71cc-1aac-8171-f3c9c59f02ce/f26637cfacf259b8df821f57cd44c81.jpeg",
"filename": ""
},
"datetime": "2020-08-10 18:38:55",
"sender": "USER"
}, {
"content": {
"text": "Please send your vehicle picture"
},
"type": "text",
"tag": "message",
"datetime": "2020-08-10 18:38:38",
"sender": "BOT"
}, {
"content": {
"text": "TEST"
},
"type": "text",
"tag": "text",
"datetime": "2020-08-10 18:38:37",
"sender": "USER"
}, {
"content": {
"text": "Please type your name"
},
"type": "text",
"tag": "message",
"datetime": "2020-08-10 18:38:31",
"sender": "BOT"
}],
"userinfo": {
"phone": "91XXXXXXXXXX"
}
}
}
Send response to User
If you would want to either save fields in Nextel’s CRM or send a reply to the customer, or continue the Chatflow, then send the below JSON in response:
{
"conversations": {
"type": "quick_reply",
"body": "Thanks for visiting us. We would like to know your experience. Please rate us",
"footer": "www.nextel.io",
"header": "Nextel",
"buttons": ["5 Star", "4 Star", "Lower Rating"]
},
"userinfo": {
"phone": "919876543210",
"workplace": "badnawar"
},
"jumptoblock": 1
}
Note:
- In the fetch api you set your url in the chatflow section to get information from chat flow.
- You can select the number of previous conversations which you select in the chatflow section.
- In the chatflow section you can set your params to map with attributes which you want to get during conversation.
- In the data object we will send two objects. One conversation object for previous chat conversations(Both user and bot) and second userinfo object for user’s attributes.