A webhook service is a system that sends real-time data through HTTP requests to a specified URL when certain events occur and allows web applications to communicate with each other automatically. This service integrates different applications seamlessly, allowing automated workflows and immediate data sharing.
To use the webhook service in MindBehind Live, follow the steps below:
Click the Marketplace tab from the navigation menu on the left.

Select Conversation URLs from the Category dropdown list.

After clicking the Select button, a pop-up will open. Select your company, and click the Next button.

Enter the webhook endpoint URLs that you want to receive requests from MindBehind side for the specific events of starting, ending, and voting of the conversation.

Set the URL values as in the image above and click the Set Configurations button, which will save your URLs. If you want to change your existing endpoint addresses, you can open the same pop-up and overwrite the endpoint you want to change.
.png)
Example URLs (webhook.site) are used for testing purposes.
6. After you set related hook endpoints, you will start to receive requests from MindBehind for the fields you set before. For example, if you set an endpoint URL for only ending conversations, you will receive requests to that endpoint when a conversation has been ended.
7. Request object field and types you will receive as JSON object:
{
conversationId: string;
outerConversationID?: string;
channelID?: string;
companyID?: string;
messages: Messages[];
startDate: Date;
endDate: Date;
lastMessageDate: Date;
tags?: string[];
agentTags?: string[];
forwardDate?: Date;
channelClientID?: string;
clientID?: string;
botInfo?: ConversationBot;
agentInfo?: ConversationAgent;
isHandedOver?: boolean;
isInternalHandedOver?: boolean;
historyList?: ConversationHistory[];
channelType?: ChannelType;
rating?: number;
ratingComment?: string;
isEnded: boolean;
isNewClient: boolean;
firstAssignedTime: Date;
firstResponse: Date;
clientFirstResponse: Date;
departmentID: string;
botParams: object;
clientName?: string;
clientSurname?: string;
clientEmail?: string;
clientPhone?: string;
clientTags?: string[];
clientKeyValueProperties?: ClientKeyValueProperties[];
eventType: string;
}
WebhookEventTypes {
"START_CONVERSATION",
"END_CONVERSATION",
"VOTE_CONVERSATION"
}
Messages {
oid?: string;
content: string;
messageType: ConversationMessageType;
messageDate: Date;
sendBy: ConversationMessageSender;
outerMessageID?: string;
botInfo?: ConversationBot;
agentInfo?: ConversationAgent;
debugInfo?: string;
commandType?: ConversationCommandType;
commandPayload?: any;
metadata?: string;
departmentMessageType?: string;
}
ConversationBot {
botID: string;
versionID: string;
moduleID: string;
forwardDate?: Date;
}
ConversationAgent {
agentID: string;
agentName?: string;
agentSurname?: string;
forwardDate?: Date;
departmentID?: string;
}
ConversationHistory {
_id: string;
isAgent: boolean;
versionID?: string;
moduleID?: string;
forwardDate?: Date;
departmentID?: string;
}
ChannelType {
"SUITE",
"FACEBOOK",
"MICROWEBCHAT",
"FRESHCHAT",
"SMOOCH",
"MINDBEHIND",
"DIALOG360",
"MBWEBCHAT",
"DIALOG360_SANDBOX",
"ZOHO",
"ZENDESK",
"HEALTH",
"DIALOGFLOW",
"JIVOCHAT",
"WHATSAPP",
"INSTAGRAM",
"APPLEIMESSAGE",
"INFOBIP",
"BIP"
}
ClientKeyValueProperties {
key: string;
value: string;
}
You can see an example of a webhook request below:
{
"conversationId": "a1b2c3d4",
"channelID": "e5f6g7h8",
"companyID": "abc-123-def-456",
"messages": [
{
"oid": "xyz-123-pqr-456",
"content": "{"BROWSER_TYPE":"Google Chrome","CHAT_URL":"https://dev.mindbehind.com/chatbot-test?channelId=60a66dd9a8d4fc06e95b67ad"}",
"messageType": "CONNECT",
"messageDate": "2022-01-27T14:59:30.126Z",
"sendBy": "CLIENT",
"outerMessageID": "a1-b2-c3-d4",
"botInfo": {
"botID": "bot0123",
"versionID": "version12345"
},
"departmentMessageType": "CONNECT"
},
{
"oid": "xyz-789-pqr-012",
"content": "Hello, this is Jane. How can I help you?",
"messageType": "TEXT",
"messageDate": "2022-01-27T14:59:30.416Z",
"sendBy": "BOT",
"botInfo": {
"botID": "bot456-546-879",
"versionID": "version67890-987-057",
"moduleID": "2"
},
"metadata": "",
"departmentMessageType": "BOT_RESPONSE"
},
{
"oid": "xyz-345-pqr-678",
"content": "Is there anything else I can help you with?",
"messageType": "TEXT",
"messageDate": "2022-01-27T14:59:35.703Z",
"sendBy": "BOT",
"botInfo": {
"botID": "bot789-756",
"versionID": "version23456-478-368",
"moduleID": "4"
},
"metadata": "",
"departmentMessageType": "BOT_RESPONSE"
},
{
"oid": "xyz-901-pqr-234",
"content": "https://............/content.jpg",
"messageType": "IMAGE",
"messageDate": "2022-01-27T14:59:35.836Z",
"sendBy": "BOT",
"botInfo": {
"botID": "bot012-456-934",
"versionID": "version78901-756-034",
"moduleID": "13"
},
"metadata": "",
"departmentMessageType": "BOT_IMAGE"
},
{
"oid": "xyz-567-pqr-890",
"content": "{"buttons":[{"type":"T","text":"A","action":"A"},{"type":"T","text":"B","action":"B"}],"title":"","subtitle":"","text":"Please select.","image":""}",
"messageType": "QUICKREPLY",
"messageDate": "2022-01-27T14:59:38.051Z",
"sendBy": "BOT",
"botInfo": {
"botID": "bot987-389-024",
"versionID": "version98765-289-035",
"moduleID": "6"
},
"departmentMessageType": "QUICKREPLY"
},
{
"oid": "xyz-987-pqr-654",
"content": "A",
"messageType": "TEXT",
"messageDate": "2022-01-27T14:59:39.320Z",
"sendBy": "CLIENT",
"outerMessageID": "xyz-321-pqr-098",
"botInfo": {
"botID": "bot654-289-045",
"versionID": "version43210-178-046"
},
"departmentMessageType": "CLIENT_RESPONSE"
},
{
"oid": "xyz-098-pqr-765",
"content": "Your selection is saved. Thank you.",
"messageType": "TEXT",
"messageDate": "2022-01-27T14:59:41.606Z",
"sendBy": "BOT",
"botInfo": {
"botID": "bot432-321-789",
"versionID": "version76543-468-135",
"moduleID": "8"
},
"metadata": "",
"departmentMessageType": "BOT_CONFIRMATION"
},
{
"oid": "xyz-086-pqr-246",
"content": "COMMAND",
"messageType": "COMMAND",
"messageDate": "2022-01-27T14:59:42.022Z",
"sendBy": "BOT",
"botInfo": {
"botID": "bot246-987-543",
"versionID": "version01234-567-890",
"moduleID": "12"
},
"commandType": "INTERNAL_HANDOVER",
"commandPayload": "{"departmentID":"123456"}",
"metadata": "",
"departmentMessageType": "INTERNAL_HANDOVER"
},
{
"oid": "xyz-975-pqr-321",
"content": "INTERNAL_FORWARD",
"messageType": "COMMAND",
"messageDate": "2022-01-27T14:59:42.100Z",
"sendBy": "AGENT",
"agentInfo": {
"agentID": "ag-123-456",
"agentName": "John",
"agentSurname": "Doe",
"forwardDate": "2022-01-27T14:59:42.100Z",
"departmentID": "234567"
},
"commandType": "INTERNAL_FORWARD",
"commandPayload": "{"agentID":"ag-123-456","departmentID":"234567"}",
"departmentMessageType": "AGENT_FORWARD"
},
{
"oid": "xyz-657-pqr-467",
"content": "Welcome to our new department.",
"messageType": "TEXT",
"messageDate": "2022-01-27T14:59:42.119Z",
"sendBy": "AGENT",
"botInfo": {
"botID": "bot746-908-467",
"versionID": "version45789-034-978"
},
"departmentMessageType": "AGENT_WELCOME"
},
{
"oid": "xyz-658-pqr-046",
"content": "CLOSE",
"messageType": "ENDOFCONVERSATION",
"messageDate": "2022-01-27T15:00:23.839Z",
"sendBy": "CLIENT",
"outerMessageID": "xyz-647-pqr-846",
"agentInfo": {
"agentID": "ag-578-589",
"departmentID": "567890"
},
"departmentMessageType": "CLOSE"
}
],
"startDate": "2022-01-27T14:59:30.143Z",
"endDate": "2022-01-27T15:00:23.888Z",
"lastMessageDate": "2022-01-27T14:59:30.143Z",
"tags": ["kahve"],
"agentTags": ["priority", "transferred"],
"channelClientID": "cc-1234",
"clientID": "1234",
"botInfo": {
"botID": "bot908-789-567",
"versionID": "version367-908-345"
},
"agentInfo": {
"agentID": "ag256-879-056",
"agentName": "Jane",
"agentSurname": "Smith",
"forwardDate": "2022-01-27T14:59:42.129Z",
"departmentID": "890123"
},
"isInternalHandedOver": true,
"historyList": [
{
"_id": "id890-578-047",
"isAgent": false,
"versionID": "version367-046-237",
"forwardDate": "2022-01-27T14:59:30.143Z"
},
{
"_id": "id189-045-876",
"isAgent": true,
"forwardDate": "2022-01-27T14:59:42.129Z",
"departmentID": "901234"
}
],
"botParams": {
"Name": "Mindbehind",
"Phone": "5xxxxxxxxx",
"Mail": "example@mindbehind.com"
},
"channelType": "MBWEBCHAT",
"rating": 10,
"isEnded": true,
"clientFirstResponse": "2022-01-27T14:59:39.342Z",
"departmentID": "890123",
"clientTags": ["loyal", "testUser"],
"clientKeyValueProperties": [
{
"key": "address",
"value": "Istanbul"
},
{
"key": "membershipLevel",
"value": "gold"
}
],
"eventType": "END_CONVERSATION"
}