<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Build custom integrations using an API in Chatbot</title>
    <link>https://community.sinch.com/t5/Chatbot/Build-custom-integrations-using-an-API/ta-p/13282</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;&lt;P&gt;Chances are that you'll need to integrate bot with your back end or third-party services. Sinch Engage allows you to do that using APIs.&lt;!--        notionvc: 11e3c0d4-1559-4e67-a752-c759efd6b6d5        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;How custom integrations work&lt;!--        notionvc: 8d2dff72-971e-4138-8963-27e7eb7244ff        --&gt;&lt;/H2&gt;&lt;P&gt;Engage Bot Builder offers a solution to integrate your conversational agent with your backend business logic, APIs, and databases. This integration allows you to create contextual, personalized, and actionable conversational experiences for your users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;The API is available in the &lt;STRONG&gt;Action&lt;/STRONG&gt; step&amp;nbsp;to enable you to create chatbot messages based on user-specific information and other external data. Additionally, it allows you to redirect your users to different conversational flows based on your own business logic. You can use this solution on any platform that supports receiving and responding to HTTP requests.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 14.54.45.png" style="width: 574px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3944i5A8516BC9A195EA2/image-dimensions/574x478?v=v2" width="574" height="478" role="button" title="Screenshot 2023-10-19 at 14.54.45.png" alt="Screenshot 2023-10-19 at 14.54.45.png" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;A user types and sends a text message from a conversational agent interface channel like WhatsApp,&amp;nbsp;Webchat, Facebook Messenger, … to Engage bot builder.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The received message is going through Engage’s NLP engine to detect the intent and the returned intent combined with user context will be used to retrieve the next bot dialog in the conversation.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Engage’s API plugin can be added in a bot dialog to send an API request to your server with different types of static data and/or user session data.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Your server can respond with an object with three fields:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;session&lt;/STRONG&gt;: A session object for saving retrieved user session data&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;messages&lt;/STRONG&gt;: An array of messages to send back to the interface channel&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;nextDialogstate&lt;/STRONG&gt;: A bot dialog state identifier to redirect the user to a next bot dialog state in a conversation flow.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Session data&lt;/STRONG&gt; will first be stored in the user session so that you can use this data in messages defined in the array of messages or in messages defined in a dialog state defined as nextDialogstate in the API response. Second, messages will be sent, and afterwards the user is redirected to the nextDialogstate. All fields are optional.&lt;!--        notionvc: bc8d2916-750b-4b6e-a441-bd97d3f3b63a        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;API plugin&lt;!--        notionvc: bde345db-1078-4354-84e6-c1edeafd51ef        --&gt;&lt;/H2&gt;&lt;P&gt;Engage bot builder provides an API plugin in the list of action plugins which you can configure in dialog state in one of your conversational flows.&lt;!--        notionvc: 785c29de-fdc8-4a10-8f01-b17e235acf30        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="API (1).gif" style="width: 718px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3945i87D57D63EF4B46C9/image-dimensions/718x404?v=v2" width="718" height="404" role="button" title="API (1).gif" alt="API (1).gif" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;Sending the API request&lt;/SPAN&gt;&lt;!--        notionvc: 2ca11ffb-5dc9-43ec-879f-e14336319297        --&gt;&lt;/H2&gt;&lt;P&gt;The API plugin sends a request to your back end server. It supports different configuration settings:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;HTTPS method&lt;/LI&gt;&lt;LI&gt;API endpoint url&lt;/LI&gt;&lt;LI&gt;Query parameters&lt;/LI&gt;&lt;LI&gt;Body payload (JSON)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H4&gt;&lt;SPAN class=""&gt;HTTPS method and API endpoint url&lt;/SPAN&gt;&lt;!--        notionvc: e1a75096-616d-46b4-8135-2dd72678818c        --&gt;&lt;/H4&gt;&lt;P&gt;The plugin supports three HTTPS methods&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;GET&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;DELETE&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PUT&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PATCH&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--        notionvc: f3984b91-96dc-4436-81d8-01b03f836527        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.20.31.png" style="width: 271px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3946i6052FF12A0ED73E2/image-dimensions/271x546?v=v2" width="271" height="546" role="button" title="Screenshot 2023-10-19 at 20.20.31.png" alt="Screenshot 2023-10-19 at 20.20.31.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--        notionvc: 8de19ecc-fbb6-45c5-9537-9238dde0cd3a        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN class=""&gt;Query and body payload parameters&lt;/SPAN&gt;&lt;!--        notionvc: 49e16cbf-b5ec-4aa6-9807-f1e4e8041c3f        --&gt;&lt;/H3&gt;&lt;P&gt;Add query parameters and/or a body payload by defining key value combinations. Each key can have three possible value types:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;text&lt;/STRONG&gt;: static text&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;variable&lt;/STRONG&gt;: a user session variable. The value of the variable will be stored as value for the key. Dot and array notation are supported, for example: users[0].firstname&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;dialogstate&lt;/STRONG&gt;: select a dialog state from the dropdown. The dialog state id will be stored as value for the key. This id can be used to redirect the user to a certain dialog state based on your business logic when sending back the API response.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;!--        notionvc: 8d5f67df-7770-4db5-9369-47df64356dd7        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;You can only define a request body when your request method is &lt;STRONG&gt;POST&lt;/STRONG&gt; or &lt;STRONG&gt;DELETE.&amp;nbsp;&lt;/STRONG&gt;&lt;!--        notionvc: d9958bb9-0638-4e41-933b-de6fffdaf6d5        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example, representing a money transfer, we send five keys in the body payload of an HTTPS POST request to our API endpoint.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.12.58.png" style="width: 355px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3947i74399673C2F2FD6E/image-dimensions/355x719?v=v2" width="355" height="719" role="button" title="Screenshot 2023-10-19 at 20.12.58.png" alt="Screenshot 2023-10-19 at 20.12.58.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;STRONG&gt;&lt;!--        notionvc: af8ce423-9eda-4125-9401-96d3df8571ba        --&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-10-19 at 20.15.12.png" style="width: 728px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3948i3B17977B2562C3C1/image-dimensions/728x464?v=v2" width="728" height="464" role="button" title="Screenshot 2023-10-19 at 20.15.12.png" alt="Screenshot 2023-10-19 at 20.15.12.png" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The &lt;STRONG&gt;amount&lt;/STRONG&gt; key will have the value of user session variable transfer_amount (ex: 500).&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;destination&lt;/STRONG&gt; key will have the value of user session variable transfer_destination (ex: Elon Musk).&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;accountType&lt;/STRONG&gt; key will have the value of user session variable card_type (ex: savings_account).&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;transactionSuccess&lt;/STRONG&gt; key will have the dialog state identifier for the ‘successful transaction’ dialog state. This identifier can be used in the response of this API request to redirect the user to a new dialog state.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;transactionNoMoney&lt;/STRONG&gt; key will have the dialog state identifier for the ‘unsuccessful transaction’ dialog state. This identifier can be used in the response of this API request to redirect the user to a new dialog state.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;test&lt;/STRONG&gt; key will have a value of ‘5’.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;!--        notionvc: cc804a98-d029-4662-90c4-1d3fd57ad666        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will result in the following body payload.&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
