Remote conversation eventing provides the ability to forward events from conversations with end-users to a service of your choice and design. These events can then be used with your own infrastructure to achieve any external integrations desired. To get started, contact your ServisBOT representative.
Remote Conversation Eventing is a Beta feature.
Remote Conversation Eventing may be added to your ServisBOT package at an additional cost.
Remote Conversation Eventing egresses conversational data from the ServisBOT platform to a URL provided by the Customer. The URL must:
It is possible that a record may arrive more than once, duplicates can be identified via the id
field. Events may arrive out of order, however the timestamp
will always represent the correct order.
ServisBOT can add an API Key or a JWT to the header of the request sent to the remote endpoint. Please liaise with your ServisBOT contact to configure this. As an added layer of security, all requests egress from a known set of IP Addresses that can be added to the receivers firewall rules.
Currently three content types egressed from our conversation eventing:
source
fields in the contents
object.An example of all of the above is shown in the Examples section of this document.
Full example event body
{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "message",
"contents": {
"message": "thanks"
},
"correlationId": "GAUQ7wYJp",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "0m1EHNXkDW",
"to": "server",
"timestamp": 1683561232082,
"organization": "acme",
"identity": "eu-west-1:35e22cb7-9683-40c7-aec4-8c5432d6b43f",
"inputSource": {
"type": "utterance"
},
"endpoint": {
"address": "acme-bot"
}
}
}
{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "message",
"contents": {
"message": "thanks"
},
"correlationId": "GAUQ7wYJp",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "0m1EHNXkDW",
"to": "server",
"timestamp": 1683561232082,
"organization": "acme",
"identity": "eu-west-1:35e22cb7-9683-40c7-aec4-8c5432d6b43f",
"inputSource": {
"type": "utterance"
},
"endpoint": {
"address": "acme-bot"
}
}
}
curl --location --request POST 'www.acme.com/integrations/servisbot/events' \
--header 'Authorization: ApiKey myApiKey' \
--header 'X-Correlation-Id: XWcgeIsWR' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "message",
"contents": {
"message": "thanks"
},
"correlationId": "GAUQ7wYJp",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "0m1EHNXkDW",
"to": "server",
"timestamp": 1683561232082,
"organization": "acme",
"identity": "eu-west-1:35e22cb7-9683-40c7-aec4-8c5432d6b43f",
"inputSource": {
"type": "utterance"
},
"endpoint": {
"address": "acme-bot"
}
}
}'
{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "markup",
"contents": {
"markup": "<TimelineMessage>\n <ButtonPromptContainer interactionType=\"event\" preventRetries=\"true\" >\n <ButtonPrompt label=\"Option One\" id=\"0\" />\n <ButtonPrompt label=\"Option Two\" id=\"1\" />\n <ButtonPrompt label=\"Option Three\" id=\"2\" />\n </ButtonPromptContainer>\n </TimelineMessage>",
"markupObject": {
"TimelineMessage": {
"#name": "TimelineMessage",
"children": [
{
"attributes": {
"interactionType": "event",
"preventRetries": "true"
},
"#name": "ButtonPromptContainer",
"children": [
{
"attributes": {
"label": "Option One",
"id": "0"
},
"#name": "ButtonPrompt"
},
{
"attributes": {
"label": "Option Two",
"id": "1"
},
"#name": "ButtonPrompt"
},
{
"attributes": {
"label": "Option Three",
"id": "2"
},
"#name": "ButtonPrompt"
}
]
}
]
}
}
},
"correlationId": "XWcgeIsWR",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "HUnkGJp8io",
"to": "client",
"timestamp": 1683561222398,
"organization": "acme",
"endpoint": {
"address": "acme-bot"
}
}
}
curl --location --request POST 'www.acme.com/integrations/servisbot/events' \
--header 'Authorization: ApiKey myApiKey' \
--header 'X-Correlation-Id: XWcgeIsWR' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "markup",
"contents": {
"markup": "<TimelineMessage>\n <ButtonPromptContainer interactionType=\"event\" preventRetries=\"true\" >\n <ButtonPrompt label=\"Option One\" id=\"0\" />\n <ButtonPrompt label=\"Option Two\" id=\"1\" />\n <ButtonPrompt label=\"Option Three\" id=\"2\" />\n </ButtonPromptContainer>\n </TimelineMessage>",
"markupObject": {
"TimelineMessage": {
"#name": "TimelineMessage",
"children": [
{
"attributes": {
"interactionType": "event",
"preventRetries": "true"
},
"#name": "ButtonPromptContainer",
"children": [
{
"attributes": {
"label": "Option One",
"id": "0"
},
"#name": "ButtonPrompt"
},
{
"attributes": {
"label": "Option Two",
"id": "1"
},
"#name": "ButtonPrompt"
},
{
"attributes": {
"label": "Option Three",
"id": "2"
},
"#name": "ButtonPrompt"
}
]
}
]
}
}
},
"correlationId": "XWcgeIsWR",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "HUnkGJp8io",
"to": "client",
"timestamp": 1683561222398,
"organization": "acme",
"endpoint": {
"address": "acme-bot"
}
}
}'
{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "markupInteraction",
"contents": {
"source": {
"eventType": "TimelineMessage",
"timestamp": 1683561222398,
"id": "HUnkGJp8io",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754"
},
"interaction": {
"action": "buttonInteraction",
"value": {
"id": "2",
"label": "Option Three"
},
"timestamp": 1683561225799
}
},
"correlationId": "zTDaXjPAv",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "HUnkGJp8io",
"to": "server",
"timestamp": 1683561225461,
"organization": "acme",
"endpoint": {
"address": "acme-bot"
},
"inputSource": {
"type": "interaction"
}
}
}
curl --location --request POST 'www.acme.com/integrations/servisbot/events' \
--header 'Authorization: ApiKey myApiKey' \
--header 'X-Correlation-Id: XWcgeIsWR' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": {
"version": "v2",
"type": "TimelineMessage",
"contentType": "markupInteraction",
"contents": {
"source": {
"eventType": "TimelineMessage",
"timestamp": 1683561222398,
"id": "HUnkGJp8io",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754"
},
"interaction": {
"action": "buttonInteraction",
"value": {
"id": "2",
"label": "Option Three"
},
"timestamp": 1683561225799
}
},
"correlationId": "zTDaXjPAv",
"conversationId": "391ab66c-d3c9-415d-87ce-9b9d92a9e754",
"id": "HUnkGJp8io",
"to": "server",
"timestamp": 1683561225461,
"organization": "acme",
"endpoint": {
"address": "acme-bot"
},
"inputSource": {
"type": "interaction"
}
}
}'