Integration Settings

The integration settings page of your chatbot allows you to change or review all values related to statistica integrations.

Events Webhook URL

In the Events Webhook field you can specify a webhook URL that will receive a configurable number of events, triggered by your bot.

Events are not pushed to the URL in real-time but are grouped and sent once about every 30 minutes.

If you are looking into building a real-time system based on chat messages being exchanged by your bot, the Custom Channel would be the perfect fit.

Your custom webhook will receive a payload containing the event associated with the flags above. Events are not grouped: each event will be delivered trough a specific call to your custom webhook.

You can find below some examples you may expect:

Connect/Operator Message

{
    "Type": 0,
    "ItemType": "Text",
    "Data": "Hey you, I'm your chatbot!",
    "Date": "2019-07-10T15:47:58.580873+00:00",
    "BotToken": "...",
    "AccountName": "Matelab Srl",
    "ConversationId": "...",
    "UserName":"conversation user name",
    "Channel": "TelegramChannel"
}

User Message

{
    "Type": 1,
    "Data": "Hello there!",
    "Date": "2019-07-10T15:47:58.5750058+00:00",
    "BotToken": "...",
    "AccountName": "Matelab Srl",
    "ConversationId": "...",
    "UserName":"conversation user name",
    "Channel": "TelegramChannel"
}

Intent Update

{
    "Type":3,
    "BotToken": "...",
    "AccountName": "Matelab Srl",
    "Name":"Intent Name",
    "Key":"Intent Key"
}

NLP Missed Text

{
    "Type":7,
    "BotToken": "...",
    "AccountName": "Matelab Srl",
    "Text":"Missed AI Text"
}

Each array entry can have the following fields:

Message type can have one of the following values:

The expected Webhook reply must be a standard HTTP 200 OK. The reply body can be empty. If your Webhook fails to correctly reply to a request or is unreachable for more than 10 times MyLINK Connect will stop any further call and alert your account with an e-mail. To re-enable the Webhook simply save again the chatbot settings and publish again your bot.

The MyLINK Connect call will contain an authorization header with a Bearer equal to the current bot API Secret. In your own integration you can check for the correctness of the value to make sure that the incoming call is generated by MyLINK Connect.

Each call to your hook will count as an additional outgoing message. MyLINK Connect will consider one single outgoing message regardless of the amount of in and out messages sent to the hook in each single push. So for example if a hook call contains 30 messages that will still count as only one additional outgoing message.

The specified Webhook is ignored if your bot is running under a free plan.

Security

Each call to you custom Webhook will contain an Authorization header set to the source bot API Secret. Please ensure that your endpoint correctly filters any request that doesn't contain the correct value.

Last updated