Extending with Webhooks
Smart Webhooks
smart webhooks is a way to use generative ai to provide personal answers with data from external sources (crm, pim, cms, oms, databases, etc) how it works you create a normal webhook and add it to your preferred dialogue the chatbot from kindly will then know when to call the webhook pull the data you need from your external source and add it to the response payload in {aireply data { }} your chatbot will then take the original message from the user, together with the data you provided to generate a personal and tailored reply to the end user getting started create a new webhook, e g using firebase add your webhook endpoint to a dialogue in kindly under "dialogue outputs > advanced options > webhook" when answering your webhook (i e the webhook response ), make sure your payload looks something likes this // your code to fetch data from your source, like a json containing info about a specific product const dataaboutuserrequest = fetchdatafromsource(); response json({ aireply { data dataaboutuserrequest // your response data goes here } } test it by sending a message to the chatbot with the topic you chose earlier the reply that the chatbot gives back to you will be ai generated and answering your question as long as the payload you provided contains the necessary data to provide a proper answer tips make sure the data is well structured and keys and values in your payload are well defined and understandble the data can be in any form, like just some text , json , xlm or anything serialized, but it must be intellegible try to not include irrelevant data, as too much data can result in loss of quality and understanding by the ai examples checking an order status let's imagine a user asks about their recent order the chatbot triggers a dialogue connected to a webhook that checks your order management system user " what's the status of my latest order? " the dialogue about "status order" gets triggered and it post to your webhook inside your server, you fetch the order info and put them in the webhook response under aireply data { "aireply" { "data" { "order id" "a 12345 xyz", "status" "shipped", "carrier" "fedex", "tracking number" "781220801234", "estimated delivery" "2025 07 29", "items" \[ { "name" "classic blue t shirt", "quantity" 1 }, { "name" "black denim jeans", "quantity" 1 } ] } } } kindly's ai takes the user's original question ("what's the status of my latest order?") and combines it with the structured data you provided it doesn't just display the dataβit generates a natural, helpful, and personalized response bot " great news! your order #a 12345 xyz has shipped via fedex it's currently scheduled for delivery on july 29, 2025 you can follow its journey with tracking number 781220801234 " as you can see, the bot intelligently synthesized the data into a conversational and complete answer, creating a much better user experience than just listing the raw information