When creating a custom integration your application has to talk to our RESTful API. We have created a format, or protocol, which we call TwoWay. In essence, it is a JSON schema to which you have to adhere when sending and receiving messages to/from the Conversational Router.
When TwoWay does not fit your needs, please get in touch with the team behind the Conversational Router (via your CM.com contact). In certain cases, it may be preferable to use our older Business Messaging API.
Following gives a succinct description of how to create a custom integration via TwoWay.
The starting point of this documentation is the Scripted Chatbot configuration application. All descriptions are based on the fact you are on that page.
Messages going through the Conversational Router are sent and received by adapters. To create a custom integration you need to create a new TwoWay adapter.
After choosing the adapter type you are shown a configuration screen. To be able to receive messages you must have a publicly accessible webhook.
If your application is used in a context where handovers occur an URL can be appointed to which notifications of these handovers are sent.
TwoWay requires a product token to be present on each incoming request. This has to be added as a
X-Cm-Producttoken header. The Business Messaging API documentation contains instructions on retrieval of this product token.
Sending messages is done by doing HTTP
POST requests to the outbound URL of an adapter. To get the outbound URL of an adapter click on the button corresponding to the adapter for which you want to send messages.
The generic format of such an URL is
Messages sent there must adhere to the TwoWay format.
As already mentioned, in order to receive messages from the Conversational Router you must implement a JSON webhook. Messages sent there adhere to the TwoWay format.
Messages will always come from IP address
Updated 9 months ago