{"id":639,"date":"2022-09-06T15:09:06","date_gmt":"2022-09-06T13:09:06","guid":{"rendered":"https:\/\/support.botnation.ai\/botnation-api-import-and-export-data-via-webhook\/"},"modified":"2026-01-02T16:34:44","modified_gmt":"2026-01-02T15:34:44","slug":"botnation-api-import-and-export-data-via-webhook","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/botnation-api-import-and-export-data-via-webhook\/","title":{"rendered":"Botnation API : Import and Export data through Webhook"},"content":{"rendered":"<p>JSON API mode: Automatically import and export chatbot data via webhook<\/p>\n\n\n\n<p>The Webhook element allows you to import or export data to any external system: your own Webhook, Zapier, IFTTT or any other system that responds to HTTP protocol.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-194.png.webp\" alt=\"\" class=\"wp-image-6366\"><\/figure>\n<\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\">1. Recommendations<\/h2>\n\n\n\n<p>Avoid overloading your chatbot with Webhook calls, this can strongly slow down the performance of your chatbot as Botnation will be waiting for a service outside its infrastructure. Your webhooks are then placed in a queue dedicated to your chatbot.<br>We therefore recommend that you only connect external services with instantaneous response times via Webhook.<\/p>\n\n\n\n<p><br>To do this, enter the url of the service you want to call. The url must be in <strong>HTTPS<\/strong> (secure http).  <\/p>\n\n\n\n<p>You can add parameters either by adding them directly in the URL or by using the <em>+ Add parameter<\/em> option.<\/p>\n\n\n\n<p>The url will be called by Botnation AI in <strong>POST<\/strong> or <strong>GET<\/strong>. The header can be customized.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>TIPS<\/strong><br>If you want to be sure that the variable contains information before it is sent you can, for testing, temporarily display a message just before the Webhook that displays the variable.<br><br>Your Webhook must always be located after the data collection, not before, otherwise it has nothing to send!<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">2. Test the url of your Webhook<\/h2>\n\n\n\n<p>The button \u201cTest the Webhook\u201d allows you to make a call to the url you have entered to check that it works properly.<\/p>\n\n\n\n<p>If your url contains Botnation variables then you will have to simulate them by filling in values in the associated fields:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-196-1024x546.png.webp\" alt=\"\" class=\"wp-image-6371\"><\/figure>\n\n\n\n<p>If the url is correct, a message will confirm it, otherwise an error will appear:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-197-1024x254.png.webp\" alt=\"\" class=\"wp-image-6373\"><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u201cSynchronous process\u201d option<\/h2>\n\n\n\n<p>Synchronous processing allows you to put the Chatbot on hold while your Webhook delivers a response. This is useful if one or more functions depend on a call to your Webhook.<br><br>For example, we have two Webhook functions one after the other:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The Webhook A function executes a query that will add a user in a database<\/li>\n\n\n\n<li>The Webhook B function executes a query that will retrieve the total number of users from the database and insert it into a Botnation variable.<\/li>\n<\/ul>\n\n\n\n<p>For the Chatbot to work properly, it is imperative that function A is fully executed before launching function B, otherwise we would get an incorrect number of users.<\/p>\n\n\n\n<p>By using the \u201csynchronous processing\u201d option on function A, we ask the Chatbot to pause its execution for the time of the request. As soon as the Webhook delivers a response, the Chatbot moves on to the next function, namely B.<\/p>\n\n\n\n<p>This allows the order of the functions to be respected during the execution of the Chatbot.<br><br>If the \u201csynchronous processing\u201d option is not checked, the Chatbot will not stop its execution, it will perform the request in parallel.<\/p>\n\n\n\n<p><strong>In case of a Webhook error<\/strong><\/p>\n\n\n\n<p>When processing is synchronous, it is possible to select a redirection sequence in case of an error in your Webhook :<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-198.png.webp\" alt=\"\" class=\"wp-image-6375\"><\/figure>\n<\/div>\n\n\n<p>If your Webhook does not respond or returns an error, the user will be redirected to the redirection sequence you have chosen.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Option \u201cProcess JSON answer\u201d.<\/h2>\n\n\n\n<p><strong>Only enable this option for very advanced use of the Webhook. This can cause your chatbot to change its behavior if your webhook does not respect the expected response format.<\/strong><\/p>\n\n\n\n<p>If you are only collecting data, <strong>you should not <\/strong>activate this option.<br><br>For advanced use, the Webhook element can also read and process the response returned by the HTTP call.<\/p>\n\n\n\n<p>This allows you, for example, to generate personalized responses from data on your own servers. These responses can contain text messages, images, videos, audios, variables, buttons, etc\u2026  <\/p>\n\n\n\n<p><strong>Here are some examples of usage:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Retrieve your latest news automatically without having to integrate them daily \u201cby hand\u201d into your chatbot\u2019s tree structure.<\/li>\n\n\n\n<li>Send the city or the collected GPS coordinates of a user to your webhook which sends back a message containing the 7-day weather forecast + a weather image generated by your system.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Send to your webhook a user\u2019s order number collected by the chatbot which returns in response the status of the delivery and changes the user\u2019s variables.<\/li>\n\n\n\n<li>Send the title of a movie requested by the user in your chatbot to your webhook which connects to your database of millions of videos to send it a trailer without having to pre-program everything and upload it to your chatbot tree!  <\/li>\n<\/ul>\n\n\n\n<p>Your webhook <strong>must <\/strong> then <strong>answer within a few seconds <\/strong>(10), after which the connection to the webhook will be interrupted and the possible answer cancelled.<\/p>\n\n\n\n<p>When you choose to process the response, the \u201cSynchronous Processing\u201d option will be automatically activated. Your chatbot will be on hold until your webhook has delivered a response, so bet on a server with a good connection and a fast base.<\/p>\n\n\n\n<p>If you are going to retrieve a non-personalized content (a news item) or one that can be reused by several users (the weather forecast for the same city), you can cache your response to increase processing speed and limit calls to your webhook. The duration can be from a few minutes to several days.<br><br>You can use services like Zapier or IFFT that have pre-made webhooks connected to many external APIs like Salesforce, Mailchimp, Google etc\u2026<\/p>\n\n\n\n<p>The service must send a response in <strong>JSON<\/strong> format and encoded in <strong>UTF-8 <\/strong>. Recommended header content-type: \u201capplication\/json\u201d.<br><br>All responses must be formatted as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \"botnation\": \"v1\", \/\/ obligatoire pour que la r\u00e9ponse soit prise en compte<\/em><br><em>\u00a0 \u00a0 \"reply\": [<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\/\/ contenu de la r\u00e9ponse (voir les nombreux exemples ci-dessous)<\/em><br>{<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello\"<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<br><em>\u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<p>We strongly recommend that you use the <a href=\"https:\/\/jsonlint.com\/\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/jsonlint.com\/<\/a> service to check the syntax and format of your JSON responses. It is not uncommon to forget a comma or a brace, and the answer would then be cancelled.<\/p>\n\n\n\n<p>Warning: the response must only contain the JSON file, nothing before, nothing after.<\/p>\n\n\n\n<p>The JSON \u201creply [ ]\u201d array can contain elements of different types (texts, images, buttons\u2026) in a single reply.<br> <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"texte\">Text<\/h3>\n\n\n\n<p>Allows you to display a simple text.  <\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello World!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"534\" height=\"107\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-91.png.webp\" alt=\"\" class=\"wp-image-626\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-91.png 534w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-91-300x60.png 300w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><figcaption class=\"wp-element-caption\">Result<\/figcaption><\/figure>\n<\/div>\n\n\n<p>In the value of a text you can inject variables in the same way as for the Text elements of the interface. To do this, enclose your variable like this: <em>{{variable}}<\/em>. To learn more about variables, read this article: <a href=\"https:\/\/botnation.ai\/en\/support\/all-about-variables\/\">All about variables {{\u2026}}<\/a><\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello {{FIRSTNAME}} !\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<p><br><strong>A delay between 2 elements<\/strong><\/p>\n\n\n\n<p>\u201cvalue\u201d: duration in seconds.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello World!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"delay\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": 5 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"how are you?\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"image-vido-ou-audio\">Image, Video or Audio<\/h3>\n\n\n\n<p>Allows you to display a media, JPEG format recommended for images, MP4 for videos, MP3 for audio).<\/p>\n\n\n\n<p>\u201ctype : \u201cimage\u201d, \u201cvideo\u201d or \u201caudio<br>  \u201cvalue\u201d : \u201cmedia url\u201d  <\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello World!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"image\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"<a href=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/d\/db\/Nasa_blue_marble.jpg\/250px-Nasa_blue_marble.jpg.webp\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/d\/db\/Nasa_blue_marble.jpg\/250px-Nasa_blue_marble.jpg<\/a>\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"630\" height=\"373\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-92.png.webp\" alt=\"\" class=\"wp-image-628\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-92.png 630w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-92-300x178.png 300w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><figcaption class=\"wp-element-caption\">Result<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"set-de-variables\">Set of Variables<\/h3>\n\n\n\n<p>Allows you to assign a value to a user variable.<\/p>\n\n\n\n<p>\u201cname\u201d : \u201cvariable_name\u201d (without space or special character)<br>\u201cvalue\u201d : \u201cstring or value<\/p>\n\n\n\n<p>In the bot call this variable by {{nom_de_la_variable}} .<\/p>\n\n\n\n<p>You can create a new variable via this call, however the interface will eventually ask you to validate this variable so that it appears later in the interface menus.<\/p>\n\n\n\n<p>To learn more about variables, read this article: <a href=\"https:\/\/botnation.ai\/en\/support\/all-about-variables\/\">All about variables {{\u2026}}<\/a><br><br>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><br><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"set\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"name\": \"who\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"World\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello {{who}}\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"560\" height=\"109\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-93.png.webp\" alt=\"\" class=\"wp-image-630\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-93.png 560w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-93-300x58.png 300w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><figcaption class=\"wp-element-caption\">Result<\/figcaption><\/figure>\n<\/div>\n\n\n<p>for global variables {{varglob}} the syntax is : \u201ctype\u201d: \u201cset_gobal\u201d<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{<br>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"set_gobal\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"name\": \"phone\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"+33175757575\"<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello {{%%phone%%}}\"<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<br>\u00a0 \u00a0 \u00a0 \u00a0 ]<br>}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"boutons-et-rponses-rapides-quick-replies\">Buttons and Quick Replies<\/h3>\n\n\n\n<p>Allows you to display a list of buttons.  <\/p>\n\n\n\n<p>To display the buttons of a Story Button (3 buttons maximum):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \"type\": \"button\",<\/em><br><em>\u00a0 \u00a0 \"value\": \"le texte \u00e0 envoyer\"<\/em><br><em>\u00a0 \u00a0 \"buttons\": [button1, button2, button3]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<p>To display the buttons of a Story Rep. (maximum 11 buttons with icon):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{ \u00a0<\/em><br><em>\u00a0 \u00a0 \"type\": \"quickreply\", \u00a0 \u00a0<\/em><br><em>\u00a0 \u00a0 \"value\": \"le texte \u00e0 envoyer\" \u00a0 \u00a0<\/em><br><em>\u00a0 \u00a0 \"buttons\": [button1, button2, button3]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<p>Each of these buttons contains a <em>next <\/em>field that will redirect the user to a desired sequence. In this field, you must enter a redirection keyword that you have defined in the AI module.<\/p>\n\n\n\n<p><strong>Buttons: Text with Redirection<\/strong><br><br>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"button\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Where is Brian?\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"buttons\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"In the kitchen\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"payload\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"kitchen\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"In the bathroom\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"payload\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"bathroom\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"201\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-94.png.webp\" alt=\"\" class=\"wp-image-632\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-94.png 557w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-94-300x108.png 300w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><figcaption class=\"wp-element-caption\">Result<\/figcaption><\/figure>\n<\/div>\n\n\n<p><strong>Buttons: Variable Set and Redirection<\/strong><br><br>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"button\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"What do you want to eat?\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"buttons\": [<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"A sandwich!\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"input\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"name\": \"eat\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"sandwich\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"confirmation\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"A Cheeseburger ;)\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"input\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"name\": \"eat\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"burger\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"confirmation\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<p><br><strong>Buttons: Open Web Site and Launch Phone Call<\/strong><\/p>\n\n\n\n<p>The ratio of the open webview can be :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u201ccompact\u201d: opening of the site in a small popup system<\/li>\n\n\n\n<li>\u201ctall\u201d : opening of the site in a large popup system<\/li>\n\n\n\n<li>\u201cfull\u201d : opening the site in a new tab<\/li>\n\n\n\n<li>\u201ccurrent\u201d : opening the site in the current tab<br>The telephone number must begin with the country code. ( +1 (USA), +33 (France), +48 (Poland) etc.)<br><br>Example:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"button\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Google or Phone Call?\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"buttons\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"Google\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"web_url\",<\/em><br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\"ratio\": \"full\",<br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"url\": \"<a href=\"https:\/\/google.com\/\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/google.com<\/a>\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"Call Me\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"phone_call\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"+33101010101\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n\n<p><br>Quick Replies with Geolocation.<br>Only on Facebook Messenger<br>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"quickreply\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Where are you?\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"buttons\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"Geolocation!\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"location\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"confirmation\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }]<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"186\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-95.png.webp\" alt=\"\" class=\"wp-image-634\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-95.png 558w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-95-300x100.png 300w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><figcaption class=\"wp-element-caption\">Result<\/figcaption><\/figure>\n<\/div>\n\n\n<p><strong>Quick Replies with Variable Set and Redirection and Icon (\u201curl\u201d)<\/strong><br><br>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"botnation\": \"v1\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \"reply\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"text\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"Hello!\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"quickreply\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"What do you want to eat?\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"buttons\": [{<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"A Pizza\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"url\": \"<a href=\"https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png.webp\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png<\/a>\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"payload\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"pizza\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"A Cheeseburger\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"url\": \"<a href=\"https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png.webp\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png<\/a>\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"payload\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"burger\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 },<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"A Salad\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"url\": \"<a href=\"https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png.webp\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png<\/a>\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"input\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"name\": \"eat\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"value\": \"salad\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"confirmation\"<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 ]<\/em><br><em>}<\/em><\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"189\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-96.png.webp\" alt=\"\" class=\"wp-image-636\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-96.png 717w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-96-300x79.png 300w\" sizes=\"(max-width: 717px) 100vw, 717px\" \/><figcaption class=\"wp-element-caption\">Result<\/figcaption><\/figure>\n<\/div>\n\n\n<p>For web chatbots it is also possible to indicate outgoing links.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"label\": \"My Website\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"url\": \"<a href=\"https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png%22,\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/png.icons8.com\/dusk\/540\/shopping-cart.png.webp\",<\/a><\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"web_url\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"web_url\": \"<a href=\"https:\/\/botnation.ai\/\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/botnation.ai<\/a>\",<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"ratio\": \"full\" \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/em><br><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/em><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"gnrer-un-carrousel\">Generate a carousel<\/h2>\n\n\n\n<p>Carousels can contain several pages and several buttons, each page can have an image or not. The syntax of the buttons is similar to the classic buttons (see above).  <\/p>\n\n\n\n<p>The ratio of the images must be declared in the header. \u201chorizontal or square  <br><br>Example of a carousel of 3 pages, the 3rd of which does not contain an image with several variations of buttons.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n\t\"botnation\": \"v1\",\n\t\"reply\": [{\n\t\t\"type\": \"carousel\",\n\t\t\"ratio\": \"horizontal\",\n\t\t\"pages\": [{\n\t\t\t\"title\": \"Where is Brian?\",\n\t\t\t\"subtitle\": \"in the kitchen\",\n\t\t\t\"image\": \"https:\/\/i.pinimg.com\/474x\/c7\/9b\/2b\/c79b2b537242b865188f172b346af5fc.jpg.webp\",\n\t\t\t\"link\": \"https:\/\/www.botnation.ai\",\n\t\t\t\"buttons\": [{\n\t\t\t\t\"label\": \"In the kitchen\",\n\t\t\t\t\"type\": \"redirect\",\n\t\t\t\t\"next\": \"kitchen\"\n\t\t\t}, {\n\t\t\t\t\"label\": \"Call Brian\",\n\t\t\t\t\"type\": \"phone_call\",\n\t\t\t\t\"next\": \"+33140506010\"\n\t\t\t}]\n\t\t}, {\n\t\t\t\"title\": \"Hello {{FIRSTNAME}}\",\n\t\t\t\"subtitle\": \"Powered by Botnation\",\n\t\t\t\"image\": \"https:\/\/cdn.searchenginejournal.com\/wp-content\/uploads\/2017\/05\/bing-site-search-760x400.png.webp\",\n\t\t\t\"link\": \"https:\/\/www.botnation.ao\",\n\t\t\t\"buttons\": [{\n\t\t\t\t\"label\": \"Tell me more...\",\n\t\t\t\t\"type\": \"redirect\",\n\t\t\t\t\"next\": \"more\"\n\t\t\t}, {\n\t\t\t\t\"label\": \"Start {{LASTNAME}}\",\n\t\t\t\t\"type\": \"web_url\",\n\t\t\t\t\"url\": \"https:\/\/maboite.com\"\n\t\t\t}]\n\t\t}, {\n\t\t\t\"title\": \"One more time\",\n\t\t\t\"subtitle\": \"no picture?\",\n\t\t\t\"buttons\": [{\n\t\t\t\t\"label\": \"Test Input\",\n\t\t\t\t\"type\": \"input\",\n\t\t\t\t\"name\": \"MyVar\",\n\t\t\t\t\"value\": \"1234\",\n\t\t\t\t\"next\": \"next_one\"\n\t\t\t}]\n\t\t}]\n\t}]\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"redirection-simple\">Simple redirection<\/h3>\n\n\n\n<p> <br>Finally, if your Webhook collects data and simply needs to send the user on a confirmation message redirection you can simulate entering a keyword or indicate a blockId.<\/p>\n\n\n\n<p>\/\/ by a keyword<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 {<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"redirect\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"etape_suivante\"<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0}<\/code><\/pre>\n\n\n\n<p><br>\/\/ by a blockid<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u00a0 \u00a0 \u00a0 \u00a0{<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"type\": \"redirect\",<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"next\": \"590898d2abec169ef65fcc47\"<br>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }<\/code><\/pre>\n\n\n\n<p><strong>We strongly recommend that you use the <a href=\"https:\/\/jsonlint.com\/\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/jsonlint.com\/<\/a> service to check the syntax and format of your JSON responses. It is not uncommon to forget a comma or a brace, the answer would then not be taken into account.<\/strong><\/p>\n\n\n\n<p><br>Debug variables are available to assist you in managing webhooks.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The Http status returned by your Webhook (remote server contacted). Only in \u201cinterpret response\u201d mode is available in the variable: {{BN_WEBHOOK_STATUS}}<\/li>\n\n\n\n<li>The error message returned by your webhook or if the json transmitted in return is incorrect is available in the variable : {{BN_WEBHOOK_REASON}}<\/li>\n<\/ul>\n\n\n\n<p>Feel free to post them in messages (text).<\/p>\n\n\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[183,193,194,185,171,221],"class_list":["post-639","support","type-support","status-publish","hentry","categorie-support-chatbot-web","categorie-support-facebook-messenger-en","categorie-support-features","categorie-support-fonctionnalites","categorie-support-variables","categorie-support-web-chatbot-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/types\/support"}],"wp:attachment":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/media?parent=639"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}