# Displaying sources Source: https://docs.chatling.ai/ai/display-sources Learn how to enable sources for AI responses. 1. From your chatbot's dashboard, click on the `Appearance` menu. Appearance menu 2. Go to `Configure`. Configure menu 3. Enable the `Show Sources for AI Response` option. You can customize it by selecting the number and type of sources to display. Enable Show Sources for AI Response Here's how it appears in the chatbot: AI response sources # Fixing incorrect AI answers Source: https://docs.chatling.ai/ai/fix-incorrect-answers Learn how to fix incorrect AI responses using the fine-tuning feature in Chatling. Although the AI is trained on the data you add to the knowledge base, it may not always get the answer right, such as when it's asked a question that is not in the knowledge base or when it hallucinates. To fix this, you can use the fine-tuning feature on Chatling's conversations page. This feature is designed to help improve the chatbot's performance by refining incorrect responses. When you're viewing a conversation, you'll see a "Fine-tune this answer" button below every AI response. This feature allows you to fix incorrect AI responses so that it will learn to answer correctly in the future. ## How to use the fine-tuning feature 1. From the chatbot dashboard, click on the "Conversations" menu. Open conversations page from chatbot dashboard 2. Find and open a conversation where the AI has responded incorrectly. 3. Click the `Fine-tune this answer` button below the AI response you want to fix. Click the fine-tune answer button 4. A dialog will appear where you can edit the AI's answer or replace it with a correct one. Click finetune button 5. Once done, click the `Finetune` button. The new answer will be added to the FAQ sources in the knowledge base and will be queued for processing. Now, when the AI is asked a similar question, it will respond with the answer you provided. # Instructions Source: https://docs.chatling.ai/ai/instructions A guide on what AI Instructions are and how to use them. Instructions are a way to provide guidance to the AI on how to respond. You can use instructions to tailor the AI's responses to your specific needs, such as providing more detailed responses, using a specific tone, have a specific personality, or avoiding certain topics. Here are a few examples: * Your name is "Joanne" and you are our customer support assistant. When referring to yourself, do not mention anything about being an AI assistant or AI model. Instead, refer to yourself as "Joanne". * Keep your answers short and to the point, and do not provide unnecessary information. * Use a friendly and casual tone when responding to users. * You must act as a professional customer support agent. NEVER break character. * When responding in English, use American English spelling and grammar. * Promote special offers or promotions when appropriate. For example, if a customer asks about a product, you can mention that we have a store-wide promotion of 50% off. * Limit your answers to a maximum of 5 sentences. * You are a lead generation assistant for a Digital Marketing agency and you are communicating with a prospective customer. * Do not discuss politics, religion, or any other sensitive topics. ## How to add instructions The method for adding instructions depends on the [Response Source](/builder/blocks/ai/ai-response#what-is-the-response-source) that you've set for the [AI Response](/builder/blocks/ai/ai-response) block. ### Response Source: Knowledge Base If you are using the Knowledge Base as the response source, you can add instructions using the [AI Configuration menu](/builder/sidebar#ai-configuration) in the Builder's sidebar. 1. Click on the AI Configuration menu in the sidebar. Open AI Configuration menu from sidebar 2. Go to `Instructions`. Open Instructions page from AI Configuration sidebar menu 3. Click the `Add instruction` button and enter your instruction. Add new instruction in AI Configuration sidebar menu 4. To add more instructions, click the `New` button to create a new instruction. ### Response Source: AI Model If you are using the AI Model as the response source, you can add instructions directly from the [AI Response block](/builder/blocks/ai/ai-response). 1. Click the AI Response block on the canvas to open the block editor. 2. Under the `Instructions` section, you can add all your instructions. You can add multiple instructions in the same field, separated by a new line. Add instructions for AI Model response source # Setting the AI model Source: https://docs.chatling.ai/ai/set-ai-model Learn how to set the LLM model used by the AI. There are various [AI models](/ai/supported-ai-models) available in Chatling that you can use to generate responses for your chatbot. We recommend testing with different models to see which one works best for your chatbot and provides the most accurate responses. Each model uses a different amount of credits per response. ## How to set the AI model? The method for choosing the AI model depends on the [Response Source](/builder/blocks/ai/ai-response#what-is-the-response-source) that you've set for the [AI Response](/builder/blocks/ai/ai-response) block. Below are the instructions based on the response source you've selected. ### 1. Response Source: Knowledge Base If you are using the Knowledge Base as the response source, you can set the AI model using the [AI Configuration menu](/builder/sidebar#ai-configuration) in the Builder's sidebar. 1. Click on the AI Configuration menu in the sidebar. Open AI Configuration menu from sidebar 2. Go to `Settings`. Open Settings page from AI Configuration sidebar menu 3. Select the AI model you want to use from the dropdown list. Select AI model in AI Configuration settings sidebar menu Once you've selected the AI model, all AI Response blocks that use the Knowledge Base as the response source will use this model to generate responses. #### Setting the model on a per-block basis If you want to set the AI model on a per-block basis, you can do so by opening the AI Response block's editor and settings the `Model` option. This will override the default model set in the AI Configuration settings. Override AI model setting in AI Response block ### 2. Response Source: AI Model If you are using the "AI Model" as the response source, you can set the AI model from the block's editor using the `Model` option. Set model in AI Model response block # Supported AI models Source: https://docs.chatling.ai/ai/supported-ai-models A list of supported AI models in Chatling. Chatling supports the following LLMs: * o4 Mini * o3 Mini * GPT-4.1 * GPT-4.1 Mini * GPT-4.1 Nano * GPT-4.5 * GPT-4o * GPT-4o Mini * GPT-4 * GPT-4 Turbo * GPT-3.5 Turbo * Claude 4 Opus * Claude 4 Sonnet * Claude 3.5 Sonnet * Claude 3.7 Sonnet * Claude 3 Haiku * Claude 3 Opus * Claude 3 Sonnet * Gemini 2.0 Flash * Gemini 1.5 Flash * Gemini 1.5 Pro * Gemini 1.0 Pro To request a new AI model, please [contact us](mailto:support@chatling.ai). # Chat with Knowledge Base AI Source: https://docs.chatling.ai/api-reference/v2/ai-kb/chat POST /chatbots/{chatbotId}/ai/kb/chat Chat with the AI using the knowledge base as the response source. ## Request parameters ### Path The chatbot ID. ### Body The message to send to the AI. The ID of the AI model to use for the response. To get a list of available AI models, use the [List AI models](./list-ai-models) endpoint. The ID of the conversation. This allows the AI to remember the context of the conversation. If left blank, a new conversation will be created. The ID of the language to use for the AI response. To get a list of available languages, use the [List languages](./list-ai-languages) endpoint. The temperature to be used by the AI. The temperature controls the randomness of the response. A lower temperature value, such as 0, will make the outputs more focused and deterministic, whereas a higher temperature, such as 1, will make the responses more diverse and unpredictable. List of [instructions](/ai/instructions) to tailor the AI's response. It can be used to provide additional context to the AI, such as the desired tone or style of the response. Must be an array of strings. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the conversation. The response from the AI. The type of the source, such as `webpage` or `document`. The title of the source. The URL of the source if it's a webpage. ```json Response { "status": "success", "data": { "conversation_id": "3154224116", "response": "We offer a variety of AI models to power your chatbot. Here are the models available:\n\n- **GPT-4o**\n- **GPT-4 Turbo**\n- **GPT-3.5 Turbo**\n- **Claude 3.5 Sonnet**\n- **Claude 3 Opus**\n- **Claude 3 Sonnet**\n- **Claude 3 Haiku**\n\nThese models ensure that you can select the best fit for your specific needs and use cases.", "sources": [ { "type": "webpage", "title": "Supported AI Models - Chatling Documentation", "url": "https://docs.chatling.ai/ai/supported-ai-models" }, { "type": "webpage", "title": "Pricing | Chatling", "url": "https://chatling.ai/pricing" }, ] } } ``` # List AI languages Source: https://docs.chatling.ai/api-reference/v2/ai-kb/list-ai-languages GET /chatbots/{chatbotId}/ai/kb/languages Get a list of all the supported AI languages. ## Request parameters ### Path The chatbot ID. ### Query The page number for pagination. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the language. The name of the language. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 6, "per_page": 15 }, "languages": [ { "id": 1, "name": "Auto" }, { "id": 2, "name": "English" }, { "id": 3, "name": "Albanian" }, { "id": 4, "name": "Arabic" }, { "id": 5, "name": "Armenian" }, { "id": 7, "name": "Azerbaijani" }, { "id": 9, "name": "Basque" }, { "id": 10, "name": "Belarusian" }, { "id": 11, "name": "Bengali" }, { "id": 12, "name": "Bhojpuri" }, { "id": 13, "name": "Bosnian" }, { "id": 15, "name": "Bulgarian" }, { "id": 17, "name": "Catalan" }, { "id": 19, "name": "Chinese (Simplified)" }, { "id": 20, "name": "Croatian" } ] } } ``` # List AI models Source: https://docs.chatling.ai/api-reference/v2/ai-kb/list-ai-models GET /chatbots/{chatbotId}/ai/kb/models Get a list of all the supported AI models. ## Request parameters ### Path The chatbot ID. ### Query The page number for pagination. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the AI model. The name of the model. The number of AI credits consumed for each response generated by the model. The minimum and maximum temperature values for the model. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 1, "per_page": 15 }, "models": [ { "id": 1, "name": "GPT-3.5 Turbo", "credits": 1, "temperature": { "min": 0, "max": 1 } }, { "id": 2, "name": "GPT-4", "credits": 10, "temperature": { "min": 0, "max": 1 } }, { "id": 3, "name": "Claude 3 Opus", "credits": 18, "temperature": { "min": 0, "max": 1 } }, { "id": 4, "name": "Claude 3 Sonnet", "credits": 4, "temperature": { "min": 0, "max": 1 } }, { "id": 5, "name": "Claude 3 Haiku", "credits": 1, "temperature": { "min": 0, "max": 1 } }, { "id": 6, "name": "GPT-4o", "credits": 5, "temperature": { "min": 0, "max": 1 } }, { "id": 7, "name": "Claude 3.5 Sonnet", "credits": 4, "temperature": { "min": 0, "max": 1 } }, ] } } ``` # Create chatbot Source: https://docs.chatling.ai/api-reference/v2/chatbots/create-chatbot POST /chatbots Create a new chatbot using a template or from scratch. ## Request parameters ### Body The chatbot name. The ID of the chatbot template to use. You can get the list of available templates using the [List chatbot templates](./list-chatbot-templates) endpoint. Leave blank to create a chatbot from scratch. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the chatbot. The name of the chatbot. The version of the chatbot. The visibility of the chatbot. The date and time when the chatbot was created. ```json { "status": "success", "data": { "id": "9761342719", "name": "My chatbot", "version": "2.0", "visibility": "public", "created_at": "2024-06-17T12:00:00+00:00" } } ``` # Duplicate chatbot Source: https://docs.chatling.ai/api-reference/v2/chatbots/duplicate-chatbot POST /chatbots/{chatbotId}/duplicate ## Request parameters ### Path The chatbot ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the duplicated chatbot. ```json { "status": "success", "data": { "chatbot_id": "5285975738" } } ``` # List chatbot templates Source: https://docs.chatling.ai/api-reference/v2/chatbots/list-chatbot-templates GET /chatbot-templates Get a list of all the available chatbot templates. Can be used to create a new chatbot. ## Request parameters ### Query The page number for pagination. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the template. The name of the template. The description of the template. ```json { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 1, "per_page": 25 }, "templates": [ { "id": 1, "name": "AI Chatbot", "description": "Uses AI to automatically respond to customers by leveraging your data, such as your website content, documents, and more." }, { "id": 2, "name": "Basic Lead Generation", "description": "Engage with prospective leads and capture their contact information." } ] } } ``` # List chatbots Source: https://docs.chatling.ai/api-reference/v2/chatbots/list-chatbots GET /chatbots Get a list of all the chatbots in the project. ## Request parameters ### Query The page number for pagination. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the chatbot. The name of the chatbot. The version of the chatbot. The visibility of the chatbot. Can be `public` or `private`. The date the chatbot was created. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 1, "per_page": 25 }, "chatbots": [ { "id": "8917794239", "name": "My first chatbot", "version": "2.0", "visibility": "public", "created_at": "2024-06-05T12:13:35:00+00:00" } ] } } ``` # Retrieve chatbot Source: https://docs.chatling.ai/api-reference/v2/chatbots/retrieve-chatbot GET /chatbots/{chatbotId} Retrieve a chatbot by its ID. ## Request parameters ### Path The chatbot ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the chatbot. The name of the chatbot. The version of the chatbot. The visibility of the chatbot. The date and time when the chatbot was created. ```json { "status": "success", "data": { "id": "9761342719", "name": "My chatbot", "version": "2.0", "visibility": "public", "created_at": "2024-06-17T12:00:00+00:00" } } ``` # Update chatbot settings Source: https://docs.chatling.ai/api-reference/v2/chatbots/update-chatbot-settings PATCH /chatbots/{chatbotId} Update the settings of a chatbot. ## Request parameters ### Path The chatbot ID. ### Body The chatbot name. The visibility of the chatbot. Possible values are `public` and `private`. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the chatbot. The name of the chatbot. The version of the chatbot. The visibility of the chatbot. The date and time when the chatbot was created. ```json { "status": "success", "data": { "id": "9761342719", "name": "My chatbot", "version": "2.0", "visibility": "public", "created_at": "2024-06-17T12:00:00+00:00" } } ``` # Delete contact Source: https://docs.chatling.ai/api-reference/v2/contacts/delete-contact DELETE /chatbots/{chatbotId}/contacts/{contactId} Delete a contact by its ID. ## Request parameters ### Path The chatbot ID. The contact ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. ```json { "status": "success" } ``` # List contacts Source: https://docs.chatling.ai/api-reference/v2/contacts/list-contacts GET /chatbots/{chatbotId}/contacts Get a list of all the contacts and leads saved by the chatbot. ## Request parameters ### Path The chatbot ID. ### Query The page number for pagination. The sort order. Possible values: * `date_desc`: Sort by date in descending order. * `date_asc`: Sort by date in ascending order. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the contact. The name of the contact. The email address of the contact. The job title of the contact. The phone number of the contact. The website URL of the contact. The company name of the contact. The date and time when the contact was created. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 1, "per_page": 25 }, "contacts": [ { "id": "qtr89df0-112d-d197-b541-3f8674663246", "name": "Mark Zuckerberg", "email": "mark@meta.com", "job_title": "CEO", "phone": "555-555-5555", "website": "https://meta.com", "company": "Meta Inc.", "created_at": "2024-06-08T13:38:33+00:00" } ] } } ``` # Retrieve contact Source: https://docs.chatling.ai/api-reference/v2/contacts/retrieve-contact GET /chatbots/{chatbotId}/contacts/{contactId} Retrieve a contact by its ID. ## Request parameters ### Path The contact ID. The chatbot ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the contact. The name of the contact. The email address of the contact. The job title of the contact. The phone number of the contact. The website URL of the contact. The company name of the contact. The date and time when the contact was created. ```json { "status": "success", "data": { "id": "qtr89df0-112d-d197-b541-3f8674663246", "name": "Mark Zuckerberg", "email": "mark@meta.com", "job_title": "CEO", "phone": "555-555-5555", "website": "https://meta.com", "company": "Meta Inc.", "created_at": "2024-06-08T13:38:33+00:00" } } ``` # List conversation messages Source: https://docs.chatling.ai/api-reference/v2/conversations/list-conversation-messages GET /chatbots/{chatbotId}/conversations/{conversationId}/messages Get a list of all the messages for a conversation ## Request parameters ### Path The chatbot ID. The conversation ID. ### Query The page number for pagination. The sort order. Possible values: * `date_desc`: Sort by date in descending order. * `date_asc`: Sort by date in ascending order. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The text content of the message. The role of the sender of the message (bot, user, or system). Whether the message is AI generated and uses the knowledge base. The data of the message. Varies depending on the message type. The date and time when the message was created. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 1, "per_page": 15 }, "messages": [ { "text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [ { "type": "webpage", "title": "Types of variables - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/variable-types" }, { "type": "webpage", "title": "Sidebar - Chatling Documentation", "url": "https://docs.chatling.ai/builder/sidebar" }, { "type": "webpage", "title": "What are variables? - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/what-are-variables" } ] }, "created_at": "2024-06-17T16:09:52+00:00" }, { "text": "What are system variables", "role": "user", "created_at": "2024-06-17T16:09:45+00:00" }, { "text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [] }, "created_at": "2024-06-14T15:45:39+00:00" }, { "text": "Hello!", "role": "user", "created_at": "2024-06-14T15:45:34+00:00" } ] } } ``` # List conversations Source: https://docs.chatling.ai/api-reference/v2/conversations/list-conversations GET /chatbots/{chatbotId}/conversations Get a list of all the chatbot's conversations with users. ## Request parameters ### Path The chatbot ID. ### Query The page number for pagination. The sort order. Possible values: * `date_desc`: Sort by date in descending order. * `date_asc`: Sort by date in ascending order. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the conversation. The unique identifier of the contact associated with the conversation. Whether the conversation is archived (by the admin). Whether the conversation is marked as important. The date and time when the conversation was created. List of the most recent 20 messages in the conversation. The unique identifier of the message. The text content of the message. The role of the sender of the message (bot, user, or system). Whether the message is generated by the AI using the knowledge base. The data of the message. Varies depending on the message type. (AI response) Whether the AI's response was marked as helpful by the user. Possible values are `1` for helpful, `0` for not helpful, and `null` for not rated. (AI response) The sources used by the AI to generate the response. The date and time when the message was created. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 11, "per_page": 5 }, "conversations": [ { "id": "8977617953", "contact_id": "qtr89df0-112d-d197-b541-3f8674663246", "archived": 0, "important": 1, "created_at": "2024-06-14T15:45:34+00:00", "messages": [ { "text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [ { "type": "webpage", "title": "Types of variables - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/variable-types" }, { "type": "webpage", "title": "Sidebar - Chatling Documentation", "url": "https://docs.chatling.ai/builder/sidebar" }, { "type": "webpage", "title": "What are variables? - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/what-are-variables" } ] }, "created_at": "2024-06-17T16:09:52+00:00" }, { "text": "What are system variables", "role": "user", "created_at": "2024-06-17T16:09:45+00:00" }, { "text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [] }, "created_at": "2024-06-14T15:45:39+00:00" }, { "text": "Hello!", "role": "user", "created_at": "2024-06-14T15:45:34+00:00" } ] } ] } } ``` # Rate AI answer Source: https://docs.chatling.ai/api-reference/v2/conversations/rate-ai-answer PATCH /chatbots/{chatbotId}/conversations/{conversationId}/messages/{messageId}/rate-ai-answer Use this endpoint to rate an AI answer as helpful or not helpful. You can only rate AI answers generated using the Knowledge Base. ## Request parameters ### Path The chatbot ID. The conversation ID. The message ID. ### Body * `0`: Remove rating * `1`: Helpful * `-1`: Not helpful ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. ```json Response { "status": "success", "data": null } ``` # Retrieve conversation Source: https://docs.chatling.ai/api-reference/v2/conversations/retrieve-conversation GET /chatbots/{chatbotId}/conversations/{conversationId} Retrieve a conversation by its ID. ## Request parameters ### Path The chatbot ID. The conversation ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the conversation. The unique identifier of the contact associated with the conversation. Whether the conversation is archived (by the admin). Whether the conversation is marked as important. The date and time when the conversation was created. List of the most recent 20 messages in the conversation. The unique identifier of the message. The text content of the message. The role of the sender of the message (bot, user, or system). Whether the message is generated by the AI using the knowledge base. The data of the message. Varies depending on the message type. (AI response) Whether the AI's response was marked as helpful by the user. Possible values are `1` for helpful, `0` for not helpful, and `null` for not rated. (AI response) The sources used by the AI to generate the response. The date and time when the message was created. ```json { "status": "success", "data": { "id": "8977617953", "contact_id": "qtr89df0-112d-d197-b541-3f8674663246", "archived": 0, "important": 1, "created_at": "2024-06-14T15:45:34+00:00", "messages": [ { "text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [ { "type": "webpage", "title": "Types of variables - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/variable-types" }, { "type": "webpage", "title": "Sidebar - Chatling Documentation", "url": "https://docs.chatling.ai/builder/sidebar" }, { "type": "webpage", "title": "What are variables? - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/what-are-variables" } ] }, "created_at": "2024-06-17T16:09:52+00:00" }, { "text": "What are system variables", "role": "user", "created_at": "2024-06-17T16:09:45+00:00" }, { "text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [] }, "created_at": "2024-06-14T15:45:39+00:00" }, { "text": "Hello!", "role": "user", "created_at": "2024-06-14T15:45:34+00:00" } ] } } ``` # Update conversation Source: https://docs.chatling.ai/api-reference/v2/conversations/update-conversation PATCH /chatbots/{chatbotId}/conversations/{conversationId} Update a conversation's properties. ## Request parameters ### Path The chatbot ID. The conversation ID. ### Body Whether to archive the conversation. Whether to mark the conversation as important. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the conversation. The unique identifier of the contact associated with the conversation. Whether the conversation is archived (by the admin). Whether the conversation is marked as important. The date and time when the conversation was created. The unique identifier of the message. The text content of the message. The role of the sender of the message (bot, user, or system). Whether the message is generated by the AI using the knowledge base. The data of the message. Varies depending on the message type. (AI response) Whether the AI's response was marked as helpful by the user. Possible values are `1` for helpful, `0` for not helpful, and `null` for not rated. (AI response) The sources used by the AI to generate the response. The date and time when the message was created. ```json { "status": "success", "data": { "id": "8977617953", "contact_id": "qtr89df0-112d-d197-b541-3f8674663246", "archived": 0, "important": 1, "created_at": "2024-06-14T15:45:34+00:00", "messages": [ { "text": "System variables are predefined variables that contain system information or can be used to perform specific actions. These variables are automatically created by the Builder.", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [ { "type": "webpage", "title": "Types of variables - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/variable-types" }, { "type": "webpage", "title": "Sidebar - Chatling Documentation", "url": "https://docs.chatling.ai/builder/sidebar" }, { "type": "webpage", "title": "What are variables? - Chatling Documentation", "url": "https://docs.chatling.ai/builder/variables/what-are-variables" } ] }, "created_at": "2024-06-17T16:09:52+00:00" }, { "text": "What are system variables", "role": "user", "created_at": "2024-06-17T16:09:45+00:00" }, { "text": "**Hello! How can I assist you today?**\n\nIf you have any questions related to our chatbot or services, please feel free to ask. I'm here to help!", "role": "bot", "is_ai_kb_response": true, "data": { "helpful_value": null, "sources": [] }, "created_at": "2024-06-14T15:45:39+00:00" }, { "text": "Hello!", "role": "user", "created_at": "2024-06-14T15:45:34+00:00" } ] } } ``` # API Introduction Source: https://docs.chatling.ai/api-reference/v2/intro The Chatling API allows you to manage your chatbots programmatically. Integrate Chatling into your application or interact with your chatbots programmatically using our API. This documentation guides you through creating your API key, authenticating requests, and sending requests to the API. {/* ## Base URL ``` https://api.chatling.ai/v2 ``` */} ## Generate your API key To send requests to the API, you must include your API key. Here's how to create it: 1. Go to your Chatling account and open the Project Settings. 2. Click the API Keys tab. 3. Press the `New API key` button. 4. Enter a name for the key and press `Generate key`. 5. Copy the newly created key. For security purposes, the API key will be displayed once only. Note it down and store it in a secure place. If you forget your API key, you must delete it and generate a new one. ## Authentication Your API key acts as the Bearer token and must be supplied in the `Authorization` header of every request. ``` Authorization: Bearer ``` ## Retrieving the chatbot ID Some endpoints require that you pass a chatbot ID as the path parameter. Here's a couple of ways to retrieve it: * **Recommended method**: Using the `List chatbots` endpoint, you can fetch all the chatbots along with their IDs. * Open the chatbot's settings in your account and you will find its ID listed there. # Add FAQ Source: https://docs.chatling.ai/api-reference/v2/knowledge-base/add-faq POST /chatbots/{chatbotId}/knowledge-base/data-sources/faqs Add new FAQ data sources to the knowledge base. ## Request parameters ### Path The chatbot ID. ### Body Array of FAQs to add to the knowledge base. The question of the FAQ. The answer of the FAQ. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of FAQs that were added successfully. ```json Response { "status": "success", "data": { "faqs_added": 45 } } ``` # Add link Source: https://docs.chatling.ai/api-reference/v2/knowledge-base/add-link POST /chatbots/{chatbotId}/knowledge-base/data-sources/links Add new link data sources to the knowledge base. ## Request parameters ### Path The chatbot ID. ### Body Array of webpage links to add to the knowledge base. Exclude sections of webpages based on their HTML class names. Exclude sections of webpages based on their HTML IDs. Exclude `header` tags. Exclude `footer` tags. Exclude `nav` tags. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of links that were added successfully. An array of duplicate links that were removed. ```json Response { "status": "success", "data": { "links_added": 105, "duplicate_links_removed": [] } } ``` # Add text Source: https://docs.chatling.ai/api-reference/v2/knowledge-base/add-text POST /chatbots/{chatbotId}/knowledge-base/data-sources/texts Add new text data sources to the knowledge base. ## Request parameters ### Path The chatbot ID. ### Body Array of texts to add to the knowledge base. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of texts that were added successfully. ```json Response { "status": "success", "data": { "texts_added": 45 } } ``` # Delete data source Source: https://docs.chatling.ai/api-reference/v2/knowledge-base/delete-source Delete /chatbots/{chatbotId}/knowledge-base/data-sources/{dataSourceId} Delete a data source from the knowledge base. ## Request parameters ### Path The chatbot ID. The data source ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. ```json Response { "status": "success" } ``` # List data sources Source: https://docs.chatling.ai/api-reference/v2/knowledge-base/list-data-sources GET /chatbots/{chatbotId}/knowledge-base/data-sources Get a list of the data sources added to the knowledge base. ## Request parameters ### Path The chatbot ID. ### Query The page number for pagination. The sort order. Possible values: * `date_desc`: Sort by date in descending order. * `date_asc`: Sort by date in ascending order. Filter by the type of the data source. Possible values are `link`, `text`, `faq`, `document`, and `zoho`. Leave blank to get all types of data sources. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The unique identifier of the data source. The type of the data source. The processing status of the data source. Possible values are `pending`, `processing`, `processed`, `error`. The number of characters used by the data source. Whether the data source is queued for resync. Additional data based on the type of the data source. The date and time when the data source was created. ```json Response { { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 3, "per_page": 25 }, "sources": [ { "id": "321e979b-a174-89fc-25de-f0b31dbd659f", "type": "link", "status": "processed", "characters": 6232, "resync_queued": false, "data": { "url": "https://chatling.ai", "page_title": "No-Code AI Chatbot for Your Website | Chatling" }, "created_at": "2024-06-15T12:23:41" }, ] } } ``` # Resync data source Source: https://docs.chatling.ai/api-reference/v2/knowledge-base/resync-source POST /chatbots/{chatbotId}/knowledge-base/data-sources/{dataSourceId}/resync Resync a data source. **The following limitations apply:** * The supported sources are links and Zoho articles. * You can have up to 50 data sources queued for resync. If you exceed this limit, you will receive an error and must wait until some of the queued resyncs are complete. * You can only resync data sources that are in the `processed` state. ## Request parameters ### Path The chatbot ID. The data source ID. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. ```json Response { "status": "success" } ``` # List members Source: https://docs.chatling.ai/api-reference/v2/members/list-members GET /members Get a list of all the members in the project. ## Request parameters ### Query The page number for pagination. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The current page number. The last page number. The number of items per page. The email address of the member. The status of the member (`Active` or `Pending`). The roles of the member in the project. ```json Response { "status": "success", "data": { "pages": { "current_page": 1, "last_page": 1, "per_page": 15 }, "members": [ { "email": "elon@tesla.com", "status": "Active", "roles": [ "Owner" ] }, { "email": "mark@meta.com", "status": "Active", "roles": [ "Admin" ] }, { "email": "sundar@google.com", "status": "Pending", "roles": [ "Editor", "Billing" ] } ] } } ``` # List settings Source: https://docs.chatling.ai/api-reference/v2/project/list-settings GET /project/settings Retrieve the settings of the project. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the project. The name of the project. ```json Response { "status": "success", "data": { "project_id": "8917794239", "name": "My first project" } } ``` # Update settings Source: https://docs.chatling.ai/api-reference/v2/project/update-settings PATCH /project/settings Update the project settings. ## Request parameters ### Body The project name. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The unique identifier of the project. The name of the project. ```json Response { "status": "success", "data": { "project_id": "8917794239", "name": "My project" } } ``` # Rate limiting Source: https://docs.chatling.ai/api-reference/v2/rate-limiting Our API has rate limits to prevent abuse and ensure fair usage. We enforce rate limits to balance the load on our servers and provide a fair environment for all developers to interact with the Chatling API. Therefore, the number of requests you send to the API will be measured and throttled if you surpass the allowed rate limit. ## Rate limit The default rate limit is **300 API calls per minute** for each API key. We may adjust these limits in the future. When you exceed the rate limit, you will receive a 429 status code with the following response: ```json { "status": "error", "message": "Too many requests" } ``` ## When does the rate limit reset? The rate limit lasts 1 minute, and the number of requests you've sent within that window will reset at the next minute. # AI Credits Source: https://docs.chatling.ai/api-reference/v2/usage/ai-credits GET /usage/ai-credits Get the AI credits usage for the project. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of AI credits used. The maximum number of AI credits allowed for the project. ```json Response { "status": "success", "data": { "used": 55, "max": 3000 } } ``` # Chatbots Source: https://docs.chatling.ai/api-reference/v2/usage/chatbots GET /usage/chatbots Get the chatbots usage for the project. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of chatbots created. The maximum number of chatbots allowed for the project. ```json Response { "status": "success", "data": { "used": 2, "max": 5 } } ``` # Email Credits Source: https://docs.chatling.ai/api-reference/v2/usage/email-credits GET /usage/email-credits Get the email credits usage for the project. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of email credits used. The maximum number of email credits allowed for the project. ```json Response { "status": "success", "data": { "used": 125, "max": 1500 } } ``` # Knowledge Base Source: https://docs.chatling.ai/api-reference/v2/usage/knowledge-base GET /usage/knowledge-base Get the knowledge base usage for the project. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. Total number of characters used in the knowledge base. The maximum number of characters allowed for the project. ```json Response { "status": "success", "data": { "used": 1500000, "max": 20000000 } } ``` # User Seats Source: https://docs.chatling.ai/api-reference/v2/usage/user-seats GET /usage/user-seats Get the user seats usage for the project. ## Response The status of the request. Will be `success` if the request was successful, otherwise `error`. The number of seats used. The maximum number of seats allowed for the project. ```json Response { "status": "success", "data": { "used": 3, "max": 10 } } ``` # Block Editor Source: https://docs.chatling.ai/builder/block-editor Learn how to edit blocks in the Builder. The Block Editor is where you can configure the settings of a block in the Builder. The editor appears when you click a block that you've added to the canvas. Every block has its own unique settings that you can configure. Opening the block editor # Quick Replies Source: https://docs.chatling.ai/builder/block-options/quick-replies Quick replies are messages that will help users respond quickly without having to type out a full response. They are displayed as buttons above the input field and users can click on them to send a message. Quick Replies demo ## Supported blocks Quick replies are available for the following Capture Response blocks: * Text * Number * Email * URL ## Setting up Quick Replies Here's how to add quick replies to a supported block: * Open the block editor for a block that supports quick replies. * Under the "Quick Replies" section, click `Add` to add a new quick reply. Add a quick reply * Enter the label for the quick reply. This is the text that will be displayed on the button. * Enter the message that will be sent when the user clicks on the quick reply button. For example if the label is "Pricing" and the message is "Tell me about your pricing", the user will see a button with the text "Pricing" and when they click on it, the message "Tell me about your pricing" will be sent. # Voice Input Source: https://docs.chatling.ai/builder/block-options/voice-input Allow users to speak to your chatbot using Voice Input. Voice Input is a speech-to-text feature that allows users to record voice messages and transcribes them into text. Rather than typing their message, users can speak to your chatbot and it will automatically be converted to text. Voice Input demo ## Supported blocks Currently, Voice Input is available for the Text input block only. ## How to enable Voice Input Open the block editor for a Text input block and toggle on the "Voice Input" option. Enable Voice Input The chatbot will then display a microphone icon when the block is displayed. Users can click on the microphone icon to record a voice message. Chatbot Voice Input ## What happens when I run out of Speech to Text credits? When you're out of credits, the voice recording icon will be removed and users will not be able to access the feature. You can upgrade your plan to increase the credits limit or wait until the next billing cycle for the credits to reset. # Create Contact Block Source: https://docs.chatling.ai/builder/blocks/action/create-contact Learn about the Create Contact block and how to set it up in the Builder. The `Create Contact` block can be used to save a user's information as a contact. All saved contacts are displayed on the `Contacts` page in your dashboard. When a contact is created, it is associated with the user and the information persists across multiple chat sessions. The information can be used to personalize the conversation, skip repetitive questions, and tailor the flow accordingly. The block consists of the following components: * **Contact details**: Define which fields you want to collect and save—such as first name, email, etc. These can be mapped from variables captured in the conversation flow (e.g. from a form or user input). * **Deduplication**: Allows you to define how Chatling handles duplicate contacts during the creation process. # Delete Contact Block Source: https://docs.chatling.ai/builder/blocks/action/delete-contact Learn about the Delete Contact block and how to set it up in the Builder. The `Delete Contact` block can be used to delete a contact and dissociate it from the user. The block consists of the following components: * **Search**: Specify the field and value to use to look up the contact. You can enter a variable to search dynamically. # Get Contact Block Source: https://docs.chatling.ai/builder/blocks/action/get-contact Learn about the Get Contact block and how to set it up in the Builder. The `Get Contact` block can be used to retrieve a contact's information. The block consists of the following components: * **Search**: Specify the field and value to use to look up the contact. You can enter a variable to search dynamically. * **Contact details**: Define the properties to retrieve and the variables to store the values in. # HTTP Request Block Source: https://docs.chatling.ai/builder/blocks/action/http-request Learn about the HTTP Request block and how to set it up in the Builder. The HTTP Request block is used to send HTTP requests to external APIs and services. You can use it to fetch data, send data, or perform other actions by interacting with APIs. The block consists of the following components: * **Request method**: The HTTP method to use for the request, such as GET, POST, PUT, PATCH, and DELETE. * **URL**: The URL of the API endpoint to send the request to. * **Request options**: You can configure additional options for the request, such as headers, query parameters, and request body. * **Capture Response**: You can capture the responses from the API and store them a variable. The response must be in JSON format. ## Method and URL In order to send a request, you must provide the endpoint URL and select the appropriate request method. The following request methods are supported: * **GET**: Retrieve data from the server. * **POST**: Send data to the server. * **PUT**: Update data on the server. * **PATCH**: Partially update data on the server. * **DELETE**: Delete data from the server. As an example, an endpoint URL might look like this: `https://openlibrary.org/works/OL45804W.json` ## Request Options When sending requests to external APIs, you may need to provide additional options such as headers, query parameters, and request body. Here are the available options: * **Headers**: You can set headers for the request, such as Content-Type, Authorization, and Accept. * **Query Params**: The URL query parameters to include for the request. * **Request Body**: The request payload which can be passed as form data, form URL encoded, or raw JSON. ### How to use variables in JSON payload To use variables in the request payload, you must enclose the variable's name in double curly braces within quotes. Here's an example: ```json { "name": "{{contact_name}}", "age": 21, "email": "{{contact_email}}" } ``` Some points to note: * Make sure that the variables exist and that their name is correct. Otherwise, they will not be replaced with the actual value. * If you change a variable's name, you must also update the JSON payload to reflect the change. * Variables must be enclosed in double curly braces as shown in the example above. ## Capture Response Responses from the API can be captured and stored in one or more variables. In order for this to work, the response from the endpoint must be in JSON format. Click the `Add` button to add a new row for capturing a value. You must specify the key and the variable where the value will be stored. The naming convention for the key is as follows: * **Top level data**: use the key, such as name or age. * **Nested data**: use dot notation, such as user.name or profile.address.city. * **Array data**: use the index, such as users\[0].name or countries\[1].cities\[0].population. Let's take a look at an example. Below is a sample JSON response from an API endpoint: ```json { "title": "Fantastic Mr Fox", "permalink": "/works/OL45804W", "authors": [ { "author": { "name": "Roald Dahl" }, } ], "description": "The main character of Fantastic Mr. Fox is an extremely clever anthropomorphized fox named Mr. Fox. He lives with his wife and four little foxes. In order to feed his family, he steals food from the cruel, brutish farmers named Boggis, Bunce, and Bean every night.\r\n\r\nFinally tired of being constantly outwitted by Mr. Fox, the farmers attempt to capture and kill him. The foxes escape in time by burrowing deep into the ground. The farmers decide to wait outside the hole for the foxes to emerge. Unable to leave the hole and steal food, Mr. Fox and his family begin to starve. Mr. Fox devises a plan to steal food from the farmers by tunneling into the ground and borrowing into the farmer's houses.\r\n\r\nAided by a friendly Badger, the animals bring the stolen food back and Mrs. Fox prepares a great celebratory banquet attended by the other starving animals and their families. Mr. Fox invites all the animals to live with him underground and says that he will provide food for them daily thanks to his underground passages. All the animals live happily and safely, while the farmers remain waiting outside in vain for Mr. Fox to show up.", "meta": { "published_at": "1970-06-01" }, } ``` To capture the title, date of publication, and author name from the response, you would use the following keys: * **Title**: `title` * **Published date**: `meta.published_at` * **Author Name**: `authors[0].author.name` HTTP Request capture response example # Send Email Block Source: https://docs.chatling.ai/builder/blocks/action/send-email Learn about the Send Email block and how to set it up in the Builder. The Send Email block is used to send emails to one or more recipients. You can use it to send notifications, follow ups, transactional emails and other types of emails. The block consists of the following components: * **From**: The email address from which the email will be sent. * **From name**: The name of the sender. For example, you can use your company name. * **Reply to**: The email address to which the recipient can reply. For example, if you want to receive replies to your email address, you can set it here. Whenever the recipient replies to the email, it will be sent to your inbox. * **To**: The email addresses of the recipients. You can add one or more email addresses. * **CC**: The email addresses of the recipients who will receive a copy of the email. You can add one or more email addresses. * **Subject**: The subject of the email. * **Message**: The content of the email. You can use variables to personalize the email content. # Set Variable Source: https://docs.chatling.ai/builder/blocks/action/set-variable Learn about the Set Variable block and how to set it up in the Builder. The Set Variable block is used to set the value of one or more variables. With it, you can modify variable values dynamically at any point in the flow. ## How to configure 1. Click on the Set Variable block in the canvas to open its settings. 2. Select the variable you want to modify. 3. Select the type of the modification: * **Value**: Set the variable to a specific value. You can also insert variables to make the value dynamic. * **Add/Subtract/Multiply/Divide**: Perform a mathematical operation on the variable. You can add, subtract, multiply, or divide the variable by a specific value. The value must be a number. 4. Enter the value. Configure Set Variable block ## Multiple variables You can set multiple variables at once by clicking on the **Add variable** button. This will add a new row where you can select another variable and set its value. Add additional variable ## Example Let's say you're building a lead generation chatbot for a real estate brokerage. You want to prompt the AI to ask the customer three questions about their requirements and forward the answers to the team. You can do this by using a counter variable that increments each time the user answers a question. Below is a sample flow that demonstrates how to use the Set Variable block. Real estate sample chatbot flow using Set Variable block We're using a variable called `counter` to keep track of the number of questions that have been asked. This variable is incremented by 1 each time the user answers a question. Then, we're using the Condition block to check if the counter is greater or equal to 3. If it is, a message is displayed to inform the user that their inquiry has been forwarded to the team. Else, the AI asks the next question. # Update Contact Block Source: https://docs.chatling.ai/builder/blocks/action/update-contact Learn about the Update Contact block and how to set it up in the Builder. The `Update Contact` block can be used to update an existing contact. The block consists of the following components: * **Search**: Specify the field and value to use to look up the contact. You can enter a variable to search dynamically. * **Contact details**: Define the properties you want to update. # AI Response Block Source: https://docs.chatling.ai/builder/blocks/ai/ai-response Learn about the AI Response block and how to set it up in the Builder. The AI Response block is used for generating responses to user input using AI. It can provide answers based on the information you have added to the [Knowledge Base](/knowledge-base/overview) or from the AI's pretrained data. The AI uses natural language processing (NLP) to understand the user's input and generate relevant responses. ## What is the "Response Source"? The Response Source determines where the AI will look for answers to user queries. You can choose from the following options: * **Knowledge Base**: The AI will search the data you've uploaded to the Knowledge Base for the relevant information and return the corresponding answer. * **AI Model**: The AI will use its pretrained data to generate a response based on the user's query. This is ideal for a general-purpose AI that can answer a wide range of questions without limiting its responses to the data in the knowledge base. ## Configurations for Knowledge Base Response Source AI block knowledge base settings When you select the "Knowledge Base" as the Response Source, you can configure the following settings: * **Question**: The user's input or query that the AI will process to generate a response. You can use variables to make the question dynamic. For example, you can capture the user's input using a Text input block and store it in a variable called `user_input`. Then, you can use this variable in the "Question" field to make the AI response dynamic. * **Store response in variable**: You can store the AI response in a variable to use it in other blocks. * **Stream**: When enabled, the AI response will be streamed to the user in real-time as it is generated. This provides a more interactive experience for the user. * When Stream is enabled, some features that require post-processing, such as "Not Found path" will be disabled. * **Not Found path**: The path to follow if the AI does not find a relevant answer in the Knowledge Base. * **Model**: The AI model to use for generating responses. * **Language**: The language in which the AI will respond to the user. If you set it to "Auto," the AI will detect the language of the user's input and respond in the same language. * If you want the AI to respond in a certain dialect or accent, you can specify it in Instructions section of the [AI Configuration](/builder/sidebar#ai-configuration). * **Temperature**: The randomness of the AI's responses. A higher temperature value will result in more diverse and creative responses, while a lower value will produce more accurate responses. ### What does "Use global AI settings" mean? When you set an option, such as the AI model, language, or temperature to "Use global AI settings", the AI will use the settings defined in the [AI Configuration](/builder/sidebar#ai-configuration) menu in the [sidebar](/builder/sidebar). This allows you to define global settings that will be applied to all AI blocks in your bot. ## Configurations for AI Model Response Source When you set the Response Source to "AI Model", you can configure the following settings: * **Prompt**: The message or query that the AI will use to generate a response. You can use variables to make the prompt dynamic. * **Store response in variable**: You can store the AI response in a variable to use it in other blocks. * **Instructions**: Additional instructions for the AI to follow when generating a response. For example, you can specify its personality, tone, or style, or provide specific context for the response. * **Model**: The AI model to use for generating responses. * **Max Length**: Maximum number of tokens to generate, shared between the prompt and the response. One token is roughly 4 characters. * **Temperature**: Randomness of the AI's responses. A higher temperature value will result in more diverse and creative responses, while a lower value will produce more focused and deterministic responses. * **Top P**: Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. * **Frequency Penalty**: How much to penalize new tokens based on their existing frequency in the text so far. Decreases the model's likelihood to repeat the same line verbatim. * **Presence Penalty**: How much to penalize new tokens based on whether they appear in the text so far. Increases the model's likelihood to talk about new topics. ## How to set up the AI block to respond from the knowledge base? Here's a high level overview of how the AI generates responses using the knowledge base: * The user inputs a question or query, which is saved in a variable of your choice. * The stored input is passed to the AI which uses natural language processing (NLP) to understand the user's query and the context of the conversation. * The AI searches the knowledge base for relevant information. * The AI generates the response and displays it to the user. To set up the AI block, follow these steps: 1. Add a Text input block to the canvas. We'll use this block to capture the user's input and store it in a variable so it can be passed to the AI block. Adding text input block to the builder 2. Click on the Text block to open the editor. In the `Store answer in variable` field, enter a variable where the user's input will be stored. In this example, we'll create and use a variable called `user_query`. Storing user input in a variable 3. Next, drag and drop the AI Response block onto the canvas. Setting up AI block for knowledge base response 4. Connect the Text input block to the AI block by dragging the connector from the Text block to the AI block. Connecting text input to AI block 5. Click the AI Response block to open the editor. In the `Question` field, enter the variable where the user's input is stored. In step 2, we used the `user_query` variable, so we'll enter `{user_query}` in the Question field. Setting up AI block for knowledge base response 6. Set up the global AI settings by going to the `AI Configuration` in the sidebar. You can define settings such as the AI model, instructions, language, and business name. 7. Lastly, set up the block connections accordingly. For example, a setup like below will allow the user to continually ask questions and receive responses from the AI. Setting up AI block for knowledge base response # Language Source: https://docs.chatling.ai/builder/blocks/condition/language Learn how to use the Language condition block in Chatling The Language condition block is used to define flows based on the user's browser language. This can be useful for creating multilingual bots that respond in the user's preferred language. Let's say you want to create a bot that supports English, Spanish, and French languages. You can use the Language condition block to define different responses or actions based on the user's preferred language setting in their browser. Below is an example of such a flow. The Else path is a fallback for users whose language is not supported by the bot. In this case, it falls back to the English language. Language conditional flow # Overview Source: https://docs.chatling.ai/builder/blocks/condition/overview Learn about the condition blocks and how to use them Condition blocks are used to create conditional logic in your bot. You can use it to check if a certain condition is met and then perform different actions based on the result. Similar to an "if-else" statement in programming, condition blocks evaluate a condition and executes different paths based on whether the condition is true or false. Condition block ## Types of condition blocks There are two types of condition blocks available in Chatling: * [**Variable**](./variable): Compares a variable with a value or another variable. * **Language**: Checks if the user's language matches a specific language. Useful for creating multilingual bots. ## How do condition blocks work? Condition blocks consist of two main parts: * **Conditions**: The conditions that the block will evaluate. You can use variables, languages, comparison operators, and logical operators to create complex conditions. * **Paths**: The paths that the block will follow based on the result of the conditions. Every condition you add will have a corresponding path that the block will follow if the condition is true. Condition block components Here's an example of how a condition block works: 1. The block evaluates conditions in the order they are added. 2. If a condition is true, the block follows the path associated with that condition. 3. If none of the conditions are true, the block follows the "Else" path. ## The Else condition The `Else` condition is executed if none of the other conditions are met. You can use it to define a fallback path that the block will follow if none of the other conditions are true. ## Comparison operators Conditions support a variety of comparison operators that you can use to compare values. Here are some of the operators you can use: * **Equals**: Checks if the variable is equal to the value. * **Not equals**: Checks if the variable is not equal to the value. * **Contains**: Checks if the variable contains the value. * **Not contains**: Checks if the variable does not contain the value. * **Greater than or equals**: Checks if the variable is greater than or equal to the value. * **Less than**: Checks if the variable is less than the value. * **Less than or equals**: Checks if the variable is less than or equal to the value. * **Starts with**: Checks if the variable starts with the value. * **Ends with**: Checks if the variable ends with the value. * **Is empty**: Checks if the variable is empty. * **Is not empty**: Checks if the variable is not empty. ## Group and child conditions Conditions are grouped together to create complex logic using logical operators like "AND" and "OR". Every group contains one or more conditions that are evaluated together. Group and child conditions Conditions within a group are evaluated together to determine if the group is true or false. You can use logical operators such as "AND" and "OR" to combine conditions within a group. For example, you can create a group with two conditions and set it to "AND" to require both conditions to be true for the group to be true. On the other hand, you can set it to "OR" to require only one of the conditions to be true for the group to be true. By default, condition blocks have one group with one condition. To add additional groups, click the `Add group condition` button. ## Logical operators Logical operators are used to combine conditions within a group. You can choose from the following logical operators: * **AND**: Requires all conditions in the group to be true for the group to be true. * **OR**: Requires at least one condition in the group to be true for the group to be true. - Group 1: * Condition 1: Variable A equals 5 * Condition 2: Variable B equals 10 * Logical operator: AND - Group 2: * Condition 1: Variable C contains "hello" * Condition 2: Variable D contains "world" * Logical operator: OR In this example, Group 1 will be true only if Variable A equals 5 and Variable B equals 10. Group 2 will be true if either Variable C contains "hello" or Variable D contains "world". # Variable Source: https://docs.chatling.ai/builder/blocks/condition/variable Learn how to use the Variable condition block in Chatling The Variable condition block is used to compare a variable with a value or another variable. You can use it to create conditional logic in your bot based on user inputs, stored values, or system variables. ## Components of a variable condition Components of a variable condition * **Label**: A descriptive label for the condition, which will be displayed in the block on the canvas. This is optional and can be skipped. * **Variable**: The variable or value that the block will evaluate. The variable can be a user input, a stored value, or a system variable. * **Comparison operator**: The operator that the block will use to compare the variable with the value you specify. You can choose from a list of comparison operators, such as "equals," "greater than," "contains," etc. * **Value**: The value that the block will compare with the variable. This can be a static value or a variable for dynamic comparisons. ## Examples ### 1. Real estate bot In a real estate bot, you can use conditions to check if the user is looking to buy or rent a property and display properties accordingly. You can create two conditions: * Condition 1: User input contains "buy" * Condition 2: User input contains "rent" Here's how to set it up in the editor: Real estate conditions setup example Once you have set up the conditions, you can define the paths for each condition. Here's an example: Real estate conditions example Based on the above, here's how the bot will respond: * If the user input contains "buy," the bot will respond with `Great! Let me show you our available properties for sale`. * If the user input contains "rent," the bot will respond with `Sure! We've got amazing properties for rent. Here's the list`. * Else if none of the conditions are met, the bot will respond with `I'm sorry, I didn't understand. Please respond by typing "Buy" or "Rent"`. ### 2. Filtering job application candidates Let's say a candidate is applying for a job through the bot and you want to qualify them based on the following criteria: * Location: New York * Willing to relocate: Yes * Years of experience: 3 or more You can set up the following conditions: Job application conditions setup Once you have set up the conditions, you can define the paths for each condition. Here's an example: Job application condition block Based on the above, here's how the bot will respond: * If the candidate is from New York, willing to relocate, and has 3 or more years of experience, the bot will respond with `Congratulations! You've been shortlisted for the next round of interviews`. * Otherwise, the bot will respond with `Sorry, you are not qualified for this job opening. We'll keep your application on file for future opportunities`. # Create Company Source: https://docs.chatling.ai/builder/blocks/hubspot/create-company Create companies in HubSpot from your chatbot. Easily create new companies in HubSpot through your chatbot to streamline lead capture and keep your CRM up to date automatically. ## Configuration 1. Click the `Connect account` button under the Account field to connect your HubSpot account to Chatling or select an existing connection. 2. Under the `Company details` section, add the properties you want to set for the company. You can enter variables in certain fields for dynamic values. 3. To store the company's ID when the company is created, select a variable for the `Company ID` field under the `Save response` section. # Create Contact Source: https://docs.chatling.ai/builder/blocks/hubspot/create-contact Create contacts in HubSpot from your chatbot. Create contacts in HubSpot from your chatbot. This is useful for capturing leads and enriching your CRM data. ## Configuration 1. Click the `Connect account` button under the Account field to connect your HubSpot account to Chatling or select an existing connection. 2. Under the `Contact details` section, add the properties you want to set for the contact. 3. To store the contact's ID when the contact is created, select a variable for the `Contact ID` field under the `Save response` section. # Create Ticket Source: https://docs.chatling.ai/builder/blocks/hubspot/create-ticket Create tickets in HubSpot from your chatbot. Create tickets in HubSpot from your chatbot. This is useful for forwarding user queries to your support team or creating tickets for issues that require further investigation. ## Configuration 1. Click the `Connect account` button under the Account field to connect your HubSpot account to Chatling or select an existing connection. 2. Select the `Pipeline` where the ticket should be created. 3. Enter the ticket's details, such as the subject, status, and description. You can enter variables in all fields to make the ticket dynamic. 4. To store the ticket's ID when the ticket is created, select a variable for the `Ticket ID` field under the `Save response` section. # HubSpot Integration Source: https://docs.chatling.ai/builder/blocks/hubspot/overview Integrate with HubSpot and manage your contacts, companies, and tickets directly from your chatbot. The HubSpot integration enables you to connect your Chatling chatbot to your HubSpot account, allowing you to automate and manage key CRM workflows directly within conversations. With this integration, your chatbot can: * Create support tickets * Create, update, and retrieve contacts * Create and update companies This allows your team to capture leads, resolve issues, and enrich CRM data without leaving the chat interface. # Retrieve Contact Source: https://docs.chatling.ai/builder/blocks/hubspot/retrieve-contact Retrieve contacts from HubSpot to use in your chatbot. With this block, you can retrieve contacts from HubSpot and use them in your chatbot. ## Configuration 1. Click the `Connect account` button under the Account field to connect your HubSpot account to Chatling or select an existing connection. 2. The `Search method` determines how the contact is found in HubSpot. You can either search by the contact's ID or email address. You can enter variables to make the search dynamic. 3. Add the contact's properties you want to retrieve and select a variable for each property. # Update Company Source: https://docs.chatling.ai/builder/blocks/hubspot/update-company Update companies in HubSpot from your chatbot. Easily update companies in HubSpot through your chatbot to keep your CRM up to date automatically. ## Configuration 1. Click the `Connect account` button under the Account field to connect your HubSpot account to Chatling or select an existing connection. 2. The `Search method` determines how the contact is found in HubSpot. Currently, only searching by company ID is supported. 3. Add the properties you want to update for the company. You can enter variables in certain fields for dynamic values. # Update Contact Source: https://docs.chatling.ai/builder/blocks/hubspot/update-contact Update contacts in HubSpot from your chatbot. With this block, you can update contacts in HubSpot from your chatbot, for example to enrich your CRM data. ## Configuration 1. Click the `Connect account` button under the Account field to connect your HubSpot account to Chatling or select an existing connection. 2. The `Search method` determines how the contact is found in HubSpot. You can either search by the contact's ID or email address. 3. Add the properties you want to update for the contact. You can enter variables in certain fields to make the contact dynamic. # Buttons Block Source: https://docs.chatling.ai/builder/blocks/inputs/buttons Learn about the Buttons input block and how to set it up in the Builder. The Buttons block is used to display a set of buttons that users can click to trigger actions or provide responses. You can use this block to present multiple options to users and guide them through the conversation flow. Buttons block preview Every button in the block has a connector that allows you to link it to other blocks. # Configuration Buttons have the following configuration options: * **Label**: The text that appears on the button. * **Store selected button in variable**: The variable where the selected button's value will be stored. For example, if the user selects the "Yes" button, you can store the value "Yes" in a variable for later use. Input buttons block editor ## Connecting buttons Buttons must be connected to other blocks so that the chatbot can respond to the user's selection. To connect a button, click the connector next to it and drag it to the group you want to connect it to. In the example below, when the user clicks the "Software Development" button, the chatbot will display the "Sure thing! Our team can help..." message and continues the flow from there. Connect buttons # Date/Time Block Source: https://docs.chatling.ai/builder/blocks/inputs/date Learn about the Date/Time input block and how to set it up in the Builder. The Date/Time block is used to collect the date and time from users. You can use this block to ask users for dates, times, or date-time combinations. ## Configuration The Date/Time block has the following configuration options: * **Store answer in variable**: The variable where the user's input will be stored. * **Input required**: Whether the user's input is mandatory. If disabled, a Skip button will appear, allowing users to skip the input. * **Format**: The type of input the block will accept. You can choose from the following: * Date * Time * Date & Time * **Min**: The minimum value the user can input. * **Max**: The maximum value the user can input. Input date/time block editor # Email Block Source: https://docs.chatling.ai/builder/blocks/inputs/email Learn about the Email input block and how to set it up in the Builder. The Email block is used to capture a valid email address from the user. You can use this block to collect email addresses of users for various purposes, such as saving them as leads, sending newsletters, or providing account-related information. ## Configuration Input email block editor The Email block has the following configuration options: * **Store email in variable**: The variable where the user's email address will be stored. * **Input required**: Determine whether the user must provide an email address to proceed. If this option is disabled, a Skip button will appear, allowing users to skip the input. * **Disallowed domains**: Specify a list of email domains that are not allowed. Users will not be able to enter email addresses associated with these domains. * **[Quick replies](/builder/block-options/quick-replies)** # Form Block Source: https://docs.chatling.ai/builder/blocks/inputs/form Learn about the Form input block and how to set it up in the Builder. The Form block is used to collect multiple pieces of information from users in a structured way. You can use this block to create forms for lead generation, user feedback, surveys, and more. You can add multiple fields to the form and configure each field to collect different types of information, such as text, email, phone number, and more. Form block preview ## Configuration The Form block has the following configuration options: * **Fields**: Add and configure the fields you want to include in the form. * **Label**: The label of the field to indicate what information is being collected. * **Type**: Type of the field, such as Text, Email, Number, etc. This prevents users from entering invalid data. * **Store user input in variable**: The variable where the user's response to the field will be stored. Form block editor # Number Block Source: https://docs.chatling.ai/builder/blocks/inputs/number Learn about the Number input block and how to set it up in the Builder. The Number block is used to collect numerical input from users. You can use this block to ask users for numbers, such as quantities, prices, or percentages. ## Configuration The Number block has the following configuration options: * **Store answer in variable**: The variable where the user's input will be stored. * **Input required**: Whether the user's input is mandatory. If disabled, a Skip button will appear, allowing users to skip the input. * **Date type**: The type of number the block will accept. You can choose from the following options: * \*\*Number (Integer/Decimal): Accepts any number, including whole numbers and decimals. * **Integer**: Accepts only whole numbers. * **Min**: The minimum value the user can input. * **Max**: The maximum value the user can input. * **[Quick replies](/builder/block-options/quick-replies)** Input number block editor # Phone Block Source: https://docs.chatling.ai/builder/blocks/inputs/phone Learn about the Phone input block and how to set it up in the Builder. The Phone block is used to collect phone numbers from users. At the moment, the Phone block is not fully developed and doesn't have the ability to validate phone numbers or provide option for users to select their country code. We are working on improving this block and will update this documentation once the changes are live. # Text Block Source: https://docs.chatling.ai/builder/blocks/inputs/text Learn about the Text input block and how to set it up in the Builder. The Text block is used to capture user input in the form of text. You can use this block to prompt users for answers and collect the necessary information. ## Configuration Input text block editor You can configure the following settings for the Text block: * **Store answer in variable**: Choose a variable to store the user's response. You can use the stored data in other blocks to personalize the conversation. * **Input required**: Determine whether the user must provide an answer to proceed. If this option is disabled, a Skip button will appear, allowing users to skip the input. * **[Voice Input](/builder/block-options/voice-input)**: Toggle on the Voice Input option to allow users to send messages using voice. * **Min. characters**: The minimum number of characters the user must enter. * **Max. characters**: The maximum number of characters the user can enter. * **[Quick replies](/builder/block-options/quick-replies)** # URL Block Source: https://docs.chatling.ai/builder/blocks/inputs/url Learn about the URL input block and how to set it up in the Builder. The URL block is used to collect URLs from users. It validates the user's input to ensure that it is a valid URL. You can use this block to ask users for website URLs, social media profiles, or any other web addresses. ## Configuration The URL block has the following configuration options: * **Store answer in variable**: The variable where the user's input will be stored. * **Input required**: Whether the user's input is mandatory. If disabled, a Skip button will appear, allowing users to skip the input. * **[Quick replies](/builder/block-options/quick-replies)** Input URL block editor # Blocks Source: https://docs.chatling.ai/builder/blocks/overview Blocks are the core components of every chatbot. Learn how to use them to build your chatbot's conversational flow. With Blocks, you can build the conversational flow of your chatbot. They define the sequence in which the chatbot interacts with users and responds to their queries. You can add blocks to the canvas and connect them to create a flow. Each block performs a specific action, such as sending a message, capturing user input, or integrating with external services. Blocks menu ## Types of blocks Here are the different categories of blocks that are available: * **Send message**: Display messages to the user. * **Capture response**: Capture answers from the user, such as text, email, form submission, and more. * **AI**: Use AI to generate responses to user's questions. * **Condition**: Add conditions and logic to your flow. * **Action**: Perform actions such as sending emails, setting variables, and more. * **Trigger**: Trigger events automatically based on user's actions. * **Zendesk**: Connect your chatbot to Zendesk to create tickets. * **Cal.com**: Integration for Cal.com to book events and appointments. ## Groups Blocks can be grouped together for better organization and for creating connections between them. A group is created when you drop a block onto an empty area of the canvas. You can then drag other blocks into the group to organize them. Group blocks {/* ## Send message The `Send message` blocks are used to display messages to the user. You can use them to provide information, ask questions, or guide the user through the conversation. Here are some of the blocks available: - **[Text](/builder/blocks/send/text)**: Display a text message. - **[Image](/builder/blocks/send/image)**: Display an image. - **[Video](/builder/blocks/send/video)**: Display a video. - **[Audio](/builder/blocks/send/audio)**: Play an audio file. - **[Carousel](/builder/blocks/send/carousel)**: Display a carousel of cards. ## Capture response The `Capture response` blocks are used to receive input from the user. You can use them to capture text, email, phone number, and more. Here are the available blocks: - **[Buttons](/builder/blocks/inputs/buttons)**: Display a set of buttons for the user to choose from. - **[Text](/builder/blocks/inputs/text)**: Capture text input from the user. - **[Email](/builder/blocks/inputs/email)**: Capture a valid email address from the user. - **[Form](/builder/blocks/inputs/form)**: Displays a form for the user to fill out. - **[Phone](/builder/blocks/inputs/phone)**: Capture a valid phone number from the user. - **[Date](/builder/blocks/inputs/date)**: Capture a valid date from the user. - **[URL](/builder/blocks/inputs/url)**: Capture a valid URL from the user. - **[Number](/builder/blocks/inputs/number)**: Capture integer or decimal numbers from the user. ## AI The `AI` blocks are related to the AI capabilities of the chatbot. Here are the available blocks: - **[AI Response](/builder/blocks/ai/ai-response)**: Generate an AI response using the knowledge base or the AI model's pre-trained data. ## Logic The `Logic` blocks are used to add conditions and logic to your chatbot's flow. You can use them to create branches in the conversation based on user input or other conditions. Here are the available blocks: - **[Condition](/builder/blocks/logic/condition)**: Define the flow of the conversation based on a set of conditions. You can add multiple conditions and define the actions to be taken for each condition. ## Integration The `Integration` blocks are used to connect your chatbot to external services. Here are the available blocks: - **[HTTP Request](/builder/blocks/integration/http-request)**: Send an HTTP request to an external web service and process the response. To add a block, open the Blocks menu from the sidebar and drag the desired block onto the canvas. ![Builder interface](https://chatling-assets.b-cdn.net/Drag%20blocks.gif) You can then connect the blocks by dragging the connectors between them. This defines the sequence in which the blocks are executed during the conversation. ![Builder interface](https://chatling-assets.b-cdn.net/connect-blocks-1.gif) */} # Audio Block Source: https://docs.chatling.ai/builder/blocks/send/audio Learn about the Audio block and how to set it up in the builder The Audio block allows you to play an audio file to the user in the conversation. It can be used for various purposes, such as playing a welcome message, providing information, or playing music. ## Adding an audio file To add an audio file, you can either upload an audio file directly or provide a link to a file hosted online. The supported audio formats are `MP3`, `WAV`, and `OGG`. Audio block editor You can enable the `Autoplay` option to automatically play the audio file when the block is displayed to the user. # Carousel Block Source: https://docs.chatling.ai/builder/blocks/send/carousel Learn about the Carousel block and how to set it up in the builder The Carousel block allows you to display a carousel of cards to the user. Each card can contain an image, title, description, and buttons. Carousels are a great way to showcase multiple products, services, or information in a visually appealing format. ## Adding a carousel To add a carousel, you can create multiple cards within the block editor. For each card, you can set an image, title, description, and buttons. You can add as many cards as you like to the carousel. Users can swipe through the cards to view the content. Carousel block editor # Image Block Source: https://docs.chatling.ai/builder/blocks/send/image Learn about the Image block and how to set it up in the builder You can use the Image block to display an image to the user. It can be used for various purposes, such as showing product images, providing visual instructions, or adding visual elements to your chatbot conversation. ## Adding an image You can upload an image or insert its URL. The support image formats are `JPG/JPEG`, `PNG`, `WEBP`, and `GIF`. Image block editor # Text Block Source: https://docs.chatling.ai/builder/blocks/send/text Learn about the Text block and how to set it up in the builder The Text block is used to display a text message to the user. You can use it to provide information, ask questions, or guide the user through the conversation. ## Adding text Once you add a Text block to the canvas, click on it to open the block editor. You can then enter your message in the text editor and apply formatting using the toolbar. Output text block editor ## Inserting variables You can insert variables into your text message to make it more dynamic and personalized. To insert a variable, type `{` and a list of available variables will appear. Select the variable you want to insert and it will be added to the text message. Insert variable For example, if you have captured the user's name earlier in the conversation and stored it in a variable called `contact_name`, you can insert it into the text message by typing `{contact_name}`. When the message is sent to the user, the variable will be replaced with the user's name. output user's name within the text # URL Button Block Source: https://docs.chatling.ai/builder/blocks/send/url-button Learn about the URL Button block and how to set it up in the builder The URL Button block displays buttons that redirect users to other pages. ## Adding URL buttons 1. Drag and drop the URL Button block on the canvas. 2. Click on the block to edit it. 3. Click `Add button` button to add a new button. 4. Enter the button label and URL. The label is the text that will be displayed on the button. 5. To add more buttons, click the `+` icon. # Video Block Source: https://docs.chatling.ai/builder/blocks/send/video Learn about the Video block and how to set it up in the builder The Video block allows you to display a video to the user in the conversation. You can add a video from YouTube, Vimeo, or any other video hosting platform, or you can paste the direct link to a video file. For video platforms that support embedding, Chatling will automatically embed the video in the conversation. Here's an example: ## Adding a video Adding a video is simple. Just paste the URL to the video in the block editor and the chatbot will automatically embed it in the conversation. # Triggers Source: https://docs.chatling.ai/builder/blocks/trigger/overview Learn about triggers in Chatling and how to use them effectively in your chatbot flows. Triggers are events that automatically start a specific flow in your chatbot based on user behavior. They enable you to create more dynamic and responsive chatbot experiences. ## Types of Triggers The following triggers are currently available: 1. Returning Visitor: This trigger is activated when a visitor returns to your website after a period of time. 2. Specific Webpage Opened: This trigger is activated when a visitor opens a specific page on your website. 3. Intent: Triggered when there's a matching intent in the user's message. ## How Triggers Work Triggers are automatically invoked when their conditions are met. When a trigger is activated, the chatbot will follow the conversation flow connected to that trigger in the builder. For example, if you have a "Returning User" trigger set up, and a user comes back to your website after being away for a certain period, the chatbot will automatically start the conversation flow linked to this trigger. ## How to Use Triggers To use triggers in your chatbot: 1. Open your chatbot builder. 2. From the Blocks page in the sidebar, look for the "Triggers" section. 3. Drag and drop the desired trigger onto your canvas. 4. Connect the trigger to the subsequent blocks in your conversation flow. 5. Configure the trigger settings if necessary (e.g. specifying the trigger frequency). # Create Ticket Source: https://docs.chatling.ai/builder/blocks/zendesk/create-ticket Learn how to create tickets in Zendesk from your chatbot. Create tickets in Zendesk directly from your chatbot using this block. This is useful for forwarding user queries to your support team or creating tickets for issues that require further investigation. ## Configuration * **Account**: The Zendesk account to create the ticket in. * **Subject**: The subject of the ticket. * **Priority**: The priority of the ticket, such as Low, Normal, High, or Urgent. * **Requester name**: The name of the user who should be associated with the ticket. Normally, this should be the customer's name. * **Requester email**: The email address of the user who should be associated with the ticket. Normally, this should be the customer's email address. * **Description**: The description of the ticket. # Canvas Source: https://docs.chatling.ai/builder/canvas Learn about the canvas and how to navigate and interact with it. ![Builder interface](https://chatling-assets.b-cdn.net/canvas.png) The canvas is where you design the conversational flow of your chatbot. You can add [blocks](/builder/blocks/overview), connect them, and define the logic for how the chatbot responds to user inputs. To move around the canvas, click and drag an empty area. To zoom in or out, use your mouse scroll wheel or the zoom controls in top toolbar. All chatbots contain a default `Start` block, which is the entry point of the conversation. From there, you can add blocks to create the flow. # Chatbot Builder Source: https://docs.chatling.ai/builder/overview Learn about the Builder and how to create conversational flows for your chatbot. Chatling's Builder is a visual interface that allows you to create and manage conversational flows for your chatbot. It's where you define how the chatbot interacts with users and responds to their queries. ## Builder Interface ![Builder interface](https://chatling-assets.b-cdn.net/chatling-builder-interface.jpg) The Builder consists of the following components: * **[Canvas](/builder/canvas)**: The main area where you add and connect blocks to build the conversational flow. * **[Sidebar](/builder/sidebar)**: Contains menus for adding blocks, managing variables, and configuring the AI and general settings. * **Toolbar**: Appears at the top and contains controls for zooming in/out, saving, preview, and publishing the chatbot.