"amount": 500,
"destination": "Elon Musk",
"accountType": "savings_account",
"transactionSuccess": "successful transaction",
"transactionNoMoney": "unsuccessful transaction",
"test": 5
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;API headers&lt;!--        notionvc: e0255d95-89f6-4459-b71a-9d440981c926        --&gt;&lt;/H3&gt;&lt;P&gt;Next to Query and Body parameters, Engage bot builder also supports API Headers in its POST, GET and DELETE requests. Headers can be added using the same combination of Key, Type and Value as the other parameters.&lt;!--        notionvc: c775e843-ef9b-4358-9f04-791d132b0bb8        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.26.04.png" style="width: 322px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3949i2650AFD63BFE6504/image-dimensions/322x656?v=v2" width="322" height="656" role="button" title="Screenshot 2023-10-19 at 20.26.04.png" alt="Screenshot 2023-10-19 at 20.26.04.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;!--        notionvc: e9d5d724-fc62-4e2a-a5b9-26b7a858a404        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;Multi-language&lt;/SPAN&gt;&lt;!--        notionvc: 3cd00276-31e8-4474-81a6-3b4193d411a8        --&gt;&lt;/H2&gt;&lt;P&gt;&lt;SPAN class=""&gt;If the API response will send agent messages back to the user and the agent supports multiple languages, don’t forget to send the user language in the request. The user language is available in the user session variable ‘locale'. Your back end service can use this language setting to send back the response in the user his preferred language.&lt;!--        notionvc: 7ca1e3c4-abd0-40d9-a394-884745cbfd8f        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;Sending the API response&lt;/SPAN&gt;&lt;!--        notionvc: 155ab693-63f6-42d0-bcb8-87e9556ae779        --&gt;&lt;/H2&gt;&lt;P&gt;You do not need to configure the API plugin to listen for a response. This is done automatically and the API plugin will listen for what your API returns. The API plugin supports 3 types of return variables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;session&lt;/STRONG&gt;: A session object for saving data in to the user session. The session has two mandatory fields:&lt;STRONG&gt;namespace&lt;/STRONG&gt;: a key namespace. The data object will be stored in this namespace key in the user session. You can access this object in &lt;A href="http://Chatlayer.ai" target="_blank" rel="noopener"&gt;Chatlayer.ai&lt;/A&gt; by using interpolation: *{namespace.dataKey}*&lt;STRONG&gt;data&lt;/STRONG&gt;: an object which will be saved in the user session data in the namespace key.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;messages&lt;/STRONG&gt;: An array of messages to send back to the user interface channel. The structure of different message types such as text, buttons, quick replies, carousels, lists, media, … is available in the chat message structure.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;action&lt;/STRONG&gt;: an object defining an action such as redirecting the user to a next dialog state in the conversation.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;nextDialogstate&lt;/STRONG&gt;: A dialog state identifier to redirect the user to a next dialog state in the conversation flow&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The above 3 options are executed in the order shown above: session variables are set first, then messages are sent and then you will jump to the next dialog state. You can find an example JSON for these 3 cases in the code snippet below:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--        notionvc: 5ed4ac5e-7bc2-4c3e-bc8b-0b015bc2e0b7        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const result = {
session: {
namespace: 'myNamespace',
data: { variable: 'test123' },
},
messages: [{ type: 'text', config: { textMessages: [{ text: 'random message 1' }] } }],
action: {
nextDialogstate: 'dialogstate-123-abc',
},
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;Make sure you include the correct content t ype in the header: &lt;STRONG&gt;&lt;SPAN class=""&gt;content-type: application/json;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;!--        notionvc: 38371e14-0e2d-43b1-936a-d354c0f2598d        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Example&lt;!--        notionvc: 5f284b6d-ffda-4c62-8a43-d85b93c3d8db        --&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;This example demonstrates one API endpoint for transferring an amount of money from an account type (regular or savings) to someone. We will redirected the user to a certain dialog state based on the transaction result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.post('/transaction', function (req, res) {
let nextDialogstate;
const { amount, destination, accountType, transactionSuccess, transactionNoMoney = req.body;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// get account type (regular - savings account)
const account = account_synonyms[accountType];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if( accounts[account].amount + accounts[accounthlimit — amount &amp;lt; ) {
nextDialogstate = transactionNoMoney
} else {
// transfer amount
accounts[account].amount —= amount;
nextDialogstate = transactionSuccess;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;res.json({
action: {
nextDialogstate,
},
session: {
namespace: 'account',
data: {
limit: accounts[account].limit,
amount: accounts[account].amount
}
},
})
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We receive the body payload object as defined in the API plugin. If the user doesn’t have a sufficient amount of money on his account we set the next dialog state to ‘transactionNoMoney’. Else we subtract the desired amount and set the next dialog state to ‘transactionSuccess'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a response for the request we send the next dialogs state to redirect the user to that state and we save the amount of money and the limit of his account in his session data under the namespace account. This data can be used in that next dialog state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.17.54.png" style="width: 231px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3950iE8B349DCA15BE305/image-dimensions/231x468?v=v2" width="231" height="468" role="button" title="Screenshot 2023-10-19 at 20.17.54.png" alt="Screenshot 2023-10-19 at 20.17.54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 506965aa-c303-4b6c-bd0a-ccf3f32f6ba9        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an alternative solution you could also send that chat message as a response of the API plugin requests by using the messages key.&lt;!--        notionvc: 3887f01a-b2d9-445b-808b-29719c244f91        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;&amp;nbsp;For more API documentation, please check our API documentation &lt;A href="https://api.chatlayer.ai/v1/docs#section/Overview" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sinch.com/t5/Chatbot/New-bot-builder-Make-a-channel-router-flow/ta-p/13092" target="_blank" rel="noopener"&gt;[New bot builder] Make a channel router flow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sinch.com/t5/Chatbot/New-bot-builder-Variables-and-properties/ta-p/12280" target="_blank" rel="noopener"&gt;[New bot builder] Variables and properties&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sinch.com/t5/Chatbot/Channel-limitations/ta-p/13528" target="_blank" rel="noopener"&gt;[New bot builder] Channel limitations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 0328705a-14ba-4542-a606-438f338b6f94        --&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 92a06761-2cdd-4bf7-9124-6915fbde53ba        --&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 01a8d272-cb8a-4105-b085-bf20dfcaeb1e        --&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2024 12:23:11 GMT</pubDate>
    <dc:creator>Agatha_Morisca</dc:creator>
    <dc:date>2024-01-02T12:23:11Z</dc:date>
    <item>
      <title>Build custom integrations using an API</title>
      <link>https://community.sinch.com/t5/Chatbot/Build-custom-integrations-using-an-API/ta-p/13282</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;&lt;P&gt;Chances are that you'll need to integrate bot with your back end or third-party services. Sinch Engage allows you to do that using APIs.&lt;!--        notionvc: 11e3c0d4-1559-4e67-a752-c759efd6b6d5        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;How custom integrations work&lt;!--        notionvc: 8d2dff72-971e-4138-8963-27e7eb7244ff        --&gt;&lt;/H2&gt;&lt;P&gt;Engage Bot Builder offers a solution to integrate your conversational agent with your backend business logic, APIs, and databases. This integration allows you to create contextual, personalized, and actionable conversational experiences for your users.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;The API is available in the &lt;STRONG&gt;Action&lt;/STRONG&gt; step&amp;nbsp;to enable you to create chatbot messages based on user-specific information and other external data. Additionally, it allows you to redirect your users to different conversational flows based on your own business logic. You can use this solution on any platform that supports receiving and responding to HTTP requests.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 14.54.45.png" style="width: 574px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3944i5A8516BC9A195EA2/image-dimensions/574x478?v=v2" width="574" height="478" role="button" title="Screenshot 2023-10-19 at 14.54.45.png" alt="Screenshot 2023-10-19 at 14.54.45.png" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;A user types and sends a text message from a conversational agent interface channel like WhatsApp,&amp;nbsp;Webchat, Facebook Messenger, … to Engage bot builder.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;The received message is going through Engage’s NLP engine to detect the intent and the returned intent combined with user context will be used to retrieve the next bot dialog in the conversation.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Engage’s API plugin can be added in a bot dialog to send an API request to your server with different types of static data and/or user session data.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Your server can respond with an object with three fields:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;session&lt;/STRONG&gt;: A session object for saving retrieved user session data&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;messages&lt;/STRONG&gt;: An array of messages to send back to the interface channel&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;nextDialogstate&lt;/STRONG&gt;: A bot dialog state identifier to redirect the user to a next bot dialog state in a conversation flow.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Session data&lt;/STRONG&gt; will first be stored in the user session so that you can use this data in messages defined in the array of messages or in messages defined in a dialog state defined as nextDialogstate in the API response. Second, messages will be sent, and afterwards the user is redirected to the nextDialogstate. All fields are optional.&lt;!--        notionvc: bc8d2916-750b-4b6e-a441-bd97d3f3b63a        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;API plugin&lt;!--        notionvc: bde345db-1078-4354-84e6-c1edeafd51ef        --&gt;&lt;/H2&gt;&lt;P&gt;Engage bot builder provides an API plugin in the list of action plugins which you can configure in dialog state in one of your conversational flows.&lt;!--        notionvc: 785c29de-fdc8-4a10-8f01-b17e235acf30        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="API (1).gif" style="width: 718px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3945i87D57D63EF4B46C9/image-dimensions/718x404?v=v2" width="718" height="404" role="button" title="API (1).gif" alt="API (1).gif" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;Sending the API request&lt;/SPAN&gt;&lt;!--        notionvc: 2ca11ffb-5dc9-43ec-879f-e14336319297        --&gt;&lt;/H2&gt;&lt;P&gt;The API plugin sends a request to your back end server. It supports different configuration settings:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;HTTPS method&lt;/LI&gt;&lt;LI&gt;API endpoint url&lt;/LI&gt;&lt;LI&gt;Query parameters&lt;/LI&gt;&lt;LI&gt;Body payload (JSON)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H4&gt;&lt;SPAN class=""&gt;HTTPS method and API endpoint url&lt;/SPAN&gt;&lt;!--        notionvc: e1a75096-616d-46b4-8135-2dd72678818c        --&gt;&lt;/H4&gt;&lt;P&gt;The plugin supports three HTTPS methods&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;GET&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;POST&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;DELETE&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PUT&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;PATCH&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--        notionvc: f3984b91-96dc-4436-81d8-01b03f836527        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.20.31.png" style="width: 271px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3946i6052FF12A0ED73E2/image-dimensions/271x546?v=v2" width="271" height="546" role="button" title="Screenshot 2023-10-19 at 20.20.31.png" alt="Screenshot 2023-10-19 at 20.20.31.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--        notionvc: 8de19ecc-fbb6-45c5-9537-9238dde0cd3a        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;&lt;SPAN class=""&gt;Query and body payload parameters&lt;/SPAN&gt;&lt;!--        notionvc: 49e16cbf-b5ec-4aa6-9807-f1e4e8041c3f        --&gt;&lt;/H3&gt;&lt;P&gt;Add query parameters and/or a body payload by defining key value combinations. Each key can have three possible value types:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;text&lt;/STRONG&gt;: static text&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;variable&lt;/STRONG&gt;: a user session variable. The value of the variable will be stored as value for the key. Dot and array notation are supported, for example: users[0].firstname&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;dialogstate&lt;/STRONG&gt;: select a dialog state from the dropdown. The dialog state id will be stored as value for the key. This id can be used to redirect the user to a certain dialog state based on your business logic when sending back the API response.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;!--        notionvc: 8d5f67df-7770-4db5-9369-47df64356dd7        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;You can only define a request body when your request method is &lt;STRONG&gt;POST&lt;/STRONG&gt; or &lt;STRONG&gt;DELETE.&amp;nbsp;&lt;/STRONG&gt;&lt;!--        notionvc: d9958bb9-0638-4e41-933b-de6fffdaf6d5        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example, representing a money transfer, we send five keys in the body payload of an HTTPS POST request to our API endpoint.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.12.58.png" style="width: 355px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3947i74399673C2F2FD6E/image-dimensions/355x719?v=v2" width="355" height="719" role="button" title="Screenshot 2023-10-19 at 20.12.58.png" alt="Screenshot 2023-10-19 at 20.12.58.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;STRONG&gt;&lt;!--        notionvc: af8ce423-9eda-4125-9401-96d3df8571ba        --&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-10-19 at 20.15.12.png" style="width: 728px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3948i3B17977B2562C3C1/image-dimensions/728x464?v=v2" width="728" height="464" role="button" title="Screenshot 2023-10-19 at 20.15.12.png" alt="Screenshot 2023-10-19 at 20.15.12.png" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The &lt;STRONG&gt;amount&lt;/STRONG&gt; key will have the value of user session variable transfer_amount (ex: 500).&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;destination&lt;/STRONG&gt; key will have the value of user session variable transfer_destination (ex: Elon Musk).&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;accountType&lt;/STRONG&gt; key will have the value of user session variable card_type (ex: savings_account).&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;transactionSuccess&lt;/STRONG&gt; key will have the dialog state identifier for the ‘successful transaction’ dialog state. This identifier can be used in the response of this API request to redirect the user to a new dialog state.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;transactionNoMoney&lt;/STRONG&gt; key will have the dialog state identifier for the ‘unsuccessful transaction’ dialog state. This identifier can be used in the response of this API request to redirect the user to a new dialog state.&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;test&lt;/STRONG&gt; key will have a value of ‘5’.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;!--        notionvc: cc804a98-d029-4662-90c4-1d3fd57ad666        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will result in the following body payload.&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
"amount": 500,
"destination": "Elon Musk",
"accountType": "savings_account",
"transactionSuccess": "successful transaction",
"transactionNoMoney": "unsuccessful transaction",
"test": 5
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;API headers&lt;!--        notionvc: e0255d95-89f6-4459-b71a-9d440981c926        --&gt;&lt;/H3&gt;&lt;P&gt;Next to Query and Body parameters, Engage bot builder also supports API Headers in its POST, GET and DELETE requests. Headers can be added using the same combination of Key, Type and Value as the other parameters.&lt;!--        notionvc: c775e843-ef9b-4358-9f04-791d132b0bb8        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.26.04.png" style="width: 322px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3949i2650AFD63BFE6504/image-dimensions/322x656?v=v2" width="322" height="656" role="button" title="Screenshot 2023-10-19 at 20.26.04.png" alt="Screenshot 2023-10-19 at 20.26.04.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;!--        notionvc: e9d5d724-fc62-4e2a-a5b9-26b7a858a404        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;Multi-language&lt;/SPAN&gt;&lt;!--        notionvc: 3cd00276-31e8-4474-81a6-3b4193d411a8        --&gt;&lt;/H2&gt;&lt;P&gt;&lt;SPAN class=""&gt;If the API response will send agent messages back to the user and the agent supports multiple languages, don’t forget to send the user language in the request. The user language is available in the user session variable ‘locale'. Your back end service can use this language setting to send back the response in the user his preferred language.&lt;!--        notionvc: 7ca1e3c4-abd0-40d9-a394-884745cbfd8f        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H2&gt;&lt;SPAN class=""&gt;Sending the API response&lt;/SPAN&gt;&lt;!--        notionvc: 155ab693-63f6-42d0-bcb8-87e9556ae779        --&gt;&lt;/H2&gt;&lt;P&gt;You do not need to configure the API plugin to listen for a response. This is done automatically and the API plugin will listen for what your API returns. The API plugin supports 3 types of return variables:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;session&lt;/STRONG&gt;: A session object for saving data in to the user session. The session has two mandatory fields:&lt;STRONG&gt;namespace&lt;/STRONG&gt;: a key namespace. The data object will be stored in this namespace key in the user session. You can access this object in &lt;A href="http://Chatlayer.ai" target="_blank" rel="noopener"&gt;Chatlayer.ai&lt;/A&gt; by using interpolation: *{namespace.dataKey}*&lt;STRONG&gt;data&lt;/STRONG&gt;: an object which will be saved in the user session data in the namespace key.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;messages&lt;/STRONG&gt;: An array of messages to send back to the user interface channel. The structure of different message types such as text, buttons, quick replies, carousels, lists, media, … is available in the chat message structure.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;action&lt;/STRONG&gt;: an object defining an action such as redirecting the user to a next dialog state in the conversation.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;nextDialogstate&lt;/STRONG&gt;: A dialog state identifier to redirect the user to a next dialog state in the conversation flow&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The above 3 options are executed in the order shown above: session variables are set first, then messages are sent and then you will jump to the next dialog state. You can find an example JSON for these 3 cases in the code snippet below:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--        notionvc: 5ed4ac5e-7bc2-4c3e-bc8b-0b015bc2e0b7        --&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const result = {
session: {
namespace: 'myNamespace',
data: { variable: 'test123' },
},
messages: [{ type: 'text', config: { textMessages: [{ text: 'random message 1' }] } }],
action: {
nextDialogstate: 'dialogstate-123-abc',
},
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;Make sure you include the correct content t ype in the header: &lt;STRONG&gt;&lt;SPAN class=""&gt;content-type: application/json;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;!--        notionvc: 38371e14-0e2d-43b1-936a-d354c0f2598d        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Example&lt;!--        notionvc: 5f284b6d-ffda-4c62-8a43-d85b93c3d8db        --&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;This example demonstrates one API endpoint for transferring an amount of money from an account type (regular or savings) to someone. We will redirected the user to a certain dialog state based on the transaction result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;app.post('/transaction', function (req, res) {
let nextDialogstate;
const { amount, destination, accountType, transactionSuccess, transactionNoMoney = req.body;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// get account type (regular - savings account)
const account = account_synonyms[accountType];&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if( accounts[account].amount + accounts[accounthlimit — amount &amp;lt; ) {
nextDialogstate = transactionNoMoney
} else {
// transfer amount
accounts[account].amount —= amount;
nextDialogstate = transactionSuccess;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;res.json({
action: {
nextDialogstate,
},
session: {
namespace: 'account',
data: {
limit: accounts[account].limit,
amount: accounts[account].amount
}
},
})
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We receive the body payload object as defined in the API plugin. If the user doesn’t have a sufficient amount of money on his account we set the next dialog state to ‘transactionNoMoney’. Else we subtract the desired amount and set the next dialog state to ‘transactionSuccess'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a response for the request we send the next dialogs state to redirect the user to that state and we save the amount of money and the limit of his account in his session data under the namespace account. This data can be used in that next dialog state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2023-10-19 at 20.17.54.png" style="width: 231px;"&gt;&lt;img src="https://community.sinch.com/t5/image/serverpage/image-id/3950iE8B349DCA15BE305/image-dimensions/231x468?v=v2" width="231" height="468" role="button" title="Screenshot 2023-10-19 at 20.17.54.png" alt="Screenshot 2023-10-19 at 20.17.54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 506965aa-c303-4b6c-bd0a-ccf3f32f6ba9        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an alternative solution you could also send that chat message as a response of the API plugin requests by using the messages key.&lt;!--        notionvc: 3887f01a-b2d9-445b-808b-29719c244f91        --&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt;&amp;nbsp;For more API documentation, please check our API documentation &lt;A href="https://api.chatlayer.ai/v1/docs#section/Overview" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sinch.com/t5/Chatbot/New-bot-builder-Make-a-channel-router-flow/ta-p/13092" target="_blank" rel="noopener"&gt;[New bot builder] Make a channel router flow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sinch.com/t5/Chatbot/New-bot-builder-Variables-and-properties/ta-p/12280" target="_blank" rel="noopener"&gt;[New bot builder] Variables and properties&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sinch.com/t5/Chatbot/Channel-limitations/ta-p/13528" target="_blank" rel="noopener"&gt;[New bot builder] Channel limitations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 0328705a-14ba-4542-a606-438f338b6f94        --&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 92a06761-2cdd-4bf7-9124-6915fbde53ba        --&gt;&lt;/P&gt;&lt;P&gt;&lt;!--        notionvc: 01a8d272-cb8a-4105-b085-bf20dfcaeb1e        --&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 12:23:11 GMT</pubDate>
      <guid>https://community.sinch.com/t5/Chatbot/Build-custom-integrations-using-an-API/ta-p/13282</guid>
      <dc:creator>Agatha_Morisca</dc:creator>
      <dc:date>2024-01-02T12:23:11Z</dc:date>
    </item>
  </channel>
</rss>

