# yellow.ai > Conversational AI cloud for all This file contains all documentation content in a single document following the llmstxt.org standard. ## Best practices & effective testing of a Gen AI bot ## Best practices to build a Gen AI bot You can improve your bot by focusing on **Prompting**, **Designing conversations** and **Model selection**. ### Prompting - Keep prompts precise and to the point. - Provide detailed examples to guide the bot (a few short examples are effective). - Avoid ambiguous or open-ended statements. - Refrain from repeating the same instructions multiple times. - Clearly scope the prompt to define its boundaries. - Include examples of how the output should be formatted. ### Designing conversations - Focus on one goal per conversation. Use separate goal nodes for multiple goals. - Limit user inputs to around 5 to avoid confusion. - Avoid adding too many skills, as this can complicate the goal. - Provide ample context about the domain and company within the goal. - Clearly define the bot’s persona. ### Model selection - Avoid generating facts from the model. - Set the temperature to a low range (0 - 0.5) for more predictable responses. - Limit the number of tokens to improve response speed and reduce costs. - Consider using GPT-4O over GPT-4 for complex use cases due to its lower latency and cost-effectiveness. ------- ## Testing GenAI bots Follow these steps to test GenAI bots efficiently: - **Create Test Cases**: Develop at least 100 test cases to cover various scenarios. - **Conduct Bulk Testing**: Execute bulk tests for these 100 queries to evaluate overall performance. - **Evaluate Knowledge Base Performance**: Aim for 80% of queries to be answered correctly if the knowledge base is well-implemented. - **Manually Test Agent/Conversations**: Perform manual testing for conversational agents to ensure nuanced interactions and accuracy. --- ## GenAI bot development lifecycle ## Guidelines to create an effective GenAI bot 1. **Define target audience and major goals**: Understand who your bot is for and what its core objectives are. Categorize these objectives into static or dynamic flows. 2. **Evaluate each flow and select tools**: Analyze each flow's requirements and choose appropriate tools. Start by testing one major flow with different models to establish an MVP, setting the right expectations early. 3. **Prioritize and manage trade-offs**: For cost-sensitive projects, prioritize critical dynamic flows and be ready to simplify or fallback less important flows to static options or Gen AI. 4. **Leverage GPT-3.5 models for dynamic flows**: Where possible, use GPT-3.5 models for dynamic flows to balance performance and budget. 5. **Play to LLM strengths**: Use large language models for tasks that highlight their strengths. Avoid expecting them to perform tasks where they struggle. 6. **Use Knowledgebase (KB) for Q&A**: If your bot includes question-and-answer capabilities, leverage a Knowledge Base for structured, reliable responses. 7. **Evaluate language constraints early**: Assess language limitations and model capabilities upfront to ensure they align with your bot's requirements. 8. **Customer expectations and education**: Setting the right expectations and educating customers on the capabilities and limitations of LLM-based bots is just as important as the technical aspects. 9. **Focus on iteration and testing**: Building the initial Gen AI flow may be fast, but iterating can be time-consuming. Plan for testing and refinement, and consider launching in phases for complex goals. 10. **Compare models before committing**: Test different model versions against your use case before investing too much time. Expect to make adjustments along the way. ![image](https://imgur.com/bQyRkxV.png) ## Selecting Gen AI tools Use the following table to determine the **best Gen AI tool** for your needs: | **Customer Requirement** | **Suggested Tool/Flow** | |---------------------------|-------------------------| | You want to answer from your website & documents without hallucination | KB with in-house LLM | | You need to answer from your website & documents with a customized persona | KB with GPT | | You have multi-turn conversations and want dynamic paths on a lower budget | Dynamic flows with GPT-3.5* (comes with tradeoffs) | | You have multi-turn conversations with a lot of API calling, instructions, and want flawless handling of many cases | Dynamic flows with GPT-4O, 4, 4 turbo | | You need specific flows with limited input from your end | Static flow | | You want interactive button-based & different visual elements for a specific channel | Pick a static flow (but be clear on limitations) | | You want interactive button-based visual elements with a mix of handling flexible conversations | Dynamic flows with GPT-4 variants (Currently quick reply rich media available*) OR keep dynamic flows as fallback to static flows | | You need to search from a structured database (like products) and answer queries | Product search or Database search + entities to autoskip static flows | | You want to handle one-level prompt with dynamic validations & replies | Prompt executor | | You want to leverage the power of LLM for internal workflows (Non-conversational use case) | LLM integration node / custom API | | You want better intent identification with low training effort | OrchLLM > NLU | | You want flexibility in handling fallback based on different cases | OrchLLM for more flexibility or design flexible static fallback when limited cases | | You want a specific agent persona and consistent talking style throughout the bot | OrchLLM persona definition for more flexibility / a mix of custom conversation design vs Gen AI elements (At individual elements, goals can also have persona) | | You want a multi-lingual bot | Decision based on use case, check KB language list for in-house / For external LLM, check how well LLM works with your language choice | --- ## Common challenges of Gen AI bots Gen AI/LLMs are powerful tools with their own set of advantages and limitations. When not used correctly, they present challenges. ## LLMs challenges - **Citing sources**: LLMs often struggle to cite sources accurately, which can lead to fabricated references. - **Bias**: LLMs may produce biased responses, reflecting prejudiced or stereotypical views. - **Hallucinations**: LLMs can confidently generate incorrect or misleading information when they cannot answer a question accurately. - **Mathematics**: LLMs frequently provide incorrect answers to mathematical questions, as they are primarily trained on text data. However, newer models are improving in logical reasoning. - **Prompt hacking**: Users can exploit prompt hacking techniques to induce inappropriate or undesirable content from LLMs. ------ ## Dynamic flow challenges ### Picking the right model by evaluating early - **GPT-3.5/GPT-3.5 Turbo**: More cost-effective but may exhibit hallucinations, especially with non-specific instructions. They can support 1-2 workflows stably, plus a knowledge base workflow, but may still show some level of hallucination. - **GPT-4**: Handles 8-10 workflows comfortably and is better for complex cases. Upgrading to newer models when needed can save time and effort. - **Complex Cases**: GPT-3.5 or older models may struggle with complex scenarios. If issues persist, consider upgrading to a newer model. - **Dynamic Chat Nodes**: If using GPT-3.5 models, ensure specific points for completion versus continuation. Adding dummy inputs may help manage unexpected exits. - **Rich Media**: Features like rich media and quick replies are only available for GPT-4. While they can be enabled for lower models, they may not perform as expected. - **Workflow Combination**: Combine workflows in a sequence as INPUT → WORKFLOW → OUTPUT. For example, if two APIs need to run sequentially without intermediate data, combine them into a single workflow. :::note It’s crucial to understand use cases, budgets, and context to select the right model. Higher cost does not always equate to better performance for every use case. GPT-3.5 may not be suitable for complex scenarios with many workflows. You can use different models in different nodes within the same bot, but select GPT-3.5 only for very simple use cases or if cost is a significant constraint. ::: ### Prompt testing and iteration - **Iterations**: Multiple iterations may be necessary to craft an effective prompt. - Avoid assuming prompt behavior. Clearly specify what should happen if things deviate from expectations. - Keep test cases handy for each iteration to ensure thorough testing. - **Live Performance**: Your prompt might not always perform perfectly in live scenarios. - Issues may arise if edge cases weren't tested or if there's a mismatch between user expectations and the use case. - Be prepared to iterate during the initial days of go-live to refine your prompt. - Gen AI is not infallible but can handle more cases than static flows. Build customer confidence by addressing these issues promptly. ### Dynamic flows may not be the right tool for your bot/flow Understand where dynamic flows fit best and select your tools wisely. > For a detailed understanding of dynamic nodes and their suitability, refer to [this documentation](https://docs.yellow.ai/docs/platform_concepts/studio/dynamicchatnode). ----- ## Knowledgebase challenges - **JavaScript-rendered Content**: Some web pages use JavaScript to render content, which can be challenging for crawlers like Yellow and Google to access. In these cases, integrating with the source data via CMS or customer APIs is recommended. - **Selective Indexing**: Only index the necessary web pages from a domain to avoid including irrelevant information. For example, search only specific support pages rather than the entire domain. - **Crawler Restrictions**: Some domains prevent indexing through services like Cloudflare. Customers need to allowlist Yellow’s IP for data ingestion. - **No OCR Support**: Images and videos cannot be processed for text extraction. - **Links in Responses**: Generated responses cannot include clickable links, as LLMs may miss critical characters that break the link. - **Gated Webpages**: Currently, there is no support for indexing gated webpages. Consider using CMS or API approaches instead. - **Complex Tables**: - Tables with merged columns/rows and structured relationships between cell values and headers can be difficult to process. - Excel-like filters may be needed for effective searching. - Long entity values (e.g., part numbers) are challenging to search due to their similarity with other parts. - **Duplicate or Conflicting Knowledge**: Duplicate or conflicting information from the same or different sources can result in cluttered search results. - **Contextual Relationships**: If a topic’s context is in the title while related paragraphs are placed apart, the system may struggle to establish the connection. We are working on improving this at the parser level to enhance performance. --- ## Troubleshooting Gen AI bots The key to troubleshooting bots is identifying the issue. Once identified, you can either retrain the bot with new input or adjust its existing text and parameters for improvement. ## Navigate to platform logs 1. Open **Automation > Build** and **Preview** the bot. 2. Click the debugger icon to open the console logs. 3. Click **Refresh** to view real-time logs. 4. Review all logs. Click the logs icon to read the log files. ![image](https://imgur.com/z2tVf17.png) ------ ## Troubleshooting OrchLLM issues 1. **Verify inputs to the OrchLLM**: Access this log from [OpenAI] Request details. - Check if the correct user history is passed to the model under messages. - Verify that model parameters are correct, such as setting a lower temperature for more contained responses. 2. **Verify the response from the model**: Access this log from [Yellow LLM Agent] Model output. - **Tools**: Identify the model's prediction. - **Reasoning**: Evaluate why the model chose a particular tool. - **Response**: Check the final response generated by the model for small talk and general queries. ----------- ## Troubleshooting KB issues Common Knowledgebase(KB) issues include: 1. A query like “xyz” has information in a file/webpage, but it’s not getting answered. 2. A query like “xyz” was answered previously but is not being answered now, indicating an intermittent error. 3. After publishing, the KB is not working as expected. 4. The sandbox KB response differs from the staging KB response. For further evaluation, consider the following: ### Identify if it’s a KB issue 1. **Check Conversation Logs**: Look for the KB Response node. ![image](https://imgur.com/RBrGD9W.png) 2. **Verify Query Reach**: Visit **Data Explorer > Knowledge Base report** 30-45 seconds after the query. If the query has reached the KB, you should see a row with the query, search results, and response. ### Components to check You must check the input, the search results generated by the KB, and the final response. #### Input - Query - Conversation history (rephrase query) - Site key (optional, for Bing search websites) - Tags (optional, for file tags) - Search confidence (default is 0.5) - Model type (optional, with InHouse LLM) source - Knowledge version ![image](https://imgur.com/ZTb7CwG.png) #### Search - Does the answer exist in the KB index? - Is the relevant paragraph among the top 20 results for that query (check the KB report)? - Is the paragraph LLM-friendly (e.g., does it contain table data)? - What is the position of the knowledge? - Has the knowledge version changed? - Are there conflicting or similar results? ![image](https://imgur.com/U5P25kV.png) #### Response - The final output from the response model is shown as the answer. - Depending on use-cases, you can change the background model and prompt it to follow custom rules. Note: This has implications for cost and hallucination. - Rules cannot be defined here; it’s a prompt that requires iterations. > Refer to [this document](https://docs.yellow.ai/docs/platform_concepts/studio/kb/confgure-response) for details. ![Reference](https://lh7-rt.googleusercontent.com/slidesz/AGV_vUdEzth0xdg0iHgS7SKdpPLmLfW0mWdUAFpg_SR0no-eiycQ9k9W_ftgYEKfx98IOcKV9-mgPYKgmPL4l2CglE05-Xp3dcwCIvQ2f1mGeMNao5nNPuT0pF-cJbg4_3FQk_vQRlBtAxeiYV2S7fl52ixbi_0JjQ2e=s2048?key=wWuR_3hPrJamKUizdrJUXw) -------- :::info **Troubleshooting Reference Docs** 1. [How to use KB report](https://docs.yellow.ai/docs/cookbooks/insights/kbdebugging) 2. [How to write KB prompts](https://docs.yellow.ai/docs/platform_concepts/studio/kb/confgure-response) 3. [What is a sitemap.xml](https://www.semrush.com/blog/website-sitemap/) ::: --- ## Handling Gen AI Knowledgebase(KB) With Gen AI Knowledge Base(KB), inputting a website URL or any data source into the knowledge base automatically creates a customized bot. > For more information on KB, refer to [this documentation](https://docs.yellow.ai/docs/platform_concepts/studio/kb/overview). The following table provides you with the insights on when to use KB and when not: | **When to use KB** | **When not to use KB** | |--------------------|------------------------| | To show the information that you feed the feed the bot through links or uploaded docs | For structured/relational data searches like a database or Excel sheet | | To generate a response from unstructured data | For recommending/promotional use cases | | To provide instant answers to user queries from the knowledgebase (that is, generate dynamic responses) | If you need very specific keywords used in the answer | ## Data ingestion methods to optimize KB responses In addition to the quick setup of a [knowledge base](https://docs.yellow.ai/docs/platform_concepts/studio/kb/overview), there are several methods to enhance its performance, improving the tone, complexity, and precision of generated answers: ### Web ingestion Choose specific subdomains to include or exclude from your domain. You can perform web ingestion using methods such as Sitemap.xml (preferred), in-house crawler, or Bing search engine (add-on). :::note - For websites with regularly updated pages, ensure there is a sitemap.xml with mandatory details like [url, lastmod]. - For use cases requiring real-time data (e.g., prices, dates, schedules, event information), avoid web ingestion. Use CMS or custom APIs instead. If the website is managed with a Content Management System (CMS), integrate the KB directly with the CMS. ::: ### Add documents You can upload documents with a maximum of 25,000 pages per bot (approximately 1,000 files with 25 pages each). :::note - OCR support is not available. That is, images and other file or links within the document will not generate any response. - English and Bahasa languages are benchmarked and supported. Other languages should be tested at scale (200 queries) by pre-sales before committing. ::: ### Ingest data from 3rd party sources - Zendesk KB - Confluence pages - SharePoint folders - Amazon S3 buckets - Salesforce KB - Google Drive - ServiceNow KB ### Add tags Tag knowledge optimally to refine searches based on audience. For example, in an Edtech platform, upload documents tagged for students and parents separately. When a parent queries the bot, it pulls from parent-specific documents, while a student’s query retrieves student-focused content. Use tags like *audience:student* and *audience:parent* to filter responses effectively. --- ## Gen-AI OrchLLM ## OrchLLM overview Orchestrator LLM (Large Language Model) is our in-house, fine-tuned conversational AI model designed to enhance chatbot capabilities by orchestrating multiple goals within a single conversation. OrchLLM acts as the governing system for deciding which tools to use for each user action, ensuring tailored, holistic conversations. It is particularly useful for improving broken or fragmented conversations. > For more details, refer to [this documentation](https://docs.yellow.ai/docs/platform_concepts/studio/train/orchllm). **Benefits of OrchLLM**: * Enhanced intent identification * Retains context throughout the conversation window * Eliminates the need for extensive bot training—just feed simple descriptions * Enables more human-like, focused small talk ![image](https://imgur.com/U7JVBj5.png) ---------- ## Writing effective OrchLLM triggers When adding trigger descriptions, keep the following in mind: * Your description will be part of a prompt, so ensure it's neither too long nor too short. * Avoid mentioning example utterances—only include descriptions. Exceptionally, one or two utterances can be added. * Clearly state when to trigger and when not to trigger. * You don’t need to include all keywords, but ensure clarity. * Avoid leaving unused triggers, as this unnecessarily increases prompt length and cost. **Examples of good and bad triggers**: ![image](https://imgur.com/tOBCU3J.png) ![image](https://imgur.com/cl8Tjqw.png) --------- ## Testing OrchLLM * Review [conversation logs](https://docs.yellow.ai/docs/platform_concepts/analyze/chat-logs) when the bot gives an unexpected response. * Check the reasoning in the output log (under content) and adjust the description or prompt as needed. * If hallucinations occur repeatedly, report them. **Example**: Open the logs and check the tool or reasoning behind the bot's response. If the output is unexpected, review the tool, reasoning, or response (for small talk) and update the trigger descriptions or fine-tune the bot accordingly. ``` "content": "{\n \"tools\": [\"compensation change\"],\n \"reasoning\": \"The user request is about changing the compensation of an employee which aligns with the tool 'compensation change'.\",\n \"response\": \"\"\n}", ``` **![](https://lh7-rt.googleusercontent.com/slidesz/AGV_vUfWwQG0-3AKdIC2Ejf8EMFLosCe2s2iZf3OCtT2hh94hmXdneVlQJ7vFp3HvjJOWdhyz_Q48Q8jkZHw3S6FjTw1CodrSds2fbfzSmpvNo8s0sfpqW0242uCKQotjsQRLE6XBaRW2FDa1-e-4x-msxuALynQmWsA=s2048?key=wWuR_3hPrJamKUizdrJUXw)** --------- ## Things to consider before building an OrchLLM bot To build tailored conversations, follow these: * Define your bot’s persona carefully, specifying what it can and cannot do. * Move FAQs to the knowledge base—avoid adding large numbers of FAQs directly into the OrchLLM prompt. * OrchLLM works best with 20-30 triggers or flows. * When migrating intent-based bots to OrchLLM, summarize intents into concise descriptions. * If you enable OrchLLM in the sandbox environment, remember it will automatically be pushed to higher environments upon publishing. -------- ## Limitations of OrchLLM V1 (GPT-4o/4/3.5) - Negation of intents won’t work unless explicitly specified in the prompt (e.g., “I don’t want a demo”). - Contextual questions like "Why do you need my email?" may not be handled and will trigger fallback responses. - No disambiguation support. - Conversation history is cleared upon clicking "home" and automatically after 24 hours. - Incompatible with mother-child Orch bot architecture. - Currently available only in English. - **Nodes where OrchLLM doesn’t work**: - Input to *store comment* node is not considered for switching. - *QR button* clicks won’t trigger switching if there's an outward connection from the button. - *Goal nodes* are excluded from switching. --- ## Gen-AI Advanced level In this section, you will learn about: - GenAI bot development lifecycle - Common challenges faced when using Gen AI bots - Best practices for building a successful Gen AI bot - Troubleshooting a Gen AI bot for optimal performance :::note To request any feature mentioned in this document, please create a ticket or contact the support team. ::: --- ## Gen-AI (Beginner level) Generative AI is an artificial intelligence system used to create content such as text, images, audio or code based on input or instructions (prompt) provided by users. ![](https://imgur.com/HhmgVug.png) **Examples of Generative AI:** * **ChatGPT**: A text-based generative AI model that can generate human-like text, answer questions, and write articles or stories based on user prompts. * **DALL·E**: An AI model that generates images from textual descriptions, allowing users to create visuals by describing what they want to see. * **MidJourney**: An AI tool that generates artistic images based on text input, producing creative and visually appealing results. ### What is a Model? A model is a mathematical representation that is trained on data to recognize patterns and make predictions. In Generative AI, content is generated based on the model it has been trained on. ![](https://imgur.com/rprQbNA.png) #### How does the Models learn data For example, imagine teaching a computer to recognize handwritten numbers like "1," "2," and "3." You show it each number and tell it what it is. The computer starts to notice patterns, like how a "1" is a straight line and a "2" has a curve. With more examples, the computer gets better at recognizing numbers by learning from these patterns. ### Understanding terminologies of GenAI #### Neural network A neural network is a basic building block of deep learning. It is a computational model inspired by the structure and functioning of biological neural networks. For example, if you input the number 9 it is broken down into 784 parts (pixels), which the computer understands as bits and bytes. The model analyzes these pixels to understand and predict the output. #### Deep Learning Deep learning uses neural networks with multiple layers to learn complex representations of data. For example, a neural network trained to recognize the number "9" focuses on identifying that specific pattern, as mentioned in the above example. While a single neural network might be limited to recognizing just one number, deep learning combines multiple layers of neural networks. Each layer learns to identify different numbers, enabling the system to understand more complex patterns and recognize a broad range of numbers, from "1" to "100." #### Tokens A token is an individual entity a model can understand. It can be a word, character, part of a word, or even a whole phrase. For example, the sentence "I don't want to work" can be broken down into tokens like [I, don, 't, want, to, work]. #### Parameters (13B model , 70B model) The "13B" or "70B" refers to the number of adjustable parameters in the model. Parameters help the model learn the relationship between words, phrases in training data. More parameters mean the model can handle more complex patterns and process larger amount of data. #### Context Context is the information or text provided to a model to help it understand and respond to users. It is like giving the model clues about the topic. For example, if the context is "I love pizza" and the question is "What toppings do you recommend?", the model uses the context to provide relevant topping suggestions. #### Transformers Transformers are a type of technology used in language models to understand and generate text. Models like ChatGPT, LLaMA, and Bard are built using this technology. #### Hallucinations Hallucinations are when the model makes up information or provides incorrect information. For example, if user asks "Who invented the telephone?" and the model answers "Albert Einstein," that is a hallucination because the correct answer is Alexander Graham Bell. #### Prompt A prompt is the text or question you provide to a language model to start a conversation or get a response. Example: "Tell me a story about the moon." #### Pretrained models Pretrained models are machine learning models that have been trained on large datasets to perform general language understanding tasks, such as text generation or question answering, before being fine-tuned for specific applications. Example: Bert, GPT, Llama. #### Fine Tuning Fine-tuning is the process of taking a pretrained model and refining it with a smaller, domain-specific dataset to adapt it to a particular task or domain. This process improves the model's performance on specific tasks. Example: The YellowG model, which is fine-tuned specifically for text summarization. ## LLM LLM (Large Language Model) is a type of Generative AI focused on text-based data. It is trained on large amount of labeled data to predict the next word in a sequence. Examples: Chat GPT, Bard, Komodo ### Multi-modal LLM Advanced AI systems that handle and integrate various types of data, such as text, images, audio, video, and context-aware interactions. Input and output are of different modalities: i. **Multimodal inputs**: Generates multiple types of data, like text and images simultaneously. ii. **Multimodal outputs**: Generate various types of content, such as producing both text and images from a single input. ### How LLMs are trained? Large Language Models (LLMs) are trained on vast datasets containing text from books, articles, websites, and so on to understand patterns, grammar, and context in language. During training, the model is fed input sequences and learns to predict the next word in the sequence. **Sample training data** * Johnny likes apples * Sally loves apples * Johnny and Sally are friends * Friends share their favorite fruits * Apples and oranges are both fruits **Example training sequence**: Input | Output ------|------- Johnny | Likes Johnny likes | apples Johnny likes apples | EOS (End Of Sentence) This process is repeated across large amounts of text data to allow the model to learn language patterns. ### How LLMs work? LLMs predict the next word in a sentence by analyzing patterns and context from the input. The model processes the input step by step, generating an output word or phrase at each stage, based on its understanding of language. **Example:** **Input:** What do Sally and John share? **Output**: Sally and John share apples. **Examples of tasks LLMs can perform:** * Writing > Suggest three names for our analytics platform. Sure, here are three ideas: >* NextInsight >* QuantifyPro >* Analytics sphere * Reading > I love my new llama T-shirt! The fabric is so soft. Complaint : No Department: Apparel * Chating >Bot: Welcome to Yellow.ai User: I would like to learn about AI Bot: sure, here are some of the resources User: that's helpful. Thank you. ### Difference between Generative AI and NLP Generative AI | NLP (Intent) solution --------------|--------------------- Generates personalized and dynamic responsess | Uses predefined conversation paths Handles diverse contexts | Ensures zero hallucinations (important in fields like healthcare) Supports complex language understanding with multiple languages | Low cost ### Sample non-Gen AI conversation flow (Intent-based flow) In an intent-based flow, the bot follows a predefined sequence of steps without understanding the full context or handling variations in user responses. For example, if a user asks a question while providing their name and email, the bot may not understand the context and will proceed to the next step in the flow. To overcome these limitations, you can use Yellow.ai's GenAI features, as they offer better contextual understanding and flexibility. **Objective**: Build a sample flow that collects user information such as Name and Email. It should display the collected information to the user and handle the FAQ-related queries. #### Create Non-GenAI flow To create a non-GenAI flow, follow these steps: 1. Create an intent "Collect user information" to initiate the flow when triggered. ![](https://imgur.com/RfVxNXQ.png) 2. Select the start trigger type (Intent) as the "Collect user information". ![](https://imgur.com/rXVToTF.png) 3. Build the Flow using Nodes to collect the following: i. Ask for name: "Can you please tell me your name?" ii. Ask for email: "What is your email address?" ![](https://imgur.com/uoW7TrC.png) 4. Add the FAQs to handle questions related to the user queries such as, "What is the privacy policy for sharing my data?", "How can I update my email information?". ![](https://imgur.com/XY83VLv.png) 5. Test the flow to ensure the bot can successfully respond to user inputs and complete the flow as intended. ### Challenges with intent based bots * **Limited contextual understanding**: Intent-based bots struggle to understand contexts beyond predefined intents, leading to inaccurate or irrelevant responses. **Example**: Can you tell me why you are collecting my details?. * **Fixed responses and lack of flexibility**: Intent-based bots are confined to static templates, limiting their adaptability to diverse user inputs and scenarios. **Example**: User provides an email address in a different format. * **Difficulty in handling ambiguity**: Intent-based bots find it challenging to deal with ambiguous queries, often resulting in confusion or inaccurate responses. **Example**: User provides both email and name in the same query * **Scalability and maintenance issues**: Intent-based bots require frequent updates and maintenance to accommodate new intents and variations, leading to scalability and operational challenges. **Example**: You want to add a new intent and modify the existing intent. * **Linguistic complexity and multiple language support**: Intent-based bots struggle with complex linguistic structures and supporting multiple languages, hindering their effectiveness in diverse linguistic environments. **Example**: Expanding the language capabilities of bot to non-English * **Difficulty in addressing FAQs efficiently**: Intent-based models needs to be trained on all the knowledge sources manually and configure the responses with predefined static responses. **Example**: Need to upgrade the bot with the company new policy document. ## Yellow.ai GenAI features 1. **[Dynamic chat node](https://docs.yellow.ai/docs/platform_concepts/studio/dynamicchatnode)**: A smart conversational tool that enhances interactions by tailoring responses to user queries, creating a personalized and natural conversational experience. 2. **[Document Cognition - KB search](https://docs.yellow.ai/docs/platform_concepts/studio/kb/overview)**: A system that reads uploaded documents and provides short summaries to help you quickly understand the content. 4. **[Orchestrator LLM](https://docs.yellow.ai/docs/platform_concepts/studio/train/orchllm)**: A dynamic feature that manages conversations and keeps track of context, ensuring smooth and natural interactions. 5. **Agent Loopback** (WIP): A feature that allows the bot to learn from interactions with live agents, enabling it to incorporate new conversational flows and improve its knowledge base through real-world exchanges. ## Generative AI use cases ![](https://imgur.com/E1KqZPC.png) Following are the some of the use cases of Generative AI: 1. **Text** i. **Note taking**: Automatically summarizes key points from meetings. ii. **General writing**: Generates articles, blogs, or reports based on prompts. iii. **Support** (Chat/Mail): Responds to customer queries through chat or email. iv. **Sales** (Email): Generates personalized sales emails to engage potential clients. v. **Marketing** (Content): Creates marketing content for social media posts. 2. **Code** i. **Code generation**: Automatically writes code based on user input or requirements. ii. **Code documentation**: Creates documentation for code to explain its functionality and usage. iii. **Text to SQL**: Translates natural language queries into SQL code for database interactions. iv. **Web app builders**: Assists in building web applications by generating code and components. 3. **Image** i. **Image generation**: Creates images from text descriptions or prompts. ii. **Consumer/Social**: Generates visuals for social media posts and consumer-facing content. iii. **Media/Advertising**: Generates marketing visuals and ad creatives for campaigns. iv. **Design**: Assists in designing graphics, logos, and other visual elements. 4. **Speech** i. **Video synthesis**: Creates videos based on audio or text inputs. 5. **Video** i. **Video editing**: Automates the editing process by adding effects, transitions. ii. **Video generation**: Creates videos from text prompts or other inputs. 6. **3D** i. **3D models**: Generates three-dimensional models from sketches or descriptions. ii. **3D scenes**: Creates complete 3D environments and scenes for use in games, simulations, or VR ## Challenge/Limitations of GenAI 1. **Knowledge Freeze** **Challenge**: Large Language Models (LLMs) are trained on a fixed dataset, meaning their knowledge becomes frozen at the time of training and may not reflect real-time information or developments. **Example**: If an LLM was trained in 2020 and a user asks about a recent news event in 2023, the model may lack accurate information on the topic. Who has won the premier league 2024? What is the temperature today in mumbai? Who is the prime minister of india in 2015? 2. **Input (Output) length limitation** **Challenge**: LLMs have constraints on the length of input text they can process and the length of output they can generate, which can limit the complexity and depth of conversations. **Example**: When summarizing a lengthy document, the model may truncate important details due to length limitations, resulting in incomplete or inaccurate summaries. Input | Output ------|------- The stock market fluctuated significantly due to unexpected economic news and changes in interest rates. | The Stock market fluctuated due to news. 3. **Hallucinations** **Challenge**: LLMs may generate responses that are based on real information and "make things up" based on patterns in their training data, which can lead to misinformation. **Example**: When asked about historical events, the model might invent details or events that never happened, resulting in inaccurate responses. Input | Output ------|------- Describe a significant event in the life of Marie Curie | Marie Curie discovered the theory of relativity in 1912, revolutionizing physics 4. **Bias and toxicity** **Challenge**: LLMs can pick up biases from the training data, leading them to generate harmful or offensive content that continues societal biases and potentially causes harm. **Example**: If the training data includes gender biases, the model might respond with gender stereotypes, continuing societal prejudices. Similarly, if trained on toxic content, it could produce offensive or harmful responses. Input | Output ------|------- What are common career paths for women? | Women are usually teachers or nurses. 5. **Structured data** **Challenge**: ChatGPT Generative AI faces difficulties with structured data as it focuses on designed text patterns, leading to possible misinterpretation of context, imprecise outputs, and limited training on structured formats. Country | Population(mil) | Area (Sqkm) --------|-----------------|---------- Japan | 126.5 | 377,975 India | 1254 | 8,515,767 The population of India is 896 million people The area of japan is 377,975 sq km --- ## Upgrade to New Engage Module (for app bots) App bots are now provided with an option to upgrade the Engage module by migrating all the campaign and audience data to the new engage module. ## What's new in Engage - Cloud ? ### User 360 #### *[Know more about User 360](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/overview)* ![](https://i.imgur.com/dFehW6I.png) ### Template manager ![](https://i.imgur.com/cEjUFmq.png) ### Inbound campaigns #### *[Know more about Inbound Campaigns](https://docs.yellow.ai/docs/platform_concepts/engagement/inbound/gettingStarted/launchingYourFirstInboundCampaign)* ![](https://i.imgur.com/MexHCVf.png) ## What are the limitations? 1. Up to **5 audience table** will be migrated to cloud platform 1. **Segment details will not be migrated**. But you can download all the segment details once the migration is completed 1. **Scheduled campaigns (runs multiple times) will not be resumed**. You need to schedule the campaigns again from cloud UI. 1. **Function executions** using cron jobs will not be supported. ## Who cannot use this feature? * Bots which has active "**cron jobs**" which runs functions executions will not be able to proceed with the migration process. * In case of any **in-progress campaigns** you will not be allowed to process with migration. You can try once the in-progress campaigns are completed. ## Step by Step guide for migration process #### Step 1: Login Login to https://app.yellowmessenger.com and open your bot #### Step 2: Open Engagement Navigate to Engagement module and click on "upgrade to new platform" from top right corner. ![](https://i.imgur.com/iK8DUAJ.png) #### Step 3: Start Migration What's new slides will give you a glimpse of new features which will be available in Engage - cloud platform. Click on "start migration" to proceed. ![](https://i.imgur.com/nLhja7z.png) #### Step 4: Wait for Migration progress Migration window will be opened and the below data will be migrated by default. 1. Preferences details 3. Campaign reports and details ![](https://i.imgur.com/9nmccU3.png) #### Step 5: Proceed User data Migration * User data migration is optional. * If you do not want to migrate the older audience table, you can give "skip" and start clean with new cloud module by uploading the user data. * If you want to migrate the user data to cloud, Click on start #### Step 6: Select Audience tables to be migarted You can select up to 5 audience table for migration. Select and give next. **`Note : Audience tables are sorted in ascending order based on number of rows present in each table.`** Here, I have selected 5 tables which I would need to migrate to new platform. ![](https://i.imgur.com/RkzfnPx.png) #### Step 7: Map your audeince tables properties to new properties In cloud engage, we maintain single user database called CDP (User 360). Hence we need to merge the audience tables from app to CDP attributes. [Learn more about CDP (User 360)](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/overview) * From left side drop downs you can select you older column names. * Right side properties are "default CDP properties". * You can create new property as well and map your existing columns. * Here, I need to map my older column "number" to "phone number" in new CDP property. ![](https://i.imgur.com/YGzyRzs.png) Here, I have *link* and *offer code* as new columns which is not in default CDP properties. Hence creating, new attribute by clicking on "add new property" and mapping the column. ![](https://i.imgur.com/C0bMC3u.gif) #### Step 8: Complete User Data Migration Once the user data migration started, the progress will be shown as below ![](https://i.imgur.com/q7qXLT8.png) Once the process is completed you can see this finish screen, where you can download the segment details and open Engage module in new platform. ![](https://i.imgur.com/9Z9i5I5.png) #### Note: `You will get this screen only once to download segment details. Post migration as soon as you click on "Engagement" from left vertical tab, you will be redirected to cloud engage.` ## Few benefits of migrating to new cloud engage 1. You can use **User 360 module** which is helps you to unify your user data at single place and maintain rich profile across channels 1. Improvised outbound campaign **overview**. 1. **Whatsapp templates** can be created and submitted directly from yellow's Engage module instead of raising SUD or from facebook business manager. 1. Manage templates across channels (SMS, email, whatsapp, Viber) 1. You can use **inbound campaigns** module 1. You can run **Viber business outbound campaigns** --- ## Universal international freephone number (UIFN) ## UIFN overview A **Universal International Freephone Number (UIFN)**, also known as a **Universal Toll-Free Number**, allows callers from multiple countries to dial a single number without incurring long-distance charges. UIFN numbers start with **"+800"**, followed by an **8-digit Global Subscriber Number (GSN)**. ### How UIFN works 1. Callers dial their **International Access Code (IAC)**, followed by **"+800"** and the **8-digit GSN**. 2. The call is then routed to the business's designated phone number. ## UIFN pricing and commercials Below are the charges for purchasing and using a UIFN number with termination on an **India landline PSTN** number connected to the **Yellow platform**. ### General costs | Charge Type | Cost (INR) | |------------|-----------| | **NRC (Non-Recurring Charge) per Number** | 50,000 | | **Annual Recurring Charge (ARC) per Number** | 50,000 | For example, if you need **one UIFN number across 17 countries**, you will pay: - The **NRC and ARC for one UIFN number** - **Additional per-country charges** (as per the UIFN rate table below) ## UIFN country rate table :::note 1. **Payphone Origination is Blocked**: Can be enabled at an additional cost. 2. **Mobile Operator Charges**: Some mobile operators may charge the caller an **airtime fee**. 3. **KYC Documentation**: Required as per local regulations. 4. **Pricing Validity**: Prices are valid until **January 31, 2025**. 5. **Latest Pricing**: Contact the **support team** for updates. ::: > For further assistance, reach out to the **Simple2Call Provisioning Team**. ### Cost breakdown - **NRC per Number**: One-time charge per country - **MRC per Number**: Monthly charge per country - **Fixed & Mobile Origination**: Per-minute rates | # | Country | Currency | Fixed Origination (INR/min) | Mobile Origination (INR/min) | NRC per Number (INR) | MRC per Number (INR) | Pulse | Delivery Time | Accessibility | Remarks | |----|-------------|----------|--------------------------|--------------------------|------------------|------------------|-------|--------------|--------------|---------| | 1 | Argentina | INR | 32.50 | NA | 3,000 | 3,000 | 1 Min | Best efforts | Fixed Only | | | 2 | Australia | INR | 18.00 | 18.00 | 3,000 | 3,000 | 1 Min | 21 business days | Fixed & Mobile | | | 3 | Austria | INR | 18.00 | 35.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 4 | Belgium | INR | 11.00 | 44.00 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 5 | Brazil | INR | 18.00 | 44.00 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 6 | Bulgaria | INR | 25.00 | 25.00 | 20,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 7 | China | INR | 49.50 | NA | 3,000 | 3,000 | 1 Min | Best efforts | Fixed Only | | | 8 | Colombia | INR | 23.50 | 23.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | No access from Tigo and Uff Movil prepaid | | 9 | Croatia | INR | 38.50 | 38.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | Guaranteed only via Croatian Telecom Fixed Line | | 10 | Cyprus | INR | 17.00 | 17.00 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | Guaranteed only via Cyta Fixed and Mobile | | 11 | Czech Republic | INR | 14.00 | 35.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 12 | Denmark | INR | 11.00 | 50.00 | 10,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 13 | Estonia | INR | 12.50 | 75.00 | 4,000 | 4,000 | 1 Min | Best efforts | Fixed & Mobile | | | 14 | Finland | INR | 31.50 | 31.50 | 12,500 | 6,500 | 1 Min | 21 business days | Fixed & Mobile | | | 15 | France | INR | 12.50 | 26.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 16 | Germany | INR | 10.00 | 30.00 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | Company name & address required | | 17 | Greece | INR | 12.50 | 47.00 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 18 | Hong Kong | INR | 10.00 | 10.00 | 4,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | Mobile operator may charge airtime | | 19 | Hungary | INR | 13.50 | 35.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 20 | Ireland | INR | 18.00 | 77.50 | 3,000 | 3,000 | 1 Min | Best efforts | Fixed & Mobile | | | 20 | IRELAND | INR | 18.0000 | 77.5000 | 3,000.00 | 3,000.00 | 1 Min | Best efforts | Fixed & Mobile| | | 21 | ISRAEL | INR | 18.0000 | 18.0000 | 3,000.00 | 3,000.00 | 1 Min | Best efforts | Fixed & Mobile| | | 22 | ITALY | INR | 50.0000 | 50.0000 | 3,000.00 | 3,000.00 | 1 Min | Best efforts | Fixed & Mobile| | | 23 | LATVIA | INR | 32.5080 | NA | 3,000.00 | 3,000.00 | 1 Min | Best efforts | Fixed Only | | | 24 | LUXEMBOURG | INR | 10.0000 | 13.5000 | 4,000.00 | 3,000.00 | 1 Min | Best efforts | Fixed & Mobile| 80% of fixed lines can dial UIFN | | 25 | MAYOTTE | INR | 32.5000 | 32.5000 | 3,000.00 | 3,000.00 | 1 Min | Best efforts | Fixed & Mobile| | | 26 | NETHERLANDS | INR | 12.5000 | 50.0000 | 4,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | Sometimes minor operators decide to block access. | | 27 | NEW ZEALAND | INR | 11.0000 | 48.0000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | The company-name & address (worldwide) needs to be available. The mobile operator may charge the end user an airtime charge for mobile calls. | | 28 | PHILIPPINES | INR | 52.5000 | NA | 4,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed Only | Only access from PLDT network is guaranteed. | | 29 | POLAND | INR | 15.0000 | 15.0000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 30 | PORTUGAL | INR | 18.5000 | 55.0000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 31 | ROMANIA | INR | 20.0000 | 26.5000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 32 | SINGAPORE | INR | 10.5000 | 10.5000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | Only Fixed callers of other carriers who have pre-registered with SingTel for 001 access are able to call SingTel UIFN by dialing 001 800 XXXX XXXX. Mobile callers from Starthub & M1 networks must be pre-registered with Singtel for 001 service to access this solution. The mobile operator may charge the end user an airtime charge for mobile calls. | | 33 | SLOVAKIA | INR | 15.0000 | 48.5000 | 4,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 34 | SOUTH AFRICA | INR | 37.0000 | 37.0000 | 10,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 35 | SOUTH KOREA | INR | 18.0000 | 18.0000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 36 | SPAIN | INR | 22.5000 | 50.0000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 37 | SWEDEN | INR | 10.0000 | 29.5000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 38 | SWITZERLAND | INR | 10.0000 | 48.0000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 39 | TURKEY | INR | 21.5000 | 21.5000 | 75,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | | | 40 | UK | INR | 10.5000 | 10.5000 | 3,000.00 | 3,000.00 | 1 Minute| Best efforts | Fixed & Mobile | The mobile operator may charge the end user an airtime charge for mobile calls. | --- ## Troubleshooting Voice agents Ensure the proper functioning of voice bots by identifying and resolving common issues such as connectivity problems, voice recognition errors, and response issues. :::note **Prerequisites** * Familiarity with voice bot tables and logs (e.g., callbackstatus_details, call_details_report, api_logs, CDR, notifications report). * Ability to interpret SSML (Speech Synthesis Markup Language) using tools like MS TTS Studio or https://xmlgrid.net/. * Access to customer API logs. ::: ## Initial Assessment 1. **Reproduce the issue**: Try to recreate the reported issue. * Document the steps taken to replicate the problem. * Collect screenshots or recordings if possible. 3. **Analyze affected records**: Review recordings, chat transcripts, and logs. 4. **Check primary bot tables**: Review `callbackstatus_details, call_details_report, api_logs`. 5. **Data Explorer tables**: Check call details reports (CDR), notifications reports, and analytics. 6. **Validate SSML**: Ensure Speech Synthesis Markup Language (SSML) is valid using tools like MS TTS Studio. 7. **Patch or upgrade**: Check for recent updates or patches to the voice bot system. 8. **Debug logs:** Use the customer’s phone number to analyze production logs and API logs. 9. **Node verification**: Ensure prompt/question nodes are not empty (except in Inbound Hangup cases). 10. **Documentation**: Note down affected SIDs and key observations. --- ## Connectivity Issues ### Symptoms * The bot does not play the welcome prompt. * API calls fail to reach the server. ### Steps to Troubleshoot 1. Check platform and voice server connectivity. 2. Verify that the client API endpoint is accessible. 3. Review network logs for disconnections or timeouts. ### Solutions 1. Ensure strong connectivity between the voice server and platform. 2. Check for API endpoint changes (e.g., URL or request/response structure). ---- ## Voice Recognition Errors ### Symptoms * The bot misunderstands user input. * Low accuracy in recognizing voice commands. ### Steps to Troubleshoot 1. Review call recordings in the callbackstatus_details table. 2. Analyze recent voice logs for recognition issues. 3. Ensure correct language settings and codes are in place. ### Solutions 1. Repeat unclear prompts. 2. Update the bot’s training data by refining intents and entities. ------ ## Response Issues ### Symptoms Delayed or no response from the bot. ### Steps to Troubleshoot 1. Check server load and the bot’s attached numbers. 2. Test the response time of the client API. ### Solutions 1. Optimize server performance by adjusting the number of channels. 2. Ask the client to check for API issues using logs from the api_response table. ------- ## Engage Flows – Calls, WA, and SMS Triggers ### Symptoms Users did not receive a call, WhatsApp, or SMS notification. ### Steps to Troubleshoot 1. Analyze the target Engage flow analytics (use flow ID from the URL: e.g., https://cloud.yellow.ai/bot/botID/engagement/flows/661cbd4c8c383c6621230a41/analytics). 2. Check the Notifications report for issues with CampaignID. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiISEFQOoeC_jFJQRPlvQz1IHCLdocjvKtFvADeMtnGkS9DkASuStGWqBmtjYLwcoJmizgQJpmFVGl-5iCvlTlRHgutrA1EPkJ5ro6jXpvoc1ocLktVkfYpphC0XfwxR-ngejKoEUnwr6fKCZSPIiBRlAx?key=yM6pYcXy3m07B90GFb8mvA)** ### Solutions 1. Check for telephony-level traffic congestion. 2. Raise WA/SMS issues through a support ticket with the engage team. ------ ## Error HTTP Codes and Messages | Error | Description | Solution | | ----- | ----------- | --- | | 4xx Client Errors | Request contains bad syntax or cannot be fulfilled | | | 5xx Server Errors | Server encountered an error and failed to fulfill the request| | 500 Status Code | Server failure| Verify the Client API/Bot API and confirm that the endpoint is correct. For Bot API issues, provide bot ID, failure duration, and logs to the support team in a ticket. | -------- ## Log Analysis :::note Enabling Auto fallback to Enable summarized results in the Conversation settings, or within any node that invokes document search in a voice flow, will result in an error. ![](https://imgur.com/rpStrjO.png) ::: 1. Access Logs: - Navigate to **Analysis → Conversational Logs** or access the relevant database for details on `drop_steps` and `dispositions`. - Use log analysis tools to filter and search for specific log entries based on sender ID or profile ID. 2. Common Log Entries | Type | Description | | -------- | -------- | | **API Call Logs** | - Provide detailed information on API requests and responses stored in the database. - Useful for diagnosing API related issues (e.g., request failures or incorrect responses). | | **Voice Interaction Logs** | - Track user interactions and bot responses, offering insights into the flow of conversation. - These logs are found in Data Explorer or custom tables such as `callbackstatus_details`.| 3. Steps to Analyze Logs: - Locate Errors or Patterns: Look for error messages or unusual patterns in the logs, such as failed API calls or timeouts. - Cross-Reference Logs with Issues: Compare logs with the specific issues reported by the user to identify potential correlations or causes. --- ### Detailed steps to access logs from Analyze module 1. Navigate to **Analysis → Conversational Logs**. Search for the logs using the customer’s phone number. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXe9DUIgul25WZ5tRQPy7u5_-2grp4ZPjRQhSEfEmS749IuQK6XMnpteymQV0edd2DSPZdh4ySnvHHltKBuQ8Js7qfAsJDhHsSAXBGgkeFc2bETUpFIwxR8KAuB_R6M7IgCSL-qATg0A3qWIB2QDjV_njnY?key=yM6pYcXy3m07B90GFb8mvA)** 2. In the chat transcript displayed on the left, locate the message where the issue occurred. Click the Logs icon (debugger) next to the relevant message. Review the logs for any error messages indicating problems at that step. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXey3zq3aA_I4O8s9lBxxV4e2oRlE9v-HH9YpuoCmVCJcv8Qaq5CgyVJ4wjOFUeLMKS-yFWLfXi9PMyJDvK8YO2MMdRxRuAWKLpc9SsRTkV4F8Us20gGdMDtKKnfdyA3BOWgoak9Kgu-kXAUjqzhKrdLjHA?key=yM6pYcXy3m07B90GFb8mvA)** 3. Check the callbackstatus event data for any instances where `bot_failed = true` or `bot_failover = true`. This helps identify where the bot encountered failures or fallbacks. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXc1Kadj4hHg1ho2Qk9IMp0Iuo63aWW9c4wC98Vo54XJU4Qn9u9mbkC0s9CsvV7Pyaxr80XcHXZh45xZxUQIkzA1iYni7eiqEkGizwK7QaRFesqjiRQq0GmaMssb4SjTqL4bgTYtulgpjAA5rSmD-HsD37eg?key=yM6pYcXy3m07B90GFb8mvA)** **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfW3CPudx-SV4uyA4iQ22SQ7WQVKLVnRug5dNFtewmmZKCw5ftN2TRxMiNohD7Hkfcn8le2RjoY4J7gnHHWau5LON8rGfJWxhn4PwRdwpgFn4Sq4V1e4O5606tS6kzKM9aU2yCcaB5xl0jZB_sBhT5Zxzs?key=yM6pYcXy3m07B90GFb8mvA)** 4. Review the function logs at the step where the issue occurred. If a failure is detected, the function log will show error details such as: ``` [ { "log": { "data": "{\"tag\":\"Error while executing the function\",\"extraInfo\":{\"message\":\"Cannot read property 'length' of undefined\"}}", "level": "error" } } ] ``` **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeq6KoMXwFS5nRJ58Zt-7iuJBu-x9wUHF2bttsUUh_uzFhOR69QGBif60meZRBzTUbs63A_LWZKX7iYVnU7hH2Uogn-yLTwM7rjyeRKdOUAA9_vnWq_WysNP-4i2OJieGk0SwkwRel8bFivDULIKg43PspW?key=yM6pYcXy3m07B90GFb8mvA)** This type of error usually points to a specific issue, such as a missing or undefined property, which can guide further troubleshooting. By following the above steps, you can isolate specific log entries and errors that contribute to the problem, allowing for targeted resolution. -------- ## Frequently Asked Questions (FAQ) 1. What should I do if the bot is not responding? Place a call and check the bot logs in the analysis tab and review logs for any errors. 2. How can I improve voice recognition accuracy? Update utterances in the bot's intents and entities regularly. --- ## How to Determine the Region Where Your Bot is Hosted This guide explains how to find out in which region your bot is hosted on the platform. > To know the region of a bot, you must have **access** to the **Platform** and **Bot**. ## Steps to identify bot region ### Method 1: Using the configure button 1. Login to the platform and open your bot. 2. Click on the **Configure** button located at the top right corner of the bot's home page. The region where the bot is hosted will be displayed. ### Method 2: Using the Knowledge Base URL 1. Go to **Knowledge Base** of the bot. 2. Click on **Share** and then copy the URL. The region information is embedded in the URL as `region=`. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdtzX1dZEaqVUvDDo0JM8kw1GA43XFXQLMXb15LKYBmgzrp99WKjapzOLEW7aE-Tf-YnuBJ4w6W8YyProEmda2HyHSG4Yi_NYT91PEecEz5IPAi6OCfU9BMwr933pabQcUWib895-oPHzNdieT9MX-xvFic?key=xTkWPmlh-46RdThnX_8ggQ)** ### Method 3: Using Automation Flows 1. Navigate to **Automation > Build > Flows**. 2. Click on Preview. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfW7OCn2Lqbf_aF34xRfXkomi0hhocM-CtK2ewQwDYVdc2hSrvwPmc57YS8BRSWV8lCO84MsPAs_13Waa43Vmfqbtu13VRreSLLyBdQU5VgQUx2XyOa4xj-bimJCa_HC_wC9wMJzmQI3zPQySUpJ9UKCljb?key=xTkWPmlh-46RdThnX_8ggQ)** 3. In the preview window, click on the redirection arrow which will open a new page. Check the URL in the new page; the region will be indicated as `region=`. ![](https://imgur.com/vRkj5JH.png) **Sample URL Format** (In this URL, the region is specified after `region=`): ``` https://cloud.yellow.ai/liveBot/x1667286708237?region=4 ``` The region codes in the URL correspond to the following locations: | **Region Code** | **Location** | |-----------------|----------------| | r0 | India | | r1 | MEA | | r2 | Jakarta | | r3 | Singapore | | r4 | USA | | r5 | Europe | | r6 | Qatar | | r7 | Saudi Arabia | --- ## Handling CORS errors for Chat Widget Websites often add CSP (Content Security Policy) to restrict loading of content from external sites, which leads to CORS (Cross-Origin Resource Sharing) errors. In such cases, the entire chat widget or specific components like fonts or icons may fail to load. To resolve CORS errors and ensure the seamless functioning of the chat widget, add Yellow’s domain to the CSP headers of the website. The following domains should be included: `https://*.yellow.ai` `https://*.yellowmessenger.com` To whitelist the WSS (WebSocket Secure) protocol, add the following: `wss://*.app.yellow.ai` By adding these domains in the CSP headers, you allow the necessary resources to be loaded, will then allow the bot to load on the website. --- ## Difference between Viber and Viber for business *** | Viber |Viber for business| ---------|--------|------------- Target audience | Ideal for personal one-on-one interaction with the bot. | Ideal for business users to interact with larger audience. Setup | Download the app and install on your mobile device. | Contact [Yellow.ai support team](mailto:support@yellow.ai) with your business details for setup | Interaction | 1-1 messaging | Many-to-one messaging Verification | No | Need approval from Viber business team. Supported message types | Free text messaging Voice and video calls Multimedia sharing | Text Image Files Campaign/Messages | Supports only promotional campaigns | Supports transactional, promotional, and conversational messages Customer support | Yes | Yes Live Agent support | Yes | Yes Auto responses | Yes | Yes Business Profiles | Personal profiles are used in the regular Viber app. | Businesses can create official business profiles on Viber for Business, providing a professional identity for customer communication. API and Integrations | Does not support API or integrations designed for business purposes. | Supports APIs and integrations that businesses can use to integrate Viber into their customer communication systems. Discoverability | Requires QRCode or Share with a friend option for users to discover and connect. | Offers a searchable feature, allowing users to find and connect with businesses more easily :::note The information provided is based on general features, and the specifics may vary. It is recommended to check the latest documentation. ::: --- ## App password generation for email tickets To ensure reliable email delivery from agents to end users, app passwords can be utilized. This process involves generating an app password to improve communication between agents and users when email integration is used. > Use the same email ID and password that were integrated into the bot. 1. Log in to the email account that is integrated with the bot. 2. Click [here](https://support.google.com/accounts/answer/185833?hl=en) to create the app password- Google Support App Password. 3. Create the app name. After creating the app name, you will receive a 16-character app password. 4. Prepare the password: Remove any spaces between the characters of the app password. Copy the modified password. 5. Paste the app password into the email settings within the bot. > If the normal password for the email account is changed, a new app password must be generated and updated in the email settings of the bot. --- ## Difference between Web widget and Mobile SDK *** | Web widget | Mobile SDK | -------|----------|------ Destination | Hosted on Website | Hosted on Mobile app Entry point | Supports both floating bot icon and custom entry point | Supports only custom entry point Hardware permission |The bot will inherit the same permissions as the browser | Need to define mic, location, storage, and other hardware permissions in the SDK Optimisation | Better optimized for web browsers | Better optimized for mobile screens and keyboards, with native attachment button support. Push notifications | Supports browser push notifications which require additional setup (service worker) | Supports Firebase push notifications even without the need of device token. Additionally, you can also configure `sendIOSEvent` to redirect users to any other screen within or outside the app Navigation | Supports floating icon as an entry point | Supports native entry and exit.When you click on the link it will open in default browser, and upon clicking back, users are redirected to the app Customisation |Supports custom script to override bot’s UI elements | Supports custom loader (while loading chatbot) Speech-to-text (STT) & Text-to-speech (TTS) | Supports both | Not supported **Note**: STT is not optimised for Mobile but mobile keypads support STT --- ## Configure multiple themes on Web and Mobile SDKs You have the option to set a default theme and customize various themes for different pages on your website or mobile app. The configuration includes: * Bot name * Primary color * Secondary color * Bot icon * Bot description * Bot click icon To implement this on the web, pass the following values inside window.ymConfig in the bot script: ```javascript theme:{ botName:" ", //Text upto 50 characters botDesc:" ", //Text upto 50 characters primaryColor:" ", //RGB or HEX value secondaryColor:" ", //RGB or HEX value botBubbleBackgroundColor:" ", //RGB or HEX value botIcon:" ", //CDN link botClickIcon:" " //CDN link } ``` For mobile SDK, send the values as mentioned below: ```c let theme = YMTheme() theme.botName = " " theme.botDesc = " " theme.primaryColor = " " theme.secondaryColor = " " theme.botIcon: " " config.theme = theme ``` --- ## Gupshup (WhatsApp) integration Integrating Gupshup with the Yellow.ai platform allows businesses to connect their WhatsApp channel through Gupshup and enable two-way communication between the bot and WhatsApp users. This integration ensures that the Yellow.ai bot can send and receive messages to and from WhatsApp users using Gupshup's webhook. --- ## What this integration does - **Incoming messages** — When someone writes to your WhatsApp business number, Gupshup notifies Yellow.ai. Your bot can then run its flows, AI, or agent handoff as usual. - **Outgoing messages** — When your bot sends a reply, Yellow.ai sends it to Gupshup so it is delivered on WhatsApp. The **User ID** and **Password** you save in Yellow.ai are what allow those sends to work. **How it works, in order:** 1. A customer sends a WhatsApp message → **Gupshup** receives it. 2. Gupshup calls the **Webhook URL** from Yellow.ai and includes the **Authorization** value Yellow.ai gave you. 3. Yellow.ai matches that request to your **bot** (the URL contains your bot identifier). 4. When your bot replies, Yellow.ai uses your saved **User ID** and **Password** so **Gupshup** can deliver the reply on WhatsApp. You save **User ID** and **Password** in Yellow.ai; you register the **Webhook URL** and **Authorization** value in Gupshup so steps 2 and 4 above work. --- ## Before you begin (checklist) Go through this list once before you start: | You need | Why | |----------|-----| | A **Gupshup** account with **WhatsApp** set up for your business number | Gupshup must already be able to send and receive WhatsApp for that number. | | Your Gupshup **User ID** and **Password** for WhatsApp | These are the same kind of credentials Gupshup provides for API-based messaging. If you are unsure where to find them, use Gupshup’s documentation or your Gupshup account manager. | | Your Yellow.ai bot is ready and published. | A live, published bot can receive traffic and run your flows when WhatsApp is connected. | **Gupshup help for webhooks (optional reading):** [Webhooks overview](https://docs.gupshup.io/docs/webhooks-2) · [Set webhook callback URL](https://docs.gupshup.io/docs/set-webhookcallback-url) --- ## Steps to connect Gupshup in Yellow.ai Follow these steps **in order**: 1. Log in to **Yellow.ai** platform. 2. Open the **bot** that should use this WhatsApp number. 3. In the left navigation, go to **Extensions** → **Channels**, then use the search bar to search for **Gupshup**. ![Extensions → Channels: search for Gupshup (WSP)](https://cdn.yellowmessenger.com/assets/doc/gupshup1/gupshup_1.png) 4. Click **Gupshup (WSP)** in the results to open the channel setup page. ![Extensions → Channels: search for Gupshup (WSP)](https://cdn.yellowmessenger.com/assets/doc/gupshup-2/gupshup_2.png) 5. On the form you will see: - **Gupshup User ID** — enter the User ID from your Gupshup account (Customer Care / WhatsApp API credentials). - **Gupshup Password** — enter the matching password from your Gupshup account. 6. Click **Save**. ![click save](https://cdn.yellowmessenger.com/assets/doc/gupshup-4/gupshup-4.png) Keep your **Gupshup Password** private. ### After you save: Webhook URL and Authorization After the channel saves successfully, the same page shows two values you will use in **Gupshup** when you configure the webhook there. You can copy each value using the **Copy** control next to it: | What you copy | What it is for | |---------------|----------------| | **Webhook URL** | This is the web address Gupshup must call **every time** there is incoming WhatsApp activity for this bot. It will look like a normal `https://` link and will include your bot’s identifier in the path. | | **Authorization header value** | Gupshup must send this exact value in the **`Authorization`** HTTP header when it calls the Webhook URL. That way Yellow.ai knows the traffic belongs to this bot. | :::tip Always use **Copy** from the Yellow.ai screen. Pasting by hand often causes **401** errors (access denied) because of a missing character or a wrong header. ::: **What Gupshup’s request should look like (conceptually):** - Method: **POST** - Address: your copied **Webhook URL** - Header: **`Authorization`** = the copied value (no extra word like “Bearer” unless Gupshup’s own screen asks for that format—follow what Yellow.ai shows you as the full value to send) ### Edit or disconnect later - **Edit** — Repeat the steps above and choose **Edit account** when you need a new **User ID** or **Password**. - **Disconnect** — Removes this Gupshup connection from the bot until you connect again. --- ## Live chat queue handling for chat widget When all agents are engaged with incoming chat tickets, you can enable the queue position of users in the chat widget. For more information on how to enable the queue position, click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/workflows/chat-queue#1-configure-chat-queue). ### Enable the queue position of the user in chat widget To enable the queue position of the user, follow these steps: 1. Navigate to **Inbox** > **Setting** > **Queue handling**. ![](https://imgur.com/mEdxo8C.png) 2. Enable the queue position display on the widget. ![](https://imgur.com/mcTTlZS.png) 3. Enter a custom message to display the queue position and click **Save**. 4. Go to **Channels** > **Chat widget** > **Deploy** > **Experience on a website**. * The chat widget will now display the queue position for the user. --- ## Multi-file upload in Chat widget You can enable uploading multiple files in the chat widget using the [File prompt node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/file-prompt-node). The supported file formats are documents (doc, docx, pdf,) images (png, jpeg), videos (MP4, MOV). You can also preview the uploaded files. ##### Limitation * You can upload upto 5 files simultaneously. --- ## Redirect users to Phone App/Email via QRs, Text Message, or Callout Banner Brands can configure hyperlinks that redirect users to phone apps or email services in various components like Text Messages, Quick Replies (QRs), Cards, and Callout Banners. To set up these links: 1. For phone numbers, add tel:`+{phone_number}` to the button link. For example, `tel:+919988776655` will initiate a call when the button is clicked. 2. For emails, add `mailto:{email ID}` to the button link. For example, mailto:apps@yellow.ai will open the default email client when the button is clicked. --- ## Resolving message failures in WhatsApp, Facebook, and Instagram channels This guide provides steps to identify and troubleshoot message failures when using WhatsApp, Facebook, and Instagram channels. Message failures can occur due to various reasons such as incorrect configuration, network issues, or platform limitations. Understanding the specific cause of message failures helps in timely resolution and maintaining effective communication. ##### Prerequisites To troubleshoot message failures, ensure you have the following: * Access to the Yellow.ai platform. * Permission to view message logs and configuration settings. * Knowledge of the specific channel (WhatsApp, Facebook, or Instagram) where the failure occurred. ### Steps to resolve message failure 1. Navigate to the bot where the message failure has occurred. 2. Copy the chat transcript of the user’s WhatsApp number for which the message was not delivered. 3. Open the copied chat transcript in a new tab. 4. Open the **Network** tab > right-click on the page > select **Inspect**. ![](https://i.imgur.com/zqtmouS.png) 5. Go to the **Network** tab to monitor network requests. 6. Look for an API call with the name signature in the network logs. 7. To analyze the error message, open the API in a new tab and search for the message where the failure occurred. 8. Identify the error message or reason for the failure. **Example of error and resolution** * **Error**: The WhatsApp list exceeds the character limit of 24. * **Resolution**: Adjust the message content to comply with the character limit. ![](https://i.imgur.com/FhYWlmV.png) By following these steps, you can determine if the issue is related to the bot configuration or requires escalation to the platform or Meta team. ### Additional Tips By following these guidelines, you can effectively troubleshoot and resolve message failures to ensure continuous and reliable communication through WhatsApp, Facebook, and Instagram channels. * **Check configurations**: Ensure that all configurations related to the specific channel are correct and up-to-date. * **Monitor network stability**: Network issues can cause intermittent message failures. Ensure stable network connectivity. * **Update permissions**: Verify that all required permissions for the Yellow.ai platform and specific channels are properly set. --- ## Track user interaction with links in Chatbot components You can monitor user interactions within the widget by tracking clicks on links within text messages (message-hyperlink-clicked), card buttons (card-cta-clicked), and banner buttons (banner-cta-clicked). When a user clicks on any of these components, an event is triggered, and the relevant information is stored in the **Event** column for analysis and insights. To track link clicks in Chatbot components, follow these steps: 1. Go to **Insights** > **Data Explorer** > **User engagement events**. ![](https://imgur.com/ROUzHDH.png) 2. Under Events table, you can view the user intearction (message-hyperlink-clicked, card-cta-clicked, and banner-cta-clicked). ![](https://imgur.com/WNfc8zz.png) --- ## Building custom apps with YApps SDK ## Introduction The YApps SDK enables the integration of custom applications within the Yellow Cloud platform. These apps are embedded as iframes within the parent application, allowing for extended functionalities such as customer management, custom visualizations, and dynamic workflows. The SDK ensures secure communication between the parent app and custom apps while controlling embedding permissions and interactions. ## Building and deploying a custom app This guide provides a step-by-step process for building and deploying a custom app named `color-picker` for a customer named `bluewall`. ## Deployment methods Custom apps can be deployed using one of the following methods: ### 1. In-House deployment (Using yellow cloud infrastructure) #### Step 1: Develop the custom app To develop a custom app, follow these steps: 1. Clone the repository: `yellowdotai/chat-components` 2. Navigate to `yellowdotai/chat-components/views/yapps/` 3. Create a new folder with the customer name (`bluewall` in this case). 4. Place all the customer’s custom apps within this folder. **Example directory structure:** ``` yellowdotai/chat-components/views/yapps/bluewall/color-picker ``` #### Step 2: Build the Custom App 1. Choose a tech stack such as React, Angular, or Vanilla JavaScript. 2. Ensure that the final build files are stored inside the `dist/` folder within the app directory. 3. Use a bundler such as Webpack or Vite for optimized builds. 4. Minify and optimize assets to reduce load time. 5. Implement cross-origin isolation to prevent security vulnerabilities. #### Step 3: Deployment & Access 1. Create a Pull Request (PR) and submit it for review to the repository owners. 2. Use Jenkins CI/CD pipelines to automate the deployment. 3. Perform both static and dynamic security testing before merging the PR. 4. Deploy the custom app and access it using the following URL format: ``` https://app.yellowmessenger.com/components/{customerName}/{appName} ``` **Example:** ``` https://app.yellowmessenger.com/components/bluewall/color-picker ``` ### 2. On-Prem deployment (Customer’s infrastructure) - The app is hosted on the customer’s infrastructure instead of Yellow Cloud. - The YApps SDK must be included using the following CDN: ``` https://cdn.yellowmessenger.com/yapps-sdk/v1.0.0/widget.js ``` - Ensure that the app is deployed to a publicly accessible URL. - Implement strict security measures such as Content Security Policy (CSP) headers to prevent cross-site scripting (XSS) attacks. - Enforce HTTPS and TLS encryption for secure communication. ----- ## Using the YApps SDK The YApps SDK provides methods that allow custom apps to securely interact with the Yellow Cloud platform. ### Importing the SDK To use the SDK in your custom app, import it as follows: ```javascript const yAppWidget = new YAppWidget(); ``` ### Available Methods #### 1. Ticket Methods **Fetch ticket details**: ```javascript const ticket = await yAppWidget.getTicket(); ``` #### 2. Ticket Custom Field Methods **Fetch ticket custom fields**: ```javascript const customFields = await yAppWidget.getTicketCF(); ``` **Update ticket custom fields**: ```javascript await yAppWidget.updateTicketCF({ key: "value" }); ``` **Disable a custom field**: ```javascript await yAppWidget.disableTicketCF("custom_field_1"); ``` **Enable a custom field**: ```javascript await yAppWidget.enableTicketCF("custom_field_1"); ``` #### 3. Agent Methods **Fetch agent details**: ```javascript const agent = await yAppWidget.getAgent(); ``` ## Testing the Custom App on Cloud After development, test the app by adding it as a custom app in the sandbox or staging environment of the customer’s bot on the Yellow Cloud platform. ## Custom App Configuration The `custom-app-config` endpoint allows for the management of custom app settings via API requests (GET, POST, PATCH, DELETE). ### Example cURL request: ```sh curl --location 'https://${regionCode}.cloud.yellow.ai/api/agents/settings/custom-app-config?bot=${botId}' \ --header 'Cookie: ym_xid=${ymXid}' \ --header 'Content-Type: application/json' \ --data '{ "description": "Color Picker", "defaultContext": [], "enabled": true, "name": "bluewall color picker", "url": "https://app.yellowmessenger.com/components/bluewall/color-picker", "iconUrl": "https://cdn.yellowmessenger.com/assets/bluewall-logo.png", "trigger": "live-forever", "type": "ephemeral", "location": "inbox.email.ticket.sidebar" }' ``` ### Configuration Properties Explained - `description`: A brief summary of the app’s purpose. - `defaultContext`: Context parameters to pass to the app. Leave empty if not needed. - `enabled`: Boolean flag to enable (`true`) or disable (`false`) the app. - `name`: Display name of the custom app. - `url`: The endpoint where the app is hosted. - `iconUrl`: URL for the app icon (must be publicly accessible). - `trigger`: Defines how the app is activated (e.g., click, hover). Leave empty for now. - `type`: - `ephemeral`: Displays the app in the right sidebar of email or chat tickets. - `persistent`: Runs in the background without a visible UI. - `location`: Determines where the app is displayed (e.g., `inbox.email.ticket.sidebar`). After successful testing, update the configuration for production deployment. ## Deploying to production To deploy the custom app to production, follow these best practices: - Automate deployment using Jenkins or GitHub Actions. - Implement rollback strategies to revert changes in case of deployment failures. - Use monitoring tools such as Prometheus and Grafana for logging and tracking performance. - Apply API rate limiting and other security measures to protect against excessive API calls. ----- The YApps SDK provides a structured and secure approach to building, deploying, and integrating custom applications on the Yellow Cloud platform. By following these best practices, developers can ensure a seamless and efficient extension of platform functionalities while maintaining high security and performance standards. --- ## Not receiving emails from Yellow.ai If you're not receiving emails from the Yellow\.ai platform, follow the steps below to identify and resolve the issue. ### Step 1: Check if the Issue Is Isolated Determine whether the issue is specific to you or affecting others in your organization. * Ask colleagues if they are receiving Yellow\.ai emails. * If you are affected, proceed to the next steps. --- ### Step 2: Check Your Spam or Junk Folder Emails may be incorrectly flagged by your email client. * Review your **Spam**, **Junk**, or **Promotions** folders. * If you find Yellow\.ai emails there, mark them as **Not Spam** to prevent future filtering. --- ### Step 3: Try a Different Network Some networks may restrict or block certain emails. * Switch from your work network to **mobile data** or **home Wi-Fi**. * Check if emails arrive when connected to a different network. --- ### Step 4: Verify with Your IT or Security Team If the issue persists across networks, contact your IT or security team to confirm: * Whether **firewall rules or email security filters** are blocking messages from Yellow\.ai. * If **Yellow\.ai’s email IP addresses** are whitelisted. > You can request the IP list by emailing [support@yellow.ai](mailto:support@yellow.ai). --- ### Step 5: Contact Yellow\.ai Support If none of the above steps resolve the issue, reach out to [support@yellow.ai](mailto:support@yellow.ai). Include the following details to help us assist you faster: * **Bot ID** * **Issue start time** (approximate date/time when you stopped receiving emails) * **Troubleshooting steps you've already tried** --- > **Tip:** Keeping your IT team looped in while contacting support can speed up resolution, especially for email delivery issues involving firewalls or filters. --- ## Resolving Template Sync Issues Between Meta and the App Platform **FAQ: Resolving Template Sync Issues Between Meta and the App Platform** **Q1: Why aren't templates created in Meta syncing automatically to the app platform?** **A:** Templates created in Meta do not automatically sync to the app platform due to integration limitations. Manual entry is required to ensure templates are available for campaigns. **Q2: How do I manually add a template to the app platform?** **A:** To manually add a template, follow these steps: 1. **Create the Template in Meta:** - Use your WhatsApp Business Account (WABA) access to create the template in Meta. 2. **Open the Engagement Module in the App Platform:** - Go to the engagement module and select "Create Campaign." 3. **Set Up a Test Campaign:** - Choose a test audience and segment. - Skip the sender’s field mapping option. 4. **Add the Template Manually:** - When prompted to select a template, note that the Meta-created template will not appear. - Click "Add Template" to enter it manually. ![img](https://i.imgur.com/rU5HVJG.png) 5. **Enter Template Details:** - **Template Name:** Enter the name in lowercase (copy and paste from Meta). - **Content:** Copy and paste the content exactly as it appears in Meta, including all spacing. - **Namespace:** Obtain from Meta under the "Manage Template" options. - **Parameters:** Enter the number of parameters used in the template. - **Media:** Check if the template includes media and select the appropriate media type. - **Quick Replies:** Specify the number of Quick Reply (QR) buttons and choose between QR or Call to Action (CTA) buttons. - **Language:** Set the language according to the template (e.g., "en" for English, "hi" for Hindi). **Q3: What should I do if the manual addition of the template does not work?** **A:** If the manual addition fails: - Double-check all details for accuracy. - Verify that all required fields are filled correctly. - Contact our support team for further assistance. **Q4: Is there a way to automate or improve the sync process?** **A4:** Currently, automatic syncing is not available. Manual entry is necessary until improvements are made to the integration system. Watch for updates on potential enhancements to the sync process. --- ## Email outbound domain authentication - From the bulk email campaign account created for the brand, we will send something called ‘CNAME’ records to the mail ID suggested by the brand. CNAME records are a type of DNS records. - DNS records are like text instructions available in the DNS server (the view of this is possible in the registrar account of the brand such as GoDady account of the brand). In certain cases, instead of CNAMEs, TXT and MX records will be generated for domain authentication. - These DNS records tell what IP address is associated with what domains. - By performing domain authentication, we map an IP address to the domains/subdomains of the brand. - The CNAME records sent by us to the brand should be manually added by the brand in their DNS/ domain registrar portal. - It takes upto 48 hours for the domain to be authenticated or rejected. :::note After the Domain authentication setup, we do reverse DNS. Reverse DNS is the opposite of domain auth , that is, connect the domain to the IP address. ::: --- ## Exclude opted-out users from campaigns Enhance your campaign targeting by excluding users who have opted out. Learn how to ensure your messages reach the right audience while respecting user preferences. ## Store opt-out status through converstions 1. [Train an utterance](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#add-intents-and-utterances) with the keywords such as "DND" and "unsubscribe". i. Navigate to **Automation** > **Train**. ii. Click **Add new intent**. iii. Provide a relevant name for the intent and add "DND" and "unsubscribe" as Uttrences. iv. Click **Add** to save the intent. 2. [Set up a flow to trigger based on the intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#map-intents-to-flows) and choose the relevant intent. 3. Use the [Variable node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/variables-node) to [update the relevant user property](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data/store_conv_data), in the following example, the `campaignOptIn` property is set to `false`. This ensures that the customer's optout status is captured and stored in User 360. 4. [Create a user segment](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data_segments/segments_overview) excluding opted-out users. Add a condition to include users whose `campaignOptIn` status is `true. `Use this updated property as a condition in segment targeting to exclude users who have opted for DND from receiving further campaign messages. 5. When [setting up your campaign](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/outbound-campaigns/run-campaign), make sure to exclude opted-out users using the segment you created. This ensures that users who have opted for "STOP" or "DND" will not receive any further campaign messages.
--- ## Use cases for Shopify event-driven campaigns ## Cart abandonment recovery campaign In an online store on Shopify, you notice that some customers abandon their shopping carts during the checkout process. To recover those potential sales, set up a Flow campaign to automatically send reminders to users who have abandoned their shopping carts on your Shopify store. **Entry trigger**: `shopifyCartCreate` event **Exception to trigger notification**: `ShopifyCheckoutCreated` event **Flow configuration**: 1. **Trigger the flow**: Initiate the campaign when a user adds items to their cart, identify it using the `shopifyCartCreate` event. ![](https://i.imgur.com/qxmCKM3.gif) 2. **Wait condition**: Check if the user has completed the purchase by waiting for the `ShopifyCheckoutCreated` event. Set time delay, say 10 min. If no `ShopifyCheckoutCreated` event is detected within 10 min, proceed to the next step. ![](https://i.imgur.com/2210dOW.gif) 3. **Send abandonment reminder**: If the user has not completed the purchase within the specified time, send a WhatsApp notification. Here is a sample message: ![](https://i.imgur.com/MSyaUBa.gif) - *Sample Notification Message:* "Hello [User's Name], we noticed you left some wonderful items in your cart. 🛒 Don't miss out on these great finds! Tap here to complete your purchase: [Checkout Link]. Thank you for choosing our store!" --- ## Guidelines to design your AI Agent AI agents are smarter and more flexible than old rule-based bots. Instead of following fixed scripts, they can understand context, make decisions, and act on their own. To build an effective AI agent, you need clear goals, the right setup, and ongoing improvements. ## Key Practices ### 1. Set the Purpose and Persona Decide what role the agent will play. - Define its **tone and style** (helpful, professional, friendly, etc.). - Match the agent’s role to your business need (support expert, sales guide, knowledge assistant). - Link the purpose to a clear outcome, like faster service or fewer escalations. ### 2. Focus on Use Cases, Not Scripts Forget designing step-by-step flows. - Think in terms of **goals**: “Answer billing questions,” “Suggest the right plan,” “Book a meeting.” - The agent will build conversations around these goals using AI. ### 3. Provide Knowledge and Context Give the agent access to the right information. - Connect to your **knowledge base** for FAQs and guides. - Link to business systems (CRM, ERP, HR, ticketing) so it can complete tasks. - Add **rules, triggers, and variables** to keep conversations accurate. ### 4. Add Guardrails AI agents should work freely but with limits. - Set **handover to humans** for complex cases. - Use **fallbacks and validations** to avoid errors. - Monitor with tools to understand how the agent makes decisions. ### 5. Improve with Analytics Keep refining your agent. - Track performance with metrics like **containment, resolution, CSAT, and sentiment**. - Review where it works well and where it needs support. - Update prompts, integrations, or style based on insights. --- ## Alias name for agents Maintaining confidentiality is crucial in chat conversations. To ensure privacy, you can display an alias name instead of an agent's actual name. This feature enables you to record information in reports while remaining anonymous. For security reasons, the system will store the agent's real name, but only the alias name will be visible on the widget. If you don't provide an alias name, the system will display the real name. Here are some scenarios where you can use this feature: ## 1. Add an alias name to be displayed on the chat widget > Only **Inbox admins** can modify agent details. When customers connect with an agent, the alias name will appear on the chat screen. 1. Open **Inbox** > **Settings** > **Team** > **Agents**. 2. Select the agent you want to assign an alias name to. 3. Enter **Alias name** and click **Update**. ![](https://i.imgur.com/fLh9Xeh.png) The **widget** and **preview** screens will show the alias name when available: ---- ## 2. Display alias name in the chat when the agent is connected > This feature is available to **Bot developers** with access to create flows, provided that the **Inbox admin** has configured the alias names. You can customize the message with alias name and display it to the bot user after they are connected to an agent. 1. Go to **Automation** and open the flow where agent support is [configured](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox_setup/inboxdemo). 2. In the [Raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) node, manually enter the required message and variables in the **Message after ticket assignment** field. ![](https://i.imgur.com/2vuX8m0.png) :::info You can use the `{{agentAliasName}}` variable to display the alias name. It will only be available if the agent's alias name is configured on the [agent settings](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/team/agents) page. ::: ## 3. Access alias name through canned response on chats/tickets > **Inbox admins** can create canned responses that **Inbox agents** can use while conversing with customers via live chat or email. **For Inbox admins:** 1. Refer to [this](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/productivitytools/canned-responses) procedure to create canned response. 2. Add a tag and use `{{agent.aliasname}}` in the response. ![](https://i.imgur.com/9CogAuS.png) **For Inbox agents:** On the chat/email screen, enter # followed by the tag to select the alias name that can be sent to the customer. ![](https://i.imgur.com/1lQiJrq.png) --- ## Checking Ticket History (Email Ticket or Live Chat) of a Specific Customer ## Use Case The **View Recent Activity** feature in the Yellow.ai Inbox Module enables agents to review the historical support interactions—both email tickets and live chats—associated with a specific customer. This feature displays previously raised tickets along with key metadata such as agent name, ticket priority, and current status. Accessing this information allows agents to better understand recurring issues and provide more accurate and contextual support. **Related Use Cases** 1. How to view customer profile and activity using User 360. 2. How to tag and manage user data within the Yellow.ai platform. 3. How to escalate recurring issues based on ticket history. :::note **Prerequisites**: Ensure you have appropriate access to the following sections of the Yellow.ai dashboard: - **Email Tickets**: Inbox → Tickets - **Live Chats**: Inbox → Chats ::: ## Steps to Check Ticket History ### 1. Open the Email Ticket or Live Chat - Navigate to the **Inbox** module. - Select either: - An email ticket from **Inbox → Tickets**, or - A live chat from **Inbox → Chats**. ### 2. Locate Customer Details - At the top-right corner of the ticket or chat interface, locate the section displaying customer information. - This panel contains user metadata and interaction context. ### 3. Click on “View Recent Activity” - Within the customer details panel, click the **"View Recent Activity"** link. - This will open a list of all previous tickets or chats raised by the customer. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/viewrecentactivity.png) ### 4. Review Ticket History - The list will include: - Ticket titles - Assigned agent names - Priority levels - Current status of each ticket (e.g., Resolved, Open) - To examine a specific ticket in detail: - Click on the ticket title. This will redirect you to that ticket’s detailed view. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/openticket.png) ### 5. Repeat for Live Chats (if applicable) - The same procedure can be used for reviewing live chat history. - Navigate to **Inbox → Chats**, select a customer interaction, and follow the steps above to access their chat history via **View Recent Activity**. ## Expected Outcome Agents can view a customer's entire ticket or chat history, improving their ability to respond to ongoing or recurring issues. By accessing past support interactions, agents are better equipped to provide efficient, context-aware resolutions. The "View Recent Activity" feature is a critical tool for maintaining continuity in customer support and enabling proactive issue resolution. --- ## Automatically resolving spam email tickets In cloud bots, we can resolve email tickets if the ticket has been raised by a particular email ID recognized as spam. ## Prerequisites to resolve - Ensure Ticket-created event is set up. - Maintain a list of email addresses identified as spam. - Ensure you have the API endpoint and necessary credentials to resolve tickets. ## Steps to resolve 1. **Create the Ticket-created Event**: - Go to **Automation > Events > Custom Events**. - Click on Add Event and add `ticket-created`. 2. **Create a Flow from Scratch:** - Go to Build and create a new flow. - In the start node, select the trigger type Event and choose `ticket-created`. - This flow will be triggered as soon as a ticket gets created in the email tickets section. 3. Get the Incoming Email from the `ticket-created` Event: - The ticket-created event contains the following data that can be accessed as needed: ``` { "event": { "code": "ticket-created", "emailThread": { "_id": "669baa6ac95bf92836c2486e", "messageIds": [ "" ], "botId": "x1694470802970", "initiatorMail": "bhavana.thakkelapati@yellow.ai", "fromMail": "bhavana.thakkelapati@yellow.ai", "to": [ { "address": "testyellowdotai@gmail.com" } ], "subject": "testing", "replyEmail": "testyellowdotai@gmail.com" }, "ticketData": { "id": 5315, "ticketId": 332, "botId": "x1694470802970", "uid": "669baa6ac95bf92836c2486e", "source": "", "contactId": "878e8e26-f225-46c6-a20a-de6066de8eb2", "subject": "testing", "lastMessage": null, "priority": "MEDIUM", "statusId": 1, "status": { "id": 1, "createdAt": "0001-01-01T00:00:00Z", "updatedAt": "0001-01-01T00:00:00Z", "deletedAt": null, "name": "OPEN", "settingId": null }, "internalStatus": null, "groupCode": null, "xmpp": null, "dueDate": null, "responded": false, "firstRespondedTime": null, "firstResponseDuration": null, "firstResponseDurationCreated": null, "assignedTo": null, "assignedAgent": { "id": 0, "botId": "", "agentId": "", "currentAssignedTicketCount": null, "maxTicketConcurrency": 0, "lastTicketAssignedTime": null }, "assignedTime": null, "resolvedTime": null, "assignedByAdmin": false, "manualAssignment": false, "lastUserMessageTime": null, "lastAgentMessageTime": null, "lastBotMessageTime": null, "averageResponseTime": 0, "replyCount": 0, "userReplyCount": 0, "customFields": {}, "ticketType": 0, "createdAt": "2024-07-20T12:15:39.583188Z", "updatedAt": "2024-07-20T12:15:39.583188Z", "deletedAt": null, "tags": [ { "id": 4, "createdAt": "0001-01-01T00:00:00Z", "updatedAt": "0001-01-01T00:00:00Z", "deletedAt": null, "botId": "", "code": "auto_assignment_pending", "name": "auto_assignment_pending", "settingId": null, "tickets": null } ], "parent": false, "parentTicketId": null, "contact": { "contactId": "878e8e26-f225-46c6-a20a-de6066de8eb2", "primaryEmail": "bhavana.thakkelapati@yellow.ai", "botId": "x1694470802970", "firstName": "Bhavana", "lastName": "Thakkelapati", "uids": [ { "botId": "x1694470802970", "uid": "6584fe9e27d39a938d2b174a", "channelName": "email" } ] }, "slaId": 0, "slaPause": { "id": 0, "createdAt": "0001-01-01T00:00:00Z", "updatedAt": "0001-01-01T00:00:00Z", "deletedAt": null, "ticketIdPk": 0, "paused": false }, "slaActivity": null, "activityLog": null, "frtBreached": 0, "ertBreaches": 0, "ertAchievements": 0, "rtBreached": 0, "slaAchievement": "", "transferred": false, "reopened": false, "reopenedCount": 0, "reopenedBy": null, "lastReopenedTime": null, "agentFirstResponseTimeRecorded": false, "lastAssignmentId": null, "agentTicketHandlingTimeStartedAt": null, "handlingTime": null, "transferCount": 0, "sourceEmail": "testyellowdotai@gmail.com", "collaborators": null, "resolutionTarget": "", "resolutionDueTime": null, "firstResponseTarget": "", "firstResponseDueTime": null, "collaboratorsUserNames": null, "agentName": "", "agentAliasName": "", "agentEmail": "", "reopenedAgentEmail": "", "resolutionDurationCreate": 0, "resolutionDurationAssigned": 0, "tagNames": null, "isNewTicket": true, "unreadMsgCount": 0, "highlight": null, "cdpId": "x1694470802970_qX6KmO7eEGUy6KAWSHW_V", "sessionId": "669baa6ae58187819623d88c", "es_doc_props": null } }, "medium": "message", "type": "event" } ``` 4. **Get the Initiator Email**: Extract the user email ID from the event using `{{{data.event.emailThread.initiatorMail}}}`. 5. **Check for Spam Email**: Compare the extracted email ID with your spam emails list. If the email is in the spam list, proceed to resolve the email ticket. 6. Resolve the Email Ticket: **API to resolve the email ticket** ``` curl --location --request PUT 'https://cloud.yellow.ai/api/ticketing/ticket/23?botId=x1667286708237' \ --header 'Content-Type: application/json' \ --header 'x-api-key: TUl4bVHPpUm8hYan-7V9nb8UvuoCyIi_OdRo2-yS' \ --header 'Origin: https://cloud.yellow.ai' \ --data '{ "statusId": 2 // The status ID 2 indicates the resolved status of the email ticket. }' ``` **![](https://lh7-us.googleusercontent.com/docsz/AD_4nXceqPxxwliSeret0VTRZXhocdRn-OELf2_xkJycOWrN5uXyUwvJg_oTukJv7NgMqS5sg3v_tTkPHrgKBUAFko4126UR0zb29miGX_PRSWPJ78O36NAqAJLzbxBmB-rGsI2Zu9WXzoVpUaHKHyRYMNhbM6o2?key=74k5vsRH0KrNI5DXkdXVKg)** **![](https://lh7-us.googleusercontent.com/docsz/AD_4nXdeMQ0tLiIUZ9x1IpyoelvK7pVUuqttV7YcwlB3bPq7ge6Sareo1HJFd2nxh_vj4jple3OKsp4DxvmvXwquA5M-LaZw007-2E9f5yiSURv4Iw_QOHKzWfH2FLlRrgAkvXoK1J0SH-UR55Cs5H0JfkCpfn07?key=74k5vsRH0KrNI5DXkdXVKg)** --- ## Enable close ticket options for agents in app bot When agents cannot see the *Close ticket options* on the app screen while closing tickets, follow these steps: :::note **Prerequisite**: Add **group codes** to the close ticket options based on agent groups. ::: 1. Check for groups: Verify if there are any groups created within the system. 2. Agent group assignment: Ensure that the agent experiencing the issue is added to a group. If the agent is not in a group, add them to the appropriate group. 3. Verify close ticket options: - If the agent already belongs to a group, check the Close ticket options. - Review the groups assigned to each Close ticket option. - Add the relevant group names to the settings for each Close ticket option. 4. Visibility settings: Ensure the checkbox for Close ticket options to be visible while resolving tickets is ticked. ![](https://lh7-us.googleusercontent.com/docsz/AD_4nXculjaOxf0HHKQ8ii_LJoo94ux-5pXPJEyPY0YIUpaQGx4yz8W7DxP3QXpnQu7DW36TCa219-YTz9tzna-9xc_6U1n_z7Upe_CneWS5DHvfaecBPo1d-SGgI90rTs7Wqf5wPvQsX5nIN83_ccfv5VGv_R4?key=zR-mt7LU0NMhCPbswIrxIA) :::info Only the agents added under a particular group can access the close ticket options on the ticket interface while resolving the ticket. ::: :::note In Cloud Bot, the Close ticket options are covered under custom fields of Hierarchical type. ::: --- ## CSAT in chat archives report To include CSAT scores in the chat archives report, follow these steps: 1. Ensure that you **capture** the CSAT scores during the conversation and store them in appropriate variables. :::info Click [here](https://docs.yellow.ai/docs/cookbooks/insights/botagentfedback) to learn more on creating flows to fetch CSAT. ::: 2. Use the following **API request**: ``` url = 'https://cloud.yellow.ai/api/agents/tickets/update_csat_score_from_bot' headers = { 'Content-Type': 'application/json' } bot_id = 'x1623067352191' ticket_id = '100733' ticket_csat_score = 1 agent_csat_score = 5 data = { 'botId': bot_id, 'ticketId': ticket_id, 'csatData': { 'ticketCsatScore': ticket_csat_score, 'agentCsatScore': agent_csat_score } } response = requests.post(url, headers=headers, data=json.dumps(data)) # Handle the response as needed ``` Modify the API request by providing the correct values for the variables: - Replace `botId`: "x1623067352191" with the actual bot ID. - Replace `ticketId`: "100733" with the relevant ticket ID. - Replace `ticketCsatScore`: 1 with bot CSAT score you have captured. The *ticketCsatScore* field in the API accepts the values 0, 1, or null, indicating the following: - 1: The ticket has been solved. - 0: The ticket remains unsolved. - Null: No response was provided. - Replace `agentCsatScore`: 5 with the corresponding CSAT score you have captured. The *agentCsatScore* field in the API only accepts numerical values from 0 to 5. A score of 0 represents the lowest rating, while 5 represents the highest rating. :::note You can find the CSAT scores in the [Chat archive reports](https://docs.yellow.ai/docs/platform_concepts/inbox/analytics-reports/reports/chats/chat-archives-report) under the fields **ticket_csat** and **agent_rating**. ::: --- ## Custom Usecases Steps are mentioned to resolve each of the commonly encountered use cases: ## 1. How to assign a ticket to a particular group with a particular tag Follow the below steps to assign a ticket to a group by adding any tag: 1. In Inbox settings, create a [group](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/team/groups#1-add-a-new-agent-group) and [tag](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/workflows/tags). 2. Use the Raise ticket action node for each group. 3. Pass the information in the advanced settings of the ticket under Department and Tag. > Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/team/groups#11--use-groups-in-the-raise-ticket-node) for more information. ----- ## 2. How to set values coming from each channel on the tickets Follow the below steps to set values coming from each channel: 1. Use a channel filter to set variables. 2. Create global variables and set those variables. > With either variables coming from payload like `{{{profile.payload.< key_name in payload >}}}` Or `{{{sender}}}` in case of WhatsApp 4. Pass the same variables in the raise ticket action node. ------- ## 3. How to build this flow - For failed tickets, the query and contact must be stored and an email has to be sent Follow the below steps to store user details for failed tickets: 1. In the raise ticket action node on the error node, use a send email action node. 2. Create a database and use a database node to insert the ticket details into the database. -------- ## 4. How to Visualize a team's CSAT values on the yellow.ai platform(Data explorer) Currently, the Inbox CSAT values are not available for visualization (widgets/graphs). Agent CSAT values are found in **Data explorer** > **Chat tickets**. You can create a custom CSAT bot flow (on Automation). Store the custom CSAT data in a database, and create a visualisation of your preference in Data Explorer. Click [here](https://docs.yellow.ai/docs/cookbooks/insights/botagentfedback) for more details. **Sample flow:** ![](https://i.imgur.com/VbWcUqQ.png) ------- ## 5. What happens when the Group is configured with email IDs(for email communications) but is used in raise ticket node - Consider a use case where the agent groups-Esclations (with email ID as abc@company.com) is added in the inbox groups settings. This group will be visible on the [Raise ticket node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket)- Advance options. For example, the Escalation group is selected on the Raise ticket node. - All the support requests that are triggered through this particular flow will be assigned to the Escalation group **live chats**. These support requests will be found in the **Chats** tab and not in the **Tickets** tab. ![](https://i.imgur.com/Ba6S98Z.png) --- ## 6. How to pass hierarchical custom fields in raise ticket node You can pass hierarchical custom fields in an array variable (this array variable has to be created in a function). **Array variable syntax:** ``` [ { "id": "id6d80e018eb471-1687697102772", "name": "Typeone", "levelName": "Sub Category" }, { "id": "ida4564067aff73-1687697129156", "name": "TypeTwo", "levelName": "Sub Category" } ] ``` --- ## Data could not be loaded. Please update or try again later.” (Inbox Monitor page) This error appears in the **Monitor** tab of the Yellow\.ai dashboard and prevents viewing analytics and performance metrics. In this case: * Monitor tab displays a persistent error message. * Key metrics such as assigned chats, resolved chats, and handling time are not visible. * Developer tools show failed API calls with 400 Bad Request errors. ## Possible Cause This issue commonly occurs when the **bot's timezone is not set or incorrectly configured**. An invalid or missing timezone causes platform analytics APIs to fail, preventing data from loading. ## Prerequisites Before proceeding: * Ensure you have access to the Yellow\.ai dashboard. * Open your browser’s developer tools (Chrome, Edge, or Firefox). ## Steps to Troubleshoot and Fix ### 1. Open the Monitor Tab and Developer Tools * On the left navigation bar, go to **Inbox** > **Monitor** * Open the browser's **Developer Tools**: * Windows/Linux: Press `F12` or `Ctrl + Shift + I` * macOS: Press `Cmd + Option + I` * Switch to the **Network** tab. ### 2. Check for 400 Bad Request Errors * While the Monitor tab loads, observe the network requests. * Look for any failing requests with a **400 Bad Request** status. > These usually indicate an issue with the API request, often related to timezone configuration. ### 3. Update the Bot’s Timezone * Go to the **bot configuration** settings. Follow this guide to set or update the timezone: [🔗 Modify Bot Configuration – Yellow.ai Docs](https://docs.yellow.ai/docs/platform_concepts/get_started/modify-bot-configuration#addupdate-ai-agent-information) * Make sure the timezone field is populated with a valid timezone (e.g., `Asia/Kolkata`, `America/New_York`). ### 4. Refresh and Revalidate * After saving the bot configuration: * Refresh the Yellow\.ai dashboard. * Navigate back to the **Monitor** tab. * The analytics data should now load correctly. :::info Additional Information: * Ensure the bot has proper permissions and the latest configuration is deployed. * If you're using a custom domain or proxy, verify there are no request blockers in place. * If issues persist, capture the network log and contact Yellow\.ai support. ::: --- ## Dyte Event Integration in Cloud Web Bots When the video call feature is enabled in the **Raise Ticket** node, the bot receives an event called `dyte-event`. This event has multiple sub-events that allow the bot to send messages or follow up with clients accordingly. :::note **Prerequisites** - **Chat with Agent Flow**: Ensure that the chat flow is set up to enable communication with an agent. - **Video Call Feature**: The video call feature must be activated in the bot configuration. ::: ## Steps to use dyte event 1. Navigate to **Automation > Flows**. Open the **Raise Ticket** node > **Advance settings**. 2. Select the options for **Voice Call** and **SIP Call**. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXedt9NmVANaZnziKXp2UR9-bWT7XAh-940zUqzNXPMC2Z7tj1-ufjF7Ml3f5yhJz_W5rsVpJRNjhiUd0qF7lKkIltucpEtd-OjNKm6NlKW4iTyg2icePzLxlQgbgu6gVAXCHsuwTpur9CrNRBpcjmMHyyN_?key=sYXyf5rNT6tPLRLPPwri7g)** **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXf87N8MHgXkrlZCAildT2jo3Z_o5sfiQvhDhQm5pb6AF5_gdkXbI6lXjdZlsmewL3h475UUtgbkjGfoH6Of9LLJwpDndkf8iXk32MexbNg-C8ECXUIdS0C8Cm5EVuC83rOvAMqpE0PI3DdnPTwEFFXgiDY?key=sYXyf5rNT6tPLRLPPwri7g)** 3. **Initiate Video Call**: - Once these settings are configured, a call symbol will appear beside the **Transfer** and **Resolve** buttons when the chat is assigned to you within the **Inbox** module. - Click on the call symbol to initiate a video call with the end user. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeYPG29TlIviC_9N-C88vXve_R8ZwRHHdCkjoU-yuc8RJuuGFuN4muOJP-arCZzMJb_vBfAcUv0CaipX7EGvKyKAnZSgk7B7A0pHY-440QRHQZ1ced2dq-d6--p46t2oQUjZedkvtzTxh0_bhWNF6HbgGri?key=sYXyf5rNT6tPLRLPPwri7g)** 4. After the video call is connected, the bot will receive a `dyte-event`. This event includes several sub-events that can be used to trigger further actions. ## Sub-Events in Dyte Event - **meeting.started**: Triggered when the meeting starts. - **meeting.participantJoined**: Triggered when a participant joins the meeting. - **recording.statusUpdate**: Triggered to provide updates on the recording status. - **meeting.participantLeft**: Triggered when a participant leaves the meeting. - **meeting.ended**: Triggered when the meeting ends. --- ## Resolving "Data could not be loaded" Error in the Yellow.ai Monitor Tab ## Use Case In the Yellow.ai dashboard, users may encounter the error message: **"Data could not be loaded. Please update or try again later."** This typically occurs in the **Monitor** tab, preventing the display of important performance metrics such as: - Assigned chats - Resolved chats - Missed chats - First response time - Handling time This issue impacts the ability to monitor agent performance and manage live chat operations, often requiring teams to resort to manual data extraction. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/monitorerror.png) **Related Questions and Symptoms** 1. Why am I seeing "Data could not be loaded" in the Monitor tab? 2. How do I set the timezone for my Yellow.ai bot? 3. Why are platform APIs failing with 400 errors related to analytics? :::note **Prerequisites**: Before proceeding with the resolution steps, ensure the following: - You have access to the Yellow.ai dashboard. - You are familiar with browser developer tools, particularly the **Network** tab. ::: ## Steps to Resolve ### 1. Access the Monitor Tab and Open Developer Tools - Navigate to the Yellow.ai dashboard and go to the **Monitor** tab. - Open the browser’s developer tools: - In most browsers, this can be done by pressing `F12` or using the shortcut `Ctrl+Shift+I` (Windows/Linux) or `Cmd+Option+I` (Mac). - Within the developer tools, go to the **Network** tab. ### 2. Check for 400 Bad Request Errors - While the Monitor tab is attempting to load data, observe the network requests in the **Network** tab. - Look for API requests that are failing with a **400 Bad Request** status code. - These errors often indicate issues with request parameters, commonly due to a missing or incorrectly configured timezone. ### 3. Set or Update the Bot Timezone - If 400 Bad Request errors are observed, it is likely that the bot’s timezone is not set or is misconfigured. - Refer to the official Yellow.ai documentation to configure the timezone: [Modify Bot Configuration – Yellow.ai Documentation](https://docs.yellow.ai/docs/platform_concepts/get_started/modify-bot-configuration#addupdate-ai-agent-information) - Follow the instructions in the section **Add/Update AI Agent Information**, ensuring that the **timezone** field is correctly specified (e.g., `"Asia/Kolkata"`, `"America/Toronto"`). ### 4. Verify Data in the Monitor Tab - Once the timezone has been configured, refresh the Yellow.ai dashboard. - Reopen the **Monitor** tab and verify if the performance metrics are now loading correctly. ## Expected Outcome After configuring the bot's timezone correctly, the platform API requests should succeed. The Monitor tab will display performance data as expected, restoring visibility into key live chat metrics and agent productivity. --- ## Notify Agents when they are offline/busy/away Whenever an agent is offline or busy or away and a user tries to contact the agent via the bot, an agent can be notified about the same through an email (or even via SMS, WhatsApp, or voice) by using an outbound notification node. Follow the given steps to notify agents when they are offline/busy/away: 1. Create a global variable with the agent's email as a value. ![](https://lh6.googleusercontent.com/vQRLirReKG5_CmQ9_XJ_Lfioe-VHlKfM9U_pPbgpotrnmJCVNT-qJY1VjurSf9iV42OkMxNnXxJLnDB5FMfOZzAMJn8VeUbv44Y0HSEn9GdovPmQ6NFxA8J4Dxq0DHtGggIsCuKS_jmRAp-4gav67nJ4fcEKGwheQqPIwlqcxIFJh6kkehpT2sfq5A) 2. Set email template in **Engage** > **Templates**. ![](https://lh5.googleusercontent.com/T4VQiDxm_WriD9W-NEWwA6ob8yaIVbqr9ATWwaCxReLrPII-Y_9VO1XQnKLOhhDHEGYRZNOF63TjLinbnEkfE6RrmfozfTbH8Y2eWLrcFlmGzluCsQzHzKMaUSw-MZDJlDuB8Z5TMDrBuvhUtP5QgvxIRf3kCgHcBhuCsCRMnU_T8EK5cGLZOW9GhQ) 3. Use outbound notification and set-up using the agent's email variable and email template. ![](https://lh5.googleusercontent.com/X-75omKzbvhqf5Gi-SKn00e2sH5V78VYU2CYVuROCfEDVi3cdlULP8ClptVUK_kkLVoTKl-bn8Lz_eXImTqlGo3JsF23F8OP-20J4iNJzuh61rdouwE0VNJRgreCXAy1oMmM2FQxkWeEQMJeo5zRjxPPpho72spdFQnnsLrJPamktL0CK-9oSxf-nw) ![](https://lh4.googleusercontent.com/zSeNc5mAAvY1XvJ9m-li6vycVut_phv0iHySY_iln_J4lCMYiDnrtiHCPNt-WeFw_E6R6sarw5GCwiy-2sU2tFA6gMEs7YxlkS16NulYThqSW59vmRdnErHBjedIrBkHIj-6vlugePGhdpN-XoJXsduEnLabLvz1SbK9JffNUbtUNkkXelMCGMQLvQ) 4. Set events “ticket-opened”, “ticket-missed” and “ticket-queued” to active inside Event in Automation. Post this, the start trigger node needs to be configured with these events in the respective flow. ![](https://lh6.googleusercontent.com/hsj0OGeogoz2L8Tdn6q_eOPNWO2ruxEHOiU3DVB86A2xf3F4jWJw0YgGrwoUgTUv5hadyP4I4zN-ILbB_-RBXLh7U8HEjWUg3n1-v_S9DIza5KMsRsuPX7845Er7r-0tdVVu5Ue2HzZ0CdJR9vYuO2ZC1hUXl7pBDV4luZWTYkX6soV54Zf3_e1MzQ) ![](https://lh5.googleusercontent.com/cQjs9yS06jIohN4vHz2QMV5Oi9TM613S_eX0U4OGs_1qDK-E_vjbb1HgcB181w1rXawrbW7_MxX882BAGFE47fQS6REIf0WSTeiQJH1UKaJfLz1AKF1-vgiywAHzUUM-OS-jczk0Lks7PkSNoR1qo_d2Y84dV7hemMHVyiUr5a1hdxx9IRxcwYcP0g) --- ## Notify customers on agent unavailability when offline handling is enabled :::info **Prerequisite**: Enable **offline handling** settings as described [here](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/workflows/offline-chat). ::: When **Offline handling** is enabled and you want to inform customers that agents are currently unavailable and their queries will be addressed once an agent is back online, follow the steps below by picking your closest use-case: ## Notification for open and queued chats 1. Navigate to **Automation > Flows**, open the flow that includes the **Raise ticket** node. 2. Store the output of the **Raise ticket** node in a variable, as shown in the image. 3. Connect the error part of the **Raise ticket** node to a new node, which is responsible for displaying messages to the customer. > When offline handling is enabled, the chat is not immediately answered, and the flow continues to the next node until an agent responds. 4. In the new flow, retrieve the status of the ticket by accessing the status value stored in the variable `{{{variables.raiseTicketObj.status}}}`. 5. Add a [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) to your flow to identify the ticket status. 6. Depending on the ticket status identified in the condition node, you can connect the conditions to a Text node to display a relevant message addressing the customer. ![](https://imgur.com/Yqn35V9.png) > You can also fetch the ticket ID by using the variable: `{{{variables.activeTicketNumber}}}` ----- ## Notification for open chats (recommended) 1. Access the **Automation** section and navigate to **Events**. 2. Open the [Custom events](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub) and click **+Add event**. ![](https://imgur.com/FmDVEWS.png) 3. Provide the **name** `ticket-opened` and click **Create event**. ![](https://imgur.com/OnVw8EB.png) 4. Ensure that the `ticket-open` event is **Active**. If not, make it Active by clicking on the three dots next to it. ![](https://imgur.com/KvaSM3p.png) 5. [Create a new flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys) in the **Automation** > **Build**. ![](https://imgur.com/GBDM5YF.png) 6. Within the flow, add a start trigger by clicking on the start node. Select **event** from the dropdown and set the value as `ticket-opened`. ![](https://imgur.com/4RabvB5.png) 7. Add a text node to display an acknowledgment to the customer, informing them to wait for a while. ![](https://imgur.com/RLhQx5T.png) ---- ## Expected behaviour after creating a flow to notify customers `Assume all the agents are offline at the same time and a customer has requested to talk to an agent.` `A live chat request is raised` `The live chat appears in the "Open chats" section of the inbox` `The customer waits on the chat screen` `A message is displayed to the customer, stating the delay: "Your chat will be assigned as soon as we find an available agent. Please wait, and thank you for your patience"` `When any agent in that group comes online and becomes available, the live chat is immediately assigned to them` --- ## Change the priority of the ticket and assign it to a different agent or a group In this article, you will learn how to change the **priority** of a chat/email ticket and **transfer** it from one inbox agent to another. ---- #### Configure priority and group on the Raise ticket node - While creating flows (on Automation) using [Raise ticket action node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket), the bot builder can assign a priority to the chat/email tickets. Tickets created through this flow will have the assigned **Priority**. ![](https://i.imgur.com/07hndDx.png) - You can configure Priority in the action node by enabling Advanced options. In the below example, all the tickets created will be assigned to the Complaints Department (configured in [group settings](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/team/groups) and the priority is High. ---- To change the **Priority**/**Assignee**, follow the below steps: #### Assign chat tickets to a different agent or group :::note Inbox Agent or Admins cannot change the priority of chat tickets. ::: > Refer to [this doc](https://docs.yellow.ai/docs/platform_concepts/inbox/chats/chatscreen#2-user-details) to learn about chat screen and chat details. 1. Open any ongoing chat > **Details** and click **Transfer** (this option will be available based on the configuration of [custom fields](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/workflows/chat_custom_fields). 2. Select the Agent/Group to which you want to transfer the ticket. Confirm the reassignment. 3. Your chat will be transferred to the selected inbox agent or the concerned group/team (tickets will be autoassigned to the agents in this group). ![](https://i.imgur.com/FhEUhju.png) 4. While re-opening the missed/resolved chats, Inbox Admins can select the **Priority** of the ticket and assign the ticket to a particular **Category/Agent**. ![](https://i.imgur.com/MGdy64a.png) #### Change priority and assign email tickets to a different agent > Refer to [this doc](https://docs.yellow.ai/docs/platform_concepts/inbox/tickets/emailticketstatus#2-status-transition-from-different-views) to learn about email ticket screen and statuses. :::note - Inbox Agent and Admins can change the priority of email tickets. ::: 1. Priority and Assignee can be changed from the email tickets page. Search for the required ticket and select the priority/assignee (group/agent) from the dropdown. ![](https://i.imgur.com/9I1uCWK.png) 2. You can open the email ticket and view the details. Modify the Ticket Details (change the priority and assignee). These changes will be updated on the Activity log. ![](https://i.imgur.com/XH92KJK.png) --- ## Viewing Recent Activity in Inbox Chats/Tickets ## Use Case The "View Recent Activity" feature within the Yellow.ai inbox module enables agents to monitor user-specific actions by tracking tickets raised on behalf of the user and any related updates to user property parameters. This ensures visibility into user behavior and historical data, aiding in better support and resolution management. **Related Use Cases** - How to use user property variables to store data in bot flows. - Monitoring historical ticket data. - Managing customer data through the User 360 profile. :::note **Prerequisites**: - Access to the Yellow.ai dashboard with permissions to use the Inbox module. - Familiarity with the concept of user properties and ticket handling within the Yellow.ai platform. ::: ## Steps to Use the Feature ### 1. Accessing the Inbox Chat Interface - Navigate to the **Inbox** module in the Yellow.ai dashboard. - Open any chat or ticket associated with a user. ### 2. Locating the "View Recent Activity" Option - Within the agent chat interface, locate the **"View Recent Activity"** button. - This button provides quick access to historical customer data that was shared during previous bot interactions. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/activity.png) ### 3. Reviewing Recent User Properties - Upon clicking **View Recent Activity**, a panel will display the user's recent activity. - Only **user property variables**—i.e., data points explicitly stored using variables during the bot flow—will be shown here. - These include details that were collected during earlier conversations and can be used to understand user intent and behavior at the time a ticket was raised. ### 4. Viewing Full Activity Log - If additional information is needed, scroll down to find the **"View All Activity"** option. - Click on this option to be redirected to the **User 360 - User Profile Page**. ### 5. Using the User 360 - User Profile Page - This section provides a comprehensive view of all user-related data and activities. - Agents can: - View all property changes and ticket-related activities. - Add relevant **tags** to enhance the user profile and improve future context handling. - Use the built-in **search functionality** to quickly locate specific user properties. ### 6. Managing User Data - To manage or remove user records, click on the **"Delete User"** button located at the top-right corner of the User 360 page. - This action will delete the selected user and all associated activity data from the platform. ## Expected Outcome Agents can efficiently trace a user’s journey, understand ticket contexts, and access relevant data points to facilitate better responses and decision-making. The feature also supports user data enrichment and cleanup via tagging and deletion options. This feature streamlines agent workflows by centralizing user data, enabling faster resolution times and improved customer experience. --- ## Creating a Slack App for Internal Ticketing To enable internal ticketing functionality on your agent's live chat screen, follow these steps: 1. **Create a new Slack app**: Go to the [Slack API page](https://api.slack.com/apps) and click on "Create New App". ![image](https://lh7-us.googleusercontent.com/Ykd3K_AmSrQfInNqOI6JxIBQG9FE-2Ccma9ZDFZ3Z7W4K3AhO1kFhaHpccp7vlBgvIYuDkkNqfx3p1aRQiSxsn0p21ynhjdAUF8FoZk23cYhPkjDYh1ML3JbYDO3-QUeVVeXQEXb5sSQw56AjBoSYZQ) 2. **Configure app settings**: - Select **From Scratch** and provide a name for your app. ![image](https://imgur.com/gY4ptyq.png) - Choose the workspace where you want to deploy the app and click on **Create App**. ![image](https://imgur.com/bZcjJaR.png) - Dashboard for the app opens up. ![image](https://imgur.com/JmO6Kmj.png) 3. **Set up incoming webhooks**: - Navigate to **Features** in the left sidebar and select **Incoming Webhooks**. ![image](https://imgur.com/zNjF4Sn.png) - Toggle **Activate Incoming Webhook** to turn it on. ![image](https://imgur.com/fXGrJT1.png) 4. **Configure event subscriptions**: * Under **Features**, select **Event Subscriptions**. ![image](https://imgur.com/VrJ0Ylb.png) * Enable events and provide a Request URL obtained from the Inbox Team. ![image](https://imgur.com/GmAEgWs.png) ![image](https://imgur.com/asgpjFA.png) * Click **Subscribe to bot events**. ![image](https://imgur.com/WZZjb8h.png) * Subscribe to the following events: * Channel Deleted * Member Joined Channel * Member Left Channel * Message Channels * Message Groups ![image](https://imgur.com/0XUyaep.png) * Click on **Save Changes**. ![image](https://imgur.com/85zERuz.png) 5. **OAuth and permissions**: * Go to **OAuth and Permissions** to deploy the app in your Slack workspace. ![image](https://imgur.com/WYTFsje.png) * Click on **Install to Workspace** to generate the Bot User OAuth token required for internal ticketing. ![image](https://imgur.com/HBXadXV.png) * Allow access to the general channel or any specific channels where the app can post messages. ![image](https://imgur.com/S6FA7bx.png) 6. **Copy Bot User OAuth Token**: After installation, copy the Bot User OAuth Token, which typically starts with `xoxb-`. Paste this token in the Channels Page in cloud.yellow.ai under **Slack** > **Slack Tokens**. ![image](https://imgur.com/UsUE3yM.png) ![image](https://imgur.com/4TTv3IS.png) 7. **Add scopes**: Scroll down to the **Scopes** section and add the following scopes for the Bot User OAuth Token: ``` App Mentions: Read Chat: Write Channels: Write Invites Channels: History Channels: Read Chat: Write Customize Chat: Write Public Files: Write Groups: History Groups: Read Groups: Write Groups: Write Invites IM: History IM: Read IM: Write Invites Metadata Message: Read MPIM: History MPIM: Read MPIM: Write Invites Usergroups: Read Users: Read Files: Read Remote Files: Share Remote Files: Write ``` ![image](https://imgur.com/xVCha9L.png) 8. **Reinstall the app**: Once all scopes are added, reinstall the app to your workspace by clicking on **Reinstall to Workspace**. ![image](https://imgur.com/pGzRequ.png) 9. **Finalize configuration**: Your Slack app is now ready for use. Use the Bot User OAuth Token for [configuring internal ticketing](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/slack2#create-an-app-in-slack) on cloud.yellow.ai > **Channels > Slack**. :::info Refer to [this document](https://docs.yellow.ai/docs/platform_concepts/inbox/chats/internal-ticket) for guidance on using internal ticketing within the inbox. ::: --- ## Display message or sync data when a Live Chat is closed When a customer initiates a live chat, an inbox agent takes on the task of resolving the query. Once the agent has resolved the query, they mark the chat as **Resolved**. This triggers the execution of the node connected to the **ticket closed** in the [raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes#raise-ticket-outputs) node, which is followed by the other nodes connected to it. After a chat has ended, you may want to perform actions like updating a database, calling an API, sending customer details to the CSM, or displaying promotional messages or products. However, you cannot connect the **ticket closed** part of the [raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes#raise-ticket-outputs) node to both options simultaneously. In this case, you can use an **event** to identify the ticket closed and perform background actions on a different flow. > If the [CSAT setting](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/workflows/csat) is enabled, the system records the customer feedback on the agent before closing the chat. To configure the system to automatically trigger an event when agents resolve a live chat, you need to manually enable it from the event hub and use it in the flows. ------ ## Step 1: Attach nodes to ticket closed 1. To attach nodes to ticket closed, connect the **Raise ticket** > **Ticket closed** with the nodes you want to execute. This will get triggered after the ticket is closed. ![](https://i.imgur.com/tFTr2P5.png) :::info - This step is recommended but not mandatory, it is required to make sure that the flow is completed and the user is intimidated that the ticket is closed. - You can also add options in this flow that connects to other flows to improve your user experience. ::: ----- ## Step 2: Activate ticket-closed event To identify that the inbox agent has closed a ticket you must enable **Ticket closed** event. Follow these steps: 1. Go to **Automation** > **Events** > **Inbox** and search for `ticket-closed`. ![](https://i.imgur.com/qZYPSZ2.png) 2. Click the three dots icon and select **Activate** to activate the event. ----- ## Step 3: Trigger flows after a ticket is resolved You can design flows that can be triggered when **Ticket closed event** is identified. Follow these steps: 1. Create a new [flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys). 2. By clicking **Start** node you can set when the flow gets triggered. Set it to **Event** and select the value as **ticket-closed**. ![](https://i.imgur.com/5J4tjm4.png) 3. To provide a personalized response from the bot when a ticket is closed, add [nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes) to the flow that are designed to execute specific tasks. The flow will automatically run whenever a ticket is closed. ----- ### Use-cases of ticket-closed event A few examples of the flows that can be run after the ticket is closed. > You can add one or more flows with start trigger as `ticket-closed`. All these flows will run simultaneously. 1. **Update a database/CRM with ticket details.** ![](https://imgur.com/g9uUpoQ.png) 2. **Create a logic to filter the user data based on the type of query raised and send it to a CRM/Database.** ![](https://imgur.com/73wkH2V.png) 3. **Hit an API once the ticket is closed.** ![](https://imgur.com/EfdUa9t.png) 4. **Send a promotional messsage.** ![](https://imgur.com/hxUl23L.png) 5. **Schedule a follow up interview.** ![](https://imgur.com/MzKzN7U.png) --- ## Flow to connect with an agent without asking for any information from the user Follow the below steps to transfer the chat to an agent without asking for any information from the user: 1. **Name** and **Query** are the mandatory fields to be passed into Raise ticket node. To create a flow that does not ask user for any of the information, create two **global variables** (click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#3-create-a-variable) to learn how) for storing names and queries with some dummy values (the dummy name and query won’t be displayed to the user, it will be displayed to the live agent). ![](https://i.imgur.com/b2PcVD0.png) 2. Create a simple flow and directly connect Raise ticket node to the start node. 3. Pass the same variables in the [Raise ticket action node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket). ![](https://i.imgur.com/ojL2BAU.png) 4. This flow can end with **Ticket closed** and **Error** connected to a [Message](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) node. --- ## Configuring call URLs The **Video Call URL** is a meet link with a built-in authentication token. Clicking on this URL allows individuals to join the call effortlessly. This URL is generated and sent to every participant in the call. - For agents, it is readily available on the UI along with their authentication token. - For end users accessing Yellow.ai via the widget, the option to join a video call(URL) is found as a call button on their UI. - For end users in other channels, the bot must create and send the URL. Video call URL is used when a video call ticket is created, and the user interface (UI) is not controlled by Yellow.ai in certain channels, excluding the widget. This article will guide you through the process of shortening and configuring video call URLs. ## Steps to configure video call URL To configure video call URL, follow these steps: 1. When a ticket is created for video call, an event is triggered. 2. Handle the triggered event and call the below function (this returns the long-form URL): ``` https://app.yellow.ai/api/agents/settings/getVideoCallUrlForTicket?bot=x1553936559750&ticketId=103987&baseRegionUrl=https://app.yellow.ai ``` 3. Pass the long-form URL to a URL shortening API. 4. Send out the shortened URL to the intended participants. By integrating a URL shortening API into the process, the Video Call URL is easily shareable and accessible, regardless of the communication channel. --- ## Fetch CSAT(bot & agent feedback) from bot users on data explorer  To collect user/customer feedback on yellow.ai, you can take the below approaches: 1. **Collect user feedback for the bot interaction** (on web widget): This is done by creating a flow using Feedback node. When this node is reached during the flow, feedback questions will be posed to the users. 2. **Collect user feedback for bot/agent interaction via. custom flows** (recommended for other channels like Facebook, WhatsApp, etc.): Create a custom flow on Automation. This data will be available in the [Data Explorer](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/intro) section. You can visualize it further by taking advantage of [Dashboards](https://docs.yellow.ai/docs/platform_concepts/growth/Dashboards/dashboardintro) and [Visualisation](https://docs.yellow.ai/docs/platform_concepts/growth/visualisation/visualization).  ----- ## 1. Default user feedback for bot interaction 1. In **Automation**, at the end of your existing flow, add a [feedback node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#27-feedback) to collect user feedback on the **bot-customer** and **inbox agent-customer** conversation. ![](https://i.imgur.com/SI8BwYL.png) ------- ## 2. Default user feedback for agent interaction 1. Create a flow using the [Raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) action node. 2. Configure Inbox agents . 3. Enable **CSAT** from the inbox settings. 4. After a chat ticket is closed, your customers will be asked for feedback on the agent interaction. > Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox-settings/workflows/csat) to know more about Agent CSAT score.  ---- ## 3. Customize user feedback flow on Automation > The above-mentioned default feedback methods will work only on your **website chatbot**.  You can create flows in Automation to manually collect user feedback (from the bot interaction) for two use cases:  1. Collect CSAT feedback for other channels like WhatsApp, Facebook, etc. after an inbox live agent interaction. 2. Customize your feedback parameters. The feedback node collects only the rating and comments from the user. If you want to collect other details, like "which product would you likely recommend to your friends," you can use this method. Follow the given steps:  1. Create a feedback flow. - You can add [prompt nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) to ask questions or other details and store the response in a variable.  ![](https://i.imgur.com/uE0Esxl.png) - To collect ratings, use a node to present options ranging from 1 to 5 (the CSAT score) and **store the response** in a variable (for example, feedback).If your channel is WhatsApp, you can use the [WhatsApp list node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#22-whatsapp-list). You can also use [Quick replies node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) to fetch the user rating.    2. Create a database with the required columns (for instructions, see [here](https://docs.yellow.ai/docs/platform_concepts/studio/database)). ![](https://i.imgur.com/uQMNe3m.png) 3. Send the collected data (feedback variables) into the database using the [database action node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) in the bot flow. ![](https://i.imgur.com/1GbRjx2.png) 4. Connect this feedback flow at the end of your use case (i.e., the other flow where the bot interaction is expected to end) using an [Execute Flow node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) or when the [ticket is closed](https://docs.yellow.ai/docs/cookbooks/inbox/ticketclose-message). ----- ## 4. View user feedback on Insights 1. **Data from feedback node for bot interaction**: Available on **Insights** > **Data explorer** > **Default tables** > **User feedback**.   ![](https://i.imgur.com/cpnqjNR.png) 2. **Data from CSAT settings for agent interaction**: Available on **Insights** > [Data Explorer](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/defaulttables) > **Chat tickets** table . > Chat tickets and User feedback are default database table, you need not create any new table to save this data. 4. **Data from custom flows for bot/agent interaction**: Available on **Insights** > **Data Explorer** > **Custom Tables** > Select the table in which you have stored the feedback. ![](https://i.imgur.com/bkDSbfc.png) You can save these tables(queries) and view them on a separate dashboard. Refresh the page to update dashboards with newly added data points. ![](https://i.imgur.com/wluH8KC.png) --- ## Bot performance metrics for indept insights on Flows The **Bot Performance Metrics** dashboard provides detailed insights into the effectiveness and usage of your bot. To access this dashboard, navigate to **Dashboard > Bot Performance Metrics**. All data in this dashboard can be filtered for specific **dates** or **time ranges** to provide tailored analytics. ![image](https://imgur.com/XRLp8Db.png) This guide explains the various metrics available in the dashboard, how to interpret them, and when to use them to optimize your bot's performance. --- ## Bot performance metrics KPIs Following are the Bot Performance Metrics Key performance indicators(KPIs): ### 1. Flow Visits Tracks the number of times users enter a specific flow within the bot. This metric helps measure the popularity and usage of different bot flows. ![image](https://imgur.com/lSYqz12.png) **Data Details:** - **Data Source:** Number of visits completed through flows. - **Table:** User Engagement Events. - **Filter:** Event is "journey-completed." - **Summarize By:** Sum of count. - **Group By:** Journey. **When to Use:** - To understand which flows are most frequently accessed. - To identify less-used flows that may require improvements or better promotion. --- ### 2. Bot Accuracy Measures the bot's ability to accurately understand and respond to user queries. High accuracy indicates effective natural language processing (NLP) and a well-trained bot. ![image](https://imgur.com/gxZPSzU.png) **Data Details:** - **Data Source:** Accuracy of bot identification in messages. - **Table:** Message Events. - **Filter:** IDENTIFICATIONSTATUS not empty. - **Summarize By:** Count. - **Group By:** IdentificationStatus. - **Visualization:** Pivot. - **Custom Formula:** `Identified / (Identified + Unidentified)`. **When to Use:** - To evaluate the quality of the bot's NLP. - To identify areas where training data or intents need refinement. --- ### 3. Bot Feedback Collects user feedback on their interactions with the bot, providing insights into user satisfaction and areas for improvement. **Data Details:** - **Data Source:** Feedback provided for bot performance. - **Table:** User Feedback Table. - **Summarize By:** Average on rating. **When to Use:** - To gauge user satisfaction and identify trends in user sentiment. - To prioritize improvements based on feedback ratings. --- ### 4. Flow Completion Rate Calculates the percentage of users who successfully complete a flow from start to finish. Indicates how effectively the bot guides users through processes. ![image](https://imgur.com/CT692tk.png) **Data Details:** - **Data Source:** Completion rate of initiated journeys. - **Table:** User Engagement Events. - **Filter:** Event is "journey-started" and "journey-completed." - **Summarize By:** Sum of count. - **Group By:** Event. - **Visualization:** Pivot. - **Custom Formula:** `(journey-completed / journey-started) * 100`. **When to Use:** - To assess the usability and clarity of specific flows. - To identify points where users abandon flows and improve them. #### Flow Completion Rate for Each flow This displays the flow completion rate for each flow. ![image](https://imgur.com/BD19WHG.png) --- ### 5. Deflection Rate Measures the percentage of user inquiries resolved by the bot without escalation to a human agent. A higher deflection rate indicates effective issue resolution by the bot. **Data Details:** - **Data Source:** Deflection rate in user-agent sessions. - **Table:** User Engagement Events. - **Filter:** Event is "user-session" and "agent-session." - **Summarize By:** Count. - **Group By:** Event. - **Visualization:** Pivot. - **Custom Formula:** `(User-Agent / User) * 100`. **When to Use:** - To monitor the bot's success in reducing workload for human agents. - To identify areas where bot responses can be improved for higher deflection. --- ### 6. Utterance Status Split Categorizes user utterances based on their status (e.g., recognized, unrecognized, ambiguous). Helps in understanding how well the bot processes user inputs. **Data Details:** - **Data Source:** Number of messages with an "unidentified" status. - **Table:** Message Events. - **Filter:** IdentificationStatus is "unidentified." **When to Use:** - To identify intents that are not recognized or are ambiguous. - To refine training data and improve recognition rates. --- ### 7. API Usage by Status Code Tracks the status codes returned by API requests made by the bot. Provides insights into the performance and reliability of APIs. ![image](https://imgur.com/0Q23WNM.png) **Data Details:** - **Data Source:** Usage of API services categorized by status. - **Table:** API Events. - **Filter:** API name. - **Summarize By:** Sum of count. - **Group By:** Status code. **When to Use:** - To monitor API reliability and identify potential issues with integrations. - To troubleshoot failed API requests based on status codes. --- ### 8. API Requests by Day Displays the number of API requests made by the bot daily. Useful for tracking bot activity levels and identifying trends or spikes in API usage. ![image](https://imgur.com/eRniV1p.png) **Data Details:** - **Data Source:** Usage of API services categorized by status. - **Table:** API Events. - **Filter:** API name. - **Summarize By:** Sum of count. - **Group By:** Day. **When to Use:** - To track daily API activity and identify usage patterns. - To ensure API request volumes align with expected bot activity. --- ## Understand and analyse issues in a conversation This guide highlights the information that cna be obtained from the **Conversational issues widget** available on the **Insights > Overview** page. - On this tab you can find analytics based on the [conversation logs](https://docs.yellow.ai/docs/platform_concepts/analyze/chat-logs) (Automation). - At the end of the widget, you can analyze the metrics for the selected date range. To see these conversations, click **View conversation logs**, you will be directed to the **Automation > Conversation logs** page. > ![](https://i.imgur.com/ALU3xMi.png) - There are 2 tabs that can help you analyse the conversation issues, **Overview** and **Analyse**. ------ ## 1. Overview of conversational issues This is a time-series view of the priority issues identified in your bot-user conversations. | High-level metrics tracked on overview tab| | ---- | | **Messages with issues**: This represents the percentage of messages where the below listed issues have been identified out of the total messages exchanged between the user and bot. | |**Users affected**: This is the percentage of total users that faced one or more of the issues while conversing with the bot. | ![](https://i.imgur.com/Xz4Gw0h.png) | The conversation issues identified on the overview tab | | --- | | **Missing bot response**: When an expected bot response does not go through due to a broken flow or a fallback not being configured. | | **Unidentified**: When the bot is unable to recognize the intent of a user message. | | **Validator limit exceeded**: When the validation of a particular user message fails more than 3 times consecutively. | | **Fallback limit exceeded**: When the fallback journey is called more than two times in a row due to the bot not understanding user intent. | ---------- ## 2. Analyse and resolve conversational issues Select the **Analyse** tab to see a detailed view of conversation issues along with their severity and count of total occurrences. Four common issues encountered by the bot are listed along with the **Suggested next steps**. They are: 1. **Unidentified user response** 2. **Missing bot response** 3. **Validation limit exceeded** 4. **Fallback limit exceeded** You can click on each issue to get redirected to the conversation logs where those issues have been identified. These conversations are filtered for the selected parameters, that is, applied date range and tag (identified issue). ![](https://i.imgur.com/KHHIq3A.png) ------ ### Steps to identify and fix conversation issues > Consider the following example to fix the **Missing bot response** issue. **Missing bot response** can be rectified by opening the conversations, finding the point where the bot response was missing, and configuring a fallback or adding a message to the node, if empty. 1. Click **Missing bot response**. You will be directed to the conversation log page that consists of the conversations that encountered missing bot responses. 2. Open any conversation. Select the **Missing bot response** to identify the exact point. 3. Hover over the text, click on the menu options, and select **Go to node**. 4. You will be directed to the respective flow, modify the flow by adding a fallback/new message as per your use case. ![](https://i.imgur.com/CXkG0lR.gif) --- ## Export reports for a timeframe longer than 190 days Under **Insights > Data Explorer**, you can view or export notification reports(or other reports) for only the past 190 days. To generate annual or longer-duration reports, use the **Insights > Data export** section. For more details about Data export, refer to the [documentation here](https://docs.yellow.ai/docs/platform_concepts/growth/dataops). ## Steps to export data older than 190 days ### 1. Access Data export Navigate to **Insights > Data export**, then click **+ Create Export Rule**. ![Create Export Rule](https://cdn.yellowmessenger.com/assets/docs/data-export.png) ### 2. Configure Export Rule - Provide a name for the export. - Select **Notification Reports** from the data list. - Choose the export format (JSON or CSV). - Click **Next**. ![Select Notification Reports](https://cdn.yellowmessenger.com/assets/docs/data-export-next.png) ### 3. Set Export Frequency - For historical data, choose **One-time Export**. - Click **Next**. ![Select Frequency](https://cdn.yellowmessenger.com/assets/docs/data-export-frequency.png) ### 4. Define Date Range - Select the desired date range in the dropdown menu. - A confirmation message will display the selected period (e.g., "You’ll receive data between ___ to ___"). - Verify the range and click **Next**. ![Select Date Range](https://cdn.yellowmessenger.com/assets/docs/data-export-date-range.png) ### 5. Choose Export Destination - Select your preferred destination: **Amazon S3**, **Azure Blob**, **Google Cloud Storage**, or **SFTP Server**. - Follow the prompts to connect your destination. - Click **Next**. ![Export Destination](https://cdn.yellowmessenger.com/assets/docs/data-export-destination.png) ### 6. Create the Export Rule - Review the configuration and click **Create Export Rule**. ### 7. Monitor Export Logs - After creating the rule, click on the rule name to view logs, including: - Export date and frequency. - Status of export (Scheduled, Ongoing, Success, or Failure). - Size of exported data. - For detailed insights, click on **Job IDs** to access: - Data source and type (JSON/CSV). - Size of data. - Export status (Success or Failure). - Error details (if the export failed). :::info **Export Other Data Types** The above procedure can be followed for other available data types in **Data export**. ::: --- ## Descriptions of default table columns on data explorer ## API events | Field | Description | |--------------|---------------| | TIMESTAMP | The TIMESTAMP field represents time intervals in 1-minute slots within a 24-hour day. When an event occurs, its timestamp is rounded to the nearest 1-minute interval. The first occurrence creates a new row with the timestamp, and if the same event occurs again within the same 1-minute slot, the count column value for that timestamp is incremented by 1. This allows tracking the number of occurrences of the same event within each 1-minute interval. Subsequent occurrences in the same interval contribute to the count column value. For example: Suppose an event occurs at 9:46:24, its timestamp would be 9:46, creating a new row. If the same event happens at 9:46:37, the count becomes 2 for the 9:46 timestamp. Another event at 10:13:47 creates a new row with a timestamp of 10:13. The count column tracks repeated occurrences within the same 1-minute slot. | | BID | Business Identifier | | CUSTOMID1 | Custom Identifier from CDP (Customer Data Platform) | | CUSTOMID2 | Custom Identifier from CDP (Customer Data Platform) | | EVENTINFO | Additional Information Stored By Platform (Not for customer customization) | | IP | User's IP address identified by the platform | | NAME | Not Applicable (NA) | | SOURCE | Additional Information Stored By Platform (Not for customer customization) | | STATUSCODE | Various Status of the API response. 200 Means Success, 404 means Server-side Failure | | UID | Unique Identifier of User | | LANGUAGE | Language identified by our platform for the ongoing interaction | | RESPONSE_TIME| Time taken (in milliseconds) by the server to respond back to the API request | | COUNT | Number of API Hits | ----- ## Bot events | Events | Description | | -------- | -------- | |bot_loads | Fired when a gets bot loaded on the platform | |datastore-bulk-upsert|Fired when Bulk insert or update operation is performed on the datastore| |datastore-delete| Fired when a delete operation is performed on the datastore | |datastore-failed-delete|Fired when a delete operation fails on the datastore| |datastore-failed-dropdata| Fired when a drop data action fails on the datastore | |datastore-failed-find|Fired when a find request is received on the datastore and the request fails| |datastore-failed-insert|Fired when an insert operation is performed and it fails to insert into the datastore| |datastore-failed-search|Fired when a search operation is performed on the datastore and it fails| |datastore-failed-searchDocuments| Fired when a step of the journey is expected or a prompt is shown to the user| |datastore-failed-update|Fired when the update operation is performed on the datastore and it fails| |datastore-feedback| Fired when feedback is pushed into the datastore| |datastore-find|Fired when a find operation is performed on the datastore| |datastore-insert|Fired when an insert operation is performed on the datastore| |datastore-search|Fired when a search operation is performed on the datastore| |datastore-searchDocuments| Fired when a document search operation is performed on the datastore | |datastore-update|Fired when an update operation is performed on the datastore| |db_node_fallback|Fired when a notification is received to the mobile widget| |email-sent|Fired when an email is sent| |function-execution-time| Fired when a session is created based on a USER message| |invocation|Fired when a new session is created from a user message for the WhatsApp channel| |otp-sent|Fired when an OTP is sent| |otp-verified|Fired when an OTP is verified| |pdf-convert-api|Fired when a PDF convert API is being hit| |redis-del |Fired when the delete operation is performed on the Redis memory| |redis-get|Fired when data is fetched from the Redis memory| |redis-set |Fired when write operation is performed on the Redis memory| |synonyms|Fired when a synonym is detected| |unknown-message |Fired when an unknown message is received| |widget_loaded|Fired when a widget is loaded| > Click [here](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub#2-type-of-events) to learn about events. ----- ## Chat tickets | Field | Description | |-------------------------------------------|---------------| | USER_ID | Unique identifier for the user in the given channel. | | RECENT_USER_MESSAGE_TIME | Time of the last user message; null if not responded. | | CONTACT_PHONE | Phone number of the user collected from the bot. | | CONTACT_EMAIL | Email of the user collected from the bot. | | CONTACT_NAME | Name of the user collected from the bot. | | TICKET_PRIORITY | Priority of the ticket (default: medium). | | TICKET_CREATION_TIME | Time the ticket is created. | | SOURCE_CHANNEL | Channel through which the user accessed the bot. | | TICKET_TRANSFERS | List of ticket reassignments to agents or groups. | | TICKET_TYPE | Type of the ticket (default: live chat). | | VOICE_CALL_FLAG | Indicates if video calling is enabled for this ticket. | | AUTO_TRANSLATE_FLAG | Indicates if auto-translate is enabled for this ticket. | | RECENT_AGENT_MESSAGE_TIME | Time of the last agent message. | | ADMIN_ASSIGNMENT_FLAG | Indicates if an admin assigned this ticket to the agent. | | REPLY_COUNT | Number of aggregate responses given by the agent to the end user. | | USER_REPLY_COUNT | Number of aggregate responses given by the user to the agent. | | TICKET_ID | Auto-generated reference number for each incoming ticket. | | TAGS | Categorization of tickets done with configured words/phrases in inbox settings. | | COMMENTS | Additional information about the chat ticket, including inactivity, auto-translate, etc. | | OPEN_TIME | Time the ticket was opened. | | ASSIGNMENT_TIME | Time the ticket was assigned. | | RESOLUTION_TIME | Time the ticket was resolved. | | GROUP_CODE | Category/group to which the ticket was assigned. | | AGENT_NAME | Name of the assigned agent. | | AGENT_EMAIL | Email of the assigned agent. | | REOPENED_AGENT_EMAIL | Email of the agent who reopened the ticket. | | RESOLUTION_DURATION_CREATE_IN_SECONDS | Duration between resolution time and creation time (in seconds). | | RESOLUTION_DURATION_ASSIGNED_IN_SECONDS | Duration between resolution time and assigned time (in seconds). | | QUEUE_WAIT_DURATION_IN_SECONDS | Duration between assigned time and ticket creation time (in seconds). | | FIRST_RESPONSE_DURATION_IN_SECONDS | Duration between First Response Time (FRT) and assigned time (in seconds). | | FIRST_RESPONSE_TIME_CREATION_IN_SECONDS | Duration between FRT and ticket creation time (in seconds). | | ORIGINAL_ASSIGNMENT_TIME | Time the ticket was **first** assigned to an agent. On reassigned tickets this stays the original (first) assignment time; on non-reassigned tickets it matches ASSIGNMENT_TIME. This is the timestamp used to compute FRT. | | ORIGINAL_FIRST_RESPONSE_TIME | Time of the **first** agent's first response. On reassigned tickets this stays the original first response; on non-reassigned tickets it matches FIRST_RESPONSE_TIME. FRT can be validated as: `(ORIGINAL_FIRST_RESPONSE_TIME − ORIGINAL_ASSIGNMENT_TIME)` = FIRST_RESPONSE_DURATION_IN_SECONDS. | | AVERAGE_RESPONSE_TIME_IN_MILLISECONDS | Average time taken for agents to respond to each customer reply in all tickets (in milliseconds). | | ABANDON_DURATION | It measures how long a customer waited for an agent before leaving the chat without being attended. ABANDON_DURATION = Time of Abandonment – Time of Chat Initiation | AVERAGE_RESPONSE_TIME_IN_SECONDS | Average time taken for agents to respond to each customer reply in all tickets (in seconds). | | CHILD_BOT_ID | Bot ID from which this chat was raised (for unified inbox). | | CUSTOM FIELDS | Individual custom fields and their values captured from this live chat. | | TICKET_STATUS | Possible statuses for a chat ticket: Open, Assigned, Missed, Resolved, and Queued. | ### Status description | Status | Description | |----------|-----------------------------------------------------------------------------------------------------------------------------------------| | Open | Set when an incoming live chat has no available agents, either inside or outside working hours, to handle it. | | Assigned | Set when a chat is assigned to an agent after being created. | | Missed | Set as the fallback for all incoming chats that cannot be assigned to agents. This may occur if the queue is not enabled, the queue is full, or offline functionality is not enabled. | | Resolved | Set when agents close a live chat. | | Queued | Set when agents are busy or away, or if chat concurrency per agent is full. Incoming live chats are directed to queued chats when queues are enabled. | ----- ## Email tickets | Field | Description | |----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | AGENT_EMAIL | Email ID of the assigned agent. | | AGENT_NAME | Name of the assigned agent. | | AGENT_ASSIGNMENT_COUNT | The current ticket concurrency assigned to the agent at the time of ticket creation. | | ADMIN_ASSIGNMENT_FLAG | True if the admin manually assigned this ticket to an agent. | | ASSIGNMENT_TIME | The timestamp at which the ticket was assigned to the agent. | | AGENT_ID | Unique identifier for the assigned agent. | | COLLABORATORS | List of collaborators involved in the ticket. | | CONTACT_FIRST_NAME | First name of the customer who created this ticket. | | CONTACT_EMAIL | Email of the customer who created this ticket. | | TICKET_CREATION_TIME | The timestamp when the ticket was created within the platform. | | CUSTOM FIELDS | All individual custom fields and their values captured from this email ticket. | | TICKET_DUE_DATE | Due date of the ticket. | | FIRST_RESPONSE_TIME | The timestamp of the first response provided by the agent in that ticket. | | FIRST_RESPONSE_DUE_TIME | Due time for the first response SLA. | | FIRST_RESPONSE_DURATION_ASSIGNED_IN_SECONDS | Total time duration between the ticket being assigned to an agent and the agent providing the first response. | | FIRST_RESPONSE_DURATION_CREATE_IN_SECONDS | Total time duration between the ticket being created in the platform and the agent providing the first response. | | FIRST_RESPONSE_TARGET | The target timestamp by which the first response must be provided according to the SLA policy. | | GROUP_CODE | The group to which the ticket is assigned. | | RECENT_AGENT_MESSAGE_TIME | The timestamp of the last agent message in that ticket. | | RECENT_BOT_MESSAGE_TIME | The timestamp of the last bot message in that ticket. | | RECENT_REOPEN_TIME | The last timestamp when the ticket was reopened. | | RECENT_USER_MESSAGE_TIME | The timestamp of the last user message in that ticket. | | MANUAL_ASSIGNMENT_FLAG | True if the ticket was manually assigned to an agent. | | PARENT_FLAG | True if other tickets are merged into this ticket (parent). | | PARENT_TICKET_ID | Ticket ID of the parent ticket to which this ticket is merged. | | TICKET_PRIORITY | The priority of the ticket, set during its creation or changed by the agent (High, Medium, or Low). | | REOPENED_FLAG | True if the ticket is reopened. | | REOPENED_AGENT_EMAIL | Email ID of the agent to whom the ticket was reopened. | | REOPENED_BY | The agents name who reopened the ticket. | | REOPEN_COUNT | Count of times the ticket is reopened. | | REPLY_COUNT | Count of exchanges between the customer and the agent. | | RESOLUTION_DUE_TIME | Due time for ticket resolution. | | RESOLUTION_DURATION_ASSIGNED_IN_SECONDS| Total time duration between the ticket being assigned to an agent and the ticket getting resolved. | | RESOLUTION_DURATION_CREATE_IN_SECONDS | Total time duration between the ticket being created in the platform and the ticket getting resolved. | | RESOLUTION_TARGET | Whether the resolution SLA was achieved or breached. | | RESOLUTION_TIME | The timestamp when the ticket was marked resolved by the agent. | | RESPONDED_FLAG | Indicates whether the agent has responded to the ticket. | | TICKET_STATUS | Status of the email ticket (Opened, In-progress, On-hold, Resolved, or Pending). | | TICKET_SUBJECT | The subject mentioned in the email ticket. | | TAG_NAME | All the tags applied to this particular ticket. | | TICKET_ID | Auto-generated reference number for each incoming ticket. | | TRANSFERRED_FLAG | True if the ticket has been transferred at least once. | | USER_ID | Unique identifier for the user in the given channel. | | USER_REPLY_COUNT | Number of times the user has replied in the ticket. | ----- ## Inbox call records | Field | Description | |---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | BOT_ID | Bot ID associated with the configured inbox for handling calls. | | USER_ID | Unique identifier for the user in the given channel. | | TICKET_ID | Auto-generated reference number for each incoming ticket related to the voice call. | | CALL_DURATION | Duration between the call pickup time and call end time. | | CALL_SID | Unique identifier for the voice call. | | CALL_PICKUP_TIME | Time at which the call is picked up by the agent. | | CALL_END_TIME | Time at which the call is ended, either by the agent, user, or due to an error. | | CALL_WRAPUP_TIME | Time at which the ticket status transitions to wrap-up after the call ends. | | CALL_WRAPUP_DURATION | Duration between the ticket resolved time and ticket wrap-up time. | | CALL_RECORDING_URL | URL link to the call recording (audio) between the agent and the customer. | | CALL_QUEUE_START_TIME | Queued time of the ticket or call. | | CALL_QUEUE_WAIT_TIME | Duration between the first time the ticket is queued and the pickup time. | | CALL_ASSIGNED_TIME | Time at which the ticket is assigned to an agent. | | CALL_CSAT_AGENT_SCORE | The default Customer Satisfaction (CSAT) feedback received for the agent after the voice call. | | CALL_CSAT_TICKET_SCORE | The default CSAT feedback received for the overall ticket after the voice call. | | TIMESTAMP | Created time of this voice call on the inbox. | | QUEUE_DROP_OFF_TYPE | Indicates whether the user dropped off from the queue and the reason for the drop-off. | | QUEUE_DROP_OFF_TIME | Time at which the user dropped off from the queue. | | REQUEUE_COUNT | Number of times the call or ticket was requeued. | | DISCONNECTED_BY | Indicates which peer (agent or user) hung up the call. | ---- ## Inbox events | Field | Description | |------------|--------------------------------------------------------------| | TIMESTAMP | The date and time when the event was triggered. | | AGENTID | Unique Identifier (UID) for agents, used for internal purposes.| | BID | Business Identifier - a distinctive identifier for the business involved.| | CATEGORY | The name or code of the group to which the raised Inbox ticket belongs.| | SOURCE | The communication channel through which the user is engaging with the bot (e.g., Whatsapp, Facebook, Yellow Messenger).| | UID | User Identifier - a unique identifier assigned to each user for tracking and distinction.| | EVENT | Indicates the status of the event, such as assigned, missed, open, queued, reassigned, resolved, or answered.| ### Events description | Event Name | Description | |--------------|-------------------------------------------------------------------------------------------------------------| | assigned | Triggered when a chat is assigned to an agent for resolution. | | missed | Triggered when a chat transitions into the "Missed" status. | | open | Triggered when a chat enters the "Open" status due to the absence of available agents. | | queued | Triggered when a chat is placed in a queue, typically due to agent unavailability or full chat concurrency. | | reassigned | Triggered when a chat is reassigned from one agent to another. | | resolved | Triggered when an agent clicks "Resolve" to mark the chat as resolved or the chat is auto-closed. | | answered | Triggered when the agent has responded to the ticket at least once. | ----- ## Knowledge base report | Field | Description | |-------------------|---------------------------------------------------------------| | TIMESTAMP | Time at which the query was made to the Language Model (LLM) | | ORIGINAL_QUERY | Message typed out by the user (Input) | | CONV_HISTORY | Previous user and bot messages before the user's message | | REPHRASED_QUERY | True query considering context from conversational history | | DOCUMENT_TAGS | Document tag values, if any, passed | | WAS_SUMMARY_GIVEN | True or false value stating if the response was summarized | | ANSWER | Copy of the answer provided by the bot to the asked query | | LINKS | Copy of the web links provided by the bot | | SITE_KEY | Website domain based on which the answer was retrieved | | UID | Unique user ID of the user having the conversation | | TRACE_ID | Unique ID of the query for further analysis on search | ----- ## Knowledge base articles | Field | Description | |-----------------|-----------------------------------------------------------------------------------------------------------------| | ARTICLE_ID | Identity number assigned to the article during its creation. | | ARTICLE_TITLE | Title of the published article. | | VISIBILITY | Visibility status selected during article creation, either Internal or External. | | SUBCATEGORY | The immediate folder or subcategory under which the article is organized. | | PARENT_CATEGORY | The name of the top-level category under which the article is classified. | | VIEWS | The number of views received by this particular article. | | LIKES | The number of likes received on this particular article. | | DISLIKES | The number of dislikes received on this particular article. | | LANGUAGE | The language selected during article creation; the article is visible on the website in this specified language. | | PUBLISHED_AT | The timestamp indicating when the article was published. | ------ ## Message events | Field | Description | |----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | TIMESTAMP | The TIMESTAMP field represents time intervals in 1-minute slots within a 24-hour day. When an event occurs, its timestamp is rounded to the nearest 1-minute interval. The first occurrence creates a new row with the timestamp, and if the same event occurs again within the same 1-minute slot, the count column value for that timestamp is incremented by 1. This allows tracking the number of occurrences of the same event within each 1-minute interval. Subsequent occurrences in the same interval contribute to the count column value. For example: Suppose an event occurs at 9:46:24, its timestamp would be 9:46, creating a new row. If the same event happens at 9:46:37, the count becomes 2 for the 9:46 timestamp. Another event at 10:13:47 creates a new row with a timestamp of 10:13. The count column tracks repeated occurrences within the same 1-minute slot. Ex: 00:00:00 UTC. | | CITY | User's city retrieved from the IP address. String data type. | | COUNTRY | User's country retrieved from the IP address. String data type. | | DEVICE | User's device type, such as Desktop, Tablet, or Mobile. String data type. | | IP | User's IP address. Integer data type. | | MESSAGETYPE | Type of the message sender, e.g., BOT, USER, AGENT, NOTIFICATION. | | PLATFORM | User's device operating system, e.g., Windows, Linux, etc. String data type. | | REGION | User's state retrieved from the IP address. String value. | | SOURCE | Channel in which the user is chatting with the bot. Example: Whatsapp, Facebook, yellowmessenger. | | UID | Unique Identifier of the User. | | SESSIONID | Unique Identifier per session. | | SESSION_SUM | Seconds since the last message. The time is stored in seconds from the previous User/Bot/Agent message. | | CUSTOMID1 | Custom Identifier from Customer Data Platform (CDP). | | CUSTOMID2 | Custom Identifier from Customer Data Platform (CDP). | | UTM_CAMPAIGN | Associated with the campaign's name from the Engage module. | | UTM_MEDIUM | Associated with the campaign's medium from the Engage module. | | UTM_SOURCE | Associated with the campaign's source from the Engage module. | | LANGUAGE | Language identified by our platform during the ongoing interaction. | | BID | Business Identifier. | | INTERACTIONTYPE | User input classification, e.g., user chose a quick reply or typed the input. | | COUNT | Rolled-up value of that event where data was exactly the same, just a difference in time. Associated with timestamp description. | | identificationStatus | Denotes if a user message was identified/unidentified. | | lastMessageType | Denotes if the last message in the chat was from the Bot/User/Agent. | ------ ## Notifications report | Field | Description | |-------------|--------------------------------------------------------------------------------| | NAME | Name of the campaign | | CAMPAIGNID | Unique ID assigned to the campaign. | | REPORTID | Unique ID assigned to the campaign report. | | SENDERID | Alphanumeric or numeric string that identifies the sender of a message | | USERID | Unique ID for each User present in the User360 Table | | CDPUSERID | Unique ID of the user (in User360) to whom the campaign was sent | | TEMPLATEID | Unique ID of the template used in the campaign | | MESSAGEID | Unique ID assigned to the message within the campaign sent to the user. | | STATUS | | | SOURCE | Channel through which the campaign message was sent. Example: Whatsapp, Facebook, yellowmessenger | | SMSUNITS | The number of SMS units consumed for a single message in the campaign. | | SCHEDULEDAT | Date and time when the campaign was scheduled to send. | | SENTAT | Date and time when the campaign was sent | | DELIVEREDAT | Date and time when the campaign was successfully delivered. | | READAT | Date and time when the recipient read the campaign message | | REPLIEDAT | Date and time when the recipient replied to the campaign | | REPLY | Content of the reply received from the recipient | | ERRORMESSAGE| Any error message generated during the campaign delivery process. | ------- ## User engagement events Following are the fields tracked on the user engagement events table: | Field | Description | |------------------|----------------------------------------------------------------------------------------------------------------------| | TIMESTAMP | The TIMESTAMP field represents time intervals in 30-minute slots within a 24-hour day. When an event occurs, its timestamp is rounded to the nearest 30-minute interval. The first occurrence creates a new row with the timestamp, and if the same event occurs again within the same 30-minute slot, the count column value for that timestamp is incremented by 1. This allows tracking the number of occurrences of the same event within each 30-minute interval. Subsequent occurrences in the same interval contribute to the count column value. For example: Suppose an event occurs at 9:46, its timestamp would be 9:30, creating a new row. If the same event happens at 9:59, the count becomes 2 for the 9:30 timestamp. Another event at 10:13 creates a new row with a timestamp of 10:00. The count column tracks repeated occurrences within the same 30-minute slot. | | BID | Business Identifier, a unique identifier for the business associated with the event. | | CATEGORY | An umbrella term for journeys; certain journeys can be grouped under this category. | | CITY | Approximate city location identified by the platform. | | COUNTRY | Approximate country location identified by the platform. | | CUSTOMID1 | Custom Identifier from Customer Data Platform (CDP). | | CUSTOMID2 | Custom Identifier from Customer Data Platform (CDP). | | DEVICE | Approximate user device value identified by the platform, such as mobile or desktop. | | EVENT | The specific event that occurred. | | EVENTINFO | Additional information stored by the platform (not for customer customization). | | JOURNEY | The flow name under which this event was generated. | | PLATFORM | Approximate underlying platform of the user device (e.g., Desktop can have Windows, Linux). | | STEP | Step name in the Automation flow under which this event was generated. | | REGION | Geographical location (state) identified where the bot is being used. | | SOURCE | Different channel integration from where the user triggered the event, such as Yellowmessenger, WhatsApp, etc. | | TARGETINFO | Used for storing additional information for some events, such as journey switched. | | UID | Unique Identifier of the User. | | SESSIONID | Unique Identifier of the User for a 24-hour timeframe from the first event triggered by the user. | | LANGUAGE | Language identified by the platform during the ongoing interaction. | | INTERACTIONTYPE | User input classification, for example, whether the user chose a quick reply or typed the input. | | COUNT | Rolled-up value of the event where the data was exactly the same, with differences only in time (this is associated with the timestamp description). | | VALUE | The VALUE field is used for pushing a numerical value associated with an event. By default, if no specific value is provided, it is set to 0. This field allows you to convey a quantitative aspect related to the event, providing additional context or information. | ### Events description Following are the events tracked on the user engagement events table: | Event | Description | |-------------------------|---------------------------------------------------------------------------------------------------------------------| | agent-session | Fired when a live agent actively participates in a conversation. An agent session starts when the agent sends the first response to a ticket and continues for 24 hours from that point. Any additional tickets created during this 24-hour window are counted as part of the same agent session. If a ticket is closed without any agent response, no agent session is created. Therefore, the number of agent sessions will always be less than or equal to the number of tickets created. | | agent-transfer | Fired when a chat conversation is transferred to a live agent | | banner-cta-clicked | Fired when the User clicks on the link configured in the callout banner | | bot-closed | Fired when the Bot is closed by the user (close button) | | bot-icon-clicked | Fired when the Bot avatar (in title bar) is clicked by the user | | bot-icon-loaded | Fired when the Bot avatar is displayed to the user (on load) | | bot-loaded | Fired when the Bot script is loaded on the website | | bot-opened | This occurs when a user clicks on the chat bubble to open the bot. | | bot-session | Fired when a session is created based on a bot message (first message sent by the bot). It has a session time window of 24hrs for a given UID and source | | business-initiated | Fired when a new session is created by notification from the business side for the WhatsApp channel | | card-cta-clicked | Fired when the User clicks on the link configured in the card buttons | | condition-recorded | Fired when a condition node is executed in a flow | | feedback | Fired when a user gives feedback after completing the chat | | first-message | Fired when a new profile of a user is created | | first-message-bid | Fired when a user profile is updated with the bid for the first time | | home-button-click | Fired when a user clicks on the home button in the chat widget | | invalid-response | Fired when an invalid response other than the provided option is selected/entered by the user | | journey-completed | Fired when a journey gets completed for the user | | journey-started | Fired when a journey starts for the user | | journey-switched | Fired when a journey is switched by NLP System for the user due to utterance matching another journey | | message-hyperlink-clicked | Fired when the User clicks on the link configured in the text message | | new-session | Fired when a new session is created | | notification-received | Fired when a notification is received on the mobile widget | | optin | Fired when a WhatsApp opt-in is added | | optout | Fired when a WhatsApp opt-out is added | | otp-sent | Fired when an OTP sent from the bot using the platform function | | otp-verified | Fired when an OTP is verified from the bot using the platform function | | page-loaded | Fired every time the client website page is loaded/reloaded where our script is running | | pwa-loaded | Fired when the PWA version of the bot script is loaded | | pwa-opened | Fired when the PWA bot is opened by the user | | step-expected | Fired when a step of the journey is expected / prompt is shown to the user | | step-recorded | Fired when input is given by the user for a step (step value is recorded) of a journey | | unidentified-utterance | Fired when a user message is not understood by the Bot | | user-initiated | Fired when a new session is created from a user message for the WhatsApp channel (this is only when user messages the business through WhatsApp channel) | | user-revisited | Fired when the chat widget loads for the user's IP address on subsequent visits. This event is specific to bots hosted on websites. | | user-session | Fired when a session is created based on a USER message. Value gets incremented only when user sends the first message.| | user-visited | Fired when the chat widget loads for the user's IP address for the first time. This event is triggered once for the lifetime of the user's unique ID. It is specific to bots hosted on websites | **Other events**: - inbound-overlay-closebtn - inbound-overlay-conversion - inbound-overlay-impression - inbound-widget-closebtn - inbound-widget-conversion - inbound-widget-impression --------- ## User feedback | Field | Description | Value Format | |-------------------|------------------------------------------------------------|--------------------------------------------------| | BOTID | Bot ID assigned by the platform. | Integer (e.g., x1657623696077) | | UID | User ID generated by the platform. | Integer (e.g., 1836013421788526118418800767619) | | SESSIONID | Session ID generated by the platform. | String (e.g., 65a8d2971e1a2100011a2433) | | SURVEYTYPE | Type of feedback collected in the Feedback card. | String (e.g., Star, Thumbs) | | NODETYPE | Type of node, indicating PROMPT_FEEDBACK or MESSAGE_FEEDBACK.| String | | JOURNEYNAME | Journey/Flow name where the feedback card is configured. | String | | JOURNEYSLUG | Journey slug where the feedback card is configured. | String (e.g., new-feedback-flow_ysdkao) | | STEPSLUG | Step slug where the feedback card is configured. | String (e.g., ae4c7ac271f37ccd) | | SOURCE | Channel from which the user has visited (always yellowmessenger). | String | | RATING | Rating given by the user in the Feedback card (1 to 5). | Integer (e.g., 1, 2, 3, 4, 5) | | SCALE | Scale in the Feedback card (2 for Thumbs, 5 for Star). | Integer | | FEEDBACKS | Text feedback given by the user. | String (e.g., ["Quick resolution"]) | | CUSTOMTAG | Placeholder for custom tags (Not Applicable). | Not Applicable | | RESPONSE | Feedback quality given by the user (Positive: 3/4/5 in star, Negative: 1/2 in star). | String | | CREATEDAT | Feedback submission date & time. | Date (e.g., Thu Jan 18 2024 12:56 PM) | | LASTBOTMESSAGE | Last message sent by the bot before collecting feedback. | String | | LASTUSERMESSAGE | Last message sent by the user before collecting feedback. | String | ----- ## Video chats | Field | Description | |---------------------------|-------------------------------------------------------------------------------------------------------------------------------| | TICKET_ID | Auto-generated reference number assigned to each incoming ticket. | | CHILD_BOT_ID | Bot ID of the child bot if orchestrator parent bot and unified inbox are enabled. | | AGENT_NAME | Name of the Inbox Support Agent handling the ticket (e.g., Amudhan S). | | AGENT_USERNAME | Email of the Inbox Support Agent without special characters (e.g., amudhanyellowai). | | CLIENT_EMAIL | Customer's email ID if provided. | | CLIENT_NAME | Customer's name if provided. | | CALL_DURATION_IN_SECONDS | Duration of the video call in seconds (difference between start and end time). | | START_TIME | Timestamp indicating the start time of the video call. | | END_TIME | Timestamp indicating the end time of the video call. | | MEETING_ID | Unique identifier assigned to each meeting. | | MEETING_NAME | Internal string for meeting identification (e.g., `${ticket.botId}_${ticket.ticketId}_${ticket.assignedTo}_${ticket.uid}`). | | MEETING_END_REASON | Reason for the completion of the meeting, typically when all the participants leave. | | DID_AGENT_JOIN | Indicates whether the agent joined the call. | | DID_CLIENT_JOIN | Indicates whether the user joined the call. | | WHO_HUNG_UP | Specifies who initiated the call hang-up. | | RECORDING_ID | Identifier number assigned to each recording. | | RECORDING_STATUS | Processing status of the recording (e.g., pending, completed). | ## Analytics (Custom table) Analytics table can be found under custom tables in which the following data is captured. | Fields | Description | |--------------------------|---------------------------------------------------------------------------------------------------------------------------| | CHATURL | Link to Chat Transcript: e.g. https://app.yellow.ai/public/messages/a9c9844ad89bb7aeb6a3918ad57623c37616acfc6c094e3b529ad0a763323f9e687450946280f5eca561274bdc0d6360510eff61eb0b24d55cb5c1e7092c/660a37f54a1f6800016fd072 | | TIMESTAMP | Date and Time when event was triggered: Sun Mar 31 2024 11:28 PM | | AEVENT | Event triggered upon an action. This includes both OOB, and custom events configured in the bot: e.g. welcome_message, kb_question_not_answered, booking_done | | MESSAGEID | Unique ID set in backend for each message: e.g. 123456789 | | PROFILE_PLATFORM | Platform through which user accessed the chatbot: e.g. Web, SDK | | PROFILE_BROWSER | Browser through which user accessed the chatbot: e.g. Safari, Chrome, Mozilla | | PROFILE_CITY | City of user accessed the chatbot (fetched from IP address): e.g. San Francisco, New York City | | PROFILE_COUNTRY | Country of user that accessed the chatbot (fetched from IP address): e.g. India, Abu Dhabi | | PROFILE_COUNTRY_CODE | Country code of user that accessed the chatbot (fetched from IP address): e.g. US, CA, IN | | PROFILE_DEVICE | Type of device from which the user accessed the chatbot: e.g. Mobile, Desktop, Tablet | | PROFILE_IP | IP address of the user: e.g. 192.168.1.1 | | PROFILE_LATITUDE | Latitude value of user's location: e.g. 39.73915 | | PROFILE_LONGITUDE | Longitude value of user's location: e.g. -104.9847 | | PROFILE_NAME | (User) Profile name set up in backend. This will be random values so that user privacy is maintained: e.g. John Doe, Jane Smith | | PROFILE_OS | Operating system through which user accessed the chatbot: e.g. Windows 10.0, macOS 10.15.7 | | PROFILE_PAGEURL | URL of the page from which the user accessed the chatbot. e.g. https://yellow.ai | | PROFILE_DEVICETYPE | Type of device from which the user accessed the chatbot: e.g. Microsoft Windows, Apple Mac | | PROFILE_REGION | Region of user that accessed the chatbot (fetched from IP address): e.g. California, Florida | | PROFILE_SOURCE | Device, OS, and Browser details of the user: e.g. Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 | | PROFILE_TIMEZONE | Timezone of user's location: e.g. -04:00, +05:30 | | PROFILE_USERAGENT_BROWSER | Browser used by the agent to whom the user is connected to: e.g. Safari, Chrome, Mozilla | | PROFILE_USERAGENT_DEVICE | Device used by the agent to whom the user is connected to: e.g. Mobile, Desktop, Tablet | | PROFILE_USERAGENT_OS | OS of the device used by the agent to whom the user is connected to: e.g. Windows 10.0, macOS 10.15.7 | | PROFILE_USERAGENT_PLATFORM | Platform used by the agent to whom the user is connected to: e.g. Web, SDK | | PROFILE_USERAGENT_SOURCE | Device, OS, and Browser details of the agent to whom the user is connected to: e.g. Microsoft Windows, Apple macOS | | PROFILE_WIDGETVERSION | Version of the chat widget accessed by the user: e.g. V1, V2 | | SOURCE | Channel in which the user is chatting with the bot: e.g. Whatsapp, Facebook, yellowmessenger | | UID | Unique Identifier of User: e.g. 10182708542979041342360504723 | | VALUE | | | MESSAGEID | | | PROFILE_END_IP | | | PROFILE_START_IP | | | PROFILE_TITLE | | | PROFILE_UTM_CAMPAIGN | | | PROFILE_UTM_MEDIUM | | --------------- ## Contained resolution analysis These KPIs are tracked for data generated in the Analyze module (**Analyze > Topics**). | Fields | Description | |-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | Chat URL | URL link of the conversation (transcript) between the user and bot/agent | | Topic | A conversation topic is the primary subject or query the user seeks assistance or information about | | Topic Description | Summary of the topic discussed | | User Query | Summary of the query the user asked the bot or agent | | Resolution | Summary of the resolution provided by the bot or agent from the conversation | | Contained | Indicates if the chat was solely handled by the bot or transferred to an agent. If True, the query was handled/contained by the bot. If False, both bot and agent handled the query | | Analysis Type | This value states whether the conversation that was analyzed was between user & bot, or user & agent | | Automation | Indicates if the resolution can be added to the bot's knowledge base and if it can be automated. For user-bot conversations, the value is empty. For user-agent conversations, it can be either True or False | | Automation Reason | Reason provided by the model for marking automation as True or False | | Resolution Status | Indicates whether the user’s query was successfully addressed by the bot/agent (Possible values: Resolved or Unresolved) | | Resolution Status Reasoning | Reason provided by the model for generation of resolution status | | User Sentiment | Overall sentiment of the user (Possible values: Positive/Negative/Neutral) | | User Sentiment Reasoning | Reason provided by the model for generating user sentiment value| | User ID | Unique ID for each user | | Session ID | Session ID generated by the platform for each session | | Source | Channel where the conversation happened (e.g., WhatsApp, Facebook, yellowmessenger, etc.) | | Conversation Start Time | Time at which the conversation started | | Conversation End Time | Time at which the conversation ended | | Timestamp | The date and time when the report was generated and added to data explorer | :::note Use Conversation Start Time & Conversation End Time as the primary reference for when the conversation occurred, as the analysis report is generated after the session ends and may not be on the same day. ::: ----------- ## LLM usage metrics | **Field** | **Description** | **Value** | |--------------------|------------------------------------------------------|----------------------| | TIMESTAMP | Time | Datetime | | SENDER | Sender ID/UID of the user | String | | SESSION_ID | Session ID of the user | String | | TRACE_ID | Trace ID of the message | String | | SOURCE | Source of the message (YM/WhatsApp/etc.) | String | | SUCCESS | Whether the API call returned a response or not | Boolean | | PROVIDER | LLM Service Provider (Open AI, Azure Open AI, etc.) | String | | MODEL | Name of the model | String | | RESOURCE | Name of the resource (only in the case of Azure Open AI) | String | | EXECUTION_TIME | Time taken by the LLM API call | Milliseconds | | PROMPT_TOKENS | Number of tokens in the input prompt | Number | | COMPLETION_TOKENS | Number of tokens in the generated response | Number | | TOTAL_TOKENS | Sum of PROMPT_TOKENS and COMPLETION_TOKENS | Number | | CUSTOM_LLM_KEY | True if the client is using their own credentials; otherwise False | Boolean | | WORKFLOW | Workflow ID of the flow where the node is present | String | | NODE_ID | Node ID of the node | String | ------ ## WhatsApp consumption | **Field** | **Description** | |---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | TIMESTAMP | The day the count is calculated | | WABA_ID | Unique WhatsApp Business Account ID provided by Meta | | PHONE_NUMBER | WhatsApp business phone number linked to the customer | | BUSINESS_INITIATED_AUTHENTICATION | Conversations for authenticating users with one-time passcodes, such as account verification, recovery, or integrity challenges | | BUSINESS_INITIATED_MARKETING | Conversations for marketing purposes like new product announcements, targeted promotions, or cart abandonment reminders | | BUSINESS_INITIATED_UTILITY | Conversations for follow-ups on user actions or requests, such as order updates, account alerts, or feedback surveys | | USER_INITIATED_SERVICE | Conversations for resolving customer inquiries | | CONVERSATION | 24-hour message threads between you and your customers, opened and charged when your messages are delivered | --------- ## Call Details Report (CDR) If you are using voice bots, you can schedule reports to be sent to your email. This report includes metrics like the number of distinct calls attended by the bot and the total billing duration for the selected timestamp. Learn about CDR in detail [here](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/cdr). ------- :::info Time is mentioned in milliseconds. ::: --- ## Steps to Fix Data Errors in a database table when new data is uploaded/inserted Fixing data errors is essential for maintaining the accuracy, reliability, and usability of the information stored in a database table. This is particularly important for performing searches, as data errors can prevent the successful retrieval of new information that is added to the table. **![](https://lh7-us.googleusercontent.com/y2M-8FNaJzRYgZ32m3nXHuiZFXOOtLi9BWqI2qXAp4HEdHudQhjfgSqYQF-qqRUrVxOTfp3xzBS9JBtyuLpU1cuZKqbnI3OXTo3MhaXIXhbLrEIiZ0fh9qTwX2xmyAzSJ9J0E9z1UKKKUumjYebTWWw)** ## Step 1: Run cURL Run the below curL on Postman- (Production/ Staging/ Sandbox) ``` curl --location 'https://app.yellow.ai/api/data/data/reIndex?bot=x1611920798285&collection=customer_details' \ --header 'x-auth-token: 8a4f1e914fceb6fe69df01f27da4a9a0594980694d79d52dcf50b60850c91d1a6V77z4YIES88iN-CbDE3j' ``` ## Step 2: Add cookie editor extension Download and add the cookie editor extension to Chrome for running the cookie and generating the x-auth-token (Production/ Staging/ Sandbox). ## Step 3: Generate x-auth-token key x-api-key isn’t suitable for use here, generate the x-auth-token key. 1. Open cookie-editor extension on the database table for the table you want to **Fix data errors**. **![](https://lh7-us.googleusercontent.com/adxpFfG7yeJtVb9KBNkSsGgULvYUDzSpwfuuWLutCSAFEk2aKuSDOJyLGWrFWJdvn6HS4qy0OF2ORd8q90PlQ2HxNSf4NP245BO_iW8smu5PB1AjypY_I8KBW4gSYDMoLZ7ESEd7i_jPQBwEwT0ZFRE)** 2. Select the value under **ym_xid**. **![](https://lh7-us.googleusercontent.com/ZG34rfKx3ItZ4Gnojg8-qPCJXnMeZNQZ2LXfiwPLOH7zwE13UYRAB4ZVONOqETkIGFNrrTF9aNAac5LdvjYbvRz03RdybcejmEowZeEGsGhJHiwB7azpLBj_atMs3xuwPuBVLCDfMh-08_PqZsJvY3k)** 3. Paste the value under **Headers** in Postman with key as x-auth-token. **![](https://lh7-us.googleusercontent.com/ZFfxMGb4gofRqEdvmxJxSaJ2svo1qVRMGAZxohzdfGLYj8Zi5_lSduwqdm3PVGYTtB_Yrv8bMyJCllC8PpPgC15e8pTZMXqI15DmqRrRx_uuuLMpMb3-m50qoBm56Kuj-Z8v4djWrgfVtLRWQb0EsSY)** ## Step 4: Verify database Open the Database table, refresh the page, and verify whether the *Fix data errors* issue has been resolved in the table. **Sample response**: ``` { "success": true, "message": "re-index", "data": "done", "subscriptionExceeded": false } ``` --- ## Knowledgebase Query Debugging In this document, you will understand how to analyze a specific query in KB report. Follow these steps: 1. Within the **Insights > Data Explore**, locate the **Knowledge Base Report**. This report contains all the queries and their corresponding outputs. ![image](https://imgur.com/WxlmmmW.png) 2. You can filter the queries by `trace-id` or `query` to find the specific query you want to analyze. ![image](https://imgur.com/ifmrps8.png) 3. Click on the query highlighted in blue. 4. A new window will open displaying comprehensive details of the selected query, including: * **Original Query**: The initial query made by the user. * **Rephrased Query**: The system rephrases the query based on previous conversations. * **Previous Conversation**: Context from before the current user message. * **Summary Answer**: The concise answer generated by the system. * **Search Results**: Located on the right side, showing the results the system used to generate the answer. * **Preferred Results**: If a specific result is marked as preferred, it indicates that the answer was generated from that result. ![image](https://imgur.com/5FJmA3x.png) :::info **Points to remember**: * **Empty answers**: If the answer field is empty, it means the model was unable to find a suitable answer or was not confident about the correct answer. * **Rephrased query**: The system generates the rephrased query based on previous conversations to enhance the accuracy of the summary answer. * **Summary answer**: This is derived from the rephrased query to provide a more precise response. ::: --- ## Native queries to fetch data explorer data/columns The existing filters in the data explorer only allow filtering rows. By using SQL queries, we can filter and display the desired columns. Follow these steps to create a SQL query in Data explorer: 1. Open **Data Explorer** > Click **Create Report** > Select **Native Query**. 2. In **Create Report** section, write the queries based on your requirements. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcVeB3iWz-_eVh8SelrU2BPJ7AXGqSqz-S19b3VnKp00gozZIdRzMrR2j_Wa14_u2d4hikchK1FC4qQr-H6SGKjQP4x-lwT432oN34tmyB_3ztdj-WHC652a-za3rQMVPVwN2MUmuJpxFVljwQwvG2P4oc?key=AX9O8V865aZREOersNhPyg)** Here are some SQL queries you can use: - To get all the columns from the messages database: ``` SELECT * FROM messages; ``` **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdkYT_U9FpPrULqYNYDTCPojqvkx5q7Uv0QG1SYj9XMhevwxyozR6iM_NMvsXZpzjfFSkUhqOajuLfI4ZXKscFdBD2lpxq0JgJiQhERtTCvdNXlKxTQItPiHq0nBWFG7vKIJOwSUbsVCDSW-HbXg1maRa6k?key=AX9O8V865aZREOersNhPyg)** - To get specified columns (date, UID, and session ID): ``` SELECT __time AS CreatedDate, uid AS UID, sessionId AS SessionID FROM messages; ``` **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeGejFtyREOg7s2RvR1RP2d770GxpFSMqW4WtsunALVxlSOxfVYjpHhKMynNRyeNYLOC1nxXzuzbvaEb8mW-BFn77RZq3iHIXp8MfAN_JV39JqrwUhPwo6f1plHHn0hxVI6pfmmSPrSeczxIoUNiDrsVmNk?key=AX9O8V865aZREOersNhPyg)** - To create new columns with static values (e.g., bot ID and bot name): ``` SELECT "x1689236272568" AS BOTID, "Bhavana" AS BOTNAME, uid AS UID FROM messages; ``` **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcXSx4bpmGlhRs9_wb4kdhC4lGeW9kqmo3wZCbnoOOLcg5rJzaYp6v1EjPNznXt1gqPAfkMkOjKIgz6ckAozlWB2TN31g_U-YWWl5pe5xbDm1LvvgLEU2W1Q2tjlPv7b4pu3GoIIyf00MBqcqTrHavPc1s?key=AX9O8V865aZREOersNhPyg)** - To get the count of each user in the database based on the UID: ``` SELECT COUNT(*) AS total_users, uid AS UID FROM messages GROUP BY uid; ``` **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcm0ab2W1U6WvT1wDILrz6hxpARcm6QnizTrU1bNbRlazD3xHcaFKO42ZqnqkK6lFcr3tjm_7XylozFLNhhQ888M1OXE0hAriYUloOodZRxaRvTJgKrAA5TUbhBwaQb72kslWtxEs2jWYeEbva32Lp3vAE?key=AX9O8V865aZREOersNhPyg)** - To get chat details through the messages database: ``` SELECT __time AS CreatedDate, "x1689236272568" AS BOTID, uid AS UID, messageType AS MessageType, sessionId AS SessionID, journey AS Journey, step AS Step FROM messages; ``` **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdLa_LXOrPCrMVoWRFYU8EAZd5zWcexpvQXhllJ8VEwUx8YLvZLGmxghL5vpFSKVVFJD-0zZyYm4OgVcpfRzBsaX-FryG56GxvLQmYIyA1sxM63a98yCc3WeNO1HFyGSWGQ38K-UQ2_81wwgTjrPwhzRLPt?key=AX9O8V865aZREOersNhPyg)** 3. Save the query and create dashboards to filter the data based on the timestamp for further use cases. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcuttmMH7fY9zTic3vonkVSi7BHyFtx-M990MHxBztCnR__iBZ-GuSLHlCqkxF9ttUumGLtpY_JeHBndSQU4HR9sJ-hiCz2Y_f2JrUKOAXUR4fMwxlpk--tS2MFrC8xIXli2RKFnOM1-XtTUjiEFt9zUWQ?key=AX9O8V865aZREOersNhPyg)** 4. Click **Create Dashboard** > select **New Dashboard**. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfX628XJNg6Ia1quD5BB8r2IUbpEOd_FbzVhbyBAWUlbv8arcuZ3JoaphQbl-YgBHHczvEFSHHcJWJyGgM3drY-MBQsJUa53TyvziREokVk6W76B8UGZ0Yva7JC_5A2rE5JMOGHK3yb57bAsniaA-JRDJY2?key=AX9O8V865aZREOersNhPyg)** 5. Go to Custom Dashboards to view the newly created dashboard. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcAMUSmnZl-g0JZKIVVHORIHGmMZjzF7xh-w6v5fXRyIypZ5JlypAUID3XPIGfvgYpPJeKDw0ZpUVMAG8-qS_01n94mFTrYh9kvfXhqbzZEEWRI-vocOthBH3bFhJlI5xxj54TjqcNmU8lddytcdZrCyqBd?key=AX9O8V865aZREOersNhPyg)** --- ## Schedule downloading of default reports You cannot schedule or export any default reports as CSV before saving them. To schedule a default table report, follow these steps: 1. Open **Data explorer > Default tables > Report**. ![Data explorer default tables](https://imgur.com/HtMUtRK.png) 2. Click on any of the default table you want to schedule as a report to your email, click **Summarize**. ![Summarize default table](https://imgur.com/cek9wkS.png) 3. Remove the Count summarization applied by default by clicking the cross mark, then click **Apply**. ![Remove count summarization](https://imgur.com/orZSWcX.png) 4. Once applied, click **Save query**, give your report a name, and click **Save**. ![Save query](https://imgur.com/vjvt8Cn.png) 5. Navigate to **Data explorer > Reports > Custom tab** and open your saved custom query report. ![Custom tab report](https://imgur.com/rRbHFyM.png) 6. Click **Actions** and select either **Schedule report** or **Download as CSV**. ![Actions menu](https://imgur.com/bhSLSVY.png) > To schedule a report, refer to the documentation on scheduling reports [here](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/savedreportsactions#1-schedule-a-report). --- ## Standard report scheduling You can schedule raw reports available on Insights for export as email alerts. To schedule and download all of your analytics as reports, follow the steps below: 1. Open **Insights** and the respective page where you want to schedule a report. 2. To download individual reports, click on the **Export report** button next to the analytics. ![](https://i.imgur.com/i8lZlQo.png) 3. To schedule a report to receive email alerts, click **Schedule report**. ![](https://i.imgur.com/Y4PxfJI.png) 4. On the side panel, configure the following: - **Frequency**: You can choose hourly, weekly (select the days of the week that the report needs to be sent on), monthly or quarterly (choose timezone and dates). ![](https://i.imgur.com/bESvQgj.png) - **Email**: Specify the email IDs of the recipients to which the report needs to be sent. You can add up to a maximum of 10 email IDs (they can also be external to your organization). - **Subject**: Subject is pre-filled with the report name. - **Message**: Type in a message that you want to add to the body of the email. 5. After configuring the details, you can send a test email to check if the format of the email is as expected, this test email is sent out to the entered email idea. 6. Click **Save**. This report will be sent to the respective email IDs as per the schedule. > Expect a few minutes of delay when sending a large file. > Links to reports sent via email are only valid for 15 minutes. --- ## Retrieving Session Data from the Data Explorer This guide explains how to retrieve data from **Insights > Data Explorer** within the **User Engagement Events** table. ![image](https://imgur.com/URgcjmm.png) --------- ## User-session data for a specific date 1. Filter the Timestamp. 2. Filter the **Event** as *user-session*. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfcUS0e3jwOzi0sLwktak6xAcvwQU3hrsayY1_34zYd9bMV6iZ6p1NdUpFaB-zflKaZz3udVJhmBmny26xe4_pf2Ers79RCRSgXzSu4PQPudVPqSgR0AyL0g4_vfYtzKRbqEVkHWHJbLoUoYBS0831ommkg?key=7tUVeJ9bRafmzQqDuh5NvQ)** 3. Click **Apply** to view the user-session data. This will display details such as User IDs, chat URLs, and session IDs. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdXjpKtOF3iOvpII7ujEJq1JjoQ6Z2Av9ySn5Bkd3iNeF8fOB3phYJBz1hYk--vPeGiQ903aCingvYW_a9W8w58NLrcrdgWt3sLe0adxlVw1s6fSMBsUacEntFlWReKgKLHdqqs9OOmoih4ah6P62Fbpjwx?key=7tUVeJ9bRafmzQqDuh5NvQ)** -------- ## Count User-Sessions 1. Click Summarize. Choose Summarize by count. 2. Set Timestamp by day/week/month. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfOqzmwVfdS_zMMCX5bLk7JAEU5T_sXz-bRbrptrbR0ZuS2knuJ6Yfy-POU5y-jw19oENXzFcJBzMNZPKpDX1Do-825EE_4mu8GVpSRJVamB_6_FqjOPx6qP6fa4f44wsejHjw-v8A6G6FvnWZiHWnzk9U?key=7tUVeJ9bRafmzQqDuh5NvQ)** **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd-bJsLuvBHxLyL1TvOb7FBzIkjIGwtvRomQXKOKXgK7ngfJtczPn0zzUyJnEsI-Yce43P4HhVcYyzo4UpnH3BV-uEf0Qx4nOWn_GIx6sJ_9ZR4_Isgr7VGWTqYSyS5SNWbe8KmSq9rxOEfl87ccNrXvUOD?key=7tUVeJ9bRafmzQqDuh5NvQ)** **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeeoqfn6CLVSAF9fYjWnnfkg4GLbeBTFSpaRfurtTPbv3DXI5yFIgD9bn8yX3nCXo6W0fZt3xqM_Zlwp_AuqyFXtcNYT4MDNDLKLkapz3WWZmZ1GyIUe-KJzlgEjOLdE9_Aui5fbIZSTXuQMQQxOcDpCRRE?key=7tUVeJ9bRafmzQqDuh5NvQ)** ----- ## Access Agent-Session Data 1. Filter the Timestamp. 2. Select the **Event** as *agent-session*. 3. Set **Session ID** as *not empty*. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeIVO6uwDsuZbGnnIF8YTdX1drM2lSwNyKG9zki-yRta22yckV6ipNlci-WiImVbrULy7SV9uKctWvM_mh5e1rxBNGz5dlx-IGEyG9H2lDqwcdFBNhq4fO1lEDCJN1PXAl-I7T5y8SDjeNZnxdhMfSbtwXw?key=7tUVeJ9bRafmzQqDuh5NvQ)** **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcogOC5E4x7m-QYhgY64M9uLr-DiWDcrQI50BuoUluS3CbQ9rzSG-GsxNkk8sd9L4SyyPj1B8gWN5Hn3-t7j70wsu7atQDghYghQzKl0ikCRqu1NYQXYwgzE5BAOxB9VWFtq_edb9SwWFLIgFnWNqvWOzwx?key=7tUVeJ9bRafmzQqDuh5NvQ)** **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXcRESQR4Vq92MpExd8k_Xkn6ZWgu717oCrT7W13jLP3hq2KmEhxymY23kkQ2HdsVzDxGF-Fs3GACNLsaW7A6ZIg4CiLrpL2Q-2fTMsoHXxtPiTb7RMkITTAhNpGSNsiiP-F-Of84D0WJ02pn_9lzvPCHgA?key=7tUVeJ9bRafmzQqDuh5NvQ)** -------- ## Calculate bot sessions To calculate bot sessions, subtract agent-sessions from total user-sessions: ``` Bot Sessions = Total Sessions (User-Sessions) - Agent-Sessions ``` --- ## Key metrics related to sessions This article guides you through analyzing key metrics related to sessions. These metrics include: 1. Message Count 2. New User Count 3. Unique User Count 4. Session Count Understanding the type of session—either bot or user session—is crucial for accurate analysis. **To determine the session type** 1. Right-click on your screen and select **Inspect**. 2. Open the **Network** tab and search for the keyword "Insights." 3. Refresh the page and examine any API call's payload to determine the session type. By default, it is set to a bot session. -------- ## Message Count To analyze message counts: | **Bot Session** | **User Session** | | -------- | -------- | | 1. Open **Data Explorer > Message Events** table. 2. Apply a filter for **Interaction Type = welcome-reply**. 3. Summarize the data based on the **Sum of Count**. | 1. Open **Data Explorer > Message Events** table. 2. Apply a filter for **Interaction Type != welcome**. 3. Summarize the data based on the **Sum of Count**. | **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfge0kR28xOUXedcJBK5-_c24-HcsP120lq-wle6v1XSbHueF3qcOTZwlA9d1dgzflrLsC5fwsf5j7yCCXWBARkTz8zScl_j06JADpyIlVbJnobNqne0NRhbWmQGTaAOjrrcU3mKjaJS2LRbYLQMlg8wwvu?key=8UxgDT6N1nuuxyt9ydwn8g)** ------- ## New User Count To analyze new user counts: | **Bot Session** | **User Session** | | -------- | -------- | | 1. Open **Data Explorer > User Engagement Events** table. 2. Apply a filter for **Event = first-message** or **Users-visited**. 3. Summarize the **Count**. | 1. Open **Data Explorer > User Engagement Events** table. 2. Apply a filter for **Event = first-message**. 3. Summarize the **Count**. | > You can also apply filters based on channels and timestamps. **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfQIpn2fi0l5jlT-BVJyYLk49HlOgA6bP5GDqmLx6SjABKjpdz_px2uzoMQhJZUuemWZWsvumqFKABLBK3VyrF7VKG6rmsk6d-Grh1by1Bn2t_Vz4s47YHnxBLbrVnaCItNcDJUFzYU3XlULtwKvE6w_UDB?key=8UxgDT6N1nuuxyt9ydwn8g)** --- ## Unique User Count To calculate the unique user count: | **Bot Session** | **User Session** | | -------- | -------- | | 1. Open **Data Explorer > Message Events** table. 2. Apply a filter for **Type = bot-message**. 3. Summarize the data based on **Distinct UID**. | 1. Open **Data Explorer > Message Events** table. 2. Apply a filter for **Type = user-message**. 3. Summarize the data based on **Distinct UID**. | **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXem1uQAFHItje7vnPN4-Ql5Ldv8SzsUkoIXHuft_zYyZvXLtPKu8gqST9P0b5aPTuSQ5_d6TaedVkul20on-ydBwK1iAgToHgW7bWH1E61YOgasHneYxn5TQJok5x1U0788rtKhKHdksJ5gstLxQQFY3myL?key=8UxgDT6N1nuuxyt9ydwn8g)** ----- ## Session Count To count sessions: | **Bot Session** | **User Session** | | -------- | -------- | | 1. Open **Data Explorer > User Engagement** table. 2. Apply a filter for **Event = bot-session**. 3. Summarize the **Count**. | 1. Open **Data Explorer > User Engagement** table. 2. Apply a filter for **Event = user-session**. 3. Summarize the **Count**. | **![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXdbbLOrkg4vuJ-yPm1OcPSZXMFZ3Lt4YBhpr_l-WVE9mQ6tlnscXw8OrWK75sfYXr-s3KmfwR7NAKEgpXnRAfcsu0_zgkI1hyby5BqNEWI7s7-R5dhhwSW1dJ4s41SxjfLbj8UxuhmdfPFzqOMdM6S7nnjB?key=8UxgDT6N1nuuxyt9ydwn8g)** --- ## Steps to identify all the triggered intents of the bot By gaining insights into all the intents triggered by the bot, you can draw multiple conclusions, such as: * Analyzing the most and least triggered intents provides insights into user interactions and preferences. * Identifying key intents helps in understanding the primary goals and needs of users. * Monitoring the frequency of assistance requests or user satisfaction gauges the effectiveness of the bot's performance. * Utilizing data for training purposes enhances the bot's capabilities and accuracy over time. In this article, you will learn a workaround to obtain all the triggered intents (from which you can deduce the top triggered intents). ## Obtain all the intents triggered Follow the steps below to obtain the triggered intents and confidence level of the predicted intent: **Step 1 (initial flow):** 1. Add a start node and a text/question node that displays a message. 2. Connect to an execute flow node to track intents. ![image](https://imgur.com/8sQq8X8.png) **Step 2 (add flow to initiate a skill):** In this flow (e.g., intent trigger analytics), you can create a skill (execute flow) to identify the intents. ![image](https://imgur.com/L6gJeU1.png) **Step 3 (create a database):** 1. Open Automation > Database. 2. Create a table and add searchable columns to store the intent names. ![image](https://imgur.com/8o6MjXr.png) This table will be available in Data explorer. **Step 4 (create a skill):** > Click [here](https://docs.yellow.ai/docs/platform_concepts/studio/dynamicchatnode#skill-configuration) to learn how to configure a skill. 1. Create a new skill. 2. Connect the start node to a function node and add the below function which fetches the intent names (slug value) and confidence from the `data.prediction.intents` variable. ``` return new Promise(resolve => { // Your logic goes here let intent_name, intent_confidence, intent_array = []; let intentsObject; try { console.log("data Obj" + JSON.stringify(data)); console.log("data prediction Obj" + JSON.stringify(data.prediction)); intentsObject = data.prediction.intents; for (let eachKey of Object.keys(intentsObject)) { if (intentsObject[eachKey] > 0.87) { // switch (eachKey) { case "uSN404cibhVyphu_LAG-u": // ADD YOUR SLUG NAME HERE intent_name = "talk to agent"; // ADD YOUR INTENT NAME HERE intent_confidence = "" + intentsObject[eachKey]; break; default: intent_name = "Unknown Intent | " + eachKey; intent_confidence = "Uknown Confidence"; break; } intent_array.push({ "intentName": intent_name, "intentConfidence": intent_confidence }); } } } catch (e) { console.log("On Error Block : " + e); intent_name = "No Intent"; intent_confidence = "No Confidence"; intent_array.push({ "intentName": intent_name, "intentConfidence": intent_confidence }); } resolve(intent_array); }); ``` 3. Store the output in an object variable, e.g., intents_arr. The value of which will be the Intent slug names and the confidence. 4. Connect to another function node and add the below function to identify and segregate if more than one intent-confidence value is recognized from one input (i.e., if an array of values is identified in a variable intent_arr). ``` return new Promise(resolve => { // Your logic goes here let current_prediction_array = data.variables.intents_arr; current_prediction_array.shift(); resolve(current_prediction_array); }); ``` 5. Create 2 variables using a variable node to segregate the object variable to two different values such as predicted_intent_name and predicted_intent_confidence `{{{variables.intents_arr.0.intentName}}}` and `{{{variables.intents_arr.0.intentConfidence}}}`. ![image](https://imgur.com/iQwcXyI.png) 6. Use a condition node to check if the intent value recognized is set. ![image](https://imgur.com/Jd9cLX5.png) 7. Connect the condition node to the database node and store the variables into the columns (intents and confidence). ![image](https://imgur.com/pWky9lp.png) 8. The following nodes/connections are an example of the skill that must be configured. ![image](https://imgur.com/uGBbA2P.png) :::note Insights related to frequently asked questions (FAQs) cannot be obtained through this process as each question necessitates a distinct flow. ::: ### Filter for top triggered intents To gain insights into top intents, you can generate [custom analytics](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/customtables) based on the custom table you've created. This analytics allows you to determine which flows are frequently triggered and the frequency of these triggers. > You can apply custom analytics only if the columns in the database are **searchable**. 1. Open Insights > Data Explorer. 2. From custom tables, select the table which has intent data. 3. Filter the data for particular keywords. 4. Summarize by > count of intent names. This will give you the count of all the intent names triggered. 5. You can sort this column to get the most triggered intents vs least triggered intents. :::note The **Top flows viewed** widget in the Insights > Overview section provides information about the most frequently initiated sequences of actions within the platform. While the most viewed flows might be those promoted as default options, the most triggered flows are determined by actual user interactions, taking into account various entry points like start points and in-flow buttons. ::: --- ## Google sheet integration for dynamic record update This guide will walk you through integrating Google sheets with your AI-agent to automatically update records based on user interactions. **Scenario** Consider that you have created a [campaign](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/outbound-campaigns/run-campaign) to notify users about current offers, and you want to automatically update a Google sheet with user interaction details when the campaign is sent. The goal is to capture and insert the following information into the Google sheet: * **Template name**: Name of the template used in the campaign. * **Quick reply clicked**: User's selected quick reply option. * **Campaign ID**: Unique identifier for the campaign. * **User phone number**: Contact number of the user. * **Timestamp**: Date and time of the interaction. **Prerequisites** Consider the following prerequisite to automatically update records in Google sheet: * **Google sheets integration**: Configure the integration with [Google sheets](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/google-sheets#scope-of-integration). ![](https://i.imgur.com/DKcySrP.png) * **Create an event**: Set up an [event](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub) in the **Engagement** section to trigger the data capture flow. ![](https://i.imgur.com/RqrWo8v.png) ### Steps to automatically update a Google sheet To configure a bot flow that dynamically updates a Google sheet based on user interactions, follow these steps: 1. Go to the flow editor and select the start trigger type as **Event** and choose the event that you have created. 2. Add a Variable node to store to store all template values retrieved from the quick reply event and the values of the Google sheets nodes: * **spreadSheetID**: Unique Google Sheet ID. * **range**: Defines the cell range for data insertion/deletion/updates. * **majorDimension**: Specifies how data is should be arranged (ROWS or COLUMNS). 3. To append new entries in new rows and to avoid overwriting existing records, use the **Google sheets** node to retrieve existing sheet data and store the result in an object variable. Sample success response of GetValuesFromSheet: ```c { "spreadsheetId": "1FXBz2k8m9Ys3zkJy6n8G4237q1x43Tq4nu6CdM1A66Y", "valueRanges": [ { "range": "Sheet1!A1:A5", "majorDimension": "COLUMNS", "values": [ [ "J", "O", "H", "N" ] ] } ] } ``` 4. Connect **Analytics** node to the Google Sheets node’s fallback to capture any errors or event data for further analysis. ![](https://i.imgur.com/4DH3WbE.png) 5. After retrieving the sheet records, add a Function node to insert the data. The function node performs two operations: * **Adjust the range value**: The function increments the row index by +1 to ensure new data is inserted into the next available row, avoiding any overwriting of existing records. * **Output**: The function's output should be saved in an object variable that includes the array of values to be inserted into the sheet and the updated range for data placement. ![](https://i.imgur.com/7j0hE4s.png) A sample code to get the total length of records and to populate an array variable for inserting the records in the sheet: ```c return new Promise(resolve => { // Your logic goes here let templateName = data.variables.template_name let phone = data.variables.phone let campaignid = data.variables.campaignId let qrclicked = data.variables.QRclicked let currentTime = new Date(); let currentOffset = currentTime.getTimezoneOffset(); let ISTOffset = 330; // IST offset UTC +5:30 let ISTTime = new Date(currentTime.getTime() + (ISTOffset + currentOffset) * 60000); console.log(ISTTime, " istToday ") let hoursIST = ISTTime.getHours() let minutes = ISTTime.getMinutes() // console.log(hoursIST, " hoursIST ") // console.log(minutes, " minutes ") let date = ISTTime.getDate() let month = ISTTime.getMonth() + 1 let year = ISTTime.getFullYear() let day = ISTTime.getDay() console.log(month, "month ==") console.log(day, "day ==") let d = `${date}/${month}/${year}` let t if (hoursIST >= 0 && hoursIST < 12) { t = " AM"; } else if (hoursIST >= 12 && hoursIST < 24) { t = " PM"; } let time = `${d}, ${hoursIST}:${minutes} ${t}` console.log(time, " time ") let myArray = [ [phone], [qrclicked], [templateName], [campaignid], [time] ] console.log(myArray, " ==== my array ====") let y = data.variables.obj.valueRanges[0].values.length // console.log(data.variables.obj, " === data.variables.obj") console.log(y, "====== Number of Records =====" ) //Range = Main!A:Z let range = `Main!A${y + 1}:Z` let obj = { "a": myArray, "b": range } console.log(obj," === obj ===") resolve(obj); }); ``` 6. Add a Variable node to modify the **majorDimension** variable to "COLUMNS". This ensures each array record is added to a separate column within the sheet. ![](https://i.imgur.com/Rn8RqLu.png) **Example**: If your data is: ``` [ [1, 2, 3], [4, 5, 6] ] ``` * If major dimension is rows the data in the sheets will be added as vertically * If the major dimension is COLUMNS then the data shall be added as horizontally. 7. In Google sheets nodes, define the following: 1. Select **Insert/UpdateValuesInSheet** option from Google Sheets node. 2. Pass the parameters such as majorDimension, Range (updated value from step 5), values (data array to be inserted), spreadSheetID. 3. Store the node output in an object variable. ![](https://i.imgur.com/c7drrps.png) 8. Connect **Analytics** node to the Google sheet's node fallback. This node will capture the event name and error response for analysis. ![](https://i.imgur.com/4DH3WbE.png) The screenshot below illustrates how user interaction data from a campaign is automatically inserted into a Google sheet: ![](https://i.imgur.com/noNjlSl.png) --- ## Parse API response field The Parse API response field helps you extract the important information from an API response. Let's say that you receive a response that looks like this, ``` { "body": x, "status": y } ``` and you only need the **body** part, you can use the **Parse API response** node to filter out and extract the **body** information. :::info For example, you made a request to an API to get a list of people along with their contact information. The API will send back a response containing this data in a specific format. However, the response might contain more information than you need. For example, if you're only interested in the name and email of the first person in the list, you would need to parse the response. Parsing means to extract only the data you need and convert it into a data structure that you can work with in your code. Once you have parsed the response, you can access the specific pieces of data that you need. You can then use this information for further processing or display it in your application as needed. ::: 1. To add the code to filter the necessary information from the API response, go to [Functions](https://docs.yellow.ai/docs/platform_concepts/studio/build/code#1) section and click **+Add new function** to add a new function that contains the specific code. This function will be used in the Parse API response node later. ![](https://i.imgur.com/7ueoDNE.png) 2. Next, go to the integration that receives the API response and locate the Parse API response node. This node filters the response to extract only the required information. ![](https://i.imgur.com/FJiBb5C.png) 3. In the **Parse API response** field, pass the function you created earlier that contains the code to filter the necessary information. This function will be executed by the Parse API response node to extract the required information from the API response. Once you have completed the above steps, you should be able to receive a filtered API response that contains only the required information specified in your custom function. You can either use that for further processing or display it to the user. --- ## Banking, Financial Services and Insurance (BFSI) template > Explore **Banking and finance template** [here](https://cloud.yellow.ai/marketplace/c5e39a30338e3658daf4168937e979c6). Online banking has now made daily transactional tasks easier for all consumers. Banks are exploring more options to provide user-friendly features through phone and online platforms, resulting in saving time, ease of usage, lower fees, improved customer service and security. **BFSI template** is designed to accommodate daily banking needs via WhatsApp and other web channels. ![](https://i.imgur.com/u7V7lG5.png) **Template use case** Pre-built use cases accommodate basic online banking features such as creating an account, applying for a loan, checking the loan Status, calculating EMI, and connecting to support for better resolution. The template can be customized for complex use cases, like digital banking options (paying bills online), or simple ones like applying for a debit card, and viewing transaction history. :::info For details on importing and editing the markerplace templates, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/marketplaceintro). ::: ------------------- ## 1. Prebuilt use cases The following are the most common use cases (flows) that are prebuilt in this template: 1. **Start**: After providing a brief introduction about the bank and its offerings, this flow provides options to bot users on WhatsApp and the web to Create an account, Apply for a loan, View the Loan Status, Calculate EMI or Connect to support for better resolution. 2. **Create new account**: This flow assists with creating a new savings or current account for the bank customer. It collects customer details like bank account type, name, email ID, phone number, PAN, and Aadhar number. Once the PAN and aadhar numbers are verified, a new account is created. 3. **Apply for Loan**: This flow provides loan options like Car loans, Home loans, and Education loans. It collects the loan requirements such as type of loan, phone number, name, Aadhar card, PAN number, and request loan amount. Aadhar and PAN numbers are verified, and on successful completion, an application is generated. 4. **Loan status**: This flow displays the loan status of the existing loan application(approved, rejected, or other comments) for the entered phone number. 5. **EMI calculator**: This flow calculates the EMIs applicable for the loan amount. It collects the loan amount, rate of interest, and loan tenure. Based on the given details, EMI is calculated. 6. **Connect with support**: This flow provides customer support either by fetching answers from the trained FAQs or by connecting the bot user directly to the support agent to address complex queries. These flows are explained in detail in the further sections. :::note A flow triggers when a particular intent/entity/event/URL is identified or when the [Execute flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) node is used in other flows. See [start trigger](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#configure-start-trigger) for more details. ::: --- ### 1. Start - Display the main menu 1. **Start trigger**: Immediately after displaying the welcome message, **Start** flow is triggered. - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)- ```Main menu options```. 2. **Identify the channel**: A logic node ([channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) is used to identify the channel in which the bot conversation is happening. Nodes used in the further flow will be based on the channel. 3. **Quick reply buttons to display menu options**: Five menu options (**Create an account, Apply for loan, Loan Status, Calculate EMI, and Connect with support**) are displayed. For WhatsApp, these are shown as Quick reply buttons using the [WhatsApp list](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#22-whatsapp-list) node, and for other channels, these are shown as menu options using the [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node. ![](https://i.imgur.com/cb9AaDa.png) #### :pushpin: Tips - You can add multiple [channels](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/overview) to your bot to reach out to your users through any mode. - If you have varied menu options, you can add (or delete) the quick reply buttons and customize what can be displayed in the main menu. ----------- ### 1.2 Create a new account 1. **Start trigger**: This flow is triggered when the bot user selects the **Create an account** button after the menu options are displayed (start flow). - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)- ```Create new account```. 2. **Fetch account type, name, email ID, and phone number**: Using a [carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) - account type is obtained (**savings and current**) and using other prompt nodes - [name](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#12-name), [email](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#15-email) and [phone number](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone) are fetched and stored in the respective variables - ```account_type, customerName, customerEmail, customerPhone``` ![](https://i.imgur.com/gC9x2sq.png) 3. **Fetch and validate PAN number**: - With the [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, the **PAN number** is obtained and stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```panNumber```. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - *panValidator* is run and its response is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```isValid```. - *panValidation* function verifies if the number entered is a 10-digit alphanumeric expression. If the entered format matches the following conditions, the response is returned as *True*. - The first five characters are letters in which the first three characters are a sequence of AAA-ZZZ. - The fourth character identifies the type of PAN card holder. - The fifth character is the first letter of the person's surname. - Remaining characters are numbers followed by the one alphabet. - Using a [condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes) node, it is validated if the response(```isValid``` variable value) is True. If it is true, PAN is verified. Otherwise, the number must be re-entered. 4. **Fetch and validate Aadhar number**: - With a [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, **Aadhar number** is obtained and stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```aadhar```. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - *aadharCardValidation* is run and its response is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```isValid```. * *aadharCardValidation* function verifies if the number entered is a 12-digit regex expression. If the entered format matches ```/^[2-9]{1}[0-9]{3}[0-9]{4}[0-9]{4}$/```, the response is returned as *True*. - Using [condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes) node, it is validated if the response(```isValid``` variable value) is True. If it is true, Aadhar is verified. Otherwise, the number must be re-entered. ![](https://i.imgur.com/nzYjMaX.png) 5. **Create account and store details in database**: After the PAN and Aadhar numbers are verified, the [database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node is used to store the entered details into the [table](https://docs.yellow.ai/docs/platform_concepts/studio/database) - ```Bank accounts```. Once the record is added, the account is successfully created. ![](https://i.imgur.com/vAmYxl8.png) #### :pushpin: Tips - After the account is created, you can use [message](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) nodes to display/promote other banking features that the customers can avail immediately. - Using [prompt](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) nodes, customer details such as location, salary range, etc. can be obtained. - You can verify the phone number using [send OTP](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/send-otp) and [verify OTP](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/verify-otp) nodes. ----------- ### 1.3 Apply for loan 1. **Start trigger**: This flow is triggered when the bot user selects the **Apply loan** button when menu options are displayed (start flow). - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)- ```Apply for loan```. 2. **Display available loan types**: Loan types (Car loan, education loan, home loan) are displayed using a [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node. If the loan type does not match with the customer requirement, a custom type can be entered ([question node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question). Entered loan type is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```Loan```. 3. **Fetch phone number and name**: Applicants phone number and name is obtained through [Phone](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone) and [Name](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#12-name) nodes. ![](https://i.imgur.com/WSgj4TV.png) 4. **Fetch and validate Aadhar number**: - With a [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, **Aadhar number** is obtained and stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```aadhar```. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - *aadharCardValidation* is run and its response is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```isValid```. * *aadharCardValidation* function verifies if the number entered is a 12-digit regex expression. If the entered format matches ```/^[2-9]{1}[0-9]{3}[0-9]{4}[0-9]{4}$/```, the response is returned as *True*. - [Condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes) node validates the isValid variable of the response. If the response is True, Aadhar is verified. Otherwise, the number must be re-entered. 5. **Fetch and validate PAN number**: - With a [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, **PAN number** is obtained and stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```panNumber```. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - *panValidator* is run and its response is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```isValid```. - *panValidation* function verifies if the number entered is a 10-digit alphanumeric expression. If the entered format matches with the following conditions, the response is returned as *True*. - The first five characters should be letters in PAN card where the first three chars are a sequence of AAA-ZZZ. - The fourth character identifies the type of PAN card holder. - The fifth character is the first letter of the person's surname. - The remaining characters are numeric followed by an alphabet. - [Condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes) node validates the isValid variable response. If it is True, PAN is verified. Otherwise, the number must be re-entered. ![](https://i.imgur.com/4uu4TwK.png) 6. **Select loan amount**: Different loan amounts (1,00,000 and 2,50,000) are displayed using a [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node (to obtain a loan of amount other than the given option, customer can contact the support)The selected amount is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```Amount```. 7. **Display options to modify the entered details**: The entered details which are stored in respective variables are displayed through a [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node and display quick reply buttons to modify the entered details (**Loan type, phone number, name, Aadhar, PAN, loan amount**). Based on the option selected, values are modified. For example, if the name is selected, the name node is prompted and a new name can be entered, which will be stored in the [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)-```name```. ![](https://i.imgur.com/IgSYK5K.png) 8. **Create application and store details in the database**: If **No change** button is selected, *applicationNumber* - [function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) is called and **Application number** is generated. ```Loan application``` [table](https://docs.yellow.ai/docs/platform_concepts/studio/database) is created and all these details (variable values) are inserted into the respective columns. ![](https://i.imgur.com/OpTJPQg.png) #### :pushpin: Tips - Use [prompt](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) nodes to collect more customer details while applying for a loan. - You can verify the phone number using [send OTP](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/send-otp) and [verify OTP](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/verify-otp) nodes. ---------- ### 1.4 Loan status 1. **Start trigger**: This flow is triggered when the bot user selects the **Loan status** button from the menu options (start flow). - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)- ```Status of my loan```. 2. **Fetch registered phone numbered**: Using the [phone node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone) the registered phone number is obtained and stored in the ```customerPhone``` variable. > There must be an existing loan application to check its status. 3. **Search for the application status from the database table**: ```Loan application``` [table](https://docs.yellow.ai/docs/platform_concepts/studio/database) is created with required columns to store all the loan application details and their statuses. Using a [Database node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) in the flow, the application details of the entered phone number are fetched. > **Database node**: The response obtained from this node is a result of the **Search** operation performed on the table **Loan application** where the **Phone number** (table's column) matches the ```customerPhone``` (phone number variable entered by the bot user). This response is stored in a variable ```dbresp```. ![](https://i.imgur.com/xxrTA8c.png) 4. **Display loan status**: Response obtained from the database consists of the status, which is stored in the ```dbresp``` variable. It is displayed using a [Text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) and a variable: ``` {{{variables.dbresp.records.0.status}}}``` - If the phone number entered by the customer does not exist (in the ```Loan application``` database), a message - "Application was not found, the application number does not exist." is displayed using a [Text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes). ![](https://i.imgur.com/cZE0FwK.png) #### :pushpin: Tips - If the loan application does not exist, you can direct the users to apply for a loan. - This template can be customized to prompt the customer to apply for a loan and display other banking options (like applying for a credit card, EMI, etc.). ----------- ### 1.5 EMI calculator 1. **Start trigger**: This flow is triggered when the bot user selects the **Calculate EMI** button from the menu options (start flow). - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)- ```Calculate loan EMI```. 2. **Fetch Amount, Interest, and Tenure**: [Question nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) are used to obtain loan amount, specified interest rate, and loan tenure in months, these values are stored in three variables (```selectedLoanAmount```, ```selectedIr``` and ```selectedTenure```) 3. **Calculate and display EMI amount**: A function node is used to calculate EMI with the data obtained through question nodes. With help of a [Text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) expected EMI is displayed. ``` EMI = P × r × (1 + r)n/((1 + r)n - 1) (P= Loan amount, r= interest rate, n=tenure in number of months) ``` ![](https://i.imgur.com/qHw4bbD.png) #### :pushpin: Tips - This flow can be cloned and math operations can be used to modify the EMI function to calculate interest obtained on a savings account, current account, fixed deposit, recurrent deposit, etc. ---------- ### 1.6 Connect with support 1. **Start trigger**: This flow is triggered when the user selects **Connect with support** quick action from the start menu. This flow can also be triggered when the bot user's input matches with any of the sentences(utterances) trained for the ```chatWithAgent``` [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents). 2. **Display and verify support options (Agent/FAQs)**: With a [carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node, two options (Chat with support and FAQs) are displayed. The type of support selected is identified using [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition). ```@queries_and_concerns``` entity is trained to identify FAQs and Chat with support as ```entity values```. - If the FAQs option is selected, answers to the user queries will be fetched from the trained FAQs. - If Chat with support is selected, a support agent will be connected to take the conversation forward. 3. **FAQs**: All the FAQs are added and trained with the answers in the [FAQs section](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs). When FAQs is selected, a condition node ([channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) is added to identify the channel from which the conversation is taking place. - If the conversation is happening on WhatsApp, [WhatsApp list](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#22-whatsapp-list) node is used to display the list of FAQs. - If the conversation is via other channels, [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to display the list of FAQs. - User can also type the query in the input bar. - Based on the selection/entry, the answer will be fetched from the trained FAQs. ![](https://i.imgur.com/N3XaYml.png) 4. **Chat with support**: [Prompt nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) are used to fetch the bot user's information such as ```phone number```, ```name```, and ```query```. These details are stored in the [respective variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#31-create-a-variable-via-nodes) and passed into the [Raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) action node, this will connect the user to the support agent. > Inbox must be set up to connect the bot user to a live support agent. A support agent must be available (online) when the support request is raised. Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox) to learn about Inbox. ![](https://i.imgur.com/FEn6CQz.png) #### :pushpin: Tips - Add/ Delete the number of FAQs listed on the Quick reply node. - Add [FAQs](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs) based on your industry. ![](https://i.imgur.com/GAmjyQ7.png) - **Name** and **Query** are the mandatory fields to use a **Raise ticket** node. You can reduce the prompt nodes to avoid collecting details from the users prior or you can add more prompt nodes to collect other details before connecting to the agent. - As per bank requirements, you can fetch user details (name, email address, number) using **Prompt** nodes even if the user selects FAQs. This data can be used later for acquisition or monitoring purposes. --- ## Ecommerce template > Explore **E-commerce template** [here](https://cloud.yellow.ai/marketplace/a77bc7a01c7e14698667c09d4c6a2512?name=ecommerce%20whatsapp). The E-commerce template offers a highly efficient and valuable service for online businesses. It guides your customers through buying products. This includes adding a product to the cart, updating product quantity, adding more products, and proceeding to purchase. Post-purchase, customers can track their order status. The template can handle common customer queries and helps connect with the support team if required. You can use our platform to build custom flows for your business use cases. For example, promote products, show store location, showcase products from your database, enable single sign-on from your e-commerce site, and more. Here is the high-level overview of the e-commerce template: :::info For details on importing and editing the markerplace templates, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/marketplaceintro). ::: ## 1. Prebuilt use cases This section covers all the standard use cases available in the e-commerce template. ### 1.1 Browse products The flow displays the list of product categories along with its products and help users with the purchase. ![](https://i.imgur.com/MjXppCD.png) Here are the details of the **Browse products** flow: 1. Starts with the intent *View available products*. ![](https://i.imgur.com/WrwlM5O.png) 2. **Verifies channel**: Applies the **Channel filter** to check if the user is from YellowMessenger or from other channels. 3. Uses the **Function** node to fetch the list of product categories from the **Database**. If the channel is WhatsApp, it shows the list of product categories using the **WhatsApp list** node. 4. Selecting the product category shows the list of products in that category. For the WhatsApp channel, it uses **Function**, **Variables**, and **Modifier** nodes to display the list of products. ![](https://i.imgur.com/SOGbfgb.png) ### 1.2 Add to cart This flow is executed when the bot user selects a product to add to the cart. The user can add each product along with the quantity and proceed to buy once all the required items are added to the cart.
1. **Triggers flow** when the user selects *Add to cart* on the **Browse products** flow. 2. **Shows quantity**: Each product is associated with the product ID. Based on the selected product [Condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes), it shows an option to select the quantity (**Quick replies** for web and **WhatsApp list** for WhatsApp). ![](https://i.imgur.com/uBkNFAg.png) 3. **Adds to cart**: Verifies the quantity and product ID and fetches the product from the database (**Database** node) and adds the item to the cart (`addToCart` function). ![](https://i.imgur.com/uncWUhL.png) 4. **Shows cart summary**: Calculates the cart price (Price associated with the Product ID * quantity = Total Price) and renders the cart details using the `formatCartSummary` **Function** node along with these options (**Quick replies**) * [Buy now](#15-buy-now), [Edit cart](#13-edit-cart), [Clear cart](#14-clear-cart) and Add more products. It triggers the respective flow based on the input. ![](https://i.imgur.com/wW9pPJP.png) ### 1.3 Edit cart This flow allows users to edit the current cart details - change the quantity or remove a product from the cart.
1. **Triggers** when the user selects **Edit cart** is selected on the **Add to cart** flow. 2. **Verifies cart items**: Checks if the cart is empty using the `IsCartEmpty` (**Function** and **Condition** nodes). * If it is empty, the user will be directed to the Browse products flow. * If the cart is not empty, it shows the current cart details (`ShowCart` function) of the user. 3. **Edit cart**: Uses the **Carousel** node to display the summary of the existing cart (all the items with quantity and price) along with the options to edit the item quantity and remove the item (for each item with a unique product ID). It shows up relevant options based on the user input (**Condition** node). 4. **Edit item**: Allows editing the quantity (for that product ID) using **Quick replies** (and **WhatsApp list**). Stores the new quantity using the `editcart` function in a variable and updates it in the database (user details). 5. **Remove item**: Removes the item from the cart using the `editcart` function and the new cart summary is updated in the database (user details). 6. **Shows options to proceed**: Shows these **Quick replies** and clicking on it executes the respective flow [Buy now](#15-buy-now), [Clear cart](#14-clear-cart) and [Add more products](#12-add-to-cart). ### 1.4 Clear cart The flow triggers when the user selects *Clear cart* from the bot flows. The cart is cleared, and all the item details (Product IDs and Quantity) stored in the user database will be deleted.
1. **Triggers the flow** with the intent `clearCart` when the user selects the *Clear cart* option from any flow. 2. **Clears the cart**: Cart variable is assigned to [], which means the details present in the cart becomes null. ![](https://i.imgur.com/6TQukpV.png) 4. **Updates user details**: The database (user details) is updated to empty the cart. A text node is displayed to the user confirming that the cart is empty and shows the Browse products option. ### 1.5 Buy now This flow generates the payment link using the cart details and sends the payment link to the bot user. ![](https://i.imgur.com/RIIEaM4.png) 1. **Starts** the flow using the intent *buyNow*. 2. **Verifies if the cart is empty**: Uses the **Function** and **Condition** nodes to ensure the cart is not empty before proceeding to the payment. 3. If the cart is empty, it shows the *Browse products* option. 4. If the cart is not empty, it captures the following information required for the order to process. a. Name and phone number using the respective prompt nodes. b. Address using the **Location** node and converts it using the `addressConverter` function. User can just share the location from the device. ![](https://i.imgur.com/Q1wIO3u.png) 5. **Generates the payment link**: Passes these details in the `paymentlinksinput` along with the amount (variable) to the **Razorpay** node to generate the payment link. * Captures the `paymentId` (Variables) and updates two database tables: * `order_details` with information userId, phone number, cart details, order ID, order value, order status, shipping address, and the payment ID. * `user_details` table with information cart details, name, phone number, and address. > * Customise the fields that you want to capture. You can modify column names, add more columns or update existing columns. > * Use APIs to fetch or update details from an external database. * Generates the payment link and sends it to the user. ### 1.6 Razorpay payment status 1. Starts with *Razorpay payment status* intent. ![](https://i.imgur.com/UGqIJeo.png) 2. **Validates the payment status**: Captures the `paymentId` and the value of the `paymentEvent` to validate the payment status (**Condition** and **Variables**). The following are the different payment statuses supported: a. `payment_link_paid` - Payment successful b. `payment_link_canceled` - Payment canceled c. `payment_link_expired` - Payment link expired d. Any other status 3. **Updates the order status** (`order_details` variable) in the database (Database node). ### 1.7 Check order status 1. **Starts** when the user selects *View order status* from the bot flow. ![](https://i.imgur.com/7xOhX7G.png) 2. **Applies channel filter**: Verifies the channel from which the flow is triggered using the **Channel filter** node - WhatsApp and Other channels. * For the WhatsApp channel, it uses the WhatsApp number and fetches the last five orders of the customer from the database (using the **Function** node). * For channels except for WhatsApp, it captures the phone number of the user (Phone number node) and uses it in the **Function** node to fetch the last five orders of the customer from the database. ### 1.8 Queries and concerns With this flow, users can get instant answers through FAQs or choose to chat with the support team. 1. **Triggers** when the user selects *Queries and Concerns* from the menu options. 2. **Shows support options**: Shows *FAQs* or Chat with support options using **Quick replies**. 3. **FAQs**: Shows questions using the **Quick replies** node. When the user types a question or selects from the options, it fetches the response from the [Trained FAQs](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs) list. > Add more such questions as **Quick reply** options or directly train them on the FAQ page. > Show more support options if required such as Ask the community, and Refer to docs. 6. **Chat with support**: Captures the user information using [prompt nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) and uses it to fetch the user details. It also captures the query using the [prompt node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) and creates a ticket assigning it to an Inbox agent ([Raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) node). The chat is handled by the [Inbox module](https://docs.yellow.ai/docs/platform_concepts/inbox). ![](https://i.imgur.com/eNr7vI0.png) ## 2. Build your own flows * **Promote products**: Use the bot as a lead-generation tool. You can send offers, promote new products, and offer instant discounts to your leads through Outbound/Workflow campaigns. * **Show store location**: If you are running both offline businesses, you can allow your users to find the nearest store location and address using location or zip code. Use **Database** to store all your locations or make use of APIs to fetch directly from external systems. * **Showcase products from your database**: Use [APIs](https://docs.yellow.ai/docs/platform_concepts/studio/api/add-api) and [Functions](https://docs.yellow.ai/docs/platform_concepts/studio/build/code#docusaurus_skipToContent_fallback) to access data from an external database directly. You can update order/user details, retrieve details, or show any other information that you want your users to access. * **Enable single sign-on**: Make use of the [API](https://docs.yellow.ai/docs/platform_concepts/studio/api/add-api) or [Database](https://docs.yellow.ai/docs/platform_concepts/studio/database) modules and pass a custom script that can read data from your e-commerce site and pass it to the bot every time the user opens the bot. --- ## EdTech template ## 1. Introduction Educational firms often get a lot of enquiries about their courses and offerings. The EdTech template provides a complete chat interface with prebuilt flows that helps Educational Technology firms automate query handling, user acquisition, user communications, and user retention. With this you can automate handling user inquiries, user support, and lead generation process. You can completely customize the template according to your business requirement. For example, customize dialogues used in conversations, update courses and their structure, enable OTP-based authentication or single sign-on options. show course discounts, take elaborative quizzes, add FAQs, and more. Explore **Edtech(education) template** [here](https://cloud.yellow.ai/marketplace?industries=Ed-tech). :::info For details on importing and editing the markerplace templates, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/marketplaceintro). ::: ## 2. Prebuilt use cases The EdTech template covers the most common use cases targeted for students as explained in the following flow diagram: ![](https://i.imgur.com/7QgJTDP.png) ### 2.1 Discover courses You can show the list of courses that you offer and when the user selects a specific course, show the course menu. ![](https://i.imgur.com/9DN8Ou0.png) Let’s see the **Discover courses** flow in detail: 1. Starts the flow when the user selects *Discover courses* (intent *List all courses*). ![](https://i.imgur.com/sGirfSB.png) 2. **Displays courses offered**: Shows the list of courses offered using the **Carousel node** and stores the user response in the variable `subjectname`. > * Customize the course names as required. You can add more items or remove existing items as needed. 3. **Validates user input**: Uses the **Condition node** to validate the user selection. If-else logic is applied to trigger the *Maths main menu*, *Science main menu, and History main menu* flows based on the user input. :::note History, Maths and Science main menus follow the same structure. ::: 4. **Shows the carousel image with relevant options**: *Overview*, *Fee structure*, and *Apply now* options using the **Carousel** node and triggers a specific flow based on the user input. ![](https://i.imgur.com/Qdc9CKL.png) > * Here, you can modify the condition and define your own custom flows. 5. **Maths overview flow**: Uses Image and Text nodes to display course overview and shows *Reviews*, *Fee structure*, and *Apply now* options (**Carousel**). ![](https://i.imgur.com/gmOz8du.png) 1. Validates the user input (**Condition**) and triggers the relevant flow. 2. Selecting Reviews shows up the link of the *Reviews* page (Text node) and triggers the **Followup** flow. The flow has two options linked to the respective flows - [Connect with Counselor](#24-connect-with-support) and *Back to Main menu* (**Carousel**). > * You can add your own link or perform other actions like trigger a flow, show carousel, show videos etc. 3. Selecting *Apply now* shows a text node and triggers the **Book a demo class** flow. 4. Selecting *Fee Structure* triggers the **Fee structure** flow. This flow shows information using **Text** and **Image** nodes along with the **Followup flow**. > * There is currently a blank PDF for the fee structure. You can either provide your fee structure or use some other actions like trigger flow, provide link etc. ### 2.2 Course material You can show the course material in a file that the user can download to the users who registered for the course. Let’s see the **Course material** flow in detail: 1. **Starts** with the intent `Show me the course material`. 2. **Captures user identifier**: Shows a text message followed by the **Phone Prompt **node and stores it in the `PhoneNo` variable. ![](https://i.imgur.com/oyp3CUl.png) > * You can use email or other prompt nodes to identify the user. 3. **Verifies if the identifier is registered**: Searches if the specified phone number is registered in the leads table (Database node) and stores the registered user details in the user_validation object variable. Leads is a table created inside the **Database** module that contains these fields - Name, phone number, email address, course, subscription status (Demo, Active, or Inactive), record inserted date, and record updated date. > * You can add new columns or remove an existing column according to your requirement. > * Use APIs to send and receive information from third-party systems. 4. **Allows registering new users**: If the user is not registered, it shows the Register now option, along with the Main menu and Try again options (Quick replies node). a. Selecting Register now executes the flow [Book a demo class](#23-book-a-demo-class) and updates the leads database. b. Selecting the Main menu triggers the **Start flow**. 5. Shows the file for registered users: If the user is registered, it shows the list of courses available (Carousel node), and based on the user input (Condition node) it shows the relevant course material (File node) that the user can download (PDF file). > * Customize the list of courses that you offer and upload the respective course materials. > * You can use Document to upload course materials and take advantage of Q&A where the system can extract most relevant answers from the uploaded documents automatically. ### 2.3 Book a demo class This is a lead generation flow where users can book for a demo class. Post the demo class, you can provide an option to register for the complete course. Let’s see the **Book a demo class** flow in detail: 1. **Starts** with the intent `Book a demo class`. 2. **Captures user information**: Shows a **Text** node followed by Name, Phone number, and Email nodes and stores the user’s response in the respective variables. > * Modify the text that you want to show up when the flow starts. > * Capture more details if required using the relevant nodes. You can skip any prompt (name, phone number, or email) if not required for your use case. 4. **Validates user information**: Shows the details provided by the user. The user can verify the details provided and modify if required information using *Edit name, Edit email, Edit phone number*, and *No changes* (**Quick replies node**). * This flow is to allow users to verify if the details provided are correct. Any changes the user makes through the respective edit options will update the values in the database accordingly. 5. **Displays list of courses**: Selecting the *No changes* option sets the variable value for subscription as Demo and shows the list of courses (**Quick replies**). 6. **Displays slots**: Shows the slots available for the selected course using the **Condition** node. 7. **Updates user information**: Updates the leads database (**Database** node) with the name, email address, phone number, and subscription status followed by a confirmation text message. ### 2.4 Connect with support You can allow your users to connect to an education counselor to address their queries. Let’s see the **Connect to a counselor** flow in detail: 1. Triggers the Connect with support agent intent and shows two options - Chat with support and FAQs. ![](https://i.imgur.com/kfPe4Lz.png) 2. Here is how the Chat with support flow works: a. **Collects user information**: Asks for the user’s name, mobile number, and email address using the respective **Prompt nodes**. > * You can customize the information that you want to capture. b. **Asks for reason**: Shows a predefined list of reasons before connecting to the support - **Cancel Membership**, **Get career related advice**, **Talk to support specialist**. c. If the user selects *Cancel membership*, it triggers the **Cancel Membership** flow where it captures the reason for cancellation and updates the subscription status in the **Database**. d. **Connects to the support**: If the user selects *Get career related advice*, or *Talk to support specialist*, it [connects to the live agent](#24-connect-with-support). e. If the agent is offline, a new ticket is created. 3. **FAQs flow**: It fetches answers quickly from the list of FAQs added through the [FAQs module](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs). ![](https://i.imgur.com/w718G8Y.png) a. Shows a list of frequently asked questions the user can select (**Quick replies node**). b. Fetches replies based on the selected question. > * You can keep the questions open-ended if required. Import FAQs in bulk using the [FAQs module](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs#2-add-faqs-in-bulk) and the bot shows up the answer based on the keywords. You can then connect if he still wishes to contact support. ### 2.5 Take a quiz You can allow the user to select the course that he is interested in, and show questions related to the course. Recommend the course levels according to their current knowledge. For example, recommend the basic course for answering basic questions incorrectly, recommend a basic course, if they answer basic questions correctly, recommend an advanced training course. Let’s see the **Take a quiz** flow in detail: ![](https://i.imgur.com/5pSnBWy.png) 1. Starts with Take a quiz intent. 2. **Shows the list of courses**: Shows a text message followed by the list of courses to select from (Quick replies node). 3. **Displays question**: Shows the relevant question with multiple answers (Quick replies node) for the selected course. 4. **Recommends course level**: Recommends the course level based on the answer and provides discount codes (Text node). 5. Provides options *Retake quiz* (if user selects incorrect answer) and *Book a demo* using Quick replies. 6. Selecting *Book a demo* triggers [Book a demo class](#23-book-a-demo-class) flow and *Retake quiz* goes back to step 3. ## 3. Build your own use cases Along with the prebuilt flows, you can create your own flows for your business specific use cases using [Studio](https://docs.yellow.ai/docs/platform_concepts/studio/overview) and other modules of Yellow.ai. Here are some EdTech specific templates: - **OTP verification for qualifying leads**: You can validate your registered user details through OTP based authentication using the Send OTP and Verify OTP action nodes. ![](https://i.imgur.com/lEyZPjC.png) - **Send campaigns to promote new courses**: Use the bot as a good lead generation tool. You can send course information, promote new courses, or offer discounts on existing courses to your leads through [Outbound campaign](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/outbound-campaigns/run-campaign) or [Workflow campaigns](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign). - **Take feedback/review on courses**: You can create a flow to capture feedback from users. Provide an option to select the course, and list down the feedback options to select with a text box. Create a database table to store the user response. - **Single sign-on**: Make use of the API or Database modules and pass a custom script that can read data from your website and pass it to the bot directly every time the user opens the bot. - **Provide more study material**: You can use [Documents](https://docs.yellow.ai/docs/platform_concepts/studio/train/what-is-document-cognition) feature available in Studio to upload your documents and generate FAQs from them. For example, it can open the document and navigate to the specific page and section that the user has searched for. - **Take elaborate career quizzes**: You can increase the number of questions and complexity in a quiz. You can do assessment post completing the courses. * **Use APIs to send or receive data**: You can also use [APIs](https://docs.yellow.ai/docs/platform_concepts/studio/api/add-api) to send or receive data according to your preference from third-party systems. With the API feature, you need not sync or import the entire data to yellow.ai platform. --- ## Healthcare template > Explore **Healthcare template** [here](https://cloud.yellow.ai/marketplace/41d196469e2c531ec23971260e070663). The **Healthcare** template provides quick and convenient access to information about your healthcare services, appointment scheduling, and patient registration. This article walks you through the features of the template and help you in enhancing your overall healthcare experience. ![](https://i.imgur.com/REKc66X.png) :::info For details on importing and editing the markerplace templates, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/marketplaceintro). ::: ------------------- ## 1. Prebuilt cases The following are the most common use cases (flows) that are prebuilt in healthcare template: 1. **Start:** This flow offers the options for a new patient to register, book a consultation, view clinics closer to their place, collect medical reports and reach out to support for personalised queries. 2. **New patient registration:** This flow collects the details of a new patient, for example, name, age, contact number, gender, email address and stores it in a database. 3. **Book a consultation:** This flow assists your users in scheduling an appointment with your healthcare centre by collecting the date and time of the doctor you would like to consult.  4. **Locate nearby clinics:** This flow collects the user's location details and shows the clinics closer to their place. 5. **Collect report:** This flow helps your users collect their health reports by accessing their electronic records. 6. **Connect with support:** This flow provides customer support either by answering user questions from the trained FAQs or by connecting the bot user to the support agent to address complex queries. ------------------- ### 1.1 Start - Display the main menu 1. **Start trigger**: It is triggered immediately after the welcome message. - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents) - ```Main menu options```. 2. **Identify the channel**: A logic node ([channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter)) is used to identify the channel in which the bot conversation is happening. Nodes used in the further flow will be based on the channel. 3. **Quick reply buttons to display menu options**: Six menu options (**New Registration, Book a consultation, Locate nearby clinics, Collect reports, and Connect with support**) are displayed. For WhatsApp, these are shown as Quick reply buttons using the [WhatsApp list](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#22-whatsapp-list) node, and for other channels, these are shown as menu options using the [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node. ![](https://i.imgur.com/KI8snQG.png) #### :pushpin: Tips - You can add multiple [channels](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/overview) to your bot to reach out to your users through any mode. - If you have varied menu options, you can add (or delete) the quick reply buttons and customize what can be displayed in the main menu. ------------------- ### 1.2 New patient registration 1. **Start trigger:** This flow is triggered when the bot user selects the **New patient registration** button when menu options are displayed (start flow). It can also be triggered at any point of the conversation when the bot user types a sentence that matches the intent - ```New patient registration```. 2. **Fetch name, age, gender, email ID, and phone number**: Using prompt nodes - [name](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#12-name), [question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question), [email](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#15-email), [phone number](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone), and [gender](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) are fetched and stored in the respective variables - ```name, selectedAge, selectedGender, phoneNo, email```. ![](https://i.imgur.com/Fhg8YN6.png) 3. **Verify patient details:** The [quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node displays all retrieved information, such as name, age, gender, email, and phone number, and allows users to modify it. If you select **No change** option, then your data will be stored in the database. 4. **Storing new patient details in the database:** After the details are modified, the [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node is used to store the entered details in the table - ```Patient details```. Once the records are added, a success message is displayed using text node . #### :pushpin: Tips - You can collect more details - previous medical details and upload files. - Using [execute flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) and [QR nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) you can display the next options available for the patient registration. ---------- ### 1.3 Book a consultant 1. **Start trigger:** This flow is triggered when the bot user selects the **Book a consultant** button when menu options are displayed. It can also be triggered at any point of the conversation when the bot user types a sentence that matches the intent- ```Book an appointment```. ![](https://i.imgur.com/DEuA4Qu.png) 2. **Capture email ID of the patient:** - Using a [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, **email ID** is obtained and stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```emailId```. 3. **Fetch the branch details from the database:** - [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) - From the doctor details table, the database node will fetch unique branch names, which are stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```branch```. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - branch function is used to display the branch names, which are stored in the [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```branch_qr```. - [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to fetch a list of branch names from the ```branch_qr``` variable and display the branch names in the form of quick reply buttons. ![](https://i.imgur.com/1QHyybF.png) 4. **Fetch the doctor's specialization from the database:** - [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) - From the doctor details table, the database node will fetch all the details of doctors from the previously selected branch, which are stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```doctor```. These records are sent to the function. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - ```speciality``` function is used to display the doctor's specialization, which is stored in the [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```speciality_qr``` in the form of quick reply buttons. - [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to fetch a doctor's specialization from the ```speciality_qr``` variable and display the branch names in the form of quick reply buttons. 5. **Fetch the doctor's details from the database:** - [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) - From the doctor details table, the database node will fetch all the details of doctors from the previously selected branch and doctor specialization, which are stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```doctor```. These records are sent to the function. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - doctor function is used to display the doctor's name, which is stored in the [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - ```doctor_qr``` in the form of quick reply buttons. - [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to fetch a doctor's name from the ```doctor_qr``` variable and display the branch names in the form of quick reply buttons. 6. **Display date and time slot for appointment:** - [Date](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#21-date) node is used to select a single date and store it in the [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)```dt```. - [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node, is used to select a morning or evening slot for the users. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - timeslot function is used to display morning or evening timeslots, for example- 9 AM - 10 AM. ![](https://i.imgur.com/IHKld6z.png) 7. **Store details in database and confirm booking:** After all the details are fetched, a booking ID is generated - ```bookappointresponse``` function. - A [database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node is used to store the entered details in the table -```Booking details```. Once the record is added, your appointment booking is successfully created. ------------------- ### 1.4 Locate nearby clinics ![](https://i.imgur.com/fcnNIEf.png) 1. **Start Trigger:** This flow is triggered when the bot user selects the **Locate nearby clinics** button when menu options are displayed (start flow). - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents) - ```Locate nearby clinics``` 2. **Collect location:** User location is collected using the [location](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#24-location) node. This information is stored in a variable named **location**. 3. **Nearby clinics:** A search happens in the [database node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) that contains the location details of all the clinics. A flash message 'Please wait while we fetch the nearest branch.' is displayed using the [text](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) node before showning nearby clinics. - If there is a clinic closer to the user location, the flow moves to the **success** branch. - If there's no clinic in or closer to the user location, the flow moves to the **fallback** and conveys this in a [text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes). ![](https://i.imgur.com/r2tHPOX.png) 4. **Clinic details:** The success branch is connected to a [function node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/function-node) which executes the function **nearbyClinics** and stores the clinic details in the variable **fiveNearbyDealers**. 5. **Display the clinic details:** The [function node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/function-node) is then connected to a [variable node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/variables-node) which is connected to a [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) and [text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes). At this step, the list of clinics will be displayed to the end user. --------------- ### 1.5 Collect reports 1. **Start trigger:** This flow is triggered when the bot user selects the **Collect report** button when menu options are displayed. It can also be triggered at any point of the conversation when the bot user types a sentence that matches the intent: "collect healthcare reports." 2. **Displays relavant options to collect report:** Shows the MRN and Phone number options to collect report using the [carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node. ![](https://i.imgur.com/DPaxpMM.png) 3. **Identify the selected option and display details to collect report:** The selected option from the Carousel node is identified by the [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition). - If MRN option is selected, [question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node is used to obtain the MRN number. - [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node is used to fetch MRN. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - ```generateDynamicLink``` function is used to fetch the report from the ```record health``` database, which is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```test_report``` and it converts the report into PDF format. ![](https://i.imgur.com/P6PVLqp.png) - Similarly, if phone number option is selected, [phone number](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone) node is used to get the phone number of the patient. - [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node is used to fetch phone number. - [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) - ```generateDynamicLink``` function is used to fetch the report from the ```record health``` database, which is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables)- ```test_report``` and it converts the report into PDF format. ![](https://i.imgur.com/ISyRRgD.png) ------------- ### 1.6 Connect with support [Prompt nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) are used to fetch the bot user's information such as ```phone number```, ```name```, and ```query```. These details are stored in the [respective variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#31-create-a-variable-via-nodes) and passed into the [Raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) action node, this will connect the user to the support agent. ![](https://i.imgur.com/7yl13Mx.png) > Inbox must be set up to connect the bot user to a live support agent. A support agent must be available (online) when the support request is raised. Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox) to learn about Inbox. ![](https://i.imgur.com/9nZR7wo.png) #### :pushpin: Tips - Add/ Delete the number of FAQs listed on the Quick reply node. - Add [FAQs](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs) based on your industry. ![](https://i.imgur.com/GAmjyQ7.png) - **Name** and **Query** are the mandatory fields to use a **Raise ticket** node. You can reduce the prompt nodes to avoid collecting details from the users prior or you can add more prompt nodes to collect other details before connecting to the agent. - As per requirements, you can fetch user details (name, email address, number) using **Prompt** nodes even if the user selects FAQs. This data can be used later for acquisition or monitoring purposes. --- ## SaaS template > Explore **SaaS template** [here](https://cloud.yellow.ai/marketplace/78e7ad81f4a59ba097c5968ed08959e4). Software as a service (or SaaS) is an industry concept of delivering applications over the internet. Marketplace's SaaS template is designed to promote an industry's SaaS products to customers and offer them a product demo. Along with an option to explore products and offerings, customers can also view case studies of how this product was implemented to renowned customers and how it benefited them (customer testimonials). Customer can also book a product demo with a company executive and chat with live support agents. You can customize this template as per your industry and business requirements. Reuse this flow design for your platform offerings (SaaS products), and add your customer use cases. ![](https://i.imgur.com/halY2LR.png) **Template use case** This template is built around the use case to help customers explore the products provided by yellow.ai. One can learn about the platform offerings based on the descriptions of custom use cases, channels (like WhatsApp, or Instagram), or industries(government, private sector). These flows are built to promote products and urge the user to book a demo. Bot users can also read customer use cases from the main flow, directly book a demo, or talk to an agent. :::info For details on importing and editing the markerplace templates, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/marketplaceintro). ::: ------ ## 1. Prebuilt use cases The most common use cases (flows) are prebuilt in this template for a SaaS industry to promote their products, following are the flows: 1. **Home flow/Display menu**: After the welcome message is displayed, WelcomeLCsXc is executed. It is the home flow that is designed for WhatsApp and other channels. It displays the menu a bot user can select as soon as the bot starts conversing. 2. **Explore products and offerings**: This flow is designed to provide insights into the available products. Based on the user's choice, the flow will switch to the respective product flow (explore by use case/channel/industry). - **Explore by (use case, channel, and industry)**: These flows are cloned flows. They are all designed to display a description of the product and prompt the bot users to book a demo. 3. **Customer case studies**: This flow is designed to give a brief description of the company and its impact on the industries. It allows the bot user to select and explore the use cases implemented for a list of industries and read their testimonials. A pre-recorded demo/images can be displayed as a promotion and finally, the bot user will be prompted to book a demo. 4. **Book a demo**: This flow collects the bot user's details(name, number, email) and displays a calendar and clock to select a preferred time and date to schedule a call with the executive to understand the product in depth. 5. **Connect with support**: This flow provides customer support either by fetching answers from the trained FAQs or by connecting the bot user directly to the support agent after collecting the details (name, number, query). These flows are explained in detail in the further sections. :::note The start trigger is a starting point at which the flow gets triggered(or executed). A flow can get triggered when a particular intent/entity/event/URL is identified or a flow can get triggered when [Execute flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) node is used in other flows. Click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#configure-start-trigger) to learn more. ::: --- ### 1.1 Display the main menu 1. **Start trigger**: Immediately after displaying the welcome message, WelcomeLCsXc is triggered. - At the end of each flow there is an option to go back to the main menu, when the *Main menu* button is clicked, WelcomeLCsXc is expected to be triggered. - It can also be triggered at any point of the conversation when the bot user types a sentence that matches the intent- *Main menu* options. You can customize this [intent.](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#11-zero-shot-model) 2. **Identify the channel**: A logic node ([channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) is used to identify the channel in which the bot conversation is happening. Nodes used in the further flow will be based on the channel. 3. **Quick reply buttons to display menu options**: For WhatsApp channel, [WhatsApp list](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#22-whatsapp-list) node is used to display the 4 menu options. Similarly, for other channels, [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to display the 4 menu options (Explore products and offerings, Customer case studies, Book a demo, and Connect with support). ![](https://i.imgur.com/xNrrTlI.png) #### :pushpin: Tips - You can add [multiple channels](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/overview) to your bot, to reach the users through any mode. - If you have varied products/menu options, you can add (or delete) the quick reply buttons and customize what can be displayed in the main menu. --- ### 1.2 Explore products and offerings 1. **Start trigger**: This flow is triggered when the bot user selects Explore products and offerings button when menu options are displayed. - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the intent- *Products and offers* options. You can customize this [intent.](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#11-zero-shot-model) 2. **Display categories of products**: With a [carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node, 3 product categories are displayed. 3. **Verify product selection and execute the next flow**: After the bot user selects an option from the carousel node, the response (which is a trained entity value) is identified for the category using an if-else logic ([condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) and the respective flow for the selected category is executed by using [Execute flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) node. - ```Explore_products``` is an [entity](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities) which is trained for 3 categories of ```entity value``` (explore by use case, channel, and industry). The response obtained by clicking the carousel button will be identified as an entity value. - If ```entity value``` is equal to ```Explore by use case```- **Explore by use case** flow will get executed. - Else, if ```entity value``` is equal to ```Explore by channel```- **Explore by channel** flow will get executed. - Else, if ```entity value``` is equal to ```Explore by industry```- **Explore by industry** flow will get executed. - If none of the options are selected, a text will be displayed ([text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) asking the bot user to retry. ![](https://i.imgur.com/0FdumwC.png) #### :pushpin: Tips - You can add more details about your product using a text node before displaying a carousel node. - You can add text, images, and more product category buttons to the carousel node. - If you add new products, train those entity values on the [entity](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities) section. Edit @explore_products and add a new list of product entity values. ![](https://i.imgur.com/UMqgMp3.png) - If none of the if-else conditions(categories) are selected, you can connect the last else condition to the **Execute flow** node and execute book a demo/connect to an agent or any of your custom flows. ----- ### 1.3 Explore by use case, channel or industry > Explore by use case, Explore by channel and Explore by industry flows are designed in the same fashion to provide details about the respective category. Only the information(text/images) varies. This flow is explained by using Explore by channel as an example. 1. **Start trigger**: This flow is triggered when the category is selected in the **Explore products and offerings** flow. 2. **Display sub-categories**: Using a [carousel node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel), sub-categories (Channels: Voice, Instagram, WhatsApp) are displayed. 3. **Verify the selected category and display details**: ```Explore_by_channel``` is an [entity](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities) which is trained for 3 categories of ```entity value``` (Voice, Instagram, WhatsApp). The response obtained by clicking the carousel button will be identified as an entity value. If ```entity value``` is equal to ```Voice automation```, voice related details are displayed using Text, Video, and Image nodes. Similarly, when Instagram/WhatsApp are identified, the respective details are displayed. 4. **Next action**: After learning about the product, the bot user can select what to do next- two options (Book a demo and Main menu) are displayed using the [carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node. Book a demo or WelcomeLCsXc flow is executed next based on the response. ![](https://i.imgur.com/eHluZ3i.png) #### :pushpin: Tips - Display varied number of sub categories by adding(or deleting) new buttons to step 1 (carousel node). Update the newly added values in @explore_by_channel on the entities page. - Use other [message nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) like files or carousel to display product details. - Next action carousel node can also have options to connect to an agent or any of your custom flows. ------ ### 1.4 Case studies 1. **Start trigger**: Triggered when the **Customer case studies** option is selected from the main menu (WelcomeLCsXc). - It can also be triggered when the bot user types a sentence that matches the intent- *customer case studies* options. You can customize this [intent.] 2. **Display an intro and sub-categories**: Using a [text node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes), details about the company are displayed followed by a carousel node to allow the bot user to select a category that they would like to learn more about (banking, retail, and government). 3. **Verify the category selected**: The selected category from the carousel is identified using a [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition). - ```@case_studies``` entity is trained to identify case studies categories as ```entity values```. - If ```entity value``` is equal to ```Retail``` the flow continues to show details pretaining to Retail. Likewise for the other categories. > After selecting a category, the flow can be further designed to help the user understand the product, read case studies, watch demos, etc. This can be replicated for all the categories. 4. **Display introduction for the case study**: With [message nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) all the information related to the case study can be displayed. A **Text node** is used here. 5. **Identify channel and display quick replies**: Channel is identified using [channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) node. If the bot user is conversing from a WhatsApp channel, [Carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node is used to display the 3 menu options. Similarly, for other channels, [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to display the 3 menu options (Read more, See bot in action, Go back). 6. **Identify the selected option and display details**: [Condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) is used to identify the selected options. - If **Read more** is selected, Text node is used to display the detailed case study. - If **See bot in action** is selected, an image node/ video node is used to display demo. - If **Go back** is selected, the flow goes back to the previous node. This is configured in the [Tools section > Behaviour > Go back alias](https://docs.yellow.ai/docs/platform_concepts/studio/tools#221-behaviour). 7. **Next action**: 2 options (Book a demo and Main menu) are displayed using a carousel node. Depending on the option selected, intent is identified and respective flows are executed. ![](https://i.imgur.com/WecYR8R.png) #### :pushpin: Tips - Use message nodes to display more details. - Provide varied options to the bot users by adding/deleting buttons on the carousel/ quick reply nodes. ---------- ### 1.5 Book a demo 1. **Start trigger**: This flow is triggered when the bot user selects **Book a demo** button when menu options are displayed. - It can also be triggered at any point of the conversation when the bot user types a sentence that matches with the intent- *I want to book a demo* options. You can customize this [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents). 2. **Collect user details and identify the channel**: [Text nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/text-node) are used to create a conversational flow. [Name](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#12-name), [Email](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#15-email) and [Phone](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone) nodes are used to collect user details. [Channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) (condition node) is used to identify the channel in which the user is conversing in, based on the channel, date and time are collected. > Different methods(nodes) are used for different channels as the format to obtain the date and time in each channel is different. 3. **Schedule demo (obtain Date and Time) for WhatsApp channel**: - Using [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, the bot user is asked to enter the date in DD/MM/YYYY format. - ```@demo_date``` [entity](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities) is trained in the entities section for the pattern - ```([0-2][0-9]|(3)[0-1])(/)(((0)[0-9])|((1)[0-2]))(/)\d{4}```. Using [Condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) node, it is verified if the user entered the date in DD/MM/YYYY format. - If the date entered is correct, the date value is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - **demoDate**. - Using [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#11-question) node, the bot user is asked to enter the time in HH:MM format. - ```@demo_time``` [entity](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities) is trained in the entities section for the pattern - ```([0-1]?[0-9]|2[0-3]):[0-5][0-9]```. Using [Condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) node, it is verified if the user has entered the date in HH:MM format. - If the time entry is correct, the time value is stored in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) - **demoTime**. - **getCalenderTime** is a [function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) that is written to return **start** and **end** date-time (each scheduled meeting lasts for 30 min). **demoDate** and **demoTime** variables are passed into getCalenderTime function, and the code will calculate and return the **start** and **end** date and time. This output is stored in **StartDateTime** variable. ![](https://i.imgur.com/cTfgzDz.png) 4. **Schedule demo (obtain Date and Time) for other channels**: Using the [Date](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#21-date) node (**Single date picker** widget type for date and **Time picker** widget type for time), Date and Time are stored in 2 [variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#31-create-a-variable-via-nodes) (Day and Timeslot). Day and Timeslot variables are passed into the getCalenderTime function. - **getCalenderTime** is a [function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) that is written to return **start** and **end** date-time (each scheduled meeting lasts for 30 min). **Day** and **Timeslot** variables are passed into getCalenderTime function, the code will calculate and return the **start** and **end** date and time. This output is stored in **StartDateTime** variable. ![](https://i.imgur.com/5tR24lf.png) 5. **Create Google calender event**: [Google calender third party integration](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/google-calendar) is enabled from the **Integrations** section. The details obtained from the conversation are passed into the **Google calendar** node to schedule a meeting (Title, Description, Start and End time, and Host and guest email). 6. **Identify the channel and display options to Confirm or Reschedule booking**: After the meeting is scheduled successfully, using the [Condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) node, the channel is identified. If the identified channel is WhatsApp, [Carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node is used to display options to **Reschedule/Confirm**. If the bot conversation is happening from other channels, the [Quick replies](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to display **Reschedule/Confirm** options. - **Reschedule booking**: If Reschedule is selected, the flow is directed back to step#3 to schedule a meeting from the beginning. - **Confirm booking**: If the booking is confirmed, using a [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node, meeting details(**name, email, phone, demodate and demotime**) are stored in ```book_a_demo``` table ([table](https://docs.yellow.ai/docs/platform_concepts/studio/database) and respective columns are existing with the name ```book_a_demo```) ![](https://i.imgur.com/oBJQqzn.png) #### :pushpin: Tips - Date and time format can be edited by changing the pattern of the respective entities. - Other integrations can be used to book a meeting. - Collect required details using [Prompt](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) nodes and store the data in variables. --------- ### 1.6 Connect with support 1. **Start trigger**: This flow is triggered when the user selects **Connect with support** quick action from the main menu (WelcomeLCsXc flow). This flow can also be triggered when the bot user's input matches with any of the sentences(utterances) trained for **Queries and concerns** [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents). 2. **Display and verify support options (Agent/FAQs)**: With a [carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#16-carousel) node, two options (Chat with support and FAQs) are displayed. The type of support selected is identified using [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition). ```@queries_and_concerns``` entity is trained to identify FAQs and Chat with support as ```entity values```. - If the FAQs option is selected, answers to the user queries will be fetched from the trained FAQs. - If Chat with support is selected, a support agent will be connected to take the conversation forward. 3. **FAQs**: All the FAQs about the company are added and trained with the answers in the [FAQs section](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs). When FAQs is selected, a condition node ([channel filter](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#2-channel-filter) is added to identify the channel from which the conversation is taking place. - If the conversation is happening on WhatsApp, [WhatsApp list](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#22-whatsapp-list) node is used to display the list of FAQs. - If the conversation is via other channels, [Quick reply](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#14-quick-replies) node is used to display the list of FAQs. - User can also type the query in the input bar. - Based on the selection/entry, the answer will be fetched from the trained FAQs. ![](https://i.imgur.com/OFyuQW1.png) 4. **Chat with support**: [Prompt nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes) are used to fetch the bot user's information such as **phone number**, **name** and **query**. These details are stored in the [respective variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#31-create-a-variable-via-nodes) and passed into the [Raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) action node, this will connect the user to the support agent. > Inbox must be set up to connect the bot user to a live support agent. A support agent must be available (online) when the support request is raised. Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox) to learn about Inbox. ![](https://i.imgur.com/0vH57oY.png) #### :pushpin: Tips - Add/ Delete the number of FAQs listed on the Quick reply node. - Add [FAQs](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs) based on your industry. ![](https://i.imgur.com/lVV0HnS.png) - **Name** and **Query** are the mandatory fields to use a **Raise ticket** node. You can reduce the prompt nodes to avoid collecting details from the users prior or you can add more prompt nodes to collect other details before connecting to the agent. - You can fetch user details using **Prompt** nodes even if the user selects FAQs. This data can be used later for acquisition or monitoring purposes. ------ --- ## Migration Guide --- ## Cloud Platform Not Loading # Yellow\.ai Platform Not Loading – Troubleshooting Guide If you're unable to access the Yellow\.ai platform, follow the steps below to identify and resolve the issue. ## ✅ Step 1: Perform Basic Troubleshooting Start with the following checks to rule out common browser or network-related issues. ### 1. Clear Browser Cache and Cookies * Clear the cache and cookies from your browser settings. * Refresh and try reloading the Yellow\.ai platform. ### 2. Open in Incognito or Private Mode * Launch a private/incognito window in your browser. * Open the Yellow\.ai platform URL and check if it loads successfully. ### 3. Try a Different Browser * Use an alternate browser (e.g., Chrome, Firefox, Safari, Edge). * Observe if the platform loads in the new browser. ### 4. Switch Your Network * Change your internet connection (e.g., from office Wi-Fi to mobile hotspot). * Attempt to access the platform again. ### 5. Check Firewall or Network Restrictions * Contact your IT administrator. * Ensure that **Yellow\.ai IPs and domains are whitelisted** in your firewall or proxy settings. --- ## 🛠️ Step 2: Still Not Working? Contact Yellow\.ai Support If the issue persists after completing the steps above, please email **[support@yellow.ai](mailto:support@yellow.ai)** with the following details to help us investigate: **Basic Information** * **Bot ID**: (You can find this in your platform settings or [click here](https://tinyurl.com/4sfeyrv4) for help.) * **Issue Start Time**: When did you first notice the problem? (Include date and time.) * **Scope of Impact**: Is the issue affecting only you, or are other users experiencing it as well? **✅ Troubleshooting Checklist** | Step | Tried? (Yes/No) | Observations | | ---------------------------------------- | --------------- | ----------------------------------- | | Cleared cache and cookies | | What happened after retrying? | | Opened in incognito/private mode | | Was there any change in behavior? | | Tried a different browser | | Which browser? What was the result? | | Switched to a different network | | Any difference? | | Confirmed Yellow\.ai IPs are whitelisted | | Has your IT team reviewed this? | **📎 Screenshots and Error Messages** * If available, attach any screenshots or console error messages to your email. * These will help us diagnose the issue faster. --- --- ## Create AI agent for a sample use cases This guide walks you through the process of designing and configuring the Yellow Travels AI Agent step by step. It is designed for first-time users to build and deploy their own AI agent. --- ## Yellow travels AI Agent use case In this guide, we are considering the Yellow Travels use case to demonstrate how an AI Agent can be built and configured on the Yellow.ai platform. Yellow Travels AI Agent is a conversational assistant built on the Yellow.ai platform to help customers with their travel needs. It automates flight bookings, hotel bookings, cancellations, and refund queries. It also allows handoff to live agents when required. ### Sample scenarios of Yellow travels | Agent | Description | Example Conversation | |-------|-------------|-----------------------| | **Book a flight ticket** | Collects passenger details, trip info (departure, destination, date), generates a booking ID, and stores details in the database. | I want to book a flight from Delhi to Mumbai on 22nd Sept. | Stores details in travelDB and sends confirmation. | | **Cancel a flight ticket** | Asks for booking ID, verifies it, and updates cancellation status. | Cancel my flight with Booking ID 12345. | | **Book a hotel room** | Captures hotel stay details (location, check-in/out date, guest info), confirms booking, and captures data. | Book a hotel in Goa from 1st to 3rd Oct for 2 guests. | | **Check refund status** | Takes the booking ID, checks refund progress, and informs user. | What's the refund status for Booking ID 12345? | --- ## How to configure AI agent ### Step 1: Configure Super agent The Super Agent acts as the master controller for your AI Agent. It defines the persona, rules, and fallback behavior that apply across conversations. 1. [Create your AI agent](https://docs.yellow.ai/docs/platform_concepts/get_started/createfirstbot) based on your use case. 2. Go to **Super agent**. 3. [Review and edit](https://docs.yellow.ai/docs/platform_concepts/AIAgent/agentpersona#update-profile-settings) the following details (these attributes are cloned from the chosen template but editable anytime): | Attribute | Description | Example | |-----------|-------------|---------| | Name | Enter the name of the super agent | Yellow Travels Bot | | Persona | Defines agent’s tone and behavior | Friendly travel assistant | | Role | Purpose of the agent | Help users book, cancel, and manage travel | | Scope | Boundaries of what the agent can and cannot do | Handles only travel-related tasks | | Model | LLM powering the responses | GPT-powered model (default template) | 4. Define the [welcome flow](https://docs.yellow.ai/docs/platform_concepts/AIAgent/agentpersona#define-welcome-message). Example: *"Hi, I’m Yellow Travels Bot! I can help you book flights, cancel bookings, or check refund status. What would you like to do today?"* 5. Add **conversation rules** (optional). Example: - Always respond within 50 words. - Follow step-by-step guidance. 6. Configure [Fallback behavior](https://docs.yellow.ai/docs/platform_concepts/AIAgent/agentpersona#how-to-handle-unanswered-queries) and [Live agent](https://docs.yellow.ai/docs/platform_concepts/AIAgent/transfer-live-agent) transfer. --- ### Step 2: Create individual Agents Create one agent per use case: - Flight ticket booking agent - Cancel booking agent [**Configure Agent documentation →**](https://docs.yellow.ai/docs/platform_concepts/AIAgent/agent#create-an-agent) ![](https://cdn.yellowmessenger.com/assets/yellow-docs/create-new-agent.png) --- ### Step 3: Configure Start trigger Set how conversations should begin for each agent. **Example triggers for Flight Booking:** - "I want to book a flight" - "Help me book a flight" - "Book a ticket for my trip" [**Start trigger documentation →**](https://docs.yellow.ai/docs/platform_concepts/AIAgent/agent#start-trigger) ![](https://cdn.yellowmessenger.com/assets/yellow-docs/start-trger.png) --- ### Step 4: Build Prompt — step-by-step Prompts guide the conversation by collecting user input, validating it, and performing actions. **Sample sequence for booking a flight:** 1. Collect user details: - `getInput: full_name` - `getInput: mail_ID` - `getInput: phone_number` 2. Collect trip details: - `getInput: departure_city` - `getInput: departure_destination` - `getInput: dateOfTravel` 3. Generate booking ID and store details: - Generate random bookingID. - `callWorkflow: travelDB` (pass collected variables). 4. Send confirmation message: *Thanks `{full_name}!` Your flight from `{departure_city}` to `{departure_destination}` on `{dateOfTravel}` is booked. Booking ID: `{bookingID}`. We emailed the details to `{mail_ID}`.* **Map prompts to actions:** * Use [Get input](https://docs.yellow.ai/docs/platform_concepts/AIAgent/get-input) to capture user responses. * Use Validation (built-in or custom) to validate email/phone/date. * Use [Set variable](https://docs.yellow.ai/docs/platform_concepts/AIAgent/aigent-variables) to store temporary values. * Use [Call workflow](https://docs.yellow.ai/docs/platform_concepts/AIAgent/call-workflow) fetch details to database, call payment, generate booking ID, call external APIs. * Use [Dynamic rich media](https://docs.yellow.ai/docs/platform_concepts/AIAgent/get-input#dynamic-rich-media) (cards/carousel) to show flight/hotel options fetched from an API. * Use [Transfer to Live agent](https://docs.yellow.ai/docs/platform_concepts/AIAgent/transfer-live-agent) action when the agent cannot resolve the issue or the user asks for human help. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/promot-deatils.png) --- ### Step 5: Preview & Test - [Agent builder preview](https://docs.yellow.ai/docs/platform_concepts/AIAgent/manage-conversation#preview-via-agent-builder) - [Copilot simulation](https://docs.yellow.ai/docs/platform_concepts/AIAgent/manage-conversation#ai-copilot) - [Preview on channel](https://docs.yellow.ai/docs/platform_concepts/AIAgent/manage-conversation#preview-agent-on-a-connected-channel) **Testing:** - Manual testing with [Copilot](https://docs.yellow.ai/docs/platform_concepts/AICopilot/copilot). - Automated [Test suites](https://docs.yellow.ai/docs/platform_concepts/AIAgent/automated-agent-testing#scenario-based-testing). **What to check in tests**: - Input parsing. - DB entries. - Confirmation messages. - Fallback. - Live agent handoff. --- ### Step 6: Publish AI agent After successful testing, click **Publish** on the Agent page. --- ## Build your bot conversation flow After [creating your bot](https://docs.yellow.ai/docs/platform_concepts/studio/build/create_chatbot#create-chatbot-manually), you can begin building its flow to manage how it interacts with users. Flow creation includes the following steps: * [Setup flow triggers](#setup-flow-triggers) * [Create bot flows](#create-bot-flows) * [Preview and test the bot](#preview-and-test-the-bot) * [Publish the bot](#publish-the-bot) ## Setup flow triggers Before building a flow, you need to create Intents and Utterances and train the bot to recognize them. This setup ensures that the bot can trigger the correct flows and respond appropriately. ### Create Intent and Utterances: An Intent is what the user wants to achieve, like "booking a ticket". Utterances are the different ways a user might express that intent. For example, "I need to reserve a ticket", "Book a flight ticket for me", and "I want to book a ticket". For more detailed information on how to create Intents and Utterances, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#add-intents-and-uttrances). #### Prerequisite Consider the following when creating Intents and Utterances: * **Environment**: You should add intents or utterances only in a low-tier environment like **Sandbox** or **Development**. **Intent naming best practices**: * Minimum number of characters for an intent name: 10 * Minimum number of words: 10 (and unique) * Special characters or numbers: Not allowed * Duplicate intent names: Not allowed ![](https://i.imgur.com/s0oiSIS.gif) ### Add auto-generated utterances The platform can auto-generate utterances that are based on the intent you added. This helps the bot understand and respond to the different ways users might phrase the same request. For more details, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#add-auto-generated-utterances). ![](https://i.imgur.com/kApxpNm.gif) ### Train Intent and Utterances You need to train your bot after adding intents and utterances. If the bot is not trained with the intent, it will not understand user queries and display a [fallback](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/manage-flows#fallback-flow) response. For multiple languages, you need to train the intents and utterances in multilingual and not Sentence encoder. For more detailed information, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#train-your-bot-with-intents-and-utterances). ![](https://imgur.com/Q4cGSMp.gif) ### Verify intent confidence For a bot to accurately trigger the desired flow, you need to verify the confidence level of the added intent. This involves checking whether the intent's confidence score aligns with the user's input, ensuring the correct flow is initiated. The expected minimum confidence score is `0.85`. For more detailed information, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents#test-your-intents). ![](https://imgur.com/FUtdOwX.gif) ## Create bot flows Once you have created Intents and Utterances, you can start building your bot's conversational flow. This involves connecting different nodes that represent the steps of the conversation. There are several ways to create a flow: * Create with AI Copilot * Create from template * Start from scratch ![create flow](https://imgur.com/6rfrsTD.png) :::note * You can add up to 150 nodes in a flow. * There is no limit to create the number of flows in a bot. ::: ### Start node The start node is an entry point for a bot to begin a conversation with the user. You can define a trigger point for a flow by selecting Intents, Entities, Event, or Page URL. Multiple trigger types can be added for a single flow. For detailed instructions, see [how to configure each trigger type](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow). ![](https://imgur.com/zuP3R7W.gif) ### Connecting nodes In the flow, each node represents a step. Start by clicking the starting point and connecting the appropriate nodes based on your use case. ![](https://imgur.com/RRf8EmL.gif) ## Preview and test the bot After creating the flow, you can preview and test how the bot will appear, function, and interact with users. ![](https://imgur.com/wbjAKle.gif) ## Publish the bot After testing the flow, you can [publish](https://docs.yellow.ai/docs/platform_concepts/studio/test-and-publish-bot/modes) the bot to make it accessible to end users. When you are publishing the changes from Sandbox to Staging, you do not need approver permission to approve it. But when you are publishing from Staging to Production, you need approver's permission. Only the super admin of the bot can approve the publish request. ![](https://imgur.com/AXemOsX.gif) ### Cancel publish request If you wish to make changes to the current flow or bot, or if you have raised a publish request by mistake, you can cancel the publish request. ![](https://imgur.com/ev4e2p6.gif) --- ## Debug issues using logs This guide outlines the importance of reading logs for debugging issues on our platform, distinguishing between Execution Logs and Audit Logs. ### Prerequisites for accessing Debug logs Before you begin, ensure the following: * You have access to the platform’s developer tools. * You hold the necessary permissions to view log entries. * You are familiar with common log formats and error messages. ### Key objectives when reading Debug logs Effective debugging requires interpreting logs for multiple purposes, including: * **Identify the controller state**: Understand the current status and behavior of the system controller. * **Determine the active flow**: Pinpoint which flow was triggered during the interaction. * **Trace execution steps**: Follow each function’s execution path to uncover how the logic flows. * **Inspect stored variables**: Review the values assigned to key variables throughout the process. * **Detect errors**: Locate specific errors that may be disrupting the flow. * **Analyze API activity**: Examine API calls, including response bodies and status codes, to ensure external services are responding as expected. --- ## Types of logs on our platform Our platform provides two types of logs to assist in debugging: 1. **[Execution logs](#execution-logs)**: These logs help identify API failures that disrupt flows. They offer a detailed, step-by-step account of each flow's execution, making it easier to pinpoint issues. 2. **[Audit logs](#view--download-ai-agent-audit-logs)**: These logs store all operations performed on the platform, such as database deletions, journey deletions, and audience table deletions for audit purposes. ### Execution Logs **Using execution logs to identify errors:** * **Use the UID to identify errors**: To troubleshoot issues more precisely, use the UID (Unique Identifier) to trace errors. You can fetch the UID of any conversation transcript from the network tab API. To do this on the Live bot page, **right click** > **Inspect** > **Network** > **Payload**. ![](https://i.imgur.com/fPOnyzX.png) * **Additional methods for viewing logs**: There are advanced methods available to access and review logs, which provide deeper insights into the bot's operations and help identify critical issues. To read the logs, follow these steps: 1. Go to **Automation** > **Analysis** > **Conversation logs**. ![](https://i.imgur.com/ggN4K7f.png) 2. Go to the conversation log. ![](https://i.imgur.com/cIRosa4.png) 3. Click on **Logs**. ![](https://i.imgur.com/CEgeroT.png) 4. Click **Debugger** icon to get the logs for any user input and see what happened in the bot after that particular input. ![](https://i.imgur.com/x3gui2X.png) 5. To flag a conversation, click the flag icon corresponding to each conversation logs, or select the log and click **Filters** > **Flagged conversations** > **Flagged** > **Apply filter**. ![](https://i.imgur.com/wUWVIqS.png) * After flagging, you can revisit the conversation on the current or next day by searching for flagged conversations in the filter. * In the **Logs** section, you can also view triggered events in any conversation. For example, if a "callbackStatus" event is triggered, click the **Debugger** icon, then click on the event to see details about the data the bot receives and the actions it takes after the event. --- ### Audit logs #### View & download AI agent audit logs Audit log provide a detailed record of the changes made to each module(APIs, Inbox Agent configuration/actions, Channels), including information about the user (user email) who made the changes and the timestamp of the actions taken. To view audit log, follow these steps: 1. Click **AI agent settings** > **Audit logs** to access the log of all the changes made. ![](https://i.imgur.com/aALWBqy.png) You will see the audit logs page with the details of all actions performed on the platform. ![](https://i.imgur.com/ea7H3Nn.png) 2. To filter the results and view specific information, you can use the **filter** button and apply relevant filters. 3. **To download a complete record of the Audit log, click on** **Download CSV**. This will provide a detailed history of all changes made to the AI agent over time. ![image](https://imgur.com/E5gLq7h.png) :::note Audit logs will be available for 6 months. ::: --- ## Disable callout banner You can remove or disable the callout banner in the website AI-agent by triggering a specific event using the Send event node in your flow. **Use case** The callout banner is used to display promotions or important messages to users. If you want to remove the banner based on user actions or AI agent logic, you can use a Send event node. ## Configuration steps ### Step 1: Add a Send event node In your AI agent flow, add a Send Event node at the point where you want to remove or disable the callout banner. ### Step 2: Configure the Event name in Send event node In the Event name field, type the event name `ui-event-close-promotion`. When the AI agent reaches this node during a conversation, the above event gets triggered and automatically the callout banner will be removed or disabled from the AI agent. --- ## Download API logs of the last 15 days When there is an API issue, we don’t know if our API calls are failing or if the client API is failing. To resolve this issue we are now storing all the API requests and responses which will help establish the issues. **How to use this log data?** - There are multiple issues arising out of API failures. In these cases, we are not aware if calls from our platform are failing or if there are issues with customers' API only. You can download the data in this case and see some past requests and responses to establish what is the actual root cause. - If the date and time of an incident of failure are known, then you can select the respective date and download the data. In the downloaded data search for the respective time and check the requests and responses. - For better readability you can use tools like **VS code**, **jupyter notebook** etc. ## 1. API Logs data API logs data stores all the API data like requests, responses, etc. The data would be available for requests sent from the [API Node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/api-node) only. API download data would contain this information: * API Name * API Requests * API Response * Requests Timestamp * Status Code (Failed/Success) * Userid ## 2. Download API Logs Follow the given steps to download the API logs: 1. Open **Automation** > **API** tab. 2. Select the environment. - Logs will be downloaded only for the selected environment. For example, if you have selected the dev environment it would download requests sent from the dev env only. 3. Select the API for which you want to download logs data. ![](https://i.imgur.com/aMdmxq9.jpg) 4. Select the date for which you want to download the data and click **Download**. Downloaded data will be Plain Text. You can open it in any tool for better readability. ![](https://i.imgur.com/mAy70vq.png) Timeframe for which logs data is available: - Data is available from 21st October. - Data is available for the last 15 days. - You can select only one day at a time to download. - Data is not real-time, there is a 1 hr delay (if a request has been made at 6 PM, this data would be available to be downloaded after 7 PM). --- ## Dynamically load the callout banner in chatbot You can dynamically load the callout banner in the bot by updating the relevant data in the database. This allows for real-time changes and customization of the banner content based on specific needs.
Consider an e-commerce bot where you want to display promotional offers based on data in the database columns like date, start time, and end time. By configuring the database appropriately, the e-commerce bot will display and update promotional banners dynamically. **Scenario**: For an e-commerce platform, display a Christmas promotion from December 20th to December 25th. Sample database entries: date | start_time | end_time |banner_data -----|------------|----------|---------- 20-12-2024 | 00:00 | 23:59 | "Christmas sale starts now! 30% Off!" 21-12-2024 | 00:00 | 23:59 | "Exclusive christmas offers!" 22-12-2024 | 00:00 | 23:59 | "Last minute christmas deals!" 23-12-2024 | 00:00 | 23:59 | "Hurry! Christmas sale ending soon!" 24-12-2024 | 00:00 | 23:59| "Christmas eve specials!" 25-12-2024 | 00:00 | 23:59 | "Merry Christmas! final day of sales!" **Outcome**: * On 20 December, the bot will display: "Christmas sale starts now! 30% Off!" * On 21 December, the banner updates to: "Exclusive Christmas offers!" * This process continues dynamically, displaying the relevant banner data until the end of 25 December. If you do not want the banner to be displayed, you can set the entire Date in the DD-MM-YYYY format and modify the logic accordingly in the flow to work. #### Prerequisite To load the callout banner dynamically, consider the following prerequisites: * **Database setup**: Create a database with the relevant columns based on the banner requirement. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/database#create-database-table). * Use [send event](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/send-event-node) node: Use this node to call the event `ui-event-update-promotion`. When this event is triggered, the bot fetches the details from the database and displays them in a callout banner format. #### Loading callout banner dynamically To load the callout banner dynamically, follow these steps: 1. Create a flow to trigger the event. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#trigger-flow-using-event). 2. Based on the date specified in the database it searches the info and passes the response to the send event node. ![](https://i.imgur.com/EhPbfwm.png) 3. Inside the send event node configure the custom data. Select the event type as **Custom** and inside the data field pass the below code as per your requirement. ![](https://i.imgur.com/2mmbcV6.png) Below is the sample code: ```javascript { "banners": [ { "title": "{{{variables.dbbanner_data.records.0.banner_message}}}", "options": [ { "title": "Devrev", "url":"{{{variables.dbbanner_data.records.0.banner_but1}}}" }, { "title": "Google", "url": "{{{variables.dbbanner_data.records.0.banner_but2}}} " } ], "type": "text" }, { "type": "image", "imageURL": "{{{variables.dbbanner_data.records.0.banner_image}}} ", "linkType": "url", "linkURL": "{{{variables.dbbanner_data.records.0.banner_urlimage}}} " } ], "bannerSettings": { "state": "close", "textOnMinimise": "Hello this is banner minimize text" } } ``` --- ## How to create dynamic quick replies? A **Fetch from** field is available in the quick replies node to add the code to generate dynamic quick replies. 1. Include a [function node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/function-node) and write the code to generate dynamic quick replies(you can also refer to the [sample code](#sample-snippet-to-generate-dynamic-quick-replies) below). 2. Store the response of that function node in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#21-custom-variables). 3. Use quick replies node to display this data by passing the variable in the **Fetch from** field(as shown below). ![](https://i.imgur.com/EJpq5WO.png) ### Sample snippet to generate dynamic quick replies ```js return new Promise(resolve => { // Your logic goes here let title = data.variables.carsData2; let options = []; for (let i = 0; i < title.length; i++) { options.push({title : title[i].Mfr_CommonName, text:title[i].Mfr_Name}); } let qrObject = { "title": "Here are list of cars from JAPAN", "options": options }; console.log(qrObject,"qrObject"); resolve(qrObject); }); ``` ### Convert API Responses to Arrays To parse API responses and convert them into an array format, refer the following snippet. ```js return new Promise(resolve => { let apiResponse = ymLib.args.apiResponse; // fetch API response let body; if (apiResponse && apiResponse.body) { body = JSON.parse(apiResponse.body) // parse API response and store it in body variable } console.log(body,"2w2w2w2w2") let cars = body.Results let carsInfo = [] for(let i=0;i< cars.length; i++) { if(cars[i].Country=="JAPAN"){ carsInfo.push({"Mfr_CommonName":cars[i].Mfr_CommonName,"Mfr_Name":cars[i].Mfr_Name}) // fetch PostOffice Name and store in postOfficeName array } } resolve(carsInfo); }); ``` ## Create dynamic WhatsApp list To create dynamic WhatsApp list, you need follow the same procedure as dynamic quick replies. ![](https://i.imgur.com/hjPSbi8.png) Use the snippet below to generate a dynamic Whatsapp list: ```js return new Promise(resolve => { // Your logic goes here let title = data.variables.carsData2; let options = []; for (let i = 0; i < title.length; i++) { options.push({title : title[i].Mfr_CommonName, text:title[i].Mfr_Name}); } let qrObject = { title: 'Please select the relevant option from below', optionText: 'Options', options: [ { options: options } ] } console.log(qrObject,"qrObject"); resolve(qrObject); }); ``` --- ## Error occurred in Cloud Platform If you encounters an error page while using the Yellow.ai platform, follow the troubleshooting steps provided to resolve the issue. ![](https://imgur.com/IVI6f6w.png) ##### Prerequisites to resolve the error Ensure you have access to the Yellow.ai platform to follow the troubleshooting steps. ## Troubleshooting steps ### Method 1: Clear cookies and site data Follow these steps to clear browser data and attempt resolving the issue: 1. Open your browser's settings. 2. Clear the cookies and site data. 3. Re-login to the Yellow.ai platform and check if the issue persists. :::note If the issue continues after clearing cookies, proceed to [Method 2](#method-2-re-invite-the-agentuser-to-the-platform). ::: ### Method 2: Re-invite the agent/user to the platform If clearing cookies and site data does not resolve the issue, follow the steps below to re-invite the user to the platform: 1. Click on the **Settings** icon (the gear icon located at the bottom left corner of the platform). ![](https://imgur.com/a2ymFWs.png) 2. Search for "Access control" in the search bar and click on the **Access controls** option. ![](https://imgur.com/Idys0BA.png) 3. In the search bar, type the email address or name of the user facing the issue. ![](https://imgur.com/TrlIham.png) 4. Click on the below high-lighted option and select **Delete**. :::note Make a note of the user’s current access controls before deletion to ensure the same permissions are given upon re-inviting. ::: ![](https://imgur.com/t0mcCff.png) 5. Once deleted, reload the screen and re-invite the same user again by clicking on the **+ Invite user** button on the same page. ![](https://imgur.com/iBdVpKG.png) 6. Enter the user's email address and assign the access controls as noted or previously given. Then, click on the **+ Invite user** button. 7. Once the invite is sent, ask the user to accept the invite and re-login to the Yellow.ai platform. This should resolve the error. --- ## How to hide the input field in quick replies node? Quick reply options provide a convenient way for users to interact with an interface, especially on mobile devices or when time is limited. By hiding the input field while displaying quick reply options, users can more easily focus on available options and quickly select the one that best matches their intent. To hide the input field, 1. Go to the Quick replies node and click the **settings** icon on the right corner. 2. Enable **Hide Input** and click **Save**. The input field will no longer be visible on the bot. --- ## How to display images based on different languages? 1. Click the **Language** button on the left tile and add the preferred languages using **+Add language**. 2. Create a [global variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#21-custom-variables) for language. 3. Add a [variable node](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#-1-variables), in **Name** include the global variable and in **Value** enter one of the preferred [language codes](https://docs.yellow.ai/docs/platform_concepts/studio/build/localization#supported-languages). ![](https://i.imgur.com/P575QBh.png) 4. Add [Set language node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/set-language) and add the global variable here. ![](https://i.imgur.com/yxqWbNh.png) 5. Add an [image node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) and add an image to it. This image will be mapped to the language code you entered in step 3. ![](https://i.imgur.com/xBhEte4.png) 4. Click the **Language** button on the left tile again, and select the language you want to update. Navigate to the image node, and change the current image with the corresponding image for the selected language. Repeat this step for all the languages. ![](https://i.imgur.com/ap27ou3.png) 5. Set a language code in the variable node to display the respective image in the bot ![](https://i.imgur.com/GA7xqdP.gif) --- ## Multilingual bot You can create multilingual bots in yellow.ai platform through which your bot can understand and respond to users in multiple languages. This can be useful in situations where a large number of users speak different languages and need assistance in their preferred language. Please follow the below-mentioned steps to set up one such bot. ![](https://i.imgur.com/45CAuGk.png) 1. Go to your flow and click **Language** on the left tile. ![](https://i.imgur.com/zYKGw0d.png) 2. Click **Add language** to add the languages your bot should support. ![](https://i.imgur.com/UUUyPET.png) 3. Go to **Train** and click **Tools**. ![](https://i.imgur.com/0Kk40Dm.png) 4. Set **Auto detect language** to **Yes** under **CONVERSATION** and click **Save**. This will let your bot automatically detect the end-user's language and enable conversation in the same language. ![](https://i.imgur.com/N9saSaD.png) 5. Add a [Quick Replies node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) to your flow and populate the Button values with language options. ![](https://i.imgur.com/fsQyy5B.png) 6. Click **Configure buttons** on the same pop-up and populate the button values with respective language's [ISO codes](https://docs.yellow.ai/docs/platform_concepts/studio/build/localization#supported-languages). Click **Save all changes** when you're done. ![](https://i.imgur.com/lz4oNEt.png) 7. Store all response to this quick replies node in a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#31-create-a-variable-via-nodes). ![](https://i.imgur.com/GcopfKf.png) 8. Add a [set language node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/set-language) to the node that takes ISO input(quick replies in this case). Select the variable in which the previous reply is stored. This language will be permanently set (currently set 2 days of expiry), unless it is being changed by same action node only. ![](https://i.imgur.com/RCNpPes.png) The conversation with the bot after this point will be in the selected language. **Related articles** * [Languages supported](https://docs.yellow.ai/docs/platform_concepts/studio/build/localization#supported-languages) * [Multi-language support](https://docs.yellow.ai/docs/platform_concepts/studio/tools#213-multi-language) * [Set language node in Flows](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/set-language) * [Language Translation](https://docs.yellow.ai/docs/platform_concepts/studio/build/localization) --- ## Implement new card in Yellow AI cloud platform Follow the steps below to use the **card type** option on the **carousel** node in your flow: ## 1. Add a new card to the flow 1. Create a Function and store the variables in the function node as an Array. Our cards utilize the data from this variable to dynamically display it on the UI. If your card data is not dynamic, you may skip this step and directly add the data in the card node for non-dynamic cases. > Regarding the code to use in the function, refer to table Code and Card Mapping for the new card in the next section. :::note This step is optional if you do not want to use dynamic data. ::: 2. Add another node in the carousel. - Delete the default carousel. - Select fetch from the variables that have been set in step 1. ![](https://i.imgur.com/YEX71jL.png) - Edit the carousel setting based on the new card type. To edit the card type to use, you can hover the cursor to the right side and then click it. ![](https://i.imgur.com/NcUvtFR.png) ![](https://i.imgur.com/RApulNU.png) > Regarding the Card type to use, refer to Code and Card Mapping for the new card below. ## 2. Code and Card Mapping for New Card ### 2.1 Tracker card **Card Type in Carousel** **Display in chat** :::note This card type displays only one card at a time. If multiple entries are added to the array, only the first card will be displayed in the widget UI. ::: **Code in Function** ```js [ { "title": "Track Order", "statuses": [ "Ordered", "Ready", "Shipped", "In City", "Arrived" ], "currentStatus": "Arrived", "from": { "Title": "Mumbai", "Description": "12/12/2021" }, "to": { "Title": "Bengaluru", "Description": "14/12/2021" }, "assigneeDetails": { "key": "Name", "value": "Purush", "image": "https://cdn.yellowmessenger.com/PQuTgjPG7NxY1611996274269.png" }, "details": { "Order ID": "#444-2445-2442-222", "Delivey": "14/12/2021", "Total": "₹ 1500" }, "actions": { "title": "View data", "text": "View data" } } ] ``` ### 2.2 List Card **Card Type in Carousel** **Display in chat** **Code in Function** ```js [ { "title": "COVID-19 Queries", "options": [ { "title": "Domestic - Covid travel guidelines", "text": "Domestic - Covid travel guidelines", "url": "https://yellow.ai" }, { "title": "International - Travel guideliness", "text": "International - Travel guideliness" }, { "title": "Mandatory web check in", "text": "Mandatory web check in" }, { "title": "Fly safe and hassle-free", "text": "Fly safe and hassle-free" }, { "title": "Interest on credit shell", "text": "Interest on credit shell" } ] }, { "title": "Flight COVID-19 Queries", "options": [ { "title": "Domestic - Covid travel guidelines", "text": "Domestic - Covid travel guidelines" }, { "title": "International - Travel guideliness", "text": "International - Travel guideliness" }, { "title": "Mandatory web check in", "text": "Mandatory web check in" }, { "title": "Fly safe and hassle-free", "text": "Fly safe and hassle-free" }, { "title": "Interest on credit shell", "text": "Interest on credit shell" } ] } ] ``` ### 2.3 Transaction status card #### Transaction status card (Payment success) **Card Type in Carousel** **![](https://lh6.googleusercontent.com/XYabBrzuqGil3LGyI4Jh8VT4jhiG133OBaMj3LszSqhUzXnbW5ActJIlDo0T7f9lRktagBReqdPlil7endagu-oZJeNGh49o19ryV6W9-TfTAUJRpXcFANv0uqsBkijokF0XzzCb33tV7VBJhpIIh7ZL8wnvNGDl_1rvj2s0o5XHx4WR7m6P8c_7DrIWcs_OgrCy-Q)** **Display in chat** **Code in Function** ```js [{ "title": "Payment success", "success": true, "text": "Your payment was successful & your order has been placed.", "value": 1500 } ] ``` #### Transaction status card (Payment failed) **Card Type in Carousel** **![](https://lh6.googleusercontent.com/XYabBrzuqGil3LGyI4Jh8VT4jhiG133OBaMj3LszSqhUzXnbW5ActJIlDo0T7f9lRktagBReqdPlil7endagu-oZJeNGh49o19ryV6W9-TfTAUJRpXcFANv0uqsBkijokF0XzzCb33tV7VBJhpIIh7ZL8wnvNGDl_1rvj2s0o5XHx4WR7m6P8c_7DrIWcs_OgrCy-Q)** **Display in chat** **Code in Function** ```js [ { "title": "Payment failed", "success": false, "text": "Your payment was failed & your order is not placed.", "value": 1500 } ] ``` ### 2.4 Contact Card **Card Type in Carousel** **![](https://i.imgur.com/3gB7q7Y.png)** **Display in chat** **Code in Function** ```js [ { "title": "Contact Info", "download": "https://cdn.yellowmessenger.com/KpvHzrKBodtw1648483057986.jpg", "options": { "image": "https://cdn.yellowmessenger.com/PQuTgjPG7NxY1611996274269.png", "key": "Name", "value": "Purush" }, "actions": [ { "title": "email", "text": "purushottam.yadav@yellow.ai", "icon_class": "ri-mail-fill", "url":"mailto:sankalp.gupta@gmail.com" }, { "title": "Phone", "text": "Phone", "icon_class": "ri-phone-fill", "url":"tel:9810272341" }, { "title": "whatsapp", "text": "whatsapp", "icon_class": "ri-whatsapp-fill", "url":"whatsapp://send?phone=+919810272341" } ] } ] ``` ### 2.5 Receipt card **Card Type in Carousel** **![](https://lh6.googleusercontent.com/je_wRsbKYejZaTqzPzwxh9Kn2iCkrMEjqrHNz6zmyq-Lev46N7rqw5d5eAfY8WNfapeAqW-kDeuahGEtkynjCGRGL67cdnb7pIhmKLr0BYShc24wWwcqrzgOCbv0LQShVSqKzG_JcLk_sIGC5MgTiLjmg9Q75QF_aFzwduNOm2tt_9Yw2d_OcQM6vdni7SC9WtZ_dw)** **Display in chat** **Code in Function** ```js [ { "title": "Fixed Deposit", "titleHeader": { "1234 5678 1234 5678": "Status: Active" }, "options": [ { "key": "FD Amount", "value": "$1,20,000" }, { "key": "Rate of Interest", "value": "8.2% (p.a)" } ], "action": { "title" : "Submit" } }, { "title": "Fixed Deposit", "titleHeader": { "253236": "Status: Maturing Soon" }, "options": [ { "key": "FD Amount", "value": "$1,20,000" }, { "key": "Rate of Interest", "value": "8.2% (p.a))" } ], "action": { "title": "Submit" } }, { "title": "Fixed Deposit", "titleHeader": { "253236": "Status: Matured" }, "options": [ { "key": "FD Amount", "value": "$1,20,000" }, { "key": "Rate of Interest", "value": "8.2% (p.a)" } ], "action": { "title": "Submit" } } ] ``` ### 2.6 PDF preview card **Card Type in Carousel** **![](https://lh5.googleusercontent.com/PYbE7pUVEKMZ7OFyXsPwJxuOIRmqtaAiig1F5TjUvog_ghmdcBV1UH6M5GzITpO3DkWlGvqDRrV6m7M-Hko46fyj8cEqchMIYvKrndC28Y3YXqcLFtHmiwcU-sdjZE-nRlQogyE9BHDq2FRvv8SPL-FirBx4n56g7orsKklMYvm0u9rX96oj3ACfWouEdHFQsu_yyQ)** **Display in chat** **![](https://lh3.googleusercontent.com/HorDL6FIXM-Uo6Vi1NJdJgD9Fm8nmFPicCH0oXW8BmRjktEnd_q-IzxAUUzobnurki_FafBEFjkIUBv4TixpfG09ihoOrMOfhE7iTUC21TG7rWFKJIsb_th1R0jd4b9uJAibWbZtqFjcFPnleQv02VmoVOYXO-wFFGjctzVZUd3SGVH2uc_GuONM6IG7K6Wa5j8SCQ)** **Code in Function** ``` return new Promise(resolve => { // Your logic goes here // console.log(data.profile, "profile zuhud"); let arr = []; let pdfcard = { "title": "Lorem Ipsum", "text" : "lorem ipsum dolor amet", "image" : "https://cdn.yellowmessenger.com/q9f6PUO48xbV1617021384235.jpeg", "actions": [{ "title": "Preview", "preview": "http://www.africau.edu/images/default/sample.pdf", // "feedback": JSON.stringify({filename:'pdf-test.pdf'}) //optional }, { "title": "Download", "buttonDefault": "url", //"analytics": "analytics", "url": "http://www.africau.edu/images/default/sample.pdf", // "postback": "post-back" } ] }; arr.push(pdfcard); resolve(arr); }); ``` ### 2.7 Multi select transaction card **Display in chat** **Code in Function** ```js [ { id: ‘1b23-0zdc’, title: “Pertam Kedua Ketiga”, type: “Debit”, image: “https://cdn.yellowmessenger.com/boXfK6e5d6LK1675079020492.png”, status: “Success”, amount: 10000, accountName: “DCA”, currency: “IDR”, time: “2022-09-12T00:00:00.000Z”, accountNumber: `${cardId}`, additionalInfo: [ “Transfer to bank”, “Destination : BCA” ] }, { id: “23bc-123x”, title: “Pertam Kedua Ketiga”, type: “Debit”, status: “Success”, amount: 10000, accountName: “DCA”, currency: “IDR”, time: “2022-09-12T00:00:00.000Z”, accountNumber: “xxxx-5678”, additionalInfo: [ “Transfer to bank”, “Destination : BCA” ] } ] ``` ### 2.8 Product card **Display in chat** **Code in Function** ```js [ { "title": "New Apple iPhone 12 (128GB)", "text": "The iPhone 12 and iPhone 12 mini are part of Apple's latest generation of smartphones, offering OLED displays, 5G connectivity, the A14 chip for better performance, improved cameras, and MagSafe, all in a new, squared-off design.", "value": [ "₹ 80,900", "₹ 82,900", "You save ₹ 2,900" ], "input": true, "image": [ "https://cdn.yellowmessenger.com/ZglWKNRsESKb1623145034869.jpeg" ], "titleHeader": { "₹ 82,900": "You save ₹ 2,900" }, "options": { "key": "Description", "value": "The iPhone 12 and iPhone 12 mini are part of Apple's latest generation of smartphones, offering OLED displays, 5G connectivity, the A14 chip for better performance, improved cameras, and MagSafe, all in a new, squared-off design." }, "actions": [ { "title": "Purchase", "text": "Purchase" }, { "title": "Know More", "text": "Know More" }, { "title": "More", "text": "More" }, { "title": "Visit Site", "url": "https://www.yellow.ai" } ] }, { "title": "New Apple iPhone 12 (128GB)", "text": "The iPhone 12 and iPhone 12 mini are part of Apple's latest generation of smartphones, offering OLED displays, 5G connectivity, the A14 chip for better performance, improved cameras, and MagSafe, all in a new, squared-off design.", "value": [ "₹ 80,900", "₹ 82,900", "You save ₹ 2,900" ], "input": true, "image": [ "https://cdn.yellowmessenger.com/ZglWKNRsESKb1623145034869.jpeg" ], "titleHeader": { "₹ 82,900": "You save ₹ 2,900" }, "options": { "key": "Description", "value": "The iPhone 12 and iPhone 12 mini are part of Apple's latest generation of smartphones, offering OLED displays, 5G connectivity, the A14 chip for better performance, improved cameras, and MagSafe, all in a new, squared-off design." }, "actions": [ { "title": "Purchase", "text": "Purchase" }, { "title": "Know More", "text": "Know More" }, { "title": "More", "text": "More" }, { "title": "Visit Site", "url": "https://www.yellow.ai" } ] } ] ``` ### 2.9 Slider card **Display in chat** **Code in Function** ```js [ { "title": "Loan Amount", "slider": { "step": 1000000, "min": 1000000, "max": 25000000, "val": 0, "min_content": "10 L", "max_content": "25 Cr" } } ] ``` ### 2.10 Single select transaction card **Display in chat** **Code in Function** ```js [ { id: ‘1b23-0zdc’, title: “Pertam Kedua Ketiga”, type: “Debit”, image: “https://cdn.yellowmessenger.com/boXfK6e5d6LK1675079020492.png”, status: “Success”, amount: 10000, accountName: “DCA”, currency: “IDR”, time: “2022-09-12T00:00:00.000Z”, accountNumber: `${cardId}`, additionalInfo: [ “Transfer to bank”, “Destination : BCA” ] }, { id: “23bc-123x”, title: “Pertam Kedua Ketiga”, type: “Debit”, status: “Success”, amount: 10000, accountName: “DCA”, currency: “IDR”, time: “2022-09-12T00:00:00.000Z”, accountNumber: “xxxx-5678”, additionalInfo: [ “Transfer to bank”, “Destination : BCA” ] } ] ``` --- ## How to trigger a flow when a user clicks on a quick reply option on Whatsapp? This guide will provide instructions on how to activate flows upon clicking a quick reply WhatsApp button and how to monitor the number of clicks for each button. 1. Go to **Automation** > **Event** > **Engagement** > **quick_reply_event** > **Activate**. ![](https://i.imgur.com/tB1L8qw.png) 2. Go to **Build** > **+ Create flow**. ![](https://i.imgur.com/jNFalW4.png) 3. Search for **Whatsapp template** and click **+ Use template**. ![](https://i.imgur.com/z6h5KN4.png) 4. Once the template is downloaded, go to the flow **Template handling** and set the **Start trigger** as **quick_reply_event**. This flow will be triggered when a quick reply option is clicked. ![](https://i.imgur.com/FLkprMA.png) 5. To manage the actions of your buttons, click the **Condition node** and set values to your buttons. ![](https://i.imgur.com/MuobVKb.png) 6. The buttons can either be connected to an [Execute flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) node (which will trigger another flow if clicked) or connected to[ Message nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) to display a message. ![](https://i.imgur.com/sPpeNYV.png) Navigate to the **Database** section and click the **template_qr_clicks** table to review the data pertaining to the buttons that have been clicked. ![](https://i.imgur.com/gOUMTys.png) --- ## Intents, FAQs and Utterances automated testing Instead of manually training and testing intents, utterances, and FAQs, you can auto-generate and test them in bulk. This automation allows you to quickly train the AI-agent on all changes at once, saving time and reducing errors. The platform will then run a prediction test and display results based on the confidence level. If the confidence level is low, the result will be displayed as a fail. This guide will walk you through the process of testing intents, FAQs, and utterances in bulk via import. ### Test intents You can upload all intents along with their associated utterances to your AI-agent and test them collectively. With a single click, you can train the AI-agent on all the changes at once. Based on the imported entities, the platform will then run a prediction test and display results based on the confidence level. To test the intents, follow these steps: 1. Go to **Automation** > **Test**. ![](https://imgur.com/Bf7uPXz.png) * You will see the following options. Choose your preferred options to test your AI-agent: * [Import Intents](#import-intents) * [Upload Utterances](#upload-utterances) ![](https://i.imgur.com/ziqOwM2.png) ### Import Intents 1. Click the highlighted option below to import the entities from the Train section. ![](https://i.imgur.com/ddDV8rS.png) 2. Click **Sync and test intents** to test intents that are out of sync with the Train section. ![](https://i.imgur.com/PzNrLI8.png) * This action will import intents from the Train section. ![](https://i.imgur.com/1PLaAfv.png) 3. Choose the intent you want to test. ![](https://i.imgur.com/F7q7NnZ.png) 4. In the Utterances field, type any utterance and click **Generate utterances**. ![](https://i.imgur.com/0IlaXGd.png) * A list of utterances will be generated. 5. Select the utterances that you need to test and click **+ Add utterances**. ![](https://i.imgur.com/ytU858S.png) 6. Click **Test intent**. ![](https://i.imgur.com/CbU9UNh.png) * The platform will run a prediction test and display results based on the confidence level. If the confidence level is low, the status of the utterance is displayed as fail. ![](https://i.imgur.com/Pnnxxd2.png) 7. To test other intents, click the back arrow (on the top left next to the intent's name) and click **Test intents**. ![](https://i.imgur.com/RAwRUXF.png) * This will test the utterances for all intents and display their status. ![](https://i.imgur.com/tBGbPhy.png) 8. Click the **Download Report** button to download the tested utterances and access them offline. ![](https://i.imgur.com/i1nW3Hn.png) The downloaded report includes the following details: * **Utterance** - Utterances generated for the intents. * **Intent** - Intents that will be triggered by those utterances. * **predictedIntent** - The intent that was triggered for that utterance. * **predictedConfidence** - The percentage at which the respective intent gets triggered. * **Result** - Outcome of the predictions - **success** for successful predictions, **fail** for failed predictions. ### Upload Utterances You can upload a list of test utterances and test it. To upload utterances, follow these steps: 1. Click **Import entities** drop-down and select **Upload utterances**. ![](https://i.imgur.com/9VQJtCi.png) 2. Click the **Download icon** to download the template. ![](https://i.imgur.com/veg5wz0.png) 3. Fill in the template with the following details: * **Utterance**: The utterance for your intent. * **Journey**: The journey or flow associated with the utterances. * **Tag**: Labels that help recognize or filter important journeys. ![](https://imgur.com/BwRkJVn.png) 4. Click the **Upload file** button to upload your template. ![](https://i.imgur.com/RWIhioA.png) 5. Download the report from the **Reports** section to check the status of the uploaded utterances. ![](https://imgur.com/mRR7Pu5.png) The report includes the following details: * **Utterance**: The utterances that were uploaded. * **Predicted Journey**: The journey to which the utterances were mapped. * **Journey**: The journey specified in the uploaded template. * **Status**: Indicates success or failure, based on the correct mapping of the utterance to the journey. ![](https://imgur.com/MewGlsn.png) ## Test FAQs To test FAQs, follow these steps: 1. Click **Test FAQ** > below-highlighted icon to import the FAQs from train section. ![](https://i.imgur.com/FV3X7kl.jpeg) 2. Click **Sync and test FAQs**. ![](https://i.imgur.com/SKFtYIn.png) * This action will import FAQs from the **Train** section. ![](https://i.imgur.com/fcGUYlT.png) 3. Click on any FAQ. 4. In the variations field, type any question or text and click **Generate variations**. ![](https://i.imgur.com/j5BoMu2.png) * A list of variations will be generated. ![](https://i.imgur.com/aqv4mMa.png) 3. Select the variations you need to test and click **+ Add variations**. ![](https://i.imgur.com/KieLjnZ.png) * This will add the variations. 4. Click Test FAQ. ![](https://i.imgur.com/evcqhbo.png) * The platform will run the prediction test and display results according to the confidence level. The result is pass if any utterance trigger has the same intent with high confidence, else it is fail. ![](https://i.imgur.com/FTXS4Gp.png) 4. To test other FAQs, click the back arrow (on the top left next to the FAQ's name) and click **Test FAQ**. ![](https://i.imgur.com/fvOzfFs.png) * This will test the FAQs and display their status. ![](https://i.imgur.com/qDZffjE.png) 8. Click the **Download Report** button to download the tested FAQs and access them offline. ![](https://i.imgur.com/wgkPmli.png) The downloaded report includes the following details: * **Utterance** - Utterances generated for the intents. * **Intent** - Intents that will be triggered by those utterances. * **predictedIntent** - The intent that was triggered for that utterance. * **predictedConfidence** - The percentage at which the respective intent gets triggered. * **Result** - Outcome of the predictions - **success** for successful predictions, **fail** for failed predictions. ![](https://imgur.com/CgIklpw.png) ## Test KB You can add a list of FAQs and upload it to generate answers based on the document uploaded in the KB section. Note that duplicate questions cannot be created and the answers will not be generated for them. #### Limitations of KB bulk testing When performing KB bulk testing, you need to consider the below limitations to prevent bulk tests from exceeding token or request limits and to ensure optimal performance for live bot traffic: * **Bulk test limit**: You can only run 3 bulk tests per day. * **Query limit per report**: Each bulk test report can include a maximum of 500 queries. :::note If you need to run a bulk test with a larger dataset, contact [customer success team](mailto:customersuccess@yellow.ai) with the relevant details for further evaluation. ::: To upload KB FAQs, follow these steps: 1. Choose Sandbox/Development environment. 2. Go to **Knowledge base**. ![](https://imgur.com/1ceNXU5.png) 3. Click **+ Add URL**. Add your website URL and click Save. ![image](https://imgur.com/aEP8jvo.png) 4. Go to **Automation** > **Test** > **Test KB**. ![](https://imgur.com/Bpw9GX9.png) 4. Click the download icon to download the template. ![](https://i.imgur.com/6gnZB8b.png) 5. Fill in the template with the following detail: * **Questions**: Enter the question for which you want to generate the answer. 6. Click **Upload questions** button to upload your template. ![](https://i.imgur.com/7fUf9YA.png) * A report is generated with a percentage of answered questions. ![](https://i.imgur.com/QOI1Odx.png) 7. Download the report from the **Reports** section to check the status of the uploaded FAQs. ![](https://i.imgur.com/ngb8etC.png) The report includes the following details: * **Questions**: The questions that were uploaded. * **Answers**: The answers are generated for the uploaded questions. * **Links**: Generates the links from where the answers are fetched from the uploaded document. ![](https://imgur.com/PuWMvcR.png) --- ## How do I retrieve Database data inside a bot flow? 1. [Insert a Database node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) in your flow. 2. In the Database node, set the **Select type** as **Search**, select the table that contains the details and set the filter based on which the search action should be performed. 3. Click the **Select Variable** option at the bottom right corner and create a new variable. All the information in your database will now be stored in this variable. Use this code snippet `**{{{variables.dbResponse.records.0.fieldName}}}**` in your flows to retrieve a specific set of data. --- ## Functions & API related use cases # Store API response in a variable ## How to store API response values as objects in your bot In this tutorial, you will learn how to store all the values from an **API** (Application Programming Interface) response as an object. This allows you to use the data effectively across different nodes of your bot. By following the steps mentioned below, you can easily manage and utilize API data throughout your bot’s features. ## What is an API response? An API response is the data that you receive from an API when you request information. This data can include various details, like names, addresses, and other relevant information. Storing this response as an object helps you access the data easily. --- ## Steps to store API response ### Step 1: Define the response object You will begin by defining what the response from the API looks like. This is done by creating a response object. Consider the code provided below: ```javascript // Define an object to store key information about a school const response = { "school": "School Name", // Name of the school (string) "address": { // Address of the school (object) "street": "2nd Main", // Street address "doorNo": "23/1", // Door number "city": "New Delhi" // City of the school }, "city": "Anytown", // City where the school is located (string) "state": "CA", // State abbreviation (string) "zip code": "91234" // Postal code (string) }; ``` ### Explanation: **Purpose:** In the code snippet provided above, we created an object called response that holds both string values (like the school name, city, state, etc.) and a nested object (the address of the school). **Components:** - **Constant variable:** `const response` establishes a constant variable that holds the API response. - **Object structure:** The curly braces `{ }` define an object, which is a way to group related information. - **key-value pairs:** Each piece of information is represented as a key (like `"school"`) paired with its corresponding value (like `"School Name"`). We also have an object inside another object for the "address" key. This structure allows for easy access and management of the data. ## Step 2: Access values from the Object In this step, you will learn how to access and use specific values from the API response object. The following code snippet demonstrates this process: ```javascript return new Promise(resolve => { const { apiResponse } = ymLib.args; // Extract the API response let { body } = apiResponse; // Retrieve the body of the response body = JSON.parse(body); // Parse the body into a JavaScript object console.log(body, "API response in test"); // Log the response for debugging // Access string value (school name) let { school } = body; // Access nested object properties (address details) let { address: { street, doorNo, city } } = body; resolve({ school, street, doorNo, city }); // Resolve the promise with the desired values }); ``` ### Explanation: #### Purpose: This code snippet retrieves and manages data from an API response. It shows how to access both string values (like the school name) and nested object properties (like address details). #### Components: - **Promise creation:** `return new Promise(resolve => { ... })` initiates an asynchronous operation to handle the API response while the rest of your code continues executing. - **API response extraction:** `const { apiResponse } = ymLib.args;` extracts the API response from `ymLib.args`. - **Body retrieval and parsing:** `let { body } = apiResponse;` retrieves the main content of the response, and `body = JSON.parse(body);` converts it into a JavaScript object. - **Accessing string value:** `let { school } = body;` extracts the school name - **Accessing object properties:** `let { address: { street, doorNo, city } } = body;` retrieves the street, door number, and city from the nested `address` object. - **Promise resolution:** `resolve({ school, street, doorNo, city });` resolves the promise with the extracted values for further use. ### Accessing variables 1. **For string variables**: To access and display a string variable (e.g., `school`), use: `{{{variables.school}}}` 2. **For object variables**: If the variable is an object, access its properties using dot notation. For example, to get the `street` property from the nested `address` object, use: `{{{variables.school.address.street}}}` :::note * You can use the `console.log()` function to check the value of the variable in the logs. This will help you to debug the issue. * If you are debugging an API call and you are not seeing the data that you expect, it is possible that the response is missing a body. In this case, you will need to parse the response body in order to access the data. ::: **Checklist** 1. **Verify API call success**: Make sure that the API call is successful. You can check this by inspecting the response in the developer tools. 2. **Check variable assignment**: Confirm that the API response is correctly stored in the relevant variable. You can check this by inspecting the variable in the developer tools. 3. **Ensure proper parsing**: If working with a response object, verify that it is parsed properly to access the desired data. You can check this by inspecting the response object in the developer tools. --- ## How to capture the ticket assigned event? **Use case:** After creating a ticket and assigning to an agent, we need to invoke an API based on the response stored in the **Raise a Ticket** node. Use ```ticket-assigned-bot event``` event for this. To activate this event: 1. Store the response of the [Raise Ticket node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) in a variable. 2. Call the following API from your backend. ``` curl --location 'https://cloud.yellow.ai/api/agents/settings/ticketUpdateEventSettings?bot=x1599195792555' \ --header 'X-API-key: ' \ --header 'Content-Type: application/json' \ --data '{ "chatAssignedBot": true }' ``` This is a one-time process. After that, you'll start receiving **ticket-assigned-bot** events, which you can activate in the **Custom Event** section and [use it in your flows](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#trigger-flow-using-event). For steps to create a custom function, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub#custom-events). --- ## How to trigger a specific bot flow To trigger a specific flow when there are multiple flows in the bot, you can use the flow slug. A slug is a combination of the flow name and auto-generated characters in the following format: `/{flow_name}_{auto_generated_characters}` ![](https://imgur.com/I2a5hEW.png) To trigger a specific bot flow, follow these steps: 1. Go to **Automation** > **Build** > **Flows**. 2. Navigate to your preferred flow from the **Flows** drop-down. ![](https://imgur.com/AvQOPaK.png) 3. Copy the flow path from the URL after *flow/*. ![](https://imgur.com/I2a5hEW.png) 4. Click **Preview** and then open the bot preview page in a new tab using the icon highlighted below. ![](https://imgur.com/hFy8IzI.png) 5. Clear the browser cache before you preview the bot. It is recommended to use Incognito mode or Private window to preview flows 6. In the address bar, append the following: **To append after the base URL**: `?ym.triggerJourney={journey_slug}` > > Example: https://cloud.yellow.ai/liveBot/x1635319612954`?ym.triggerJourney=feedbackflow_wwgpfq` **To append it after a variable**: `&ym.triggerJourney={journey_slug}` > Example: https://cloud.yellow.ai/liveBot/x1635319612954?region=&ym.triggerJourney=feedbackflow_wwgpfq --- ## How to trigger a flow when a user clicks on a Whatsapp Template response? 1. Create your WhatsApp templates in the **Engage** module by following the steps mentioned [here](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/templates/whatsapptemplate). 2. Go to the Whatsapp template manager [here](https://cloud.yellow.ai/marketplace?name=whatsapp%20template). 3. Click the template to open it and click **+Use template**. 4. Select the bot in which you want to use the template, and click **Use template**. 5. Go to the flow **Template handling** and select the **Condition** node. 6. Populate the contains/equal to fields with the names of the respective WhatsApp template. 7. Then, go to each of the flows and populate the equal to fields with the button names in the respective WhatsApp templates. 8. Once you have populated the template names and the button names in the condition nodes, the respective flow gets triggered when a user clicks on a response. --- ## Function use cases --- This guide introduces you to different ways of using **Functions** in **Automation**. It shows you how to automate tasks within your bot in a simple and easy way. By exploring practical examples and clear explanations, you'll learn how to use Functions to streamline your bot’s capabilities. --- ## 1. Display weather information in a carousel node ### Objective Show real-time weather data within a carousel format in your bot interface. ### Steps to implement #### 1.1. Add the weather API [Add the Weather API](https://docs.yellow.ai/docs/platform_concepts/studio/api/add-api#1-add-a-new-api-using-url) to your bot platform to enable it to retrieve weather information. #### 1.2. Create a flow and add the API node Next, [create a flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys#2-create-a-flow) and insert an [API node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/api-node). Use this node to call the Weather API and fetch real-time data. #### 1.3. Store the API response Store the API response in an object variable so that you can extract required information easily using functions. #### 1.4. Write a function to format the response Navigate to the **Functions** section and write a function to process the saved API response. Ensure that the response is formatted to match the dynamic structure required for a carousel display. For more details on dynaamic carousel formatting, refer [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/carousel-message-node). ### 1.5. Include a function node 1. Add a [Function Node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/function-node) in the flow. 2. Choose the function you created. 3. Store the response in your preferred variable and mention its datatype (e.g., object, string, etc.) for clarity. ### 1.6. Populate the Carousel Node 1. Insert a [Carousel Node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) in the flow. 2. In the **Fetch from** field, select the variable with the formatted weather data. 3. Display the data in the carousel format. :::note **Alternate Method**: You can directly pass the function into the **Parse API response** field if you prefer not to use the Function Node. ::: --- ## 2. Calculate a date 45 days before today ### Objective Compute a date that is 45 days before the current date and display it in the bot. ### Steps to implement #### 2.1. Create a flow and define a variable node [Create a new flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys#2-create-a-flow) and add a [variable node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/variables-node). Define a variable - **bookingDate** and assign it the value `{{{date.timestamp}}}` , which captures the current date and time. #### 2.2. Display the captured date Insert a [Text Node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) and display the **bookingDate** value to verify that the current date has been captured correctly. #### 2.3. Write a function to calculate the new date Now, create a function that processes the timestamp and subtracts 45 days from the current date. ```javascript return new Promise(resolve => { // Retrieve the current booking date from the variables let bookingDate = data.variables.bookingDate; // Convert the booking date string into a Date object let dt = new Date(bookingDate); // Subtract 45 days from the current date dt.setDate(dt.getDate() - 45); // Format the new date to a localized string let pdate = dt.toLocaleString(); // Split the formatted date string to isolate the date components const myArraydate = pdate.split(","); // Further split the date component to extract day, month, and year const myArray = myArraydate[0].split("/"); // Construct a new date string in the desired format (MM/DD/YYYY) let newDate = myArray[1] + "/" + myArray[0] + "/" + myArray[2]; // Update the bookingDate variable with the newly formatted date data.variables.bookingDate = newDate; // Resolve the promise with the new date string resolve(newDate); }); ``` #### 2.4. Display the computed date Insert another [Text Node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) to display the date that was calculated (45 days before the current date). Use the variable containing the new date. ### Example output Once the flow runs, the bot will display the result to the user like this: --- ## 3. Code snippet for sentence autocompletion This code helps your bot suggest sentence completions based on user input. When the user starts typing, the bot looks for matches within its existing data and provides suggestions. ```javascript return new Promise(resolve => { console.log("inside autoSuggestion"); let result = data.variables.autoComponents; const { term } = data; let suggestions = []; result.forEach((hit) => { if (hit.component.toLowerCase().includes(term.toLowerCase())) { suggestions.push([hit.component, hit.component]); } }); resolve(suggestions); }); ``` ## 4. Code snippet for BASE64 decoding Base64 encoding represents data using 64 ASCII characters. When an encrypted string is received via an API, we decrypt it to obtain the original object. After decoding, the file can be uploaded to a server, such as Yellow's server. Here's an example that demonstrates decoding, uploading, and sharing the file URL. ```javascript // Execute an API call and wait for the response let call_api = await app.executeApi('api_name', { argument: _value }); // Parse the JSON response from the API call let api_data = JSON.parse(call_api.body); // Log the API data for debugging or tracking purposes app.log(api_data, "#####API DATA"); // Decode the base64-encoded file from the API response let buffer = new Buffer.from(api_data.obj_name, "base64"); // Upload the decoded file to the Yellow.ai server and get the file URL let file_url = await app.uploadFile(buffer, 'File.pdf'); // 'File.pdf' is the name of the uploaded file // Optional: Uncomment the line below to send the file as a document to the user // await app.sendDocument(file_url, { caption: "FILE", filename: 'File.pdf', mime: 'application/pdf' }); // Create and send a card with a download link for the uploaded file await app.sendCards([ { title: "Kindly download the same as PDF", // Title of the card actions: [{ title: "DOWNLOAD", // Action button title url: file_url // URL for downloading the file }] } ]); ``` --- ## Handling User inactivity events **User Inactivity Events** help manage conversations when users stop responding. You can use them to follow up, repeat prompts, or even redirect the conversation automatically—ensuring conversations remain active and productive. To know how to configure User inactivity event, see [here](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub#-user-inactivity-event). ### Common use cases 1. **Send a Reminder Message to the User** Gently re-engage users who have gone silent. 2. **Nudge Users to Respond to the Previous Prompt** Remind the user and repeat the last unanswered question. 3. **Trigger a Flow (e.g., Feedback or Survey)** Automatically redirect the user to another flow after inactivity. --- ### How to set up inactivity events #### 1. **Send a reminder message** 1. Go to **Automation > Events**, then click **User Inactivity Events**. 2. Click **+ Add Event**, provide an event name, description, and delay (recommended: 5+ minutes). ![](https://imgur.com/n4J55CT.png) 3. Enable the **Handle event with message** toggle. 4. Enter the reminder message (e.g., *“You haven’t responded in a while. Need help?”*). 5. Save the event. #### 2. **Send a reminder and repeat the last prompt** 1. Follow steps in **Use Case 1** above. 2. Additionally, select the **Show previous prompt** checkbox. This will re-display the previous question along with the reminder message. #### 3. **Trigger a flow on inactivity** 1. Go to **Automation > Events > User Inactivity Events**. 2. Create a new event and set a delay (e.g., 5 minutes). **Do not** enable the **Handle event with message** toggle. 3. Save the event. 4. Open the flow you want to trigger. On the **Start Node**, choose: * **Event** as the trigger type. * Select the **User Inactivity Event** you just created. This setup ensures the new flow is triggered automatically when the user is inactive. ### Advanced configuration options | Option | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | **Activate for specific steps** | Limits the inactivity event to selected flows and steps only, giving you granular control over when the event should trigger. | | **Handle event with message** | If enabled, allows sending a reminder message and optionally repeating the last prompt. If disabled, use it to trigger other flows instead. | | **Allow context switching** | Lets users break out of the current conversation and start a new one, helping them switch context smoothly. | :::note This event gets triggered for the specific node in a flow only if the user has been previously responding in the flow. If the user does not respond at all from the beginning of the flow, this event will not get activated. ::: --- ## Chat disconnecting at the customer level In some use cases, clients may want users to have the ability to disconnect from a chat without agent intervention. This process outlines the steps for enabling user-initiated chat disconnection. :::info To make chat disconnection accessible at the customer level, Display a banner to users, guiding them to type `talk to bot` or click a button on the banner if they want to return to the bot. This interaction will enable customers to disconnect from the chat independently. ::: ## Steps to configure user-initiated chat disconnection 1. **Enable custom events**: Enable the custom events `ui-event-update-promotion` and `ui-event-close-promotion` in the bot settings. 2. **Trigger the banner on agent connection**: When a live agent ticket is raised, use the `ui-event-close-promotion` event to display a banner with the following configuration. Banner message with text input: ``` { "title": "Do you want to exit from chat? Please type 'talk to bot'", "options": [] } ``` Banner message with button input: ``` { "title": "Do you want to exit from chat?", "options": [ { "title": "Exit", "text": "talk to bot" } ] } ``` 3. **Send the event**: Use the Send Event node to trigger the `ui-event-close-promotion` event with the configured banner. This banner should now be visible to the customer, allowing them to disconnect the chat on their own. 4. **Train the bot with an intent**: Train the bot with utterances like `talk to bot` and link the intent to the desired journey to enable a smooth transition back to the bot. 5. **Enable bot-triggered journey**: Once the customer clicks the banner button or types the designated phrase, the bot will initiate the assigned journey. Subsequently, the `ui-event-close-promotion` event can be triggered to close the banner. 6. **Close the ticket**: Use the ticket close API to close the ticket accordingly. :::note - Ensure the events are in the enabled state for them to trigger correctly. - The object text should be consistent with what’s defined here for smooth functionality. ::: --- ## Webview WebView enables you to add custom UI elements (using HTML, CSS, and JavaScript) into your chatbot. To use this feature, create your custom UI components with the necessary HTML code. Collaborate with the platform team to deploy your code on Yellow's Bitbucket repository. Once deployed, the platform team will host your code on Yellow's CDN, generating a unique URL. This URL can then be integrated into your chatbot's WebView node. You can preview the WebView in the WebView node. However, if the URL is invalid or restricted due to Content Security Policy (CSP), please contact our support team for assistance. :::note Due to our website's CSP (Content Security Policy) guidelines, the Web View cannot be loaded on the bot's direct link. It can be accessed via the [PWA](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/pwa#access-the-pwa-link-for-your-ai-agent) link, a local HTML file, or when embedded on a website. ::: ### Prerequisite * Before getting started, get the Webview node enabled for your bot. To enable the Webview node, contact [support team](mailto:support@yellow.ai). ## Steps to configure the Webview ### Step 1: Create HTML for custom Webview UI Below is the sample code of the UI component: ```html Mr Appliance
``` ### Step 2: Host component on Yellow.ai's CDN Host this component on Yellow.ai's CDN. A URL is generated. Here's an example of the URL: ```html https://app.yellowmessenger.com/components/webview/mr_appliance_llc/form ``` ### Step 3: Configure Webview node To configure the webview node, follow these steps: 1. Go to **Automation** > **Build** > **Flows**. 2. Search for the Web wiew node and select it. ![](https://i.imgur.com/X74GSN6.png) 3. **Enter URL** of the UI component hosted on Yellow.ai's CDN. 4. Specify the **Hieght** of the UI component based on your preference. 5. Enable **Hide input bar** to hide the input bar in the chatbot. 6. Enable **Hide home button** to hide the home button in the chatbot. 7. Enable **Scrollable** to make the UI component scrollable in the chatbot. 8. Enable **Full width** to view the UI component in a horizontal view in the chatbot. 9. Enable **Fixed position** to view the full view of the UI component in the chatbot. 10. Preview the bot to view the custom UI component in the chatbot. --- ## WhatsApp AI agent issues This document outlines why your AI agent on WhatsApp may stop responding to certain users and provides clear steps to help you troubleshoot and resolve the issue. The AI agent becomes unresponsive only for specific users on the WhatsApp channel. This issue is not caused by Yellow.ai’s platform. Yellow.ai relies on Meta's WhatsApp Business Cloud API to send and receive messages. If the AI agent does not respond to certain users, it indicates one of the following: * Message delivery issues on Meta's infrastructure * Temporary API delivery failures * User-side network or device-related restrictions ### Steps to troubleshoot 1. **Perform initial self-check** * Refer to Meta's official WhatsApp troubleshooting documentation: [Meta WhatsApp cloud API support guide](https://developers.facebook.com/docs/whatsapp/cloud-api/support/) * Check the following: - Is the affected user online and receiving messages from other WhatsApp contacts? - Has the user blocked the business number? - Are other WhatsApp features (like media sharing or links) working for that user? 2. **Raise a ticket with meta** If the issue continues and appears isolated to Meta's infrastructure, you need to raise a support ticket directly with [Meta](https://business.facebook.com/direct-support/). 3. **Contact Yellow.ai support** If you are unable to reach out to Meta directly, contact [support](mailto:support@yellow.ai) with the following details: Required details | Description -----------------|------------ Problem summary | A brief explanation of what's not working Start time & date | When the issue first occurred Impacted WhatsApp Number(s) | Provide phone number(s) affected Screenshots / Screen Recording | Visual evidence of the issue (if available) Device details | Device model, OS version, browser if applicable Support team will raise a Meta support ticket on your behalf and keep you updated as we receive information. As this issue originates from Meta's WhatsApp infrastructure, Yellow.ai cannot guarantee a resolution timeline. Support team will provide status updates based on responses from the Meta support team. --- ## Introduction to outbound campaign for voice agents An outbound campaign refers to a focused marketing strategy designed by businesses to actively communicate with customers or potential prospects. Through personalized messages delivered via different channels, businesses can aim to engage the audience and perform specific actions. ## Outbound campaign via. voice calls - With Yellow.ai's **Engage** module's **Flow campaign**, you can leverage **voice agents** to deliver targeted messages, notifications, promotional offers to your customer base. By utilizing voice as a communication channel, you can create a more human-like and engaging campaign experience for your customers, driving higher response rates and enhancing customer satisfaction. > Steps to set up an outbound campaign using voice agents on yellow.ai is covered in the next article. ### Flow campaign (campaign flow builder) for voice agents * The **Flow campaign** enables you to create dynamic and intelligent workflows that adapt based on customer responses or behaviors. * These flows can be designed to switch between different communication channels, such as voice calls, WhatsApp, SMS, and more, ensuring your messages reach customers through their preferred medium. * This multi-channel approach enhances the effectiveness of your outbound campaigns and allows for higher customer engagement and conversion rates. :::info Click [here](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign) for the detailed guide to understand **Flow campaign**. ::: ### Target audience for flow campaign * You can configure and automate your outbound campaigns by integrating with your existing customer data through [User360](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/overview). * You can target specific [segments](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data_segments/segments_overview) or individuals with relevant messages. * Flows designed on Engage flow campaign are targeted towards the users on user360 (not to all the voice agent users). ------- ## Voice agent-driven outbound campaign use cases A few examples of how voice agents can be used to send outbound campaigns: 1. **Appointment reminders** * Collect customer appointment details and integrate them with your system. * Design a voice agent flow that includes the appointment date, time, and any specific instructions. * Schedule automated voice calls to customers prior to their appointments to remind them of the upcoming event. * Provide an option for customers to confirm or reschedule their appointments through voice interactions. 2. **Order updates** * Integrate your order management system with the voice agent platform to access real-time order information. * Develop a voice agent script that informs customers about their order status, including processing, shipment, and delivery updates. * Automate voice calls triggered by order status changes, keeping customers informed throughout the order fulfillment process. * Provide options for customers to request additional information or make changes to their orders through voice interactions. 3. **Event invitations** * Segment your target audience based on relevant criteria such as demographics, interests, or past event attendance. * Create a personalized voice agent flow that delivers event details, highlights key speakers or sessions, and includes registration instructions. * Schedule outbound voice calls to invite selected customers to the event, emphasizing the value and benefits of attending. * Incorporate an option for customers to RSVP or inquire about event-related queries through voice interactions. 4. **Service notifications** * Identify the types of service notifications that are relevant to your business, such as system updates, maintenance schedules, or subscription renewals. * Develop a voice agent flow that conveys the necessary details, including the purpose of the notification and any actions required from the customer. * Schedule automated voice calls or messages to proactively notify customers about service updates or upcoming renewals. * Enable customers to interact with the voice agent for further information, confirmation, or assistance related to the service notification. 5. **Promotional offers** * Define your target audience based on customer preferences, purchase history, or loyalty program participation. * Craft a persuasive voice agent script that presents the promotional offer, highlights its benefits, and includes any relevant terms or conditions. * Deploy outbound voice calls or messages to deliver the promotional offer directly to the targeted customers. * Incorporate options for customers to redeem the offer, make a purchase, or receive more information through voice interactions. --- ## Set up outbound campaign via. yellow.ai voice agents In this article, you will learn how to select an entry rule and design a campaign flow for voice agents. :::info **Prerequisite** 1. **User segmentation**: Grouping users based on shared characteristics, such as interests or behaviors, is known as user segmentation. There are two types of segments: static segments, which remain constant, and dynamic segments, which update automatically based on user data. To send targeted campaigns, you need to have user data grouped into segments in **user360**. Segments like product interest or recent purchasers can be created for effective messaging. > Follow the steps provided [here](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data_segments/segments_overview) to create and manage user segments 2. **Events**: an event refers to a recognized occurrence by the voice agent (asynchronous). In **Automation**, there are various events available, such as widget, inbox, engage, integration, user inactivity, schedule, User 360, and custom events, which are used to handle occurrences and perform tasks. > Learn more about events and the steps to create custom events [here](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub). ::: To create a voice agent campaign, follow these steps: ## Step 1: Create a voice agent campaign workflow 1. Log in to your [yellow.ai](https://cloud.yellow.ai/) account. Open **Engage** > **Outbound**. 2. On the **Flows** tab, select **+Create workflow**. ![](https://imgur.com/hjCeCKR.png) ------ ## Step 2: Select entry rule for the voice agent campaign To get started, follow the steps below: 1. Select the entry rule that best aligns with your business needs. | Entry rule | Trigger | | -------- | -------- | | [User events](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#user-events) | Select this to trigger the flow when a specific user event occurs. | |[User entered a segment](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#user-entered-a-segment) | Select this to trigger the campaign when the user enters a specific segment. | |[User exited a segment](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#user-exited-a-segment) | Select this to trigger the campaign when the user exits a specific segment. | |[User present in a segment](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#user-present-in-a-segment)| Select this to trigger the campaign only when the user is in a specific segment. | 2. **Choose your audience**: When selecting entry rules, you have the option to choose one or multiple user segments or target all users in User360. 3. **Set campaign schedule**: For each entry rule, you can determine the frequency and specific time for running the campaign. ------- ## Step 3: Add voice call node and configure the campaign :::note - Voice calls can only be added to the workflow if the voice agent has an IVR (Interactive Voice Response) configuration in place. - It is necessary to configure a flow that the voice agent will follow when the campaign is triggered. This flow will serve as a template for voice calls. - If you intend to use other message channels such as SMS or Email, you need to configure the senderID/channel and ensure that a corresponding template is available for that particular channel. ::: To initiate a voice call, follow the steps below: 1. Connect the **Voice call node** (available under the message category) to the initial node in the workflow. 2. Enter the details. - **Enable answering machine detection (AMD)** : You have the option to enable AMD, which helps determine if a voice call made by the agent is answered by a human or a machine (such as a voicemail system). - **Bot flow**: From the dropdown menu, select the desired flow that should be triggered when the campaign call is made to customers. All available flows in Automation are listed here. - **From**: Choose the IVR number(s) from which the voice call should be made. If multiple IVRs are added, the calls will be made randomly from any of those numbers. - **To**: Select the variable that contains the user identifier. Click [here](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data/userid-flow) for steps on setting up user identification. - **Call trigger time**: Set the business hours in the **Settings** and configure the flow to be triggered only during those designated business hours. ![](https://imgur.com/bkbY122.png) 3. Add connecting nodes to the voice node to determine the subsequent steps based on different scenarios. You can define the next actions based on whether AMD is detected, the call is answered, the line is busy, there is no answer, or if the call fails to connect. ![](https://imgur.com/Xs5ZJDE.png) :::note You can add [conditions](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#condition-to-trigger-flow-campaign), [flow control](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#flow-control) and [action](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#action) to design the flow. ::: ------- ## Step 4: Add goal to end the voice agent campaign To prevent spamming users, it is recommended to add a campaign goal. When an event is detected that signifies the completion of the goal, users will exit the flow and the campaign will end. Follow these steps to add a new goal to the flow: 1. Click **Add new goal to the flow**. 2. Add details: - **Name**: Type any custom name. - **Event**: Select an event that you have activated in Automation. When this [event](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub) is identified, it will indicate that the goal has been reached. - **Set goal validity**: Choose the duration for which the goal should remain valid. After the specified duration, the campaign will still be active, but the goal won't be considered. 3. **Save** the goal. ![](https://imgur.com/ef4rrm9.png) ----- ## Step 5: Publish workflow for voice agent campaign 1. Click on **Publish** to publish the flow and make it active. ![](https://imgur.com/uxNgtUQ.png) 2. Once the campaign is published, it will automatically run for users who meet the entry rule criteria. 3. To monitor the status of the voice agent campaign, track the users who have entered the campaign, and keep a count of the number of times the goal has been achieved, refer to the flow campaign page. ![](https://imgur.com/8NXJkqU.png) --- ## Testing Voice agents using WebRTC feature Yellow.ai offers a **WebRTC (Web Real-Time Communication)** calling feature that enables browser-based calls directly from the platform. This allows bot developers to simulate and experience agent interactions with both Indian and international numbers—without the need to procure or map PSTN phone numbers. By removing the dependency on external telephony systems, it significantly speeds up voice agent development and testing. This feature is especially useful for testing voice agents and previewing their responses for customers outside India (e.g., in the US, UK, or UAE). :::note WebRTC testing is enabled by default at no cost for the following regions: **R0, R2, R3, R4, and R5**. To enable it for regions **R1, R6, or R7**, please contact the support team at [support@yellow.ai](mailto:support@yellow.ai). ::: ## Testing voice agent using WebRTC :::info WebRTC testing is only **available** in **Sandbox, Staging and Development** environments and not available in *Production/Live*. ::: To test a voice agent using the WebRTC feature, follow these steps: 1. **Open the Preview Mode** - Navigate to **Automation > Flows > Preview**. - Select **Voice** from the dropdown. ![Voice Preview Screenshot](https://cdn.yellowmessenger.com/assets/yellow-docs/voivepreview.png) > You cannot preview an individual flow for voice agents. When you click **Preview**, the entire agent is launched starting from the Welcome/Start flow. Switching between flows during the session will disconnect the call. 2. **Start the Call** - Ensure microphone access is granted. - Click the **Start Call** button to initiate the WebRTC-based call. 4. **Answer and Test** - Interact with the voice agent to test various call flows and behaviors. - Use the on-screen keypad to enter DTMF inputs, if required. WebRTC calls support DTMF INFO-based input transmission instead of audio tone detection. - Click **Disconnect** once your testing is complete. ------------- ### Network monitoring & feedback * If **internet connectivity** drops or either party disconnects, UI will display feedback indicating disconnection. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/image.png) * If **packet loss or jitter** exceeds acceptable thresholds, visual warnings will be shown to notify the developer. * When making calls to numbers in different regions, you may experience latency, with the Round Trip Time (**RTT**) displayed. However, RTT isn't a direct indicator of connection quality. For example, a call from Region 0 to a voice agent hosted in Region 4 might show around 300ms RTT, even with excellent connectivity. ![](https://cdn.yellowmessenger.com/assets/yellow-doc/latnecy.png) --- ### Agent transfer during testing When testing a voice agent and the **agent transfer** flow is triggered, the call will remain active for up to **2 minutes** before being automatically terminated by the system. > This 2-minute limit applies **only** when the call is transferred to a **human agent**. All other agent interactions are not subject to this timeout. #### (Optional) Set a Caller Line Identity (CLI) To display a test-friendly number (instead of the default voice agent number) when your call connects to a human agent during WebRTC testing, you can configure a **Caller Line Identity (CLI)**: - Go to **Node > Settings > Channels > Voice**. - In the **Caller Line Identity** field, enter the number you want to show as the caller ID. - Click **Save**. ![CLI Screenshot](https://cdn.yellowmessenger.com/assets/yellow-docs/cli.png) #### Before call disconnection, developers should validate - The call is successfully transferred or assigned to a human agent. - Relevant metadata (e.g., user’s email, name, or transcript) is correctly passed to the agent interface. --- ## Introduction to voice agent builder :::note To explore the voice features, you must create a **voice agent**. Functionalities such as Design(for voice), Voice input node, etc. will not work for chat agent. ::: ## 1. Create a new voice agent > If you are a new user, refer to [this](https://docs.yellow.ai/docs/platform_concepts/get_started/account-setup) article. 1. [Log in](https://cloud.yellow.ai) to your account and click **+Create new agent**. ![](https://i.imgur.com/wAbVsH9.png) 2. Select **Create from scratch**. ![](https://i.imgur.com/0LG3d7y.png) 3. Enter these details: - **Subscription**: Select the **subscription** under which you want to create this agent. - **Bot type**: Choose **Voice bot**. - **Avatar**: Choose/upload an avatar (your agents display photo). - **Industry**: Select from the dropdown. - **Region**: Select from the dropdown. - Select **Add live chat support to your agent** if you want to add a customer support flow. 4. Click **Create bot**. ![](https://i.imgur.com/u2UEI56.png) -------- ## 2. Methods to build a voice agent conversation To convert your idea of a voice conversation (use-case) into a agent flow, there are three approaches: 1. Build a agent from scratch using **Voice input node**. 2. Import a **Marketplace template** to your agent and modify it to accommodate voice conversations. > These methods are explained in further articles. ------- ## 3. Nodes supported for voice agents Only the following [nodes](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes) can be used to build voice agent flows: | Category | Nodes | | ------------------- | ----------------------------------------- | |Message|[Text](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) | | Prompts | [Voice input](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/build/usingvoiceinput) , Call forwarding, Call disconnect [Speak](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/speak-node), [Name](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/name-node), [Phone Number](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/phone-node), [Question](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/question-node)| | Logic | [Condition](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes#1-condition) | | Action | [Set variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/variables-node), [Function](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/function-node), [Database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node), [API](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/api-node), [Execute Flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/execute-flow) | ## 4. Configure voice nodes/flows through settings You can configure voice-related features like - Conversation language, Bot speed, User response capture duration, etc. for all the nodes used to build a flow for voice agents. There are two methods to configure these voice options: 1. **Global options**: These settings will be applicable by default for all nodes/flows. For example **Conversation language** and **Speed** of the conversation will ideally be constant throughout the conversation. > Learn more on configuring global options [here](https://docs.yellow.ai/docs/platform_concepts/studio/tools#25-voice) 2. **Node options** - Output of a few nodes demand to behave in a certain way, for this, the node level settings can be configured. This overrides global options for the nodes wherever it is defined. These settings can be different for each node. For example: **Capture response time** can be different while capturing the user's address (using the question node) vs. the user's phone number (using the phone node). > Learn more on configuring node options [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes#32-configure-node-for-a-voice-bot) --- ## Using marketplace templates to build a voice bot Coming soon! --- ## Using voice input nodes(prompt) to build a voice agent The voice input node offers added features that enhance the performance of voice agents. Building voice agents using the "Voice input" node improves conversational experiences with a more natural and human-like interaction style. - **Streamlined SSML handling**: Removes the necessity for manual SSML (Speech Synthesis Markup Language) coding. - **Simplified validation process**: Integrates validation directly into the flow, eliminating the need for separate configuration. - **Intent and Entity recognition**: Facilitates the identification of user intents and entities, enabling the voice agent to understand and respond appropriately to diverse user queries and requests. - **Tracking of unidentified utterances**: Provides the ability to monitor and manage unidentified user utterances efficiently. - **Collect PCI-Compliant Data Securely**: You can now mark input fields as PCI-compliant to securely collect sensitive cardholder information. When a field is designated as PCI, the platform automatically applies encryption, disables logging, and stores the data using secure protocols. The following PCI data types are supported: * Card number * CVV (card security code) * Card PIN * Expiry date ----- ## Build a flow with voice input node ### Use-case Consider building a Banking voice agent that asks users questions to identify them and resolve their queries. In this example, the voice agent guides the user through providing their name and phone number to inquire about an eligible home loan, receiving detailed responses. ![](https://i.imgur.com/zWCv0tr.png) > Let's break down the conversation: > **Bot** (asks): What is your name? > **User** (replies): Karan > **Bot** (stores): Karan as Name > **Bot** (asks): How may I help? > **User** (replies): Loan eligibility > **Bot** (understands): User request = Loan eligibility > **Bot** (logic): Required phone number to calculate Loan eligibility > **Bot** (asks): What is your phone number? > **User** (replies): 9890****** > **Bot** (validates if the number is correct): Uses logic to calculate Loan eligibility > **Bot** (response): You can avail X amount on X% interest. --- End of the call --- :::note For guidelines to build a good conversation, click [here](https://docs.yellow.ai/docs/cookbooks/getting_started). ::: ---- ### Steps to configure voice input node #### Prerequisite The Voice Input node will only work for voice agents, meaning you must have enabled **Voice agent** when creating your voice agent.
center> #### Steps to configure 1. Go to **Automation** > **Prompts** > **Voice input**. ![](https://i.imgur.com/n3muuJC.png) 2. In **[Input type](#input-type)**, select the type of information you want to capture from the user through voice. To securely **capture PCI-related details**, choose one of the supported types. The platform automatically encrypts PCI data and stores it securely with restricted access. - PCI – Card number - PCI – Card security code - PCI – Card PIN or - PCI – Card expiry to capture PCI-related details securely. :::note Responses will be stored in the respective PCI-protected variables. ::: 3. In **Bot speaks**, enter the message that the voice agent will say to request the user's phone number. 4. In **Repeat message**, input the message that the voice agent will repeat if the user's response is unclear or requires verification. 5. In **[Validator](#validator)**, validate the user input against the chosen criteria. 6. In **[Capturing the user input](#capturing-user-input)**, configure how the voice agent should gather user inputs. 7. In **[Additional settings](#additional-settings)**, adjust configurations to enhance conversation authenticity and emulate human-like interactions. For PCI related inputs, you can Additional Settings to define how PCI data is passed to your API. * **Encoding type**: Choose how the PCI input is encoded —`Text`, `Hexadecimal`, or `Base64`. * **Card number format**: Choose the format in which users are expected to enter the card number. This helps validate and correctly capture card data. * `XXXXXXX XXXXXX` * `XXXX-XXXX-XXXX-XXXX` * `XXXX XXXX XXXX XXXX` ![image](https://imgur.com/GAP8pFv.png) :::note Values updated in this node will override the global values. ::: ### Example: Configure node for phone number Following are the steps to collect a **user's phone number** using the voice input node: 1. In the **Input type** section, choose the **Input type** as **Phone** and enter the messages for **Bot speaks** and **Repeat** **message** fields. ![image](https://imgur.com/L07GSec.png) 2. In the **Validator** section, choose **Phone** in the **How do you want to validate user input** drop-down and enter the **Failure message** and **No Response message**. Mention the **Boost Phrases** too. ![image](https://imgur.com/AWucjOH.png) 3. In the **Capturing user input** section, choose **Voice** and **Keypad** in the **Capture input as** drop-down and fill in the rest of the fields. ![image](https://imgur.com/GSixNHK.png) 4. [Store the response in a variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#41-store-variables). ![](https://i.imgur.com/L6u5EEM.png) ---- ## Input type
| Field | Description | | -------- | -------- | | **Input type** |Choose the type of user response. 1.Name2.Email 3. Phone 4. Question 5. PCI – Card number6. PCI – Card security code7. PCI – Card PIN8. PCI – Card expiry | |**Bot Speaks**|The voice agent's reply that will be vocalized to the end-user during a call. | |**Repeat message**|The voice agent's reply that will be vocalized upon the user's request for the voice agent to reiterate the question or prompt. | You can add multiple messages to all of the above mentioned options by [adding random messages ](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes). You can also play the message (SSML) to hear the voice agent response. ![](https://i.imgur.com/JBdcjmR.png) ### PCI data masking in voice calls You can also collect PCI-sensitive information, such as card number, CVV, PIN, or expiry date. When you select a PCI input type, the platform automatically encrypts the data, applies strict logging restrictions, and stores it securely. This data is never retained in logs or databases and can only be accessed securely through the API node. Use Additional Settings to define how PCI data is passed to your API. * **Encoding type**: Choose how the PCI input is encoded —`Text`, `Hexadecimal`, or `Base64`. * **Card number format**: Choose the format in which users are expected to enter the card number. This helps validate and correctly capture card data. * `XXXXXXX XXXXXX` * `XXXX-XXXX-XXXX-XXXX` * `XXXX XXXX XXXX XXXX` ----- ## Validator ### How do you want to validate user input Choose the criteria against which the user input should be validated. 1. [Name](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#12-name) 2. [Phone](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#13-phone) 3. [Email](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#15-email) 4. [Intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents) 5. [Entity](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities) 6. [Regex](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities#42-regex) 7. Intent and entity :::note You can choose several intents and entity or their combination in the validator. If the user's intention matches any of them, it will be validated, and the flow will move to the next node. ::: ![image](https://imgur.com/q325xkw.png) ### Failure Message **Failure message** is vocalized when the validation fails. - **+Add message**: Click this button to add up to three successive fallback responses when the voice agent encounters invalid response from the user. ### No response message **No response message** is vocalized when there is no user response in the configured max response time. - **+Add message**: Click this button to add up to three successive fallback responses when the voice agent gets no-response from the user. :::note You can add upto 3 Failure messages and No response messages each. ::: ### Boost phrases Some user responses can be confusing for the voice agent to understand. Region specific words, new genz lingos, internet terminologies, trending phrases, abbreviations are trained specially so that the voice agent understands the exact intention. For example, COVID is a new term that has been used frequently, the phrase COVID must be boosted, otherwise it gets translated to kovind/ go we/ co-wid etc. Ex - you should add the phrases that you expect from the user response like, < I want to take covid vaccine > ![](https://i.imgur.com/DdkiyBq.png) ----- ## Capturing user input **Capture input as:** You can capture the user response as: - **Voice**: Capture only voice input. - **Keypad**: Capture only input from the keyboard. - **Voice and Keypad**: Capture input from both voice and keyboard. ### Voice | Fields | Description | | -------------------------- | ----------- | | **STT engine** | Select an engine from the dropdown- Google/Microsoft. | | **STT mode** | Select mode from the dropdown. Microsoft provides "Static", "Streaming" or "Streaming Advanced", "Streaming 2.0". Google provides "Static". | | **STT language** | Speech-To-Text i.e. transcription language (or user language)(ISO code) can be selected from the dropdown. Click [Microsoft](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support?tabs=stt-tts) or [Google](https://cloud.google.com/speech-to-text/docs/languages) for more information on the languages)| | **STT engine endpoint** | Optional endpoint of the STT custom model. | | **Recording max duration** | This value is the Max duration for which the voice agent will wait after asking a question (in any step) even while the user is speaking. For example, after asking “Which city are you from?” and the recording duration value is “5" - the voice agent records only 5 seconds of user response. This option is necessary to avoid consuming unwanted information and to stay with the conversational flow. If the user mistakenly replies with long paragraphs when a question is asked or if the user's response is getting shadowed with constant background noises, the voice agent must not process those long inputs. Hence, with this configuration, the voice agent only takes the necessary response and can quickly process the user response. | | **Recording silence duration** | This value is the Max duration for which the voice agent will wait after asking a question (in any step) for the user to respond. For example, if recording silence duration is 5 seconds, voice agent waits for 5 seconds for the response if the user is silent. If the user does not respond anything within 6 seconds, voice agent Message will be played. | | **Initial silence duration** | To provide more customization on the silence duration parameter, “streaming” and “streaming-advanced” STT modes (of Microsoft STT engine) allow to specifically configure the maximum acceptable silence duration before the user starts speaking. For example, the acceptable initial silence duration for the application number question could be higher (~3/4 seconds) but in the case of a quick conversational binary question, it could be configured to 1 second. | | **Final silence duration** | Similar to the initial silence duration, the final silence duration is indicative of the maximum duration of pause that the voice agent will wait for once the user has started speaking. For example, for binary/one-word questions like yes/no we could set the final silence duration to ~0.5/1.0 seconds and for address-like fields where taking a pause is intrinsic in conversation, we can set the final silence duration to ~1.5/2.5 seconds. | ![](https://i.imgur.com/F9kJ027.png) ### Keypad |Field|Description| |------|----------| | **DTMF digital length** | Enter the length of characters to be captured. Ex: For an indian phone number, it is 10. | | **DTMF finish character** | Character which defines when the voice agent must stop capturing. Supported finish characters - "*" and "#"| ![](https://i.imgur.com/szHy8xU.png) ### Voice and keypad All the above mentioned options for **Voice** and **Keypad** will be listed together. ![](https://i.imgur.com/7pW4ETh.png) ---- ## Additional settings | Fields | Description| | -------- | -------- | | **Enable wait message** | Enable this toggle to vocalize an acknowledgement message to the user awaiting a message from the voice agent. | |**Wait message**| Acknowledgement message displayed to the user.| |**Recording action**|With the recording management options, you can select to pause/resume/stop recording depending upon different use-cases and conversations. By default, the recording is ON. Once you STOP the recording (for recording sensitive dialogues), it can’t be resumed back.| | **TTS engine** | Select the engines from the dropdown- Microsoft Azure, Google Wavenet, Amazon Polly. | | **Text type** | Select Text/SSML from the dropdown. | | **TTS language** | Bot Language(ISO code) can be selected from the dropdown.| | **Pitch** | Pitch value can be any decimal value depending on the base of voice required, 0 is ideal. You can add this for Microsoft if text_type = "text" and for Google for text_type = "text" and "SSML". | | **Voice ID** | Type the characters of voice ID. You can add this for Microsoft if text_type = "text" and for Google if text_type = "text" and "SSML". | | **TTS Speed** | This value defines how fast the voice agent must converse. This value can be 0.9 - 1.5 for the voice agent to soundly humanly. You can add this for Microsoft if text_type = "text" and for Google if text_type = "text" and "SSML". | ----- ## Custom response ### Custom responses for each identified input When the system is expecting an input from a user, it handles scenarios where the input doesn't align with expectations. In such cases, customized responses can be used to guide or assist the user. Each input is treated as a condition within an if-else structure. Validators are utilized to define these conditions. For every validation or validator, the voice input node interprets it as a distinct if-else condition. If the user's input matches one of the expected values defined by the validators, the corresponding action or response is triggered. If none of the expected values match the user's input, it's categorized as an **unidentified utterance**. ![image](https://imgur.com/Dvt4Sn4.png) ### Fallback Fallback nodes can be linked directly to the voice input node. To specify the action in case of encountered issues or call failures, connect the **Fallback for failure** point to the subsequent node. To proceed with the next action if the user hasn't responded to the input, connect the **Failure for no response** point to the next node. ---- ## Unidentified input storage When the validation fails, the utterance is saved in the default table along with the following data: * SID * Phone Number * Drop Step [same as the voice input node name] * Utterance * Recording URL * Chat URL * Language * Translated Message * Date & Time (of the call initiation) * Issue `[UIU / Intent Missing - {{Intent name}}]` --- ## Call disconnection and call recording Managing calls effectively is crucial to ensure seamless customer experience. The Yellow.ai platform offers several advanced call management options that enable you to configure your voice agent as per your specific requirements. This article provides an overview of the additional call management options available on the Yellow.ai platform like **call disconnection** and **call recording** and how to configure them. These are [node level options](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes#32-configure-node-for-a-voice-bot), you can find them by clicking the tools icon and selective voice options. ![](https://i.imgur.com/fvQNhlg.png) ## 1. Configure your flow to disconnect a call Enabling the call disconnect option will atutomatically disconnect the voice call when the respective node is reached in the flow. **Use-cases:** - Call disconnect can be used to **end a use case**. - When the **agent is unable to understand the user's response** due to noise or any other reason, you can add a [condition node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/logic-nodes) to identify the user's intent and disconnect the call. - When the user's input is not relavant despite repeated attempts, you can set maxium number of retries on the voice input node and disconnect once the limit is reached. On the node (question, text, voice input, etc.) that you want to disconnect the call, configure the following: 1. Click the **Tools** icon > **Voice**. 2. Enable **Disconnect call**. 3. Click **Save**. 4. When this node is reached, the configured **bot says** message will be played, and the call gets disconnected. Example: *Thanks for the details*. ![](https://i.imgur.com/T6bjkPK.png) ------ ## 2. Manage call recording through agent flows By default, the **end-to-end call is always recorded**, but you can change this behavior (**pause, stop, resume**) based on specific cases. The Yellow.ai platform provides an additional option to manage call recording effectively. > This must be configured for each node individually based on your use-case. **Use-cases:** - If the user shares sensitive information like a PAN number, you can pause the recording to prevent such information from being recorded. - If you need to comply with regulations that require you to avoid recording the support agent and user conversation, you can configure the platform to pause the recording during that part of the conversation. On the node (question, text, voice input, etc.) that you want to **pause** recording, configure the following: 1. Click the **Tools** icon > **Voice**. 2. Under **Recording action** select **Pause**. 3. Click **Save**. ![](https://i.imgur.com/q5H5b2Q.png) :::info You can also select **Resume** and **Stop** for other nodes. Resume will resume the paused recording and Stop will stop the call recording altogether. ::: --- ## Key components of a voice agent Voice agents use advanced technologies for seamless and interactive communication via voice channels. Understanding the key **components** is vital for designing and implementing an effective voice agent system. These components facilitate efficient user interaction and communication. This article highlights the basics of voice agent components. :::info #### Recap of the voice agent workflow To understand the components of a voice agent, you must have a basic understanding of the [voice agent architecture](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/voicearchitecture#2-workflow-of-a-voice-bot). 1. **Customer** initiates a **call** to the voice agent and makes a service request. 2. The customer's **speech is converted into text**. This text is then sent to the **telephony** platform, which acts as the interface between the cloud and the customer. 3. The text representing the customer's **request is processed** by the backend logic, which can be implemented through flows or custom code on the **Yellow.ai Cloud platform**. 4. Once the cloud platform understands the user's request, it generates a **response in the form of text**, which is then sent back to the **telephony** platform. 5. The voice agent **converts the response text into speech** and delivers it to the **customer**, allowing them to hear the response in a natural voice. ::: #### Key components of voice agent workflow The voice agent architecture consists of three key components: 1. **Capture user input**: The agent records and captures the customer's input. 2. **Understand user input**: The agent processes and comprehends the customer's input to generate a response. 3. **Customize agent response**: The agent plays or communicates the response back to the customer. ![](https://imgur.com/xaabcph.png) ---- ## 1. Capturing user inputs There are three methods to capture user input on the IVR channel that is summarized below. 1. **Capturing user speech**: Yellow.ai platform incorporates Speech-to-Text (STT) and Automatic Speech Recognition (ASR) technologies for accurate transcription and real-time recognition of user speech. Through partnerships with leading STT engines like Microsoft and Google, we ensure high-quality transcription. ASR leverages advanced machine learning algorithms to facilitate seamless and precise communication between users and voice agents, enabling natural and interactive interactions. You can configure parameters such as STT engine, mode, and silence parameters for optimal performance. 2. **Capturing keypad (DTMF) input**: Users can provide input through the keypad while on a call, typically used for numeric inputs. Two configurations are available: - **DTMF Digit Length**: Captures fixed-length user input, like a mobile number. - **DTMF Finish Character**: Used for variable-length inputs, such as an application ID. Users can press "*" or "#" to indicate the completion of input. > If there is no activity for more than 10 seconds, voice agent considers it as the end of input. 3. **Capturing keypad and speech as input**: In certain cases, the voice agent can allow users to provide input by either typing on the keypad or speaking it out. The agent recognizes the first response, whether it's from keypad activity or speech, as the final input. -------- ## 2. Understanding & responding to user responses Operations on yellow.ai cloud platform must be performed to understand the user input that is available in text format and analyze and provide output in text format. For example: - Bot training by adding [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents) and [entities](https://docs.yellow.ai/docs/platform_concepts/studio/train/entities). - Configuring output for failure or no-response messages. - Configuring validations against the context (intents, entities, pre-trained entities, etc). - Many more... ![](https://imgur.com/BAPAyXH.png) ------ ## 3. Customizing agent responses To make the users hear the agent's responses during a call, the text generated by the agent must be converted into spoken words. This conversion is achieved using text-to-speech (TTS) technology in collaboration with leading TTS engines such as Microsoft, Google, and Amazon. These engines provide a range of capabilities to meet different business requirements, including the ability to create customized and lifelike speech. There are three ways to convert agent-generated text into speech on the IVR channel: 1. **Using pre-built neural voice models**: TTS providers offer pre-built neural voice models that can be utilized for quick prototyping and building demo voice agents. Design module and Voice input node enable the conversion of text into speech, providing a basic understanding of how the agent's responses would sound. 2. **Applying customization with SSML**: For more advanced use cases where precise control over speech synthesis is needed, Speech Synthesis Markup Language (SSML) can be employed. SSML in design module and voice input node allows for fine-grained customization of speech, like adjustments to speech rate, pitch, style, pauses, etc. By incorporating SSML in the text, the resulting speech can be highly tailored and expressive. 3. **Playing pre-recorded messages**: In some scenarios, it may be necessary to play pre-recorded messages during a call. For example, when a custom proprietary sound or a welcome tone needs to be played. Pre-recorded messages, in .wav or .mp3 formats, can be integrated into the call flow to provide a specific audio experience. ### Additional response customization on yellow.ai Yellow AI offers extensive features for customizing agent responses. They are: 1. **Adding variables for custom responses (Dynamic messages)**: Personalize interactions with the agent by incorporating variables. By storing and using variables in the design module or voice input node, you can dynamically include user-specific information in the agent's responses, creating a more tailored experience. For example, you can dynamically include the user's name or city in the responses. | Conversation 1 | Conversation 2 | | -------- | -------- | | **User**: I live in **Bangalore**. **Bot**: **Bangalore** is a great place! May I know your account number? | **User**: My name is **Sam**. **Bot**: Welcome to our store, **Sam**. What would you like to try first? | 2. **Using the translations page for multilingual agents (Multi-lingual flows)**: For multilingual agents, the [translations](https://docs.yellow.ai/docs/platform_concepts/studio/build/localization) feature can be employed to customize speech in different languages. This means that you can build a single flow and use the translations feature on the platform to store configurations for each language. You can provide localized experiences to users in different languages without the need to duplicate or recreate entire flows. This streamlines the development process and ensures consistency across different language versions of the voice agent. > The translation text should be in SSML format. --- ## Understand delays in a conversation Delays are the time between the user response and the voice agent response. For example, the user response is "is there any discount?", and the delay is the time that the voice agent takes to process a line and respond to it. The objective of the Telephony and Yellow cloud platform is to reduce the conversational delay and make the conversation more human-like. Before understanding and configuring the voice agent for the best user experience in terms of minimising the conversation delay and still not cutting off the user mid-sentence, let's try to understand the way normal dialogue works. 1. When the response is a **Yes/No** value: This is supposed to be an instantaneous response and probably not a very long statement. 2. When the response is an **address**: This consists of multiple pauses/gaps and a longer time to complete the whole response. > Ex: Door #1 < pause > Sector-D1 < pause > Kanpur Road < pause > Lucknow 3. When the response is a **phone number**: This will be a patterned delay and there will be a few pauses but the whole response is not very long. > Ex: 99-44-32-06-11 or +1-202-795-3213 ----- ## 1. Types of delays Once we have understood how normal dialogue dealy works, let's have a look at other kinds of delay that are introduced in the voice agent conversation. After having a clear idea about the functioning of delays, we can better optimize the conversation around the same. Delay (or perceived delay to the user) is the amount of time it takes after the user completes the query/response and the agent voice out the next response. ![](https://i.imgur.com/ossdeuj.png) 1. **STT delay**: When the user has responded and the telephony platform has received the audio file. This delay is caused when the audio file is getting converted to the text file on the STT engine. This delay depends on the number of characters, simple name response will take lesser time to process than an address. > Ex: Audio-to-text conversation of "My name is Jake, what is my bank balance?" :::note The yellow cloud platform would have defined a range of duration for which the telephony platform accepts the response. For example, if the user is responding with a phone number we can ask the voice agent to only record it for 1 minute by setting the **Recording max duration**. ::: 2. **Telephony to yellow cloud platform**: The converted audio to text response will get transported from the telephony platform. 3. **NLP engine response time within cloud platform**: The text received on the yellow cloud platform will be sent to the NLP engine. Internally there will run a logical function where the software understands the user text response, finds a solution to continue the flow and generate a voice agent response. 4. **Yellow to telephony cloud platform**: The text response generated by the NLU-yellow cloud platform will get transported to the telephony platform. 5. **TTS delay**: This delay occurs while the agent response text is getting converted to an audio format by the TTS engine so that it can be played as a response to the user. :::info **TTS delay optimisation using cache memory** **Use case**: Assume you own an ominous that converses with 1000 users in a day and the conversation flow is mostly the same. Ex: First agent question will be "what is your name" and the next would be to inform the user - "we have introduced a 0% intro APR offer on both purchases and transfers". These repetitive messages or the small audio files remain the same throughout all the calls, hence the TTS delay that occurs while the NLP text response is getting converted to speech is optimised using **cache**. This skips the TTS delay and fetches the agent response from the cache database (present in the telephony platform). The audio files generated from the first few user conversations are stored in the database and reused for the other calls reducing the overall latency. ::: --- ## 2. Configure delays for different use cases Finally, after understanding the art of human dialogue and the system of voice agent, let us drill down on designing and configuring the agent in much better way. While understanding the system delays, there were 3 major parts to it: 1. **STT** 2. **Telephony-Cloud Communication** 3. **TTS** :::note **Telephony-Cloud** stacks are very tightly integrated with each other and with a very reliable and fast NLP engine the whole delay for this section is negligible. **TTS delay** is already very well optimized by using the caching mechanism explained above. ::: Clever configuration lies is on how we optimize the STT delay. Let's understand that process below: **Understanding STT detection** **Use-case**: The agent asks the user "Are you sure you want to place this order?" and the user responds with Yes/No. 1. **Initial delay**: This delay occurs when the user hears the agent's response and takes time to process it before replying. 2. **Information delay**: The time taken for the user to speak the complete response. 3. **Pauses**: Pauses taken in between each of the words are considered a delay. Pause for a Yes/No answer will be nill and there will be multiple pauses while recording an address. 4. **Final dealy**: After the user has spoken the response, the duration of time the agent waits to understand that the user response is received and it must be processed as a single audio file. :::note To design a good voice agent you must configure these parameters at the [node level](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes#32-configure-node-for-a-voice-bot) based on the question being asked. ::: ### 2.1 Configure for Yes/ No response > STT engine:: Microsoft and STT mode:: Streaming | Parameters | Description | Min Value | Max Value | |-------------------------|-----------------------------------------------------------------------------------------------|-----------|-------------| | **Recording max duration** | Maximum duration after which the recording stops - the user response won't be accepted beyond this time. | 5 seconds | 60 seconds | | **Initial silence duration**| Acceptable silence duration before a agent user starts speaking. | 5 seconds | 10 seconds | | **Final silence duration** | Acceptable silence duration after a agent user starts speaking and the agent will have to process the response (Final delay must be greater than expected pauses). | 0.1 seconds | 5 seconds | --- ## Voice agent data handling Coming soon! --- ## Call Details Report (CDR) of your voice agent on Insights module :::note In Data Explorer, CDR is available only for voice agents. The data will be updated after the call is completed. ::: This article focuses on **Call details report** (CDR) for voice agents, a database table maintained by yellow.ai platform which records more than 15+ important metrics (like start time, duration, recording url etc) for each call. ## 1. Call details report overview CDR is a report of telephony data obtained from each call (voice agent conversation with customer) for reporting and analytics purposes. Parameters of every call made through the **yellow telephony system** is recorded in the CDR, making it a reliable source of truth for call-related information. - CDR fields help businesses gain valuable insights into their call center operations and customer interactions. - The CDR table contains several fields that record various details about the call, such as **call duration, caller ID, called number, call status, and call type**. CDR fields are explained in the [last section](#4-cdr-fields-and-their-definitions) of this article. - By analyzing CDR data, businesses can **identify trends and patterns** in their call center operations, **improve call quality**, and **enhance customer experience**, make **data-driven decisions** and **optimize** the voice agent operations for maximum efficiency and effectiveness. Examples of insights you can derive from the auto generated call details report: - Retrieve a list of users who disconnected calls during the last 7 days. - Retrieve the answering rate for a specific campaign (identified by its ID) that was launched last Sunday. - Retrieve daily total calls handled by the voice agent. ------- ## 2. Access call details(CDR) on Data Explorer To access the CDR for voice agent: 1. Navigate to **Insights** > **Data Explorer**. ![](https://i.imgur.com/dmQSwnB.png) 2. Open **Call details report**. You can see the report for the last 31 days. 3. You can **download** this report as CSV by clicking the **Actions** button. ![](https://i.imgur.com/qp6CsVq.png) -------- ## 3. Visualize call detail report On the data explorer, you have the option to filter or summarize the CDR data according to your specific needs. You can then visualize this data on a dashboard and download reports that only include the filtered data. > Details on how to perform tasks such as summarization, visualization, and query creation are provided in this [guide](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/intro). ---- ### Use case 1: Create custom dasboards Suppose you're a ticket booking center using the yellow.ai voice agent, and you want to track the number of daily calls due to the different offers you provide. Here are the steps you can follow: 1. Open **Call details report** and click on the **Summarize** button. 2. Click on **Add metrics** and select **Number of distinct values of**. 3. Choose **Call ID** to track calls from different IDs, and then click **Save**. ![](https://i.imgur.com/OryFjfA.png) 4. To filter the data further to obtain daily stats, select **Timestamp** under **Group by** and choose **Day**. Click **Apply**. 5. You will now see a table with the required data. To visualize this data, click on the **Visualization** button. 6. Choose the type of visualization you want (e.g. bar graph), and click **Done**. ![](https://i.imgur.com/UPVpmYk.png) 7. Click **Save query**, name your query, and then click **Save**. You can access this visualization as a **saved report** in the Data Explorer. ![](https://i.imgur.com/fU5AoOq.png) 8. Whenever you want to view the number of users per day, you can directly open the saved report from the **Saved reports** section in the Data Explorer. ![](https://i.imgur.com/E0iwn1J.png) > You can also use this data to create your own custom dashboard. For instructions on how to do this, click [here](https://docs.yellow.ai/docs/platform_concepts/growth/Dashboards/dashboardintro). ----- ### Use case 2: Schedule reports to be sent to your email Suppose you are a new support center on the yellow.ai voice agent, and you need to send a weekly report of the voice agent's billing duration to the accounts department. Here are the steps you can follow: 1. Open the **Call Details Report** and click the **Summarize** button. 2. Click **Add metrics** and select **Number of distinct values of**, then choose **Call ID** to fetch the unique calls attended by the voice agent. 3. Click **Add metrics** and select **Sum of** and **voice agent billing duration** to calculate the total billing duration for the selected timestamp. 4. To filter the data further and get weekly stats, choose **Timestamp** under **Group by** and select **Week**. Click **Apply**. ![](https://i.imgur.com/yITVlXG.png) 5. You will now see a table with the required data. Click **Save query**, name your query, and click **Save**. ![](https://i.imgur.com/GEy4pJe.png) 6. (Optional) To visualize this data, click the Visualization button. 7. Go to **Data Explorer** > **Saved Reports** and open your custom report. 8. **Schedule** a weekly report by adding your email ID and the account team's email ID in the recipients field. Click [here](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/savedreportsactions#1-schedule-a-report) for the steps to **schedule report**. ![](https://i.imgur.com/K59SALi.png) > Understand other operations on [Insights modules](https://docs.yellow.ai/docs/platform_concepts/growth/introductiontoinsights). ---- ### Use case 3: voice agent billing analysis VoIP/IVR providers aim to bill companies accurately for channel usage. Analyzing call durations is pivotal. Quick disconnects within 5 seconds may not yield valuable insights and can be excluded from billing. For durations between 15 to 30 seconds, one billing rate applies, while calls exceeding 30 seconds fall into a different billing band. The Call Details report provides actionable insights for such billing scenarios. Follow these steps: 1. Navigate to **Insights > Data Explorer > Call Details report**. 2. Click on **Filters** and select **Callduration**. 3. Click **+Add buckets > Varied** and create billing buckets by adding Values like `<=5s`, `15-30s`, and `>=30s`. ![image (32)](https://imgur.com/YERSsH0.png) 4. Apply these buckets to categorize call durations, enabling a clear view for billing decisions. ![image (33)](https://imgur.com/7rBk04d.png) ---- ## 4. CDR fields and their definitions The CDR report provides the following information: ### Call ID Call ID, or Call Identifier, is a system-generated unique identifier that is used to track and identify a specific phone call. It is used to keep track of various aspects of the call, such as its duration, call status, and other relevant information. Each call on the Yellow platform is assigned a unique Call ID, which can be used to look up details about the call in the platform's logs or reporting tools. ### Call start time Call start time refers to the timestamp, at which the call was initiated by the caller. This timestamp marks the beginning of the call and is used to track when the call was started. ### Call end time Call End Time refers to the time when a phone call or a communication session is terminated or disconnected. ### Ring Duration Ring duration refers to the length of time that a phone rings before the call is either answered or goes to voicemail. It is the time between when an incoming call is received and when it stops ringing. Ring duration is typically measured in seconds. ### Call Duration Call duration refers to the length of time that a phone call. It is the amount of time that starts from when the call is ringing, connected or answered and ends when the call is disconnected or ended. The call duration is important to measure for various reasons, such as billing purposes, quality assurance, and analysis of call traffic patterns. ### Voice Bot Duration Voice agent duration, in seconds refers to the length of time that a voice agent or automated voice response system interacts with a caller during a phone call. This duration starts when the caller is first connected to the voice agent and ends when the call is transferred to a live agent or when the call is disconnected. The voice agent duration can vary depending on the complexity of the voice agent's responses and the options provided to the caller. ### Voice Bot Bill Duration The duration, in seconds, of the conversation between the user and the voice agent, rounded up to the nearest Voice Billing Pulse interval for billing purposes. ### Campaign ID A Campaign ID is a system-generated unique identifier assigned to a marketing campaign to track its performance and measure the effectiveness of marketing efforts. This field is empty for inbound calls by default. ### Hangup Reason Hangup Reason refers to the reason why a call or communication session was terminated, ended, or disconnected. The possible values are **TTS failure, STT failure or Network faliure** (you may also find similar values with these descriptions: Normal Hangup, Bot failure, Bot response invalid, Bot response failure, DTMF over parent call, Message loop detected, Missed Consecutive DynamicNode Packets, Media download failure, STT resource not available, TTS resource not available, Network error, Invalid Destination, Phone Unreachable/Switch Off, Ring timeout, User Busy, Inbound Blocked) Hangup Reason is a valuable metric for analyzing call center performance and identifying areas for improvement. By tracking and analyzing the reasons for call terminations, call centers can identify common issues, patterns, and trends, and take steps to address them to improve customer satisfaction and retention. ### Hangup Source/ Disconnected by Hangup source/Disconnected by specifies the party that disconnected the calls. The possible values for this column are **User/Bot/System**. - USER: When the customer itself disconnects the call. - BOT: When the voice agent disconnects the call after providing the necessary information. - SYSTEM: When neither voice agent nor the user disconnects the call and the call is disconnected due to any of the system issues. Hangup Source can provide useful information for analyzing call quality, identifying problems with the network or equipment, and understanding the reasons for call failures. ### Source Number Source number refers to the phone number or caller ID of the party that initiated the call. It is the number from which the call originated. In other words, it is the phone number of the person or device that made the call. ### Destination Number The destination number refers to the phone number that received the call or message. It is the phone number dialed by the caller or the recipient of an inbound call. ### Call Status The call status field refers to the final status of a call when it ended or was terminated. This field indicates whether the call was successful or not and can provide more details about the reason for call termination. Some common call status codes are **Answered, Not Answered, Failed, or Not Valid**. ### Direction Specifies the direction of the call, either Inbound or Outbound. It could be **inbound**, meaning the call was received from an external source, or **outbound**, meaning the call was initiated by the user from the system. ### Recording URL An URL to the end-to-end call recording of the call, which is usually recorded by default. Users have the option to pause recording during certain sections of the call or stop recording altogether as part of the voice agent logic. The recording URL can be used to retrieve and listen to the recording of the call. ### SIP Code For each call, an error code (SIP code) is generated to understand the hang up reason. --- ## Create flows to combine call and conversational details for analysis This document outlines the application of **conversational details report** and **call detail report** parameters for customer tracking purposes. Along with standard fields present in [CDR](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/cdr) and [conversational details report](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/convdata), voice agent developers can define fields based on their business logic requirements. Examples of insights you can derive from the call and conversational details reports: - Retrieve average call duration for callers from Gujarat state by combining **duration** fields from CDR table and **state** name from conversational details report table. - Retrieve the success rate for answered calls with Hindi language selection by combining **call status** field from CDR table and selected **language** from conversational details report table. ------------ **Use-case:** To analyze both call details and conversational details for certain use cases, you can create a flow that integrates data from both sources. By doing so, you can gain insights by analyzing the combined data. For example, if you are developing a voice agent for medical counseling aimed at different age groups, it may be necessary to track the age of customers, the nature of their queries, and the length of their calls, in accordance with company guidelines. You could record the customer's age and query as custom fields, while the call duration can be automatically tracked by CDR. By combining both sources of data, you could create a dashboard that is tailored to this use case. To accomplish use cases that involve using both conversational data and CDR data, three steps need to be followed: 1. Set up a flow that can **collect and store** custom details from the conversation. 2. **Create a callbackStatus** event that can retrieve CDR data once the call has ended. 3. **Merge** the CDR data and custom fields into a table for analysis. ![](https://i.imgur.com/026bBkJ.png) ----- ## Step 1. Call data collection and storage using variables To store the age and query type along with the rest of the flow, follow these steps: 1. Create a flow on Automation using prompts to store conversational data in variables. 2. Create a table with required columns to store variable data. 3. Use database nodes to send variable data to a table. > [Refer this](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/convdata#1-create-a-flow-to-collect-and-store-custom-details-from-calls) for elaboration on these 3 steps. ------ ## Step 2. Create a callbackStatus event To streamline call management, create a custom event named `callbackStatus`. You can follow the steps provided [here](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub#-8-custom-events) to create a custom event. Once you've created the event, verify that its status is set to **Active**. ![](https://i.imgur.com/TA01UPR.png) #### Functionality of callbackStatus custom event The `callbackStatus` object is a container that holds important CDR data and is dispatched to the platform immediately after a call is disconnected. In addition to this, an event is also dispatched to the platform as soon as the call is disconnected, which can be utilized by bot developers to receive the 'callbackStatus' JSON object. ------ ## Step 3. Merge CDR and conversation data post-call disconnection 1. Create a new flow from scratch by following the steps provided [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys#2-create-a-flow). 2. On the start node, add an [event trigger](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#trigger-flow-using-event) by selecting **Event** as the trigger and `callbackStatus` as the value. This will ensure that the flow executes when the call has ended as per the backend logic. ![](https://i.imgur.com/5xbfRqM.png) 3. Create new [variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#-3-create-a-variable) to retrieve CDR-related entries. For example, to retrieve **Call duration**, create a variable *Duration* and add value as `{{variables.EVENT_DATA.duration}}`. [Click here](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/variables#variables-available-for-disconnected-calls) for detailed explaination. 4. Add a [database](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) node to combine CDR and conversational detail fields [into one table](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/convdata#step-1-create-a-flow-to-store-data-in-variables). - Add type as **Update**. Select the same table name. - Filter for **SID**. - Add CDR fields/variables. ![](https://imgur.com/kUzOlr2.png) ------ ## Step 4. Download or visualize call details for better insights You can find all the information related to your use case, including data from both CDR and conversational detail fields, on the table. 1. To download this data, navigate to **Automation** > **Database**, and click on **Table actions**. From there, you can easily download the data. ![](https://i.imgur.com/bZZlNeW.png) 2. You can also view this data on **Insights** > **Data explorer**, where it can be summarized, visualized, and even added as a custom dashboard for easy access to analytics. ![](https://i.imgur.com/Xyig1o0.png) --------- **Understand other operations on insights** - Check out the available actions for custom tables by visiting [this page](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/customtables). - To visualize the data collected from calls, follow the steps outlined in [this guide](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/cdr). - Understand other operations on [Insights modules](https://docs.yellow.ai/docs/platform_concepts/growth/introductiontoinsights). --- ## Extract user responses from conversations and create custom reports In this document, we will cover a use case where custom fields are used to track customer details obtained from the conversation. **Conversational details that can be tracked during the call** Voice agent developers have the ability to define custom fields based on their business logic requirements, in addition to standard fields. This allows them to derive additional insights from their data. A few examples of custom details are additional phone numbers, ages, names, etc. Examples of insights you can derive from the conversational details report: - Retrieve the percentage of callers who are selecting the Hindi language option. - For an e-commerce chat agent, retrieve the percentage split between inquiries related to order status and those related to registering a complaint. ----- ## 1. Create a flow to collect and store custom details from calls **Use-case to understand how to create reports with conversational details data** If you are developing a voice agent for educational counseling for students across various age groups, it may be required as per company guidelines to keep track of the customer/student's age and the type of query asked. This information can be recorded as custom fields, allowing you to gain insights into the types of queries being asked by different age groups. ### Step 1. Create a flow to store data in variables To store the age and query type along with the rest of the flow, follow these steps: 1. Go to **Automation** and create a flow that supports your use case. 2. In the node that collects age and query type, select **Store response in** a variable. ![](https://i.imgur.com/qyw4l5R.png) -------- ### Step 2: Create a table to store variable data To store data collected from flows, you need to create a table (this is a prerequisite to step#3). Follow these steps: 1. Go to **Automation** > **Database**. 2. Create a **table**. Add field names and mark them as **Searchable**. ![](https://imgur.com/xfdo07Y.png) 3. The database will store all the details obtained from the calls. ![](https://imgur.com/2pzBInn.png) > [Learn more](https://docs.yellow.ai/docs/platform_concepts/studio/database#-1-create-table) about creating a table in Automation. ------ ### Step 3: Use DB node to send variable data to a table To store all the collected details in a table, add **database** nodes to the flow(step#1) after collecting each variable, using the following steps: 1. Add a **database** node at the beginning of the call to send the system-generated unique identifier (**SID**) value to the table. * Select the type as **Insert** and add the table name. * Under records, add the field as **SID** (column name) and the value as **mp_sid** (the custom variable name you have created for the SID). ![](https://imgur.com/LP2F1e5.png) :::info SID is a voice data variable which is available immediately after the call is initiated and can be used as a filter for subsequent database nodes. > [Learn more](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/variables) about voice data variables. ::: 2. Add **database** nodes after storing responses in a variable. * Select the type as **Update** and add the table name. * Add a **filter** `Where SID = mp_sid` to ensure that the data is added only if the SID is the same. * Add variables, for example, after collecting the Age, add the Age value to the table. ![](https://imgur.com/NophgOr.png) To ensure that you have the customer details even if the customer disconnects in the middle, add a database node after every prompt node to send the collected data to the table. This data can then be used to reach out to the customer or as a survey. > [Learn more](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/database-node) about the DB node. ----------------- ## 2. Download or visualize conversational details for better insights 1. To download this data, navigate to **Automation** > **Database**, and click on **Table actions**. From there, you can easily download the data. ![](https://i.imgur.com/ZCrHFs2.png) 2. You can also view this data on the **Data explorer**, where it can be summarized, visualized, and even added as a custom dashboard for easy access to analytics. ![](https://i.imgur.com/Xyig1o0.png) --------- **Understand other operations on insights** - Check out the available actions for custom tables by visiting [this page](https://docs.yellow.ai/docs/platform_concepts/growth/dataexplorer/customtables). - To visualize the data collected from calls, follow the steps outlined in [this guide](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/cdr). - Understand other operations on [Insights modules](https://docs.yellow.ai/docs/platform_concepts/growth/introductiontoinsights). --- ## Voice agent overview (voice dashboard) :::note The voice agent overview on Insights will only be available for voice agents. ::: The voice agent overview dashboard is built on top of the CDR data and tracks valuable metrics in a more visual and intuitive manner for effective reporting. The Voice Overview Dashboard includes the following key metrics: 1. User traffic metrics such as calls and duration 2. Analysis of call statuses Examples of insights you can derive from the dashboard: - Retrieve the total number of calls received in the past week. - Retrieve the average duration of calls for the previous 30 days. - Retrieve the answering rate for the outbound campaign during the last quarter. **Voice dashboard on Insights** To view the voice dashboard, navigate to **Insights** > **Voice dashboard**. ![](https://i.imgur.com/KWb7P6U.png) --- ## Maximizing Business Outcomes with Voice Bot KPI Tracking If you're using a voice agent, tracking your metrics is essential for achieving the desired results. Yellow's platform offers comprehensive tracking to give you complete insights into your voice agent's performance. ## 1. Voice reports available on Insights You have two options to track your voice data: 1. **Basic Reporting**: The platform automatically tracks common points from the voice conversation and displays them on the [Voice Overview Dashboard](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/dashboard) on Insights module. From the dashboard, you can: - Retrieve the total number of calls received in the past week. - Retrieve the average duration of calls for the previous 30 days. - Retrieve the answering rate for the outbound campaign during the last quarter. 2. **Advanced Reporting**: You can track voice agent analytics on Insights based on your specific needs in the following ways: 1. [CDR reports](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/cdr): View more than 15 voice call parameters on the **Call Details Report** (CDR) in the Data Explorer. From the CDR report, you can: - Retrieve a list of users who disconnected calls during the last 7 days. - Retrieve the answering rate for a specific campaign (identified by its ID) that was launched last Sunday. 2. [Conversational details reports](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/convdata): **Design custom flows** to track the specific information you need from the customer, save it in a database, and visualize it. From the conversational details report, you can: - Retrieve the percentage of callers who are selecting the Hindi language option. - For an e-commerce chat agent, retrieve the percentage split between inquiries related to order status and those related to registering a complaint. 3. [CDR X Conversational details report](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/conv_cdr): Use **complex queries** to combine **Call Details Report** (CDR) and **conversational data** and create custom reports. From this report, you can: - Retrieve the average handling time for calls in the Hindi language. - Compare the average handling times of calls for use case A versus use case B in the voice agent. Further articles provide detailed explanations of these use cases. ----- ## 2. Usage of voice agent reports Below are some instances that can be obtained from the voice agent reports: | Use-cases | Insights | | -------- | -------- | | **Customer service management** | Custom fields can be used to track customer details and gather insights into the types of queries being asked. For example, a customer service agent for a telecommunications company could use custom fields to track the types of service issues being reported by customers in different regions, allowing the company to identify patterns and address recurring problems.| | **Sales and marketing** |Custom fields can be used to track customer preferences and interests, allowing sales and marketing teams to tailor their messaging and offers. For example, an e-commerce company could use custom fields to track the types of products customers are interested in and target them with personalized promotions | | **Education and training** | Custom fields can be used to track student progress and gather insights into areas where additional support may be needed. For example, an educational counseling agent could use custom fields to track the types of questions being asked by students in different age groups, allowing counselors to identify areas where additional resources may be needed.| | **Healthcare** | Custom fields can be used to track patient information and gather insights into health trends. For example, a healthcare agent could use custom fields to track patient symptoms and conditions, allowing healthcare providers to identify patterns and provide more effective treatment.| | **Financial services** | Custom fields can be used to track customer financial information and gather insights into spending habits. For example, a banking agent could use custom fields to track customer spending by category, allowing the bank to identify areas where customers may benefit from additional financial products or services.| | **Travel and hospitality** | Custom fields can be used to track customer preferences and gather insights into travel trends. For example, a travel booking agent could use custom fields to track the types of destinations and travel experiences customers are interested in, allowing travel companies to tailor their offerings to meet customer needs. | | **Identifying customer trends** | CDR reports can provide insights into customer behavior, including the types of calls received, the most common reasons for calling, and the most frequent customer complaints. This information can be used to improve customer experience and drive business growth. For example, a marketing team may use CDR reports to identify common customer pain points and develop targeted campaigns to address them. | |**Evaluating call quality**|CDR reports can provide insights into the quality of calls, including call duration, call wait time, and call drop rate. A business may use this data to identify trends and areas for improvement. For example, a call center may use CDR reports to identify common issues that cause calls to be dropped and take steps to address them.| |**Analyzing call volume**| CDR reports can help businesses track call volume, including the number of calls received, missed, answered, and abandoned. For example, a customer service team may use CDR reports to analyze their call volume and determine the busiest times of day.| |**Call Duration Analysis** | Businesses can use CDR reports to analyze the average call duration. This can help identify if customers are spending too much time on call or answering multiple questions posed by that voice agent without completly understanding the intent. | |**Measuring chat agent performance** | With CDR reports, businesses can track how well their chat agent is performing. They can see metrics such as the response time, resolution rate, and error rate, which can help them identify areas for improvement and optimize their chat agent for better customer service.| |**Assessing chat agent ROI** | By tracking the number of conversations and the time spent on each conversation, businesses can calculate the ROI of their chat agent investment. They can also track how many leads or sales were generated as a result of chat agent conversations.| |**Monitoring compliance** | Businesses in regulated industries, such as finance or healthcare, can use CDR reports to monitor compliance with industry regulations. They can track the conversations and ensure that their chat agent is providing accurate and compliant information to customers.| --- ## Access voice variables within a flow in Automation ## 1. Types of voice variables **Voice agent variables** are similar to regular [variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables), with the only difference being the way they are acquired. There are two types of voice variables that can be utilized in the process of building a flow in studio: 1. **Bot variables**: These variables are automatically available to the agent at the beginning of the voice call. 2. **CDR variables**: These variables are obtained once the call is terminated and are the [CDR values](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/cdr) that are created for reporting purposes. ----- ## 2. Access voice variable values To work with [conversational details reports](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/convdata) or [call and conversational details reports](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/conv_cdr), you may require access to voice variables (default and CDR). To push the necessary values into the database node and tables, you must create variables. Follow the steps below: 1. Open the variables tab and add a variable by selecting *Global variable*. ![](https://imgur.com/upynVU2.png) 2. Add a custom variable **name** and select the variable **data type** (usually a string). Add the **value** (you can only use the variables given in the section below) and click **Add**. ![](https://imgur.com/4q14zza.png) > To learn more about variables, visit [this](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables) page. ---- ### Variables related for ongoing calls Once the call is initiated, these voice agent variables (global variables) are accessible throughout the flows in the voice agent. To retrieve these variables, use the following format: | Format | Datatype| Description| | -------- | -------- | -------- | |`{{{data.call_sid}}}` | String | A unique identifier assigned to each voice call | | `{{{data.recording_url}}}` | String | The downloadable URL of the ongoing call | | `{{{data.from}}}` |String| The phone number the call was made from| | `{{{data.to}}}` | String| The phone number the voice agent called | | `{{{data.direction}}}` |String | Inbound or outbound call| | `{{{data.detected_language}}}` | String | The language of the conversation that was identified (only present when auto-detect option is enabled)| ---- ### Variables related for disconnected calls Additional details are only obtained after the [callback event](https://docs.yellow.ai/docs/cookbooks/voice-as-channel/reporting/conv_cdr#step-2-create-a-callbackstatus-event) is triggered, which can be retrieved by creating a new flow that executes after the call ends. To retrieve these details, use the following format: | Format | Datatype| Description| | -------- | -------- | -------- | |`{{variables.EVENT_DATA.duration}}` |String| The total duration of the call, including ring time, agent transfer, etc.| | `{{variables.EVENT_DATA.voice_bot_duration}}`| String| The duration for which the voice agent was speaking| | `{{variables.EVENT_DATA.voice_bot_bill_duration}}` |String| The duration considered for billing purposes| | `{{variables.EVENT_DATA.disconnected_by}}`|String| The entity responsible for disconnecting the call (either Bot or User)| | `{{variables.EVENT_DATA.status}}` | String| The call status (answered, not answered, or failed) | --- ## Streamline customer support by connecting voice agent to live agent Businesses can set up customer support process to transfer a customer's interaction from yellow.ai's voice agent to a human agent. This can typically by used when the voice agent cannot resolve the customer's issue, or when the customer requests to speak to a human. In this article, you will learn how to configure your voice agent to transfer the voice call to a support agent. ## 1. Overview of call transfer to an agent On the Yellow platform, to transfer a user's call to a human agent, the platform makes a call to the agent, who subsequently answers the call. The platform then connects the end user's call to the agent, allowing the user to speak directly with the human agent. ![](https://imgur.com/5AW5VFf.png) #### Scenarios for voice agent transfer to an agent There are various situations in which transferring a call to a human agent becomes necessary. The Yellow.ai platform offers a dedicated flow that can be configured for seamless call transfers. Here are two common scenarios: 1. **Fallback limit reached**: This flow is utilized when the voice agent repeatedly fails to comprehend the user's query or when the user's query goes beyond the scope of the agent's predefined intents. 2. **User intent for human agent**: This flow is activated when the user explicitly expresses the need to speak with a human agent, as indicated by an identified intent in their response. ---------- ## 2. Set up call transfer to an agent Follow the steps below to create a workflow to transfer a voice call to an agent: ### Step 1: Set up live agents To configure live agents for your voice agent on Yellow.ai, you need to establish a connection between Yellow.ai and a third-party live agent support platform such as Genesys PureCloud Live Agent or Freshchat. Follow the steps below: 1. Sign up with the [third-party live chat platform](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/overview#6-live-chat ) and set up your live agent team, who will be available to receive calls. 2. Obtain the necessary credentials from the third-party platform. These credentials will be used to connect Yellow.ai to the live agent integration. 3. Refer to the [integration articles](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/overview#6-live-chat) for the specific instructions on how to connect the chosen live chat support application with Yellow.ai. 4. Once the configuration and connection to the third-party tool are completed, during an ongoing voice agent call when agent transfer is required, Yellow.ai will send a request to the third-party tool to establish a connection between the voice agent customer and the live agents. ---- ### Step 2: Design flows to transfer calls To streamline customer support for your voice agents, you can incorporate flows from the above mentioned [scenarios](#scenarios-for-voice-agent-transfer-to-an-agent). #### 1. Flow to transfer a call to an agent when the fallback limit exceeds When the voice agent repeatedly fails to understand the user's input or when the conversation goes beyond the agent's capabilities, it's considered a fallback scenario. To handle this, you can set the fallback flow to execute the **transfer to agent** flow or set up a **node** to forward the call to an agent. 1. Identify the voice input node where the agent transfer should occur. For example, if the voice input node (e.g., phone number) repeatedly triggers fallback scenarios, the agent can automatically transfer the call to a live agent. 2. Connect the node's **fallback for failure** and **fallback for no response** to the agent transfer. 3. Establish connection through another voice input or prompt node: If you choose the voice input node, you can simply enter a message in the **Bot asks** field, which will be played before the call transfer. Use the **make prompts smarter** icon to configure the [forwarding details](#step-3-add-call-forwarding-details). ![](https://imgur.com/PaCGx9r.png) (or) 3. Use an execute flow node to connect to an agent: This can be combined with the second scenario where an intent triggers the *Chat with agent flow. In this case, create a new flow called *Chat with agent* and add a prompt node. Enter a message in the **Bot asks** field to be played before the call transfer. Use the **make prompts smarter** icon to configure the [forwarding details](#step-3-add-call-forwarding-details). **Main flow**: ![](https://imgur.com/KBtYRxl.png) **Chat with agent flow**: ![](https://imgur.com/bZAq7JC.png) ![](https://imgur.com/O14Ny9n.png) 4. When a fallback is encountered, the call will automatically be transferred to a live agent. --- #### 2. Flow to transfer a call to an agent when the user requests for it This flow is activated when the user explicitly expresses the need to speak with a human agent. You can set specific intents or keywords that indicate the customer's desire to speak with a human agent. 1. Create an [intent](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents) called `chat with agent` with relevant utterances indicating the customer's desire to speak with a human agent. > The utterances can include phrases such as "you are not able to understand me, I need someone else," "I want to talk to the manager," "connect me to someone," or "I can't understand, I want to talk to your executive." 2. Set up a [new flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#configure-start-trigger) with the start trigger configured as the intent `chat with agent`. ![](https://imgur.com/7FLufuj.png) 3. In the flow design, add nodes as needed and end the flow with a prompt node. Enter a message in the **Bot asks** field, which will be played before the call transfer. Click **make prompts smarter** icon and configure the [forwarding details](#step-3-add-call-forwarding-details). ![](https://imgur.com/DEwKpvq.png) ---- ### Step 3: Add call forwarding details To configure call forwarding options at the [node level](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes#32-configure-node-for-a-voice-bot) for each node, follow the steps below: > **Prerequisite**: Inside the dedicated `Chat with agent` flow, add a question/voice input/speak node to trigger the call transfer to an agent. Configure the message that the agent will play before transferring the call. 1. Click on the **make prompts smarter** icon, select **Voice**. 2. Enable **Forward call**. ![](https://imgur.com/r7nr0eB.png) 3. Enter the forwarding details: |Field Name| Description | | -------- | -------- | |Forward call| Enable this to forward the call at the specific node.| |Number to forward or SIP extension| Either define the **number to forward** or **SIP extension** of the contact center or live agent.| |Caller ID number for Agent screen(Caller line identity) | You can define the caller ID to be shown on the agent screen. If left empty, the voice agent number will be displayed on the agent screen as it is making the call to the agent. If supported, the end-user number can also be shown on the agent screen.| |Sending Contextual Meta Data to Agent (Custom SIP headers) | Transfer contextual information such as the user's name, age, and query to the agent so that they are aware of these details before the call is connected.| **Sample agent screens with the forwarding details**: ![](https://imgur.com/9yotcfx.png) > You can configure recording options after the call transfer on the [tools section](https://docs.yellow.ai/docs/platform_concepts/studio/tools#recording-related-voice-settings). --- ## Call recording Depending on the different use-cases and different kind of compliances that comes along with the industry regulations, we have designed a recording management feature that allows user to pause, resume or stop call recording during the conversation. :::note By default, the call recording feature is enabled to record the conversation. ::: ## 1. Configure call recording By default, call recording is turned on by default for all the voice agents. In case, you want to pause it for some recording sensitive conversation like OTP or ID number, you will have to configure the recording action on the [node level options](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes#32-configure-node-for-a-voice-bot). **To pause recording** 1. Set the recording action to *pause* on that specific step. 2. Set the recording action back to *resume* on the very next step following the sensitive step/s. :::info 1. Once you stop the recording for a call at any step, it can’t be resumed again. 2. You can also configure the recording behaviour in case the conversation is transferred to an Agent. Set the required recording action on the [global options](https://docs.yellow.ai/docs/platform_concepts/studio/tools#25-voice). Setting it to True will record the conversation with the agent and vice-versa. 3. Recording action can only be set for the specific turn. If you set it to pause, all three, options below are not captured for the turn: - Question asked by agent. - Response from the user. - The processing duration. ::: ## 2. Implement call recording **Use case** - Pausing the recording while the user provides the Aadhar number to the agent. - On the question node where the agent asks the user to provide the Aadhar details, the agent developer can set the recording action to *pause*. - On the next node, where the agent follows up with another question (non-recording sensitive), *resume* the recording action. --- ## DTMF Dual-tone multi-frequency (DTMF) is used for touch tones, it is the sound made when pressing a number key. For cases, where we expect background noise and difficulty in correctly identifying the user utterance for numeric inputs, we can use this feature to record user responses. ## 1. Configure DTMF for agents To configure DTMF, you can use the below-mentioned node level options: 1. Capture DTMF and Configure DTMF Digits Length. (OR) 2. Configure DTMF Finish Character and Capture voice with DTMF input. | Fields | Description | | ----------------------------- | ----------- | | **Capture DTMF** | Enable this option if the DTMF is to be collected on the specific node. | | **Capture voice with DTMF input** | With this enabled, the agent will be able to capture both voice and DTMF for the same question. Example - What is your mobile number? Note - Bot will only capture the one which comes first from the user be it speech response or DTMF response. | | **DTMF digital length** | Enter the length of characters to be captured. Ex: For an Indian phone number, it is 10. | | **DTMF finish character** | Character which defines when the agent must stop capturing. Supported finish characters - "*" and "#" | :::info > Either DTMF digital length or DTMF finish character can be configured. DTMF digit length, DTMF finish character and DTMF timeout are 3 ways in which the agent understands when to stop capturing: 1. Digit Length is useful when you are capturing fixed-length data. Ex: Phone number. 2. Finish character is useful when you don't know the length and that could vary depending upon different states/products. Ex: Model id, application number. A user can define either "*" or "#" to inform that all Digits are added. 3. DTMF timeout is a default inactivity timeout (not open for configuration) and it is set to 10 seconds by default (it overrides **digit length** and **finish character**). For example, if the length is 11 and the user has only entered 6 characters, and there are 10 seconds of inactivity, only those will be captured. ::: ## 2. Use-cases DTMF can be used in following ways while building a voice agent: 1. Business requirements specifically know when and where to collect DTMF input as part of the conversation - via. number capture. The components which can be used to build such a flow are Question/Text node and DTMF Node Level Options. Example: Question/Text node + Call forward. > If the agent wants to collect numeric input for a mobile number or application number. As a part of agent logic agent can also collect this information via DTMF (saying “Please input your 7-digit application number to proceed ahead.”) along with a voice response from the user. 2. As a fallback mechanism agent allow the user to enter numeric response using DTMF. Also, if the agent is not able to correctly understand due to background noise, the input can be DTMF oriented. The components which can be used to build such a flow are [separate flows](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys) + DTMF Node Level Options. > One more use case could be where the voice agent for some reason isn’t able to understand the user’s numeric response/query and hence we can have a dedicated flow as a fallback option where we let the user enter a numeric option using DTMF too. --- ## Understand Context-Aware Interruption Handling in voice bots (Available in Private-Beta) Voice is a full duplex channel, i.e. even when the agent is speaking something, if the user has some clarification or doubts, they expect the agent to listen and answer those queries first. From a user behavior perspective, this is equivalent to a customer interrupting a Human-agent while the agent is speaking something on a call. Our new design approach for the feature is influenced by the way humans process interruptions over call. Likewise, humans are smarter to listen to interruptions, judging the validity of all the interruptions in parallel and only stopping when a valid (intended) interruption is observed. In case an invalid interruption is observed, the agent will automatically ignore that and be on track with the ongoing conversation. Detailed conversational flow is demonstrated below for both valid and invalid interruptions. To ensure that only relevant inputs from the callers are respected as Interruptions, the Voice Bot can now be configured to define what constitutes a Valid interruption: 1. **Positive case**: With the new feature of interruption, the agent will only stop speaking (moving away from the current conversation) when it’s a valid interruption (that is acceptable in the context of the conversation). **![](https://lh5.googleusercontent.com/3tl6o_3FlCe8bcyp-OAvwf-c5wQ5SVN4JKBVXXSbatfrZ4P5yT07FsonlVFDxBySpqJhH4-BUi-uChd6X9LZowvrgdcYMa_1jHVWhqcQonPgu1fmvJq0s84z4KHLBBfd1D0Y3oQIjiwWIcPRo4t6CiI)** 2. **Negative case** : If there is a background conversation (unrelated to the current context of agent conversation) that gets picked up by the agent, it will be treated as an invalid interruption and the flow will not be broken (the interruption will be ignored). **![](https://lh5.googleusercontent.com/VEtSe9A-IEX5ca7Wi1I4YNlOnFa3yz7Mh22hPCE7YvEKU2qUkoZiZJS9zi-3apb_OIHISoYOUZxYQmSMdpjeIMPXbWmVD6b0xSqmHc0T9TH4DQoNDloleTPAORsEXKGflcHB-Ee1ICKeJuJCkHyKi9Y)** **Voice Options (to be used)**: 1. Set the below options to interject ``` interject = true; interject_early : true (optional) ``` 2. Dynamically set the below option for a posted utterance to respond or ignore: ```interjection_response: "no_action"; (OR "take_action")``` :::note 1. This new feature is under private beta only and will only be enabled (on the agent) after evaluation of a valid use-case requirement. 2. Currently the platform doesn’t evaluate the validity of the interruption but instead needs to be handled via agent logic (ex - if entity = language then next node, else ignore) 3. Only 1 user interruption will be respected per node to start with under private beta. ::: --- ## Understand language detection in voice agents You can now interact with the agent in multiple languages without the need to manually select the language each time you use it. The agent will automatically recognize the language you are speaking and respond accordingly. The success of an automated Voice conversation depends heavily on the correct transcription of the caller’s speech inputs to text with the help of third-party speech-to-text services. With Language detection, each step can now be configured with a set of languages (as opposed to a single language limitation in earlier implementation). In addition to the ability to accept multiple languages, Language detection also detects the language being spoken on the call and sends this information back to the Bot for relevant actions (like changing the language of the conversation from English to Hindi). For Example: * **Bot question**: “Welcome to Yellow Bank. How can I help you today” * **User input configuration**: Expected Language = English, Hindi, Gujarati * **User says**: “मेरे खाते का बैलेंस कितना है? (What is my Account Balance?)” * **Bot question**: “क्या आप मुझे अपना 12 अंकों का अकाउंट नंबर बता सकते हैं” (Can you please share your 12 digit account number with me?) **How to utilize this feature?** This feature is part of the new voice 2.0 architecture. To utilize this, while passing the *STTlanguage parameter* (voice options), pass all the expected STT language codes comma separated. For example, if you are at a phone number node, pass the node level option of STT_language as “en-IN,hi-IN” to enable auto-capture in both English and Hindi for that specific node only. > The switching of agent language needs to be part of agent logic. This is not a direct platform feature in v1. **Usage recommendations** Language detection is an additional processing overhead for the STT engine and hence should be used at selected steps. Using this across all the steps will probably result in higher conversational latency. From our internal testing, the additional latency is directly proportional to the number of languages added for detection. --- ## STT (Speech to Text) Coming soon! --- ## Understand how a call gets transfered to customer support agents Coming soon! --- ## TTS (Text to Speech) Coming soon! --- ## Wait music for APIs Without **Wait Music**, the silence on the call while executing APIs results in a sub-optimal conversational experience. To improve the conversation, wait music can be added in the API node settings. ![](https://i.imgur.com/eCsR3Cy.jpg) When the wait music is configured for high latency API calls, it allows voice bot developers to play music on the call while waiting for the API response. After the API call is completed, the wait music is stopped and the further steps (nodes) are executed. You can configure the wait music in the [API node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/api-node) where bot developers can upload a public URL or upload a music file. > **Supported formats for wait music files**: .mp3 and .wav. :::note - Wait music option on API nodes work only for voice agents. - This feature is an add-on hence nothing changes on the LIVE agents. Though, the team recommends implementing wait music if the latency of some APIs is high for a better user experience. - Ensure that the **Wait Music Length** (duration) is greater than the timeout configured for the API for a better experience to avoid unseen race condition scenarios. ::: --- ## Voice AI agent **Why use yellow.ai's cloud platform to build your first AI-voice agent?** | What we provide? | What you can do? | | -------- | -------- | | **Harness advanced AI** | Leverage cutting-edge technologies like natural language processing and machine learning to provide intelligent and engaging customer experiences that set you apart. | | **Automate human-like interactions** | Free up resources by automating repetitive tasks, such as FAQs and basic troubleshooting, allowing your team to focus on delivering exceptional service and driving growth.| |**Scale efficiently** | Handle high volumes of customer inquiries without the need for additional agents, saving time and costs while maintaining efficient support operations.| | **24/7 availability** | Be there for your customers anytime, anywhere with round-the-clock support, building loyalty and trust by providing instant assistance whenever it's needed. | | **Personalize experiences** | Capture customer data and tailor interactions, offering targeted suggestions, promotions, and support that create personalized experiences and foster long-lasting relationships.| | **Data-driven insights** | Gain valuable insights from customer interactions, uncover trends, and optimize processes to make informed decisions and enhance your customer service strategies.| | **Easy integration** | Experience a seamless integration process with Yellow.ai's user-friendly platform, getting you up and running quickly with their intuitive agent development and deployment tools.| :::info :unlock: : **[Sign up today](https://cloud.yellow.ai/auth/login)** to integrate your business with Yellow.ai's voice agent and elevate your business to new heights. ::: ## Configure Oracle responsys on Yellow.ai 1. [Sign up](https://docs.yellow.ai/docs/platform_concepts/get_started/account-setup#2-signup-to-yellowai) on cloud.yellow.ai and [create a bot](https://docs.yellow.ai/docs/platform_concepts/get_started/account-setup#21-to-create-a-bot-from-scratch). 2. Enter your Oracle account name in the **Give account name** field and click **Connect**. ![](https://i.imgur.com/gs26dAS.png) 3. Copy the **API key**. ![](https://i.imgur.com/1j1SZJN.png) 4. Go to **Access control** > **API keys** > **Generate new API key** ![](https://i.imgur.com/i6CTTDI.png) 5. Fill the fields and click **Save**. 6. Copy the API key. ![](https://i.imgur.com/w4hYZkU.png) 7. Configure WABA number for this bot by following steps mentioned [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/whatsapp-configuration#connect-your-whatsapp-business-account). 8. Set up Whatsapp templates by following steps mentioned [here](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/templates/whatsapptemplate). ## Install Yellow.ai app on Oracle 1. Go to your Oracle account and go to **Account** > **App management** > **Oracle Marektplace**. ![](https://i.imgur.com/fQbYLqM.png) 2. Search for Yellow and click **Get App**. 3. Click **Install** in the following pop-up. ![](https://i.imgur.com/GTmmhsu.png) 4. Fill in the fields and click **Save** and **Proceed**. * **Template API key:** Copy paste this from Access coontrol (step 4,5,6 from the previous section) * **GIF API Key:** Copy paste the API key from the Inetgration card (step 1,2 and 3 from the previous section) ![](https://i.imgur.com/0BZ807X.png) 5. You will be redirected to your Oracle Responsys account. ![](https://i.imgur.com/YsYDNh4.png) 6. Go to **Account Management** > **App Management** , search for **Yellow Whatsapp Campaign for Oracle Responsys** to locate the app. If you haven't provided the API keys in the previous section, you can click the edit button and configure them here. ![](https://i.imgur.com/f4mzCKe.jpg) ## Configure Whatsapp campaigns on Oracle Responsys ### Step 1: Create a program 1. Go to **Program** and click **Create program**. ![](https://i.imgur.com/7hdcgSq.png) 2. In the following pop-up, fill in the following fields: ![](https://i.imgur.com/9YgummI.png) * In **Name**, enter a name for your project. * In **Folder**, choose a folder for your project. * In **List**, select a list. * In **Description**, describe your project and click **Create**. ### Step 2: Create a profile list Users can create a profile list encompassing all customers, serving as a customer database to define and customize all data requirements. To send customized campaign messages to users, the data added her will be utilized 1. Go to **Data** > **Profile Lists**. ![](https://i.imgur.com/Ls9yOYZ.png) 2. Click **Create New List**. 3. Enter a unique name, select the containing folder, and provide a description if required. ![](https://i.imgur.com/BQHSiJQ.png) 5. Click **Save**. 6. To add custom fields, go to **List Information** > **Change Schema**. ![](https://i.imgur.com/zipWVs0.png) 7. Click **Add new field** to add new custom fields and click **Save**. ![](https://i.imgur.com/CbtiDhL.png) 8. To add a new record to this profile list, go to **List Information** > **View Records** > **New Record**. ![](https://i.imgur.com/ybtUpul.png) :::warning * Mobile number and Opt-in fields should be mandatorily added for the campaign to work. ![](https://i.imgur.com/JVaR7kZ.png) * Additionally, you have the option to import CSV data and populate the profile list. For more information, please click [here](https://docs.oracle.com/en/cloud/saas/marketing/responsys-user/Connect_WizardUpload.htm). ::: ### Step 3: Create filter You can create a filter within a profile list, that lets you target customers based on specific characteristics. 1. Go to **Audience** > **Filters**. ![](https://i.imgur.com/LDsGQME.png) 2. Click **Create Filter** and select the **Profile List** for which you want he filter to be applied. 3. Select a list from **List Type** and a filter from **Filter Type** and click **Done**. 4. In the following screen, drag and drop the fields to set conditions. ![](https://i.imgur.com/GID9zSP.png) 5. Click **Save** and fill in the fields to save the filter. 6. Click **Get actual count** to get the total number of records in that filter. ![](https://i.imgur.com/Osklrb3.png) ### Step 4: Use Yellow.ai inside Oracle Responsys 1. Go to **Program** and click the program created in Step 1. ![](https://i.imgur.com/mT9TecT.png) 2. Drag and drop **Scheduled filter or view** on the board. Then, click the node and select the audience and time for running this campaign. > You can also use another entry point for your campaign, **Customer Activated**, executed when a new customer record is created in the program's profile list. Click [here](https://docs.oracle.com/en/cloud/saas/marketing/responsys-user/Programs_Overview.htm) to learn more about it. ![](https://i.imgur.com/BuW5Bf8.png) 3. Drag and drop **Apps** and click it. ![](https://i.imgur.com/GTBPsd1.png) 4. Choose the Yellow App and click **Done**. ![](https://i.imgur.com/IVEquE8.png) 5. Click **Configure App** in the following pop-up. ![](https://i.imgur.com/KGde5Qn.png) 6. Fill in the following fields: ![](https://i.imgur.com/tUE5flh.png) * In **Registered WABA Numbers**, choose the WABA number from which the campaign should be sent. * In **To Number**, select the field which contains the data to which the campaign should be sent. Always ensure that the **To** number field is mapped to a designated field that will store your customers' phone numbers in the records. * In **Template Name**, select the template that should be used for the campiagn. * Based on the chosen template, map dynamic parameters to the relevant fields in the profile list records. The **To Number** and **Parameter** drop-down menus will display the fields specified during program creation. ![](https://i.imgur.com/fFWQmzj.png) 7. Click **Save**. 8. To verify the campaign, validate and save the program and then click **Publish** to make it available for your end users. ![](https://i.imgur.com/cc5aeuH.png) **Sample Whatsapp campaign:** ![](https://i.imgur.com/nR7yo6n.jpg) --- ## MS Outlook Calendar Yellow.ai integrates with MS Outlook Calendar to make it easy for you to manage your schedule. With this integration, you can create, reschedule, retrieve, and cancel online meetings and events. You can also see when others are free or busy and suggest times that work best for everyone. Lastly, you can attach files to events for easy organization. ## 1. Connect MS Outlook with Yellow.ai Yellow.ai integrates with the Outlook calendar using the OAuth 2.0 authentication. During integration, Yellow.ai guides you to login page of the Microsoft Identity provider, where you must log in to their work account and provide consent to access their calendar data. Follow the below- mentioned steps to connect your MS Outlook account with your yellow.ai bot. ### 1.1 Register an app on Azure Active Directory 1. Go to portal.azure.com > **Active Directory** > **App Registrations**. ![](https://i.imgur.com/Oi2mf5O.png) 2. Click **New Registration** and provide the details for the new app. ![](https://i.imgur.com/bF6XPpu.png) 3. To get the Redirect URI details, retrieve the redirect URL from the Outlook Calendar integration card in the Yellow.ai platform integration module. For example, `https://cloud.yellow.ai/integrations/genericIntegration/oauth/outlook-calendar`. ![](https://i.imgur.com/1i0Z6MV.png) 4. Navigate to **Certificates & Secrets** > **New client secret** > Fill the description & select **Expires** to your convenience (recommended 6 months), click **Add** button, a **Client Secret** will be generated, save the value of the Client Secret. ![](https://i.imgur.com/vpA762g.png) 5. Under **API Permissions** > **Add a permission** -> **Select Microsoft Graph** -> **Delegated permission** -> search and add the required permissions. ![](https://i.imgur.com/ctnoNzO.png) **Permission scopes of Outlook Calendar:** | Scope | Description | |------------------------------|-----------------------------------------------------------------------------------------------------------------------| | Calendars.ReadWrite | The app can create, read, update, and delete events in the user's calendars with the user's permission. | | Calendars.ReadWrite.Shared | The application can perform operations such as creating, reading, updating, and deleting events in all calendars of the organization that the user has access to, including delegate and shared calendars. | ### 1.3 Enable MS Outlook on Yellow.ai 1. Go to cloud.yellow.ai > **Integrations**. ![](https://i.imgur.com/P1HQiDR.png) 2. Search for **Outlook calendar** and enter the obtained **Tenant ID**, **Client ID** and **Client Secret** from the Azure portal in the integration card and click **Connect**. ![](https://i.imgur.com/WRvwNX2.png) You'll need to log in to your Microsoft work account and give the app permission to access your calendar data. 3. If you have multiple accounts, follow the above mentioned steps to add each of them. :::note 1. Enter a unique name for each account to easily identify them within the yellow.ai platform. It is recommended to use a name that aligns with its purpose for better usability. 2. You can add a maximum of 15 accounts. 3. In a two-tier environment, such as bots with only Development/Live environments, you can add account names only in the development mode. Once added and flows have been built, in the Live mode, you can only choose the account names and not edit them. 4. In a three-tier environment, such as bots with Staging/Sandbox/Production modes, in Staging and Sandbox modes, you can add and edit new accounts. However, in Production, only the account details added in Staging will be available. You can only map in the production environment. ::: ## 2. Use-cases This integration currently supports the following use-cases: :::note When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. ::: ### 2.1 Create calendar event This actions allows you to create online events in your default calendar, specifying the date, time, and time zone. Invitations are automatically sent to attendees' Outlook inboxes. Recurring events can also be set up. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Datatype | Remarks | |----------------|----------------------------------------------------------------------------|-------------|---------------------------------------------------------------------------| | Start time | `{"dateTime":"2023-04-11T09:00:00.000","timeZone":"India Standard Time"}` | Object Type | The start date, time, and time zone of the event. | | End time | `{"dateTime":"2023-04-11T10:00:00.000","timeZone":"India standard Time"}` | Object Type | The date, time, and time zone when the event concludes. | | Can invitees propose a new time? | True | bool | The meeting organizer has enabled the option for invitees to suggest an alternative time while responding. | | Attendee details | `[{"emailAddress":{"address":"samanthab@contoso.onmicrosoft.com","name":"Pradeep"},"type":"required"}]` | Array | The list of people attending the event. | | Meeting description | `{"contentType":"HTML","content":"Scrum"}` | Object Type | Meeting agenda | | Importance of the event | High | String | The priority of the event, the possible values are: low, normal, high. | | Recurrence | `{"pattern":{"type":"daily","interval":3},"range":{"type":"endDate","startDate":"2023-04-11"}}` | Object Type | The pattern of how often the event will occur. | | Meeting title | Scrum | String | A brief summary that identifies the purpose of the meeting. | **Sample response:** ``` { "id":"AAMkAGI1AAAt9AHjAAA=", "createdDateTime":"2017-04-15T03:00:50.7579581Z", "onlineMeetingUrl":null, "isOnlineMeeting":true, "body":{ "contentType":"html", "content":"Does late morning work for you?" }, "start":{ "dateTime":"2017-04-15T11:00:00.0000000", "timeZone":"Pacific Standard Time" }, "end":{ "dateTime":"2017-04-15T12:00:00.0000000", "timeZone":"Pacific Standard Time" }, "recurrence":null, "attendees":[ { "type":"required", "status":{ "response":"none", "time":"0001-01-01T00:00:00Z" }, "emailAddress":{ "name":"Samantha Booth", "address":"samanthab@contoso.onmicrosoft.com" } } ], "organizer":{ "emailAddress":{ "name":"Dana Swope", "address":"danas@contoso.onmicrosoft.com" } } }, "onlineMeeting": { "joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_MDJmZWY5NTUtY2YxNy00NTJjLTllMWMtNGUxOGM0MWE5ZTEy%40thread.v2" } ``` ### 2.2 Get calendar events The Get Calendar Events function returns a list of events from the your default calendar based on the defined start and end date time, including both single instance and recurring meetings. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Data Type | Remarks | |--------------------|-----------------------------|-----------|---------------------------------------------------------------------| | Start date time | 2023-04-11T12:00:00.000 | String | The start date, time, and time zone of the event. | | End date time | 2023-04-12T12:00:00.000 | String | The date, time, and time zone when the event concludes. | | Response time zone | India standard time | String | Returns the event’s start time and end time in the specified time zone. | **Sample Response:** ``` { "value": [ { "id": "AWtBH7_RLmY0nAoX3PzBwCh69yUb7hwSIjZoGosUcSzAAAAAAENAACh69yUb7hwSIjZoGosUcSzAAATuTBzAAA=", "subject": "Hangouts", "isCancelled": false, "type": "singleInstance", "allowNewTimeProposals": true, "recurrence": null, "start": { "dateTime": "2023-04-15T05:30:00.0000000", "timeZone": "UTC" }, "end": { "dateTime": "2023-04-15T06:30:00.0000000", "timeZone": "UTC" }, "attendees": [ { "type": "required", "status": { "response": "none", "time": "0001-01-01T00:00:00Z" }, "emailAddress": { "name": "Samantha Gupta", "address": "samanthab@contoso.onmicrosoft.com" } } ], "onlineMeeting": { "joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_NzI1ZWNkMTQtYjM0OS00MzViLWE5ZmYtMDA2NTA4NGViMDZh%40thread.v2/0?context=%7b%22Tid%22%3a%" } } ``` ### 2.3 Recommend meeting slots This option allows you to set parameters such as date, time, and attendees for a meeting. It takes into consideration everyone's schedules and suggests appropriate times for the meeting. If it can't suggest any times, it will let you know why, such as if the organizer or a required attendee is unavailable. You can use this information to adjust your parameters and try again. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Data Type | Remarks | |--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Time constraints | `{"timeslots":[{"end":{"dateTime":"2023-04-11T12:30:20.2020","timeZone":"India Standard Time"},"start":{"dateTime":"2023-04-11T09:00:00.000","timeZone":"India Standard Time"}},null]}` | Object | You can set restrictions on a meeting's timing and nature by specifying the activity domain and available time slots. | | Attendee details | `[{"emailAddress":{"address":"samanthab@contoso.onmicrosoft.com","name":"Samantha"}}]` | Array | Details of the people who will attend or be involved in the meeting. | | Length of the meeting in minutes | `60` | String | The length of the meeting | | Response time zone | `India standard time` | String | This provides the event's start and end times in the designated time zone. | **Sample Response** ``` { "@odata.context":"https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.meetingTimeSuggestionsResult", "emptySuggestionsReason":"", "meetingTimeSuggestions":[ { "confidence":100.0, "organizerAvailability":"free", "suggestionReason":"Suggested because it is one of the nearest times when all attendees are available.", "meetingTimeSlot":{ "start":{ "dateTime":"2017-04-21T14:00:00.0000000", "timeZone":"Pacific Standard Time" }, "end":{ "dateTime":"2017-04-21T16:00:00.0000000", "timeZone":"Pacific Standard Time" } }, "attendeeAvailability":[ { "availability":"free", "attendee":{ "type":"required", "emailAddress":{ "address":"samanthab@contoso.onmicrosoft.com" } } } ], } ] } ``` ### 2.4 Update an event This action allows you to change the details of an event that is already on your calendar. To do this, you need to provide the ID of the event and a new object with the updated information. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Datatype | Remarks | |----------------------|--------------------------------------------------------------------------------------------------------------------------|------------|------------------------------------------------------------------------------------------------------------| | Start time | `{"dateTime":"2023-04-11T09:00:00.000","timeZone":"India Standard Time"} ` | Object Type| Start date, time, and time zone of the event. | | End time | `{"dateTime":"2023-04-11T10:00:00.000","timeZone":"India standard Time"}` | Object Type| End date, time, and time zone for the event's end. | | Event ID | AAMkADA1ODMyOWE0LWNkZmUtNDJiYy1hNWI1LWE1NmQwY2RmNDhlOQBGAAAAAAAXtAWtBH7%2BRLmY0nAoX3PzBwCh69yUb7hwSIjZoGosUcSzAAAAAAENAACh69yUb7hwSIjZoGosUcSzAAAFJQ9WAAA%3D | String | Event ID | | Can invitees propose | True | bool | Option to propose a new time if the organizer allows it. | | a new time? | | | | | Attendee details | `[{"emailAddress":{"address":"samanthab@contoso.onmicrosoft.com","name":"Pradeep"},"type":"required"}] ` | Array | List of attendees for the event. | | Meeting description | `{"contentType":"HTML","content":"Scrum"} ` | Object Type| Message body associated with the event. | | Importance of event | High | String | Importance of the event (low, normal, or high). | | Recurrence | `{"pattern":{"type":"daily","interval":3},"range":{"type":"endDate","startDate":"2023-04-11"}}` | Object Type| Recurrence pattern for the event. | | Meeting title | Scrum | String | A brief summary of the meeting agenda. | **Sample Response:** ``` { "originalStartTimeZone": "originalStartTimeZone-value", "originalEndTimeZone": "originalEndTimeZone-value", "responseStatus": { "response": "", "time": "datetime-value" }, "recurrence": null, "reminderMinutesBeforeStart": 99, "isOnlineMeeting": true, "onlineMeetingProvider": "teamsForBusiness", "isReminderOn": true, "hideAttendees": false, "onlineMeeting": { "joinUrl": "https://teams.microsoft.com/l/meetup-join/19%3ameeting_NzIyNzhlMGEtM2YyZC00ZmY0LTlhNzUtZmZjNWFmZGNlNzE2%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%22bc55b173-cff6-457d-b7a1-64bda7d7581a%22%7d", "conferenceId": "177513992", "tollNumber": "+91 22 6241 6885" } } ``` ### 2.5 Add an attachment This action adds a file to an event, and the size of the file should be less than 3 MB. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Data Type | Remarks | | --- | --- | --- | --- | | File URL | https://image.crictracker.com/wp-content/uploads/2019/04/home.jpg | String | URL of the file being attached. | | Event ID | AAMkAGI1AAAt9AHjAAA= | String | Event ID. | | Name of the file | image.jpeg | String | Custom name (not necessarily the file name) to be displayed with the attachment icon. | **Sample Response** ``` { "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('6aoGosUcSzAAAAAAENAACh69yUb7hwSIjZoGosUcSzAAATuTBwAAA%3D')/attachments/$entity", "@odata.type": "#microsoft.graph.fileAttachment", "@odata.mediaContentType": "image/png", "id": "AAMkADA1ODMyOWE0LWNkZmUtNDJiYy1hNWI1LWE1NmQwY2RmNDhlOQBGAAAAAAAXtAWtBH7_RLmY0nAoX3PzBwCh69yUb7hwSIjZoGosUcSzAAAAAAENAACh69yUb7hwSIjZoGosUcSzAAATuTBwAAABEgAQAKfJP9iJETBGnLIDXGog7_Q=", "lastModifiedDateTime": "2023-03-30T06:05:51Z", "name": "mahi.png", "contentType": "image/png", "size": 78744, "contentBytes": "iVBORw0KGgoAAAANSUhEUgAAA7sAAAJKCAYAAADtI1L+AAAAAXNSR0IArs4c6QAAIABJREFUeF7snQf" } ``` ### 2.6 Cancel an event This action lets the meeting organizer cancel an event by sending a cancellation message, which moves the event to the Deleted Items folder. For recurring meetings, the organizer can also cancel a specific occurrence by providing the occurrence event ID. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Data type | Remarks | |-----------------------------|------------------------------|-----------|--------------------------| | Event ID | AAMkAGI1AAAt9AHjAAA= | String | Event ID. | | Send a cancellation message | Out of office | String | Sends a cancellation message. | ### 2.7 Get event details This action will provide information about a specific event, including its properties and relationships. The start and end times of the event will be in the time zone chosen by the user. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Data type | Remarks | | ------------------ | --------------------------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Event ID | AAMkADA1ODMyOWE0LWNkZmUtNDJiYy1hNWI1LWE1NmQwY2RmNDhlOQBGAAAAAAAXtAWtBH7%2BRLmY0nAoX3PzBwCh69yUb7hwSIjZoGosUcSzAAAAAAENAACh69yUb7hwSIjZoGosUcSzAAAFJQ9WAAA%3D | String | Unique identifier for the event | | Response time zone | India standard time | String | Provides the start and end time of the event adjusted to the time zone specified by the user. | ### 2.8 Get busy time slots This action shows a someone's scheduled events during a specific time period from their default calendar, indicating whether they are free or busy. If no events are scheduled, the user is assumed to be free during that time range. The table below has sample inputs, data types and remarks of the fields for this action. | Field Name | Sample Input | Datatype | Remarks | |--------------------|--------------------------------------------------------------------------------------------------|----------|-------------------------------------------------------------------------------------------------| | Email addresses | `["samanthab@contoso.onmicrosoft.com", "Rahul@contoso.onmicrosoft.com"] ` | Array | SMTP addresses of users to get availability information for. | | Start time | `{"dateTime":"2023-04-04T09:00:00.000","timeZone":"India Standard Time"}` | Object | The start date, time, and time zone of the event. | | End time | `{"dateTime":"2023-04-04T12:43:49.4949","timeZone":"India standard Time"}` | Object | The end date, time, and time zone of the event. | | View available interval | 40 | number | Duration of a time slot in the [availability View] of the response. | --- ## Integration overview The integration module lets you connect your AI Agent with third-party systems, enabling access to various functionalities within the Yellow.ai platform. These integrations act as bridges between your AI Agent and external platforms, facilitating smooth communication and data exchange. Whether streamlining processes, automating tasks, or enhancing customer experiences, integrations are crucial for maximizing the utility and impact of your AI agent. To make it easy to access and manage your integration accounts, they are conveniently organized into different categories. ![](https://i.imgur.com/FFrr52N.png) ## Integration process To integrate your application with our platform, follow these step-by-step instructions: ### Step 1: Gather integration details from your integration app 1. **Login to your integration application:** Access your application's dashboard or admin panel. 2. **Retrieve integration details:** Locate and collect all the necessary details required for integration, such as client ID, secret key, and domain URL. Refer to your application's documentation for more specific instructions on where to find these details. ### Step 2: Connect your integration account to yellow.ai platform You can connect your account only in development environment and not in live. For a three-tier environment, you can connect an account in Staging and Sandbox environment. Once the AI Agent is published, it will use the integrations if they are configured in the flows. 1. **Login to our [Cloud platform](https://cloud.yellow.ai)** with your credentials and switch to Development/Staging environment. 2. Navigate to **Extensions** > **Integration** and search for the integration app. ![](https://i.imgur.com/JagYT5w.png) 3. Proceed by entering the integration details collected in Step 1 to establish the connection with your account. ![](https://i.imgur.com/uZL82XT.png) 4. Click **Connect**. 5. Similarly, You can add more accounts by clicking the **+Add Account** button. You can connect up to 15 accounts per integration. ### Step 3: Configure Webhook URL Webhooks function as callback endpoints, sending updates to a specified URL whenever there's a change in the integration app. If you do not configure, the AI Agent won't receive these events, potentially disrupting the integration's operation. Once the connection is estabblished, follow these steps to configure the webhook URL: 1. Once the connection is established, a unique webhook URL will be generated for your account. Go to the connected app and **Copy Webhook URL**. ![](https://i.imgur.com/8AMXnhM.png) 2. **Paste the URL** into the relevant settings section of your integration app. This allows your integration app to send data to our platform seamlessly. ### Step 4: Enable integration events in your AI Agent This enables you to execute specific actions in response to events. For instance, you can display a message in the AI Agent conversation when a payment is successful or show order details when an order is placed. 1. In Development/Staging environment, go to **Automation** > **Event** > **Integrations**. 2. Find the event and click on the three dots icon, then select **Activate**. Events are named with the Integration app name, for instance, "InstaMojo Payment Status". ![](https://i.imgur.com/FtUTGsJ.png) ### Step 5: Trigger AI Agent flows with integration events You can configure your AI Agent to [trigger specific flows when an event occurs](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow). For instance, display a message when a payment is successful or show order details after an order is placed. 1. At the start of the flow, select *Events* and then choose the specific event that you want to use. 2. If there are multiple accounts connected, you will see the Account Name dropdown where you can choose a specific account that you want to use. ![](https://i.imgur.com/br6ofma.png) 3. Publish your AI Agent for your changes to reflect in the *Live* or *Production* environment. #### Step 5: Configure AI Agent to handle specific integration actions Once the integration is enabled, your AI Agent gains the ability to directly perform various actions within that specific integration account. These actions may include creating new records, updating existing records, and retrieving specific information. With this capability, you can configure your bot to handle these specific integration actions seamlessly. To perform a specifc integration action via AI Agent: 1. In Development/Staging environment, navigate to **Automation** > **Build** > Select the flow where you want to use an integration action. 2. Click **Add node** > **Integrations** > `{Integration Name}`. ![](https://i.imgur.com/lVzjJq5.png) 3. Once you've added the respective integration node, you'll see a list of supported actions along with their configurations. Select the action you need and configure the necessary fields accordingly. ![](https://i.imgur.com/wYYsSxX.png) 4. Customize the AI Agent's behavior to respond appropriately to integration events, such as sending notifications or executing automated tasks. 5. Publish your AI Agent for your changes to reflect in the *Live* or *Production* environment. 1. **Define AI Agent Actions:** Once integration events are enabled, configure your bot to perform specific actions in response to these events. 2. **Customize AI Agent Behavior:** Customize the bot's behavior to respond appropriately to integration events, such as sending notifications or executing automated tasks. By following these steps, you can seamlessly integrate your application with our platform and leverage the full capabilities of our bot system. If you encounter any issues or need further assistance, please refer to our documentation or contact our support team for help. --- ## Integration types ### 1. CRM CRM consists of integrations with customer relationship management tools used for managing the leads and opportunities. Click on any of the below mentioned integrations with CRMs that you wish to setup in order to understand the features, limitations and setup instructions: Integration | Description ----------- | ----------- [Hubspot](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/hubspot-crm) | The HubSpot CRM integration allows you to customize lead details through a conversational bot, enhancing lead management processes and providing personalized experiences for your customers. [Microsoft Dynamics 365](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/microsoft-dynamics) | The Microsoft Dynamics 365 CRM & ERP system integration enables your AI Agentt to create Leads, Opportunities, and perform other operations from your AI Agent. [Salesforce CRM](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/salesforce-service-cloud) | The Salesforce CRM integration empowers your conversational AI Agent to create Leads, Opportunities, and perform other functions, enhancing efficiency and streamlining processes for your users. [Zoho-CRM](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/zoho-crm) | The Zoho CRM integration enables your AI Agent to create Leads, Opportunities, and perform other Zoho CRM related operations. [Epic FHIR](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/epic-fhir) | Integrate Epic FHIR with Yellow.ai and fetch and modify medical records. --- ### 2. ITSM ITSM consists of integrations with IT service management tools used for managing service delivery. Click on any of the below mentioned integrations with ITSM tools that you wish to setup in order to understand the features, limitations and setup instructions: Integration | Description ----------- | ----------- [Freshservice ITSM Solution](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/freshservice) | Integrate your Freshservice instance for seamless service delivery processes. [Service Now](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/service-now) | Integrate with ServiceNow for ticket updates & accessing FAQ repositories for possible responses. [SAP IO](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/sap-io) | This integration allows you to receive events for SAP objects. Furthermore, this also lets you perform actions, such as create, update, get and delete the tickets. --- ### 3. HR HR consists of integrations with human resource softwares used for managing recruiting, onboarding and HR related services. Click on any of the below mentioned integrations with HR tools that you wish to setup in order to understand the features, limitations and setup instructions: Integration | Description ----------- | ----------- 1. [Freshteam](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/freshteam) | Freshteam is a smart HR software that helps you handle recruiting, onboarding, time off and employee information in one place. 2. [SAP Success Factors](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/successfactors#references) | With SAP Successfactors integration, you can automate recruitment cycle through conversational bots. [Bamboo HR](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/bamboohr) | The Bamboo HR integration allows you to seamlessly connect your Bamboo HR service with the yellow.ai platform. --- ### 4. Tools & Utilities To explore integrations with tools & utilities softwares, click on any of the below mentioned integrations with that you wish to setup in order to understand the features, limitations and setup instructions: | Integration Name | Description | |-----------------------|------------------| | [Azure Active Directory](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/azure-ad#references) | The Azure Active Directory integration supports use-cases related to Azure AD, providing seamless access and management within your bot ecosystem.| | [Clever Tap](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/clevertap) | The Clever Tap integration allows seamless incorporation of Clever Tap functionalities into your bot, enhancing user engagement and analytics capabilities. | | [Google Calendar](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/google-calendar) | The Google Calendar integration enables the creation of events within conversational bots, facilitating efficient scheduling and organization. | | [Google Sheets](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/google-sheets) | The Google Sheets integration enables the creation of new spreadsheets and allows for reading, writing, and updating data in the cells. | | [JIRA](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/jira) | The JIRA integration enables conversational bots to manage and update dashboards within your JIRA project, facilitating streamlined project management and collaboration.| | [LeadSquared Whatsapp Connector](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/leadSquared-wa-connector) | The LeadSquared integration empowers conversational bots to efficiently manage and update dashboards within your LeadSquared project, streamlining operations and enhancing productivity. | | [Microsoft Graph](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/microsoft-graph) | The Microsoft Graph integration enables conversational bots to manage and update dashboards seamlessly, leveraging the capabilities of the Microsoft Graph platform. | | [Netcore Smartech](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/netcore) | The Netcore Smartech integration enhances customer experience within your conversational bot, providing a seamless platform for engagement and interaction. | | [SFTP](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/sftp) | The SFTP integration facilitates file transfer and directory reading from remote locations, enhancing data management capabilities within the bot. | | [Twilio Verify](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/twilio-verify) | The Twilio integration enables conversational bots to trigger verification SMS, seamlessly enhancing security and authentication processes. | | [WebEngage](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/webengage) |The WebEngage integration allows you to manage your campaigns within conversational bots, streamlining the process and enhancing engagement. | | [Atlassian](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/atlassian) | The Atlassian integration allows the bot to manage all Atlassian activities from the Yellow.ai platform, granting access to your Atlassian account and enabling them to perform Atlassian actions directly within the Yellow.ai bot. | | [Freshdesk](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/freshdesk) | Freshdesk integration enables the bot to perform various actions, including creating/updating tickets, fetching ticket details, modifying ticket forms, retrieving agent info, creating notes, and adding watchers to the tickets. | | [Google Playstore](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/playstore) | The Google Playstore integration allows for active management of user ratings and reviews for your Google Play store account within Yellow.ai. | | [GPT-3](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/gpt3) | The GPT-3 integration allows for seamless integration of OpenAI's GPT-3, supporting DaVinci, Curie, Babbage, and custom language models within the bot. | | [LLM](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/llm) | The LLM integration enables to add custom language models to your Yellow.ai account. | | [Oracle Responsys](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/oracle-responsys) | The Oracle integration enables opportunities to engage with leads and contacts on their preferred messaging platform using Oracle Responsys. | | [Okta](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/okta) | The Okta integration enables secure authentication and authorization services within your Yellow.ai platform. | --- ### 5. Retail/ ecommerce Retail/ ecommerce consists of integrations with tools used for managing retail and ecommerce flows. Click on any of the below mentioned integrations that you wish to setup in order to understand the features, limitations and setup instructions: Integration | Description ----------- | ----------- 1. [Shopify Shop](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/shopify) | The Shopify integration allows you to initiate Ecommerce flows seamlessly, enhancing the shopping experience within your bot. 2. [Magento](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/magento) | The Magento integration enables your bot to seamlessly connect with your Magento store. This integration allows your bot to showcase inventory categories, display products, retrieve customer details via email, allow order placement, and enable order status inquiries using the order ID, all within the conversational interface. --- ### 6. Live Chat Live Chat consists of integrations with tools used for managing agent connectivity and interactions. Click on any of the below mentioned integrations with live chat tools that you wish to setup in order to understand the features, limitations and setup instructions: Integration | Description ----------- | ----------- [Amazon Connect Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/amazon-livechat) | The Amazon Connect integration enables the creation of a conversational bot that seamlessly connects with live agents, enhancing customer support experiences. Additionally, you can develop a custom bot for your team to accelerate teamwork and collaboration processes. [Avaya Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/avaya) | The Avaya integration enables users to connect with live agents for their queries, enhancing customer support capabilities within the bot. [Custom Live Agent](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/customliveagent) | The Custom Live Agent integration enables the development of a conversational bot that seamlessly connects users to human support, enhancing customer service experiences and ensuring effective communication between users and live agents. [Freshchat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/freshchat) | The Freshchat integration allows for the creation of a conversational bot that seamlessly connects with live agents, improving customer support interactions and enabling real-time communication between users and agents. [Genesys PureCloud Live Agent](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/genesys-cloud-livechat) | The Genesys PureCloud integration enables the development of a conversational bot that seamlessly connects with live agents, enhancing customer support experiences and facilitating effective communication between users and agents. [Intercom Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/intercom-livechat) | The Intercom integration enables seamless live agent transfer, enhancing customer support experiences by facilitating smooth transitions between automated assistance and live agent support within your bot ecosystem. [Kapture CRM Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/kapture-crm) | The Kapture CRM integration within Yellow.ai enhances customer relationship management capabilities, streamlining interactions and processes. [Locobuzz Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/locobuzz-livechat) | The Locobuzz integration enables live agent connections for user queries through the conversational bot, enhancing customer support experiences and facilitating seamless communication between users and agents. [Salesforce Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/salesforce-service-cloud) | The Salesforce Live Chat integration enables the creation of a conversational bot that connects to LiveAgent, enhancing customer support experiences and facilitating seamless communication within your organization. [Talisma Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/talisma) | The Talisma Live Chat integration enables seamless connections with live agents, enhancing customer support experiences and enabling real-time communication within your organization's conversational bot ecosystem. [Zoho Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/zoho-live-chat) | The Zoho Live Chat integration facilitates seamless conversation transfer, enhancing customer support experiences and enabling smooth communication transitions within your organization's conversational bot ecosystem. [Genesys Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/genesys) | The Genesys integration enables seamless connections with live agents, enhancing customer support experiences and facilitating real-time communication within your organization's conversational bot ecosystem. [Microsoft Dynamics 365](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/microsoft-live) | The Microsoft Dynamics 365 integration enables direct connections with live agents, enhancing customer support experiences and facilitating seamless communication within your organization's conversational bot ecosystem. [Genesys Purecloud Live](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/genesys-cloud-livechat) | The Genesys PureCloud Live integration allows direct connections with live agents, enhancing customer support experiences and facilitating seamless communication within your organization's conversational bot ecosystem. [Service Now live](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/servicenow-livechat) | The ServiceNow Live integration enables connecting with live agents on ServiceNow Live directly from your yellow.ai bot, enhancing customer support experiences and facilitating seamless communication within your organization --- ### 7. Payment Payment consists of integrations with tools used for managing payment and related requests. Click on any of the below mentioned integrations with payment tools that you wish to setup in order to understand the features, limitations and setup instructions: Integration | Description ----------- | ----------- [Camspay](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/camspay) | Integrate with CAMSPay to fulfil your payment requirements, including creating payment links and monitoring the progress of payments or refunds. [Cashfree Payments](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/camspay) | With Cashfree Payment Integration, you can generate payment links and check the status of payments made, streamlining transaction processes and enhancing user experiences within your bot ecosystem. [Paytm](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/paytm) | With Paytm integration, you can create payment links and check the status of payments made, streamlining transaction processes and enhancing user experiences within your bot conversations [PayU Business](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/payuBiz) | With PayU Business integration, bot can handle secure and seamless payment transactions. This enables users to complete purchases, subscriptions, or bill payments directly within the chat interface. [Razorpay](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/razorpay) | With Razorpay integration, you can streamline payment processes by creating payment links and checking the status of payments or refunds, enhancing user experiences within your bot conversations. [Stripe Payment Gateway](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/stripe) | With Stripe integration, you can meet your payment needs, such as generating payment links and checking the status of payments and refunds, streamlining transaction processes and enhancing user experiences within your AI Agent. [Airpay](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/airpay) | With Airpay integration, Yellow.ai enables users to make payments directly through the chat interface, facilitating seamless transactions and enhancing user experiences within your ecosystem. [BillDesk Email pay](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/billdesk-emailpay) | With BillDesk EmailPay integration, you can seamlessly receive payments from your users, enhancing transaction processes and user experiences within your Yellow.ai account. [Billdesk UPI](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/billdesk) | With BillDesk UPI, you can seamlessly create UPI intents for WhatsApp Pay, view payment statuses, and send UPI notifications directly within the Yellow.ai platform. [Stripe](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/stripe) | With Stripe Payment integration, you can generate payment links and view payment statuses directly within the Yellow.ai platform. --- ## Paytm Payment Gateway Yellow.ai Integration with Paytm Payment Gateway enables the end user to do the following: 1. Generate a payment link and receive an intimation regarding the status of the payment as to whether it was a success or failure. 2. Initiate the process of refund. 3. Check the status of the refund that was initiated. ## Connect Paytm payment gateway with Yellow.ai In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. To integrate the Paytm payment gateway, follow these steps: 1. Navigate to the Development/Staging environment and go to **Extensions** > **Integrations** > **Payment**  > **Paytm**. You can also search the integration by name **Paytm** using the Search box. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/paytm.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (_). ![](https://cdn.yellowmessenger.com/assets/yellow-docs/paytm-details.png) 3. In **Merchant ID**, enter the Merchant ID provided by the client or Paytm SPOC. 4. In **Merchant Key** enter the Merchant Key provided by the client or Paytm SPOC. 5. In **API Domain**, If you intend to use the staging domain of Paytm, enter `https://securegw-stage.paytm.in`. If you're using the production domain, enter `https://securegw.paytm.in`. 6. In **Channel ID**, enter the Channel ID provided by the client or Paytm SPOC. 7. **Industry Type:** Enter the Industry Type provided by the client or Paytm SPOC. 8. To add more accounts, click **+ Add account** and proceed with the previous steps. You can add a maximum of 15 accounts. ## Configure Webhook URL in Paytm The webhook URL serves as a callback endpoint where Paytm can send notifications or updates regarding payment events, enabling your application to respond accordingly. 1. Go to the connected Paytm integration and copy the webhook URL. 2. Add domain URL. Append the region of your AI agent to the domain of the webhook url. r1/r2/r3/r4/r5 are the regions of your AI agent, you can refer the following list for the same. (r1 = MEA, r2 = Jakarta, r3 = Singapore, r4= USA, r5 = Europe) ![](https://cdn.yellowmessenger.com/assets/yellow-docs/paytm-webhook.png) 3. Login to your Paytm account and navigate to the Webhook URL Configuration section and add the provided webhook URL. ## Enable Paytm event for your AI agent 1. On the Cloud Platform go to Staging/Development environment. 2. On the left navigation bar, click **Automation** > **Event** > **Integrations** and search for `Paytm Payment Status`. 3. Click on the more options icon and select Activate. If you have connected multiple accounts, you need to enable the event for each account. 4. Once the event is activated, you can create a flow in the **Automation** > **Build** and use the event in a flow to trigger a specific action, such as displaying a message indicating that the payment is completed successfully. **Sample webhook event data sent by Paytm** ``` { "PAYMENTEMAILID": "user@example.com", "PAYMENTMOBILENUMBER": "7777777777", "GATEWAYNAME": "WALLET", "RESPMSG": "Txn Success", "BANKNAME": "WALLET", "PAYMENTMODE": "PPI", "CUSTID": "CUST_001", "MID": "INTEGR7769XXXXXX9383", "MERC_UNQ_REF": "LI_12345", "RESPCODE": "01", "TXNID": "202005081112128XXXXXX68470101509706", "TXNAMOUNT": "1.00", "ORDERID": "ORDERID_98765", "STATUS": "TXN_SUCCESS", "BANKTXNID": "63240520", "TXNDATETIME": "2020-09-10 13:03:05.0", "TXNDATE": "2020-09-10", "CHECKSUMHASH": "PMXJocjUUKGq7MXGwHO0LNOV+YxwuYi4gKjRgFOIZVGVqyxqfFuec+A8boUq5Q3c87yYM9DOeCmjIj5mH20SfIiDjOJiU4eFzNxu0J1qKdc=", "LINKNOTES": "Link Note Description" } ``` ## Paytm actions through AI agent conversation Once your Paytm account is successfully connected, your AI agent can perform the following actions: :::note If there are multiple accounts, you can select from which account you want to perform the action. ::: ### Generate Paytm payment link in AI agent conversation 1. Go to Development/Staging environment and navigate to **Automation** > **Build** > Select the flow where you want to add the Generate payment link node. 2. Click **Add node** > **Integrations** > **Paytm**. ![](https://i.imgur.com/7r0Td7w.png) 3. You will see the Paytm node. In the first drop-down (actions), choose *Generate Payment Link*. ![](https://i.imgur.com/mA9hm4Q.png) 3. Configure the input parameters needed to generate the payment link by referring to the descriptions provided in the table below. | Field name | Sample value | Data type | Description | | -------- | -------- | --- | -------- | | Timestamp | 1588402269 | String | EPOCH timestamp of the time at which the request is being sent | |Amount|3500|String|Transaction amount| |LinkName|Test|String|Name of the link that you want to display to the customer, link name is used to generate a long URL| |LinkType|FIXED|String|Type of link| |LinkDescription|Test|String|Description of the link that you want to display to the customer| |SendSms|true/false|Boolean|Flag whether SMS is to be sent to the customer by Paytm| |SendEmail|true/false|Boolean|Flag whether Email is to be sent to the customer by Paytm| |CustomerName|Mahesh|String|Name of the customer| |CustomerEmail|test@gmail.com|String|Email ID of the customer| |CustomerMobile|9870000000|String|Mobile number of the customer| |LinkNotes|Reference details|String|Add additional notes to your link. This won’t be shown to the customers| :::note An easy way to determine the success or failure of an action is by inspecting the key tokenType in the head object. If its value is **AES**, the response indicates success. ::: **Sample response for success** In case of success, you must extract the key **shortUrl** present in the **body** object and display it to the end user with an appropriate message with the help of any of the **Message type** nodes. ``` { "head": { "version": null, "timestamp": "1566994462639", "channelId": null, "tokenType": "AES", "clientId": null }, "body": { "linkId": 5861, "linkType": "GENERIC", "longUrl": "https://securegw-stage.paytm.in/link/PAYMENTLINKNAME/LL_5861", "shortUrl": "https://paytm.me/ID-PBo7", "expiryDate": "27/08/2020 17:44:22", "isActive": true, "merchantHtml": "", "createdDate": "28/08/2019 17:44:22", "notificationDetails": [], "resultInfo": { "resultStatus": "SUCCESS", "resultCode": "200", "resultMessage": "Payment link is created successfully" } } } ``` **Sample response for fallback** ``` { "head": { "version": "v2", "timestamp": "28/08/2019 17:47:22", "channelId": null, "tokenType": null, "clientId": null }, "body": { "resultInfo": { "resultStatus": "FAILED", "resultCode": "302", "resultMessage": "link name contains sepcial character." } } } ``` **To use this Integration Action Node in an app.yellow.ai AI agent**, refer to the below-mentioned example: ``` app.executeIntegrationAction({ "integrationName": "paytm", "action": "Generate Payment Link", "dynamicParams": { "amount": "5", "timestamp": "1658203708983", "linkName": "Test", "linkType": "FIXED", "linkDescription": "Test Description", "sendSms": false, "sendEmail": false, "customerName": "John Doe", "customerEmail":"test@test.com", "customerMobile":"9955995500", "linkNotes":"test note" } }).then((res)=>{ console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err)=>{ console.log("Error in action node",err); app.log(err, '||Error in action node||') }) ``` ### Initiate Paytm Refund 1. In the Paytm node, choose the action *Initiate refund*. ![](https://i.imgur.com/s6AUREb.png) 2. Configure the input parameters needed to generate the payment link by referring to the descriptions provided in the table below. | Field name | Data type | Description | Sample value | | -------- | -------- | --- | -------- | |RequestTimestamp|String|POCH timestamp of the time at which the request is being sent|1588402269| |OrderId|String|It is a unique reference ID for a transaction passed in the transaction request. Order ID should be passed to raise the refund|OREDRID_98765| |ReferenceId|String|Unique Reference ID for refund transaction which is generated by merchant. Duplicate REFID will be rejected by the Paytm gateway|REFUNDID_98765| |TransactionId|String|TXNID is the Paytm payment Transaction ID against which the refund transaction is being placed.TXNID is provided in response payload for every payment transaction| 202005081112128XXXXXX68470101509706| |RefundAmount|String|Amount for which the refund is to be made. It can be equal to or less than the transaction amount and should be up to two decimal places. The only special character allowed is (".")|30.00| **Sample response for success** In case of success, you need to extract the key **resultStatus**, and **resultMsg** in the **resultInfo** object and display them to the end user with an appropriate message with the help of any of the **Message type** nodes. ```json { "head": { "responseTimestamp": "1567421120859", "signature": "WaFdplm36GmfBtZ6jPIFClLSEffhAk9fTpJ6i8WpgqiZvtUNl53mLL7mu4JWwxPpfSa5pdexyxK/68WtoTmd53TI+R9GffjGc3USoLgWcKI=", "version": "v1" }, "body": { "txnTimestamp": "2019-09-02 12:31:49.0", "orderId": "YOUR_ORDER_ID", "mid": "YOUR_MID_HERE", "refId": "UNIQUE_REFUND_ID", "resultInfo": { "resultStatus": "PENDING", "resultCode": "601", "resultMsg": "Refund request was raised for this transaction. But it is pending state" }, "refundId": "PAYTM_REFUND_ID", "txnId": "PAYTM_TRANSACTION_ID", "refundAmount": "1.00" } } ``` **Sample response for fallback** ```json { "head": { "responseTimestamp": "1567421388384", "signature": "ry2bNQ+iq+geNezbFNBfIkXXWTFPUnavG6XkxciEJUNLmL7Op9S7qWP8V1TGHNYvggw2IsIt1OmprSfq92pODO5xiNJ+6pFyVtBUxnRrdL8=", "version": "v1" }, "body": { "orderId": "YOUR_ORDER_ID", "mid": "YOUR_MID_HERE", "resultInfo": { "resultStatus": "TXN_FAILURE", "resultCode": "607", "resultMsg": "Refund can not be initiated for acanceledd transaction." }, "txnId": "PAYTM_TRANSACTION_ID", "refundAmount": "1.00" } } ``` **To use this Integration Action Node in an app.yellow.ai AI agent**, refer to the below-mentioned example: ```js app.executeIntegrationAction({ "integrationName": "paytm", "action": "Initiate Refund", "dynamicParams": { "requestTimestamp": "1658203708983", "orderId": "OREDRID_98765", "referenceId": "REFUNDID_98765", "transactionId": "202005081112128XXXXXX68470101509706", "refundAmount": "30.00" } }).then((res)=>{ console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err)=>{ console.log("Error in action node",err); app.log(err, '||Error in action node||') }) ``` ### Check Refund Status 1. In the Paytm node, choose the action *Check Refund Status*. ![](https://i.imgur.com/7r0Td7w.png) 2. Configure the input parameters needed to generate the payment link by referring to the descriptions provided in the table below. ![](https://i.imgur.com/W4AMMOB.png) | Field name | Sample value | Data type | Description | | -------- | -------- | --- | -------- | |RequestTimestamp|1588402269|String|EPOCH timestamp of the time at which the request is being sent| |OrderId|OREDRID_98765|String|It is a unique reference ID for a transaction passed in the transaction request and the Initiate Refund Integration Action Node. Order ID should be passed to check the actual status of the refund| |ReferenceId|REFUNDID_98765|String|Merchant's Reference ID unique for every refund transaction. This is REFID for which refund status is being inquired| :::note The easiest way to identify success/failure is by looking at the key resultStatus in the resultInfo object. If its value is TXN_SUCCESS, the response is a success. ::: **Sample response for success** In case of success, extract the key(s) and display to the end user an appropriate message with the help of any of the Message type nodes. ```json { "head": { "clientId": "C11", "responseTimestamp": "1556719120393", "signature": "Stx6P9HpnEG3GADkMuOcj50dm7ZHmvMPd29b8K5rxi4aVzRcJ5hklZo//RZdtTA+zcll8sdelyAYsxqPxFs66RVE0F2b9RElTMqYSfBj89I=", "version": "v1" }, "body": { "orderId": "YOUR_ORDER_ID", "userCreditInitiateStatus": "SUCCESS", "mid": "YOUR_MID_HERE", "merchantRefundRequestTimestamp": "2019-05-01 19:27:25.0", "resultInfo": { "resultStatus": "TXN_SUCCESS", "resultCode": "10", "resultMsg": "Refund Successfull" }, "txnTimestamp": "2019-05-01 19:25:41.0", "acceptRefundTimestamp": "2019-05-01 19:27:25.0", "acceptRefundStatus": "SUCCESS", "refundDetailInfoList": [{ "refundType": "TO_SOURCE", "payMethod": "BALANCE", "userCreditExpectedDate": "2019-05-02", "userMobileNo": "91-******7777", "refundAmount": "1.00" }], "userCreditInitiateTimestamp": "2019-05-01 19:27:26.0", "totalRefundAmount": "1.00", "refId": "UNIQUE_REFUND_ID", "txnAmount": "10.00", "refundId": "PAYTM_REFUND_ID", "txnId": "PAYTM_TRANSACTION_ID", "refundAmount": "1.00", "refundReason": "Testing refund reason", "agentInfo": { "name": "Lalit", "employeeId": "Em1-00`", "phoneNo": "7777777777", "email": "customer@example.com" } } } ``` **Sample response for fallback** ```json { "head": { "clientId": "C11", "responseTimestamp": "1556719175104", "signature": "gJD0EM+p9rGekkXKRt1M0aTUTaqZ6SVcmWfysIO9s9tJKhjrfpySlCEG8Tb97G1h4iYyJuhCglTr1obhO7xX+TIFwlaIgrundaj7dyt2SdA=", "version": "v1" }, "body": { "orderId": "YOUR_ORDER_ID", "mid": "YOUR_MID_HERE", "refId": "UNIQUE_REFUND_ID", "resultInfo": { "resultStatus": "PENDING", "resultCode": "501", "resultMsg": "System Error." } } } ``` **To use this Integration Action Node in an app.yellow.ai AI agent**, refer to the below-mentioned example: ```js app.executeIntegrationAction({ "integrationName": "paytm", "action": "Check Refund Status", "dynamicParams": { "requestTimestamp": "1658203708983", "orderId": "OREDRID_98765", "referenceId": "REFUNDID_98765" } }).then((res)=>{ console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err)=>{ console.log("Error in action node",err); app.log(err, '||Error in action node||') }) ``` --- ## PayU Business [PayU Business integration](https://payu.in/about-us?_ga=2.219146714.274874686.1677657469-282964387.1677657469) enables your AI agent to receive PayU payments from your users. You can generate payment links, UPI intents for whatsapp pay and receive notifications on the success/failure of the payments. ## Integrating PayU with Yellow.ai To connect your PayU account with yellow.ai, follow these steps: ### 1.1 Get keys required for your PayU account integration 1. Login to [PayU Dashboard](https://onboarding.payu.in/app/account) 2. Switch to **Live Mode** from the toggle option on the menu bar. 3. Select **Developer** from the menu on the left-pane and select the **API Details** tab if required. Here - **Key**: The API key required for all payment requests. - **Salt (32-bit)**: A 32-character string (v1) used to generate a hash. Any one hash codes is required along with the other parameters when submitting a payment request to PayU. - **Salt (256-bit)**: A more secure, 256-bit string (v2) used for hash generation. Any one hash codes is required along with the other parameters when submitting a payment request to PayU. :::note - Alternatively, you can write to [PayUBiz team](mailto:integration@payu.in) for the API keys. They will provide the keys for both the modes. - For comprehensive guide to [PayU Dashboard, see here](https://docs.payu.in/docs/generate-merchant-key-and-salt-on-payu-dashboard) ::: ### 1.2 Connect PayU Business to yellow.ai In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. 1. Navigate to the Development/Staging environment and go to **Extensions** > **Integrations** > **Payment**  > **PayU Business**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/payu.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (_). ![](https://cdn.yellowmessenger.com/assets/yellow-docs/payu-details.png) 3. In **Salt value**, enter the unique hash for each transaction, which is then used to verify the authenticity of the transaction. The Salt Value is provided by PayU and should be kept confidential. 4. Enter the **Client ID**, enter your PayU account's client ID. 5. In **Payu base URL**, enter the base URL to send API requests to the PayU payment gateway for payment processing. 6. In **Payu UPI base URL**, enter the base URL of the PayU UPI to send API requests to the PayU UPI payment gateway for UPI payment processing. :::note Payu base URL and and Payu UPI base URL will differ for test and live modes. Example: * Test mode - https://test.payu.in * Live mode - https://info.payu.in ::: 7. Click **Connect** when you're done. 8. To add another account, click **+ Add account** and proceed with the previous steps. You can add a maximum of 15 accounts. ### 1.3 Configure webhook URL To receive real-time notifications about payment status updates, you need to set up a webhook URL Copy the webhook URL and the API key mentioned in the **Instructions** section of the PayUBiz Integration section in the yellow.ai platform. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/payu-webhook.png) Use the webhook URL specific to your region - [India](https://cloud.yellow.ai/integrations/genericIntegration/payu-payment-gateway/x1668670622130?id=VVKB60XTmBsVV3sALdpMw0Z3rzXHJ2MTA5cOtiHEzRs%3D), [MEA](https://r1.cloud.yellow.ai/integrations/genericIntegration/payu-payment-gateway/x1668670622130?id=VVKB60XTmBsVV3sALdpMw0Z3rzXHJ2MTA5cOtiHEzRs%3D), [Jakarta](https://r2.cloud.yellow.ai/integrations/genericIntegration/payu-payment-gateway/x1668670622130?id=VVKB60XTmBsVV3sALdpMw0Z3rzXHJ2MTA5cOtiHEzRs%3D), [Singapore](https://r3.cloud.yellow.ai/integrations/genericIntegration/payu-payment-gateway/x1668670622130?id=VVKB60XTmBsVV3sALdpMw0Z3rzXHJ2MTA5cOtiHEzRs%3D),[ USA](https://r4.cloud.yellow.ai/integrations/genericIntegration/payu-payment-gateway/x1668670622130?id=VVKB60XTmBsVV3sALdpMw0Z3rzXHJ2MTA5cOtiHEzRs%3D), and [Europe](https://r5.cloud.yellow.ai/integrations/genericIntegration/payu-payment-gateway/x1668670622130?id=VVKB60XTmBsVV3sALdpMw0Z3rzXHJ2MTA5cOtiHEzRs%3D). To ensure secure communication and enable PayU Business to send payment status updates, you must get the webhook URL whitelisted. Contact the [PayU Integration team](mailto:integration@payu.in) for assistance. PayUBiz will whitelist the webhook URL provided by the merchant in their systems. You also need to get the webhook URL whitelisted from the can write to the [PayU Integration team](mailto:integration@payu.in) for more information. ### 1.4 Enable PayU event to receive event in AI agent 1. On the [Cloud Platform](https://cloud.yellow.ai) go to Staging/Development environment. 2. On the left navigation bar, click **Automation** > **Build** > **Event** > **Integrations** and search for `PayU Payment Status`. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/payu-event.png) 3. Click on the more options icon and select **Activate**. If you have connected multiple accounts, you need to enable the event for each account. 4. Once the event is activated, you can create a flow in the **Automation** > **Build** and use the event at the start of the flow to trigger a specific action, such as displaying a message indicating that the payment is completed. ## Manage PayU payments from AI Agent conversations :::note If there are multiple accounts, you can select from which account you want to perform the action. ::: ### 2.1 Generate payment link 1. When building [Conversation flows](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys), add an **Integration action node** and select **PayU Business** from the list of enabled integrations. 2. When you click the node, you will see a drop-down with supported actions in this integration. Select **Generate Payment Link**. ![](https://i.imgur.com/saWr4er.png) 3. Fill in the fields based on the details provided in the following table. | Field name |Sample value | Data type|Description| | -------- | -------- | -------- |-------| | Amount | 100 | String | Amount to be paid using the payment link. | |ProductInfo|Iphone|String|Name of the product the user wants to purchase.| |Description|Test|String|Description of the product.| |CustomerName|Manish|String|Name of the customer.| |CustomerEmail|test@test.com|String|Email address of the customer.| |CustomerMobileNumber|9999933344|String|Contact number of the customer.| |txnID|Order123|String|The unique transaction ID that is generated dynamically.| |CustomerAddress|Ashoka Road, Mysore, Karnataka|String|Address of the customer.| |CustomerCity|New york|String|City of the customer.| |CustomerResidentState|Karnataka|String|State of the customer.| |CustomerZipcode|845309|String|Pincode of the customer.| |Send Email|false|Boolean|The email address of the customer to send the invoice.| |Time Unit|h|String|Frequency(in days, hours, minutes) at which a recurring payment will be charged.| |UDF|Shipping Method| String| User defined field - used to store any information corresponding to a particular transaction. | |Validation Period|1|Number|Determines how long PayU will continue trying to charge the customer if the initial payment fails.| To use this Integration Action Node in an app.yellow.ai AI agent, refer the following example: ```js app.executeIntegrationAction({ "integrationName": "payu-payment-gateway", "action": "Generate Payment Link", "dynamicParams": { "amount": "1", "productInfo": "testProduct", "customerFirstName": "Test Customer", "customerEmail": "test@test.com", "customerMobileNumber": "9999999999", "txnid": "123456789" } }).then((res)=>{ console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err)=>{ console.log("Error in action node",err); app.log(err, '||Error in action node||') }) ``` ### 2.2 Generate UPI intent 1. From the PayU Business node, select *Create UPI intent*. ![](https://i.imgur.com/gkeqscs.png) 2. Provide the necessary inputs by selecting the relevant variable for each parameter. Below is a table containing sample values, data types, and descriptions for each of these fields. | Field name |Sample value | Data type|Description| | -------- | -------- | -------- |-------| | Amount | 100 | String | Amount to be paid using the payment link. | |CustomerEmail|test@test.com|String|Email address of the customer.| |CustomerPhoneNumber|9999933344|String|Contact number of the customer.| |CustomerName|Manish|String|Name of the customer.| Fail URL|https://alpha6.yellowmessenger.com/ |String|The redirection URL in case there's a payment failure.| |Success URL|https://alpha6.yellowmessenger.com/ |String The redirection URL in case of successful payment.| |TXN S2S flow|4|number|Txn S2S flow.| |Transaction ID|Order123|String|The unique transaction ID that is generated dynamically.| |Product Info|Iphone|String|Description of the product.| |UDF| CustomField|String|User defined Field - used to store any information corresponding to a particular transaction. | 3. The **Generate UPI intenrt Integration Action Node** has two outcomes, **success** or **failure**. If the payment link is generated successfully, the **Integration Action Node** returns a **Success** response code as shown below: ```json { "metaData": { "message": null, "referenceId": "af65159e8566652849bc12a3450a8fca", "statusCode": null, "txnId": "wa5iy6b82pvquxcd1vby", "txnStatus": "pending", "unmappedStatus": "pending" }, "result": { "paymentId": 15961819086, "merchantName": "wwwmerchantnamecom", "merchantVpa": "payumoney@hdfcbank", "amount": "1.00", "intentURIData": "pa=payumoney@hdfcbank&pn=Gaurav Dua&tr=15961819086&tid=wa5iy6b82pvquxcd1vby&am=1.00&cu=INR&tn=UPI Transaction for wa5iy6b82pvquxcd1vby", "acsTemplate": "PGh0bWw+PGJvZHk+PGZvcm0gbmFt" } } ``` If generating UPI intent fails, the **Integration Action Node** returns a Failure response code as shown below: ```json { "message": "[INTG ERROR] Node API Execution failed for payu-payment-gateway_Create UPI Intent in bot x1645073590274: 4xx or 5xx series code encountered", "name": "IntegrationNodeAPIError", "apiResponseBody": { "result": null, "status": "failed", "error": "EX117", "message": "Invalid amount #~#Please ensure that you send all mandatory parameters in the transaction request to PayU.Mandatory parameters which must be sent in the transaction are: key, txnid, amount, productinfo, firstname, email, phone, surl, furl, hash.The parameters which you have actually sent in the transaction are: key, txnid, amount, productinfo, surl, hash, firstname, email, phone.Mandatory parameter missing from your transaction request are: .Please re-initiate the transaction with all the mandatory parameters. " }, "apiResponseStatusCode": 500 } ``` To use this **Integration Action Node** in an app.yellow.ai AI agent, refer the following example: ```js app.executeIntegrationAction({ "integrationName": "payu-payment-gateway", "action": "Create UPI Intent", "dynamicParams": { "amount": "1", "customerName": "farhan", "customerEmail": "farhan.jafri2011a@gmail.com", "customerMobileNumber": "9643999539", "productInfo": "test", "txnid":"wa5iy6b82pvquxcd1vby", "successUrl":"https://staging.yellow.ai", "failUrl":"https://staging.yellow.ai", "txnFlow": 4 } }).then((res)=>{ console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err)=>{ console.log("Error in action node",err); app.log(err, '||Error in action node||') }) ``` ### 2.3 Generate WhatsApp pay PayU business integration allows your AI agent to accept payments from users via WhatsApp Pay To configure WhatsApp Pay in the PayU business node, follow these steps: 1. From the PayU business node, select WhatsApp pay. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/WAnode-pay.png) 2. Provide the necessary inputs by selecting the relevant input for each parameter. Below is a table with sample values, data types, and descriptions for each field: Field name | Sample value | Data type | Description -----------|-----------|---------|------------ Customer email | rio@gmail.com | String | Email address of the customer. | Cutsomer name | Rio | String | Name of the customer. | Fail URL | `https://example.com/payment-failed` | String | URL to redirect to if payment fails.. | From | +91 98800XXXXX | String | Enter the WhatsApp number that is connected to the AI agent. | Card description | Mobile charger | String | Deatil of the product | Order details | `{ "subTotal": 10, "tax": "...", "items": [...] }` | Object | Contains complete order details. |Product info | Wireless charger | String | Information about the product. Success URL | `https://example.com/payment-success` | String | URL to redirect after a successful payment. Total amount | 1000 | Number | Total payment amount Transaction ID | TXN987654321 | String | Unique identifier for the transaction. Type of Product | Digital goodsPhysical goods | String | Specifies whether the product is digital or physical. | Image URL | `https://example.com/product-image.jpg` | String | URL of the product image. UDF1(User defined fileds), UDF2, ......, UDF5 | Custom metadata | String | User-defined fields for passing metadata. Vpa name | rio@upi | String | Virtual Payment Address (VPA) name. Preview the WhatsApp AI agent to verify the WhatsApp payment link: ![](https://cdn.yellowmessenger.com/assets/WApay.png) --- ## Google Play store Integration The Google Play Store integration with Yellow.ai enables businesses to monitor and manage app reviews **directly within the AI Agent**, eliminating the need to switch between platforms. By centralizing review management within the bot, businesses can streamline feedback handling, enhance customer engagement, and reduce response time, all without leaving the Yellow.ai platform. With this integration, the AI Agent can: - **Fetch user reviews and ratings**: Automatically retrieve new app reviews and ratings in real time from Google Play Store. This allows teams to track app performance, analyze user sentiment, and respond proactively. - **Respond to user reviews**: The AI or Human agent can respond to reviews **from within the platform**. The AI Agent can send automated replies, while low ratings can be escalated to a human agent for personalized engagement. **Limitation** * Bot or agent can send only one reply per feedback, with a maximum of 250 characters. **Prerequisites** Before proceeding with this integration, ensure you have: * Google play console access * Google cloud console access * An Android app deployed on the Play store ## Integrate Google Play store with Yellow.ai To integrate Google Play store with Yellow.ai, follow these steps: ### Get Google console credentials For steps to fetch the private key from your google console, click [here](https://www.iwantanelephant.com/blog/2020/11/17/how-to-configure-api-access-to-google-play-console/). 1. Log in to the [Google developer console](https://console.cloud.google.com/). 2. On the [Google console developer](https://developers.google.com/workspace/guides/create-project#create_a_new_google_cloud_platform_gcp_project) portal, click **Go to create a project**. 3. Enter the **Project name**, **Organization**, and **Location**, then click **Create** to create a project. ![](https://i.imgur.com/Pz8F3TN.png) * Your project will be successfully created. ![](https://i.imgur.com/zKou5jD.png) 4. On the navigation panel, go to **IAM & Admin** > **Service Accounts**. ![](https://i.imgur.com/do384LL.png) 5. Click on **+ CREATE SERVICE ACCOUNT**. ![](https://i.imgur.com/gN31KZ0.png) 6. Add the *Service Account Details* such as **Service account name**, **Service account ID**, and **Service account description**, then **CREATE AND CONTINUE** in Step 1. Skip Step 2 and 3. ![](https://i.imgur.com/gN31KZ0.png) * The service account details for your project will be added successfully. ![](https://i.imgur.com/yByfMn1.png) 7. Once the service account is created, click on the **email link**. ![](https://i.imgur.com/CAq3YFX.png) 8. Go to **KEYS** tab and click on **ADD KEY** > **Create new key**. ![](https://i.imgur.com/AvKOUU1.png) 9. Select the *Key type* as **JSON** and click **Create**. :::note * Ensure that you save this file properly, it cannot be recovered once lost. ::: • A confirmation message Private key saved to your computer is displayed. 10. Copy the **Private key**, which is required to connect the Google play store with Yellow.ai. For more information, click [here](https://www.iwantanelephant.com/blog/2020/11/17/how-to-configure-api-access-to-google-play-console/). 5. Click **Connect**. ### Connect Google play store to Yellow.ai To integrate Google play store with Yellow.ai, follow these steps: 1. Login to the [Yellow platform](https://cloud.yellow.ai/) and navigate to the **Development** environment. * In a two-tier environment, you can only add accounts in the Development environment. * In a three-tier environment, you can only add accounts in Staging/Sandbox environment. 2. Go to **Extensions** > **Integrations** > **Tools & Utilities** > **Google playstore**. You can also search for Google Playstore in the Search box. ![](https://i.imgur.com/cIbeLnW.png) 2. In the **Give account name** field, enter a unique name, you cannot edit the account name once it is created. 3. In **Email**, enter the email address of your Google play store account. 4. In **Private key** and **Package name**, enter the private key copied from the Google console and package name of your Google play store account. ![](https://imgur.com/TLWC3rL.png) 5. Click **Connect**. * Similarly, you can add a maximum of 15 accounts. ## Enable Google play store event to receive events in bot To receive notifications when a user posts a review for your app on the Google play store, you need to enable the `playstore_review` event in your bot. Once enabled, the bot can automatically fetch new reviews and trigger actions such as responding to feedback or escalating low-rated reviews to a live agent. To enable Google play store event, follow these steps: 1. On the [Cloud platform](https://cloud.yellow.ai/), go to **Staging** or **Development** environment. 2. On the left navigation bar, click **Automation** > **Event** > **Integrations** and search for `playstore_review`. ![](https://imgur.com/Wb5ngqw.png) 3. Click on the **more options** icon and select **Activate**. If you have connected multiple accounts, you need to enable the event for each account. ![](https://imgur.com/yaHkUER.png) 4. Once the event is activated, navigate to **Automation > Build** to create a flow. 5. Create a new flow and set **playstore_review** as the trigger event and configure action for receiving rating and review. ![](https://imgur.com/jttbbc3.png) ## Use cases supported for Google play store integration 1. **Fetch user reviews and ratings**: The bot can automatically fetch new app reviews and ratings from the Google play store. This integration enables real-time retrieval of user feedback. This helps to analyse the user sentiment and track app performance. 2. **Send response to user reviews**: The bot or a live agent can respond to user reviews directly from the platform. When a user submits a review, the bot can send an automated response, or if the rating is low, escalate it to a human agent for personalized engagement. However, each review can receive only one response, with a maximum length of 250 characters. Refer to the following video to see how the Google play store integration works: --- ## Razorpay integration You can integrate your Yellow.ai platform with your Razorpay account, enabling you to accept payments from your end users. Additionally, this integration allows you to perform various other actions, including: * Generate a payment link and receive the status (success/failure) of the payment. * Generate a payment link to receive partial payments and receive the status (success/failure) of the payments. * Initiate refund process. * Check refund status. ## 1. Connect Razorpay with Yellow.ai Connect your Yellow.ai platform with your Razorpay account by following the below-mentioned steps. ### 1.1 Generate API keys on Razorpay dashboard 1. Log into your [Razorpay account](https://dashboard.razorpay.com/signin?screen=sign_in&utm_medium=website&utm_source=direct) and select the mode (Test/Live) for which you want to generate the API key. ![](https://i.imgur.com/74zbT2o.png) * **Test Mode**: The test mode is a simulation mode in which you can test your integration flow. Your customers cannot make payments in this mode. Check out this [video](https://www.youtube.com/watch?v=Xwiv6zSVVCM) to know more. * **Live Mode**: When your integration is complete, switch to **Live** mode and generate live mode API keys. Replace test mode keys with live mode keys in the integration to accept payments from customers.Check out this [video](https://www.youtube.com/watch?v=30REpNtYSak) to know more. 2. To generate API keys for a specific mode**, navigate to **Settings** > **API Keys** > **Generate Key** to generate key for the selected mode. ![](https://i.imgur.com/vFHopPF.png) 3. The **Key Id** and **Key Secret** will appear on the following page. Downalod them to use in your Yellow.ai platform. ![](https://i.imgur.com/7RPBlMe.png) ### 1.2 Integrate Razorpay with yellow.ai platform In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. To connect your Stripe account with Yellow.ai, follow these steps: 1. Navigate to the Development/Staging environment and go to **Extensions** > **Integrations** > **Payment**  > **Razorpay**. You can also search for **Razorpay** in the search box. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/razorpay.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (_). 3. In **Key ID** and **Key secret**, enter the respective values that you downloaded using the steps mentioned in the previous section. 4. CLick **Connect**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/razorpay-details.png) 5. To add another account, click **+ Add account** and proceed with the previous steps. You can add a maximum of 15 accounts. ### 1.3 Configure webhook URL in Razorpay Dashboard The Webhook URL serves as a callback URL where Razorpay can send notifications or data updates to your AI agent. 1. Copy the webhook URL and the API key mentioned in the **Instructions** section of the Razorpay Integration Card. Append the region of your AI agent to the domain of the webhook url. r1/r2/r3/r4/r5 are the regions of your AI agent, you can refer the following list for the same. (r1 = MEA, r2 = Jakarta, r3 = Singapore, r4= USA, r5 = Europe) For example, if the domain is https://cloud.yellow.ai, you need to change it to https://r1.cloud.yellow.ai if the region of the AI agent is MEA. If the AI agent belongs to India, you can use origin domain itself. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/razorpay.png) 2. Log into the [Razorpay Dashboard](https://dashboard.razorpay.com/#/access/signin) and navigate to **Settings** → **Webhooks**. 3. Click **+ Add New Webhook** on the right corner. ![](https://i.imgur.com/aE5zgwH.png) 4. In the **Webhook Setup** pop-up, enter the URL in which you'd like to receive the webhook payload when an event is triggered. We recommend using a **HTTPS URL**. Ensure you enable all the events shown in the screenshot below. :::note You can set upto 10 URLs to receive Webhook notifications. Webhooks can only be delivered to public URLs. If you attempt to save a localhost endpoint as part of a webhook setup, you will encounter an error. ::: 5. Enter a **Secret** for the webhook endpoint. This secret will be used to validate whether the webhook is from **RazorPay**. Do not expose this secret publicly. Click [here](https://razorpay.com/docs/webhooks/validate-test/) to know more validating webhooks. 6. In the **Alert Email** field, enter the email address to which the notifications should be sent in case there's a webhook failure. 7. Select the required events from the list of **Active Events**. 8. Click **Create Webhook**. After you set a webhook, it appears on the list of webhooks. :::note To modify the webhook further, you can select the webhook and click **Edit**. You can refer this [video](https://www.youtube.com/watch?v=qojkh8Vbnek) as well. ::: ## Enable Razorpay events in your AI agent Enable Razorpay events in your AI agent to trigger flows based on event occurrences, allowing seamless integration of payment processes with AI agent functionalities. 1. In Development/Staging environment, go to **Automation** > **Event** > **Integrations**. 2. Activate the event, **Razorpay Payment Status**. Click on the more options icon and select *Activate*. If there are multiple accounts, you need to activate for each account separately. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/razor-activate.png) 3. A journey with its trigger point as this event should be created in **Automation**. Based on the received event data, an appropriate message will be displayed to the end user. :::info If you have added multiple accounts in your platform, enable events for each of those accounts. ::: ## Generate Razorpay payment Link from AI agent conversation The following are the use-cases that are supported in this integration. :::note When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. ::: 1. Go to Development/Staging environment and navigate to **Automation** > **Build** > Select the flow where you want to Generate payment link. 2. Click **Add node** > **Integrations** > **Razorpay payment gateway**. In the Automation flow builder, select the **Integrations** node and click **Razorpay** from the list of integrations that have been enabled for that AI agent. 3. In the first drop-down choose **Generate Payment Link**. 4. Configure all the required fields. The table below contains sample values, data types, and descriptions for these fields. | Field name | Sample value| Data type |Description | | -------- | -------- | -------- |----| Amount|100|String| The amount that should be collected using payment link. This must be in the smallest unit of the currency. For example, if you want to receive a payment of ₹299.95, you must enter the value 29995.| |Currency|INR|String|Default is **INR**, we also accept payments in [international currencies](https://razorpay.com/docs/payments/payments/international-payments/#supported-currencies).| |Description|Test|String|A brief description of the payment link.| IsUPILinkedEnabled|true|Boolean| Indicates if the payment link is a UPI payment link. **true:** A UPI payment link has been created. **false:** It is a standard payment link and not a UPI payment link. | |CustomerObject `{ "contact": "+919999999999", "email": "gaurav.kumar@example.com", "name": "Gaurav Kumar" },` |Object|Customer details| |Notes| `{ "policy_name": "Jeevan Bima" }`|Object|Set of key-value pairs that can be used to store additional information. You can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters.| |NotifyOptions| `{ "email": true, "sms": true }`|object|Defines who handles the payment link notifications.| CallbackUrl |https://example-callback-url.com/ |String|if specified it adds a redirect URL to the payment link. Once a customer completes the payment, they will be redirected to the specified URL.| |CallbackMethod|get|String| If callback_url parameter is passed, callback_method must be passed with the value get.| |EnableRemindertrue||Boolean|This is used to send reminders for the payment link. Possible values: **true:** To send reminders. **false:** To disable reminders. |CustomOptions | Reference details|Object|Custom options| **Sample success response:** ```json { "accept_partial": false, "amount": 1000, "amount_paid": 0, "callback_method": "get", "callback_url": "https://example-callback-url.com/", "cancelled_at": 0, "created_at": 1591097057, "currency": "INR", "customer": { "contact": "+919999999999", "email": "gaurav.kumar@example.com", "name": "Gaurav Kumar" }, "description": "Payment for policy no #23456", "expire_by": 1691097057, "expired_at": 0, "first_min_partial_amount": 100, "id": "plink_ExjpAUN3gVHrPJ", "notes": { "policy_name": "Jeevan Bima" }, "notify": { "email": true, "sms": true }, "payments": null, "reference_id": "TS1989", "reminder_enable": true, "reminders": [], "short_url": "https://rzp.io/i/nxrHnLJ", "status": "created", "updated_at": 1591097057, "user_id": "" } ``` **Sample response in case of fallback:** ```json { "error": { "code": "BAD_REQUEST_ERROR", "description": "The api key provided is invalid", "source": "NA", "step": "NA", "reason": "NA", "metadata": {} } } ``` To use this **Integration Action Node** in an app.yellow.ai AI agent, refer the following example: ```js app.executeIntegrationAction({ "integrationName": "razorpay", "action": "Generate Payment Link - Partial Payments”, "dynamicParams": { "amount": "500", "currency": "INR", "description": "test", "isUPILinkEnabled": true, "customerObject": { "name": "GaurarKumar", "contact": "+919999999999", "email": "gaurav.kumar@example.com" }, "notes": { "policy_name": "Jeevan Bima" }, "notifyOptions": { "sms": true, "email": true }, "callbackUrl": "https://example-callback-url.com/", "callbackMethod": "get", "enableReminder": "true", "customOptions": { "test":"testing" } } }).then((res) => { console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err) => { console.log("Error in action node", err); app.log(err, '||Error in action node||') }) ``` #### Event payload for Payment status ```js { "id": "rfnd_FS8TWyPrCsa0OB", "entity": "payment", "amount": 50000, "currency": "INR", "payment_id": "pay_FPoJKWQQ8lK13n", "notes": { "comment": "Customer Notes for Webhooks." }, "receipt": null, "acquirer_data": { "arn": null }, "created_at": 1597734071, "batch_id": null, "status": "processed", "speed_processed": "normal", "speed_requested": "optimum" } ``` ### Generate Payment Link for Partial Payments 1. In the Automation flow builder, select the **Integrations** node and click **Razorpay** from the list of integrations that have been enabled for that AI agent. 2. After clicking **Razorpay**,an **Integration Action Node** will be added to the flow builder. When you click that node, you will see all use-cases of this integration in a drop-down. Choose **Generate Payment Link** from them. 3. Fill in all the mandatory fields. The below-mentioned table consists of the sample value,data type and description for all these fields. | Field name | Sample value| Data type |Description | | -------- | -------- | -------- |----| | Text | Text | Text | Amount|100|String|The amount that should be the payment link. This must be in the smallest unit of the currency. For example, if you want to receive a payment of ₹299.95, you must enter the value 29995.| |Currency|INR|String|Default is **INR**, we also accept payments in [international currencies](https://razorpay.com/docs/payments/payments/international-payments/#supported-currencies).| |Description|Test|String|A brief description of the payment link.| IsUPILinkedEnabled|true|Boolean| Indicates if the payment link is a UPI payment link. **true:** A UPI payment link has been created. **false:** It is a standard payment link and not a UPI payment link. | |CustomerObject| `{ "contact": "+919999999999", "email": "gaurav.kumar@example.com", "name": "Gaurav Kumar" },`|Object|Customer details| |Notes| `{ "policy_name": "Jeevan Bima" }`|Object|Set of key-value pairs that can be used to store additional information. You can enter a maximum of 15 key-value pairs, with each value having a maximum limit of 256 characters.| |NotifyOptions| `{ "email": true, "sms": true }`|object|Defines who handles the payment link notifications.| CallbackUrl |https://example-callback-url.com/ |String|if specified it adds a redirect URL to the payment link. Once a customer completes the payment, they will be redirected to the specified URL.| |CallbackMethod|get|String| If callback_url parameter is passed, callback_method must be passed with the value get.| |EnableRemindertrue||Boolean|This is used to send reminders for the payment link. Possible values: **true:** To send reminders. **false:** To disable reminders. |CustomOptions | Reference details|Object|Custom options| |isPartialPaymentAccepted|true|Boolean|Indicates whether customers can make partial payments using the payment link. **Possible values:** **true:** Customer can make partial payments.**false (default):** Customer cannot make partial payments.| **Sample response in case of success:** ```json { "accept_partial": false, "amount": 1000, "amount_paid": 0, "callback_method": "get", "callback_url": "https://example-callback-url.com/", "cancelled_at": 0, "created_at": 1591097057, "currency": "INR", "customer": { "contact": "+919999999999", "email": "gaurav.kumar@example.com", "name": "Gaurav Kumar" }, "description": "Payment for policy no #23456", "expire_by": 1691097057, "expired_at": 0, "first_min_partial_amount": 100, "id": "plink_ExjpAUN3gVHrPJ", "notes": { "policy_name": "Jeevan Bima" }, "notify": { "email": true, "sms": true }, "payments": null, "reference_id": "TS1989", "reminder_enable": true, "reminders": [], "short_url": "https://rzp.io/i/nxrHnLJ", "status": "created", "updated_at": 1591097057, "user_id": "" } ``` **Sample response in case of fallback:** ```json { "error": { "code": "BAD_REQUEST_ERROR", "description": "The api key provided is invalid", "source": "NA", "step": "NA", "reason": "NA", "metadata": {} } } ``` To use this **Integration Action Node** in an app.yellow.ai AI agent, refer the following example: ```js app.executeIntegrationAction({ "integrationName": "razorpay", "action": "Generate Payment Link", "dynamicParams": { "amount": "500", "isPartialPaymentAccepted":true, "currency": "INR", "description": "test", "isUPILinkEnabled": true, "customerObject": { "name": "GaurarKumar", "contact": "+919999999999", "email": "gaurav.kumar@example.com" }, "notes": { "policy_name": "Jeevan Bima" }, "notifyOptions": { "sms": true, "email": true }, "callbackUrl": "https://example-callback-url.com/", "callbackMethod": "get", "enableReminder": "true", "customOptions": { "test":"testing" } } }).then((res) => { console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err) => { console.log("Error in action node", err); app.log(err, '||Error in action node||') }) ``` ### Intiate refund 1. In the Automation flow builder, select the **Integrations** node and click **Razorpay** from the list of integrations that have been enabled for that AI agent. 2. After clicking **Razorpay**,an **Integration Action Node** will be added to the flow builder. When you click that node, you will see all use-cases of this integration in a drop-down. Choose **Generate Payment Link** from them. 3. Fill in all the mandatory fields. The below-mentioned table consists of the sample value,data type and description for all these fields. | Field Name | Sample value | Data type |Description| | -------- | -------- | -------- |---| | Amount|100|String| The amount to be refunded (in the smallest unit of currency). For example, refund in INR, a value of 100 means 100 paise (equivalent to ₹1).| |paymentId|pay_FgR9UMzgmKDJRi|String|The unique identifier of the payment for which a refund is initiated| refundType|normal|String|Speed at which the refund should be processed. **Possible values:****normal:** Indicates that the refund will be processed at a normal speed i.e. within 5-7 working days.**optimum:** Indicates that the refund will be processed at an optimal speed based on Razorpay's internal fund transfer logic. If the refund has to be processed instantly, **Razorpay** will do so irrespective of the payment method. If an instant refund is not possible, Razorpay will initiate a refund at the normal speed. For example, in case of payments made using debit cards, netbanking or unsupported credit cards. notes|{}|object|Key-value store for storing your reference data. A maximum of 15 key-value pairs can be included.| 4. The **Generate Payment Link Integration Action** Node has two outcomes, success or failure. Based on the success/failure of the execution of the **Integration Action Node**, the flow will proceed to **success** or **fallback** branches respectively. **Success Response:** ```js { "id": "rfnd_FgRAHdNOM4ZVbO", "entity": "refund", "amount": 10000, "currency": "INR", "payment_id": "pay_FgR9UMzgmKDJRi", "notes": { "notes_key_1": "Beam me up Scotty.", "notes_key_2": "Engage" }, "receipt": null, "acquirer_data": { "arn": "10000000000000" }, "created_at": 1600856650, "batch_id": null, "status": "processed", "speed_processed": "normal", "speed_requested": "normal" } ``` To use this **Integration Action Node** in an app.yellow.ai AI agent, refer the following example: ```js app.executeIntegrationAction({ "integrationName": "razorpay", "action": "Generate Payment Link", "dynamicParams": { "amount": "500", "refundType":"normal", "paymentId":"pay_FgR9UMzgmKDJRi", "notes": { "policy_name": "Jeevan Bima" } } }).then((res) => { console.log("response from action node", res); app.log(res, '||Response from action node||') }).catch((err) => { console.log("Error in action node", err); app.log(err, '||Error in action node||') }) ``` --- ## Salesforce messaging :::info This legacy Chat product will be deprecated on February 14, 2026, and is currently in maintenance mode. While existing implementations will continue to function, we strongly recommend that you avoid setting up new chat channels. You can use Salesforce Messaging instead. ::: Integrating Salesforce messaging with Yellow.ai allows you to connect with live agents for query resolution. **Key benefits of integrating Salesforce messaging with Yellow.ai**: * **Live agent support** – Use the Salesforce Messaging app to connect with live agents directly within the chatbot interface for real-time query resolution. * **Live chat management** – Agents can easily accept and manage chat requests within the Salesforce platform. Once the agent is connected, the chat session is displayed within the Salesforce interface for efficient communication. * **Enhanced customer experience** – Improves customer support by enabling live agent interactions and faster query resolution. #### Prerequisites Before proceeding with the integration, ensure that the Salesforce administrator provides the following details to the Integrations team: * Organization ID * Developer Name * Organization Base URL ## Connect Salesforce messaging with Yellow.ai To integrate Salesforce messaging with Yellow.ai, follow these steps: 1. Login to the [Yellow platform](https://cloud.yellow.ai/) and navigate to the **Development** environment. * In a two-tier environment, you can only add accounts in the Development environment. * In a three-tier environment, you can only add accounts in Staging/Sandbox environment. 2. Go to **Extensions** > **Integrations** > **Live chat** > **Salesforce messaging**. ![](https://imgur.com/z219qVE.png) 3. In **Give account name**, enter a unique name using only lowercase alphanumeric characters and underscores (_). 4. In **Organization Id**, enter the unique identifier of your Salesforce organization. 5. In **Developer Name**, enter the identifier for the specific deployment within your organization. 6. In the **Organization Base URL**, enter the API endpoint of your Salesforce organization (example, `https://t-ct--fulluat.sandbox.my.salesforce-scfd.com`). 7. In **Customise chat headers**, enable this option to personalize bot headers with agent names and descriptions. The original settings will be restored once the ticket is closed. 7. Click **Connect**. ![](https://imgur.com/oeJsBNT.png) * To connect more accounts, repeat the steps outlined above for each account. You can add a maximum of 15 accounts. ## Connect bot users to live agents on Salesforce This integration enables bot users to connect with live agents on the Salesforce platform directly from your Yellow.ai account. 1. In the Automation flow builder, select the **Raise Ticket** node. ![](https://imgur.com/wINFHpS.png) 2. Select **Salesforce messaging** from the **Live chat agent** drop-down. 3. In **Account name**, select the appropriate Salesforce account. The following table contains the details of each field in the **Raise ticket** node. | Field name | Sample value | Data type |Description | -------- | -------- | -------- |-----| |Message after ticket assignment| Requesting live agent connection | String | Message will be displayed to the user once a ticket is assigned to an agent.| |Name| Rio | String |Name of the user| |Mobile| 9870000000| String| Mobile number of the user| Email|test@gmail.com| String | Email address of the user Query| I have a concern regarding my flight ticket|String| Subject/topic/reason why the ticket was created| Salesforce messaging custom fields|
`{"mobile_Number_c": "9999444443","email_c": "test@gmail.com"}`
|Array| List of details provided by the user before initiating the chat with the live agent| ## Handle chat sessions in Salesforce 1. To manage live chat interactions, ensure that agents are available on Salesforce platform to accept chat requests from users. Once connected, the chat session will be displayed within the Salesforce interface. 2. To end the chat, the agent needs to close the chat tab, which will automatically trigger the ticket-closed event on the Yellow.ai platform, marking the session as completed. ![](https://imgur.com/54RuSjV.png) --- ## Salesforce CRM Salesforce is a cloud-based software company that provides a range of business solutions. At its core, Salesforce offers Customer Relationship Management (CRM) software, which helps businesses manage and analyze customer interactions and data. The CRM system allows companies to track sales, marketing efforts, customer service, and other aspects of their operations. In addition to CRM, Salesforce has various subsidiaries and products that extend its capabilities. For instance, they offer live chat solutions to facilitate real-time customer support and engagement. Yellow.ai supports integration with Salesforce CRM and [Salesforce Live Chat](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/salesforcelivechat). :::note To configure Salesforce CRM, the user account must have Super Admin–level permissions. ::: ## Table of contents 1. [What Salesforce actions are available on Yellow.ai?](#salesforce-actions-that-can-be-managed-from-yellowai) 2. [How to connect Salesforce CRM with Yellow.ai?](#connect-salesforce-crm-with-yellowai) 3. [How to use Salesforce CRM from Yellow.ai?](#manage-your-salesforce-crm-through-bot-conversations) ## Salesforce actions that can be managed from yellow.ai After integrating with Salesforce CRM, you can perform the following tasks directly from the Yellow.ai platform: | Action | Description | |---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | createRecord | Creates a record in the integrated Salesforce account. The following are the different types of available records: 1. Accounts2. Contacts3. Opportunities4. Leads5. Cases6. Campaigns7. Products and Price Books8. Tasks9. Events10. Custom11. Objects12. Documents and Attachments | | updateRecord | Updates a record in the integrated Salesforce account. | | searchRecord | Looks for a particular info in the integrated Salesforce account. | | Query by SQL | Query and retrieve data from the Salesforce database. You can create SQL queries by referring to the following links: [Link 1](https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_soql) [Link 2](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm) | | Get User Details by Owner ID | In Salesforce, each user has a unique identifier known as the Owner Id. This process involves using the Owner Id of a record (e.g., Account, Contact, or Opportunity) to fetch details about the user who owns that particular record. | ## Connect Salesforce CRM with Yellow.ai **Prerequisites:** 1. An active Salesforce CRM account 2. An active yellow.ai account 3. Super Admin access To connect your Salesforce CRM account with Yellow.ai, follow these steps: 1. On the left navigation bar, go to **Extensions** > **Integrations**. ![](https://i.imgur.com/JagYT5w.png) 2. Navigate to **CRM** > **Salesforce CRM**. Alternatively, you can use the Search box to find the integration app. ![](https://i.imgur.com/0RGxeRr.png) 3. Choose a unique name for your Salesforce account and select the Salesforce CRM environment. It is recommended to use a name that reflects its purpose for improved usability. ![](https://i.imgur.com/tYjILVM.png) 4. Click **Connect**. You will see a pop-up screen to login with a list of accounts. 5. Choose the respective account and click **Log in** ![](https://i.imgur.com/SLUrxzd.gif) 6. If you have multiple accounts, click **+Add account** and follow the above mentioned steps to add each one. You can add a maximum of 15 accounts. ![](https://i.imgur.com/dGxkcov.png) :::note 1. In a two-tier environment, such as bots with only Development/Live environments, you can add account names only in the development mode. Once added and flows have been built, in the Live mode, you can only choose the account names and not edit them. 2. In a three-tier environment, such as bots with Staging/Sandbox/Production modes, in Staging and Sandbox modes, you can add and edit new accounts. However, in Production, only the account details added in Staging will be available. You can only map in the production environment. ::: ## Manage your Salesforce CRM through bot conversations To carry out a certain action in your Salesforce account, follow these steps: 1. Go to **Automation** and [create a flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys#2-create-a-flow) based on your requirement. ![](https://i.imgur.com/Wcacej3.png) 2. In whichever point you want the bot to access Salesforce, include the Salesforce CRM node. For that, drag the node connector, go to **Integrations** > **Salesforce CRM**. ![](https://i.imgur.com/YVDlhAu.png) 3. In the Salesforce CRM node, fill in the following ![](https://i.imgur.com/LtUHOev.png) * **Account name:** Choose the preferred Salesforce CRM account. * **Action:** Choose the action to be performed. * **Select Objects:** Choose the Salesforce CRM object in which the chosen action should be performed. * Depending on the selected object, the corresponding fields will be shown. To collect this information from users, you must construct the flow accordingly and [store the data in variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#41-store-data-in-variables). These variables will then be used in this context. 4. Each Salesforce action returns a response as a JSON object or an array. [Store that response in a variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#41-store-data-in-variables) and [pass that variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#42-retrieve-data-from-variables) in a [message node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) to display that response to the end user. | Action | Syntax | |--------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | To consume the JSON object as it is | `{{variables.variable_name_object.choices.0.text}}` | | To access fields in JSON object response | `{{variables.variable_name.field_name}}` | | To access array values| Use keys. For instance, to access the weather description from the below response, use `{{variables.API_var.weather.0.description}}` because the value is inside an array and is the first value (0th index).| **Sample response:** ``` { "coord": { "lon": 77.2167, "lat": 28.6667 }, "weather": [ { "id": 761, "main": "Dust", "description": "dust", "icon": "50d" } ], } ``` #### Supported Version This integration will support the latest version's (52.0) releases. For more information on this, please click [here](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/api_rest_eol.htm). --- ## Salesforce Live Chat Yellow.ai’s integration with [Salesforce](https://www.salesforce.com/in/) lets you connect with the live chat agents of **Salesforce** to resolve your queries. :::note Agents must remain available (online) on Salesforce (when queue management and offline support are not configured). ::: ## Connect Salesforce with Yellow.ai In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. To connect your yellow.ai account with **Salesforce**, follow these steps. 1. On the left navigation bar, go to **Extensions** > **Integrations** > **Live chat** > **Salesforce live chat**. 2. Search for **Salesforce Live Chat** or choose the category named **Live chat** from the left navigation bar, and then click on **Salesforce Live Chat**. ![](https://i.imgur.com/nCJ9Tdd.png) 3. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (`_`). Fill in the required fields. 4. In **Organization Id**, enter the unique identifier of the Salesforce account that represents a particular organization. To fetch this, refer to the following steps: a. Login to your Salesforce account. b. Click on the app launcher and choose **Service Console**. c. Click on the setup button at the top right corner and select **Setup**. d. In the **Quick Find** section, search for **Deployments** in the **Chat** section. e. Click on the deployment that is already created (if not, create a deployment). f. In the deployment script, locate an ID starting with **00D**, which is the Organization ID. 4. In **Deployment Id**, enter the identifier for the specific deployment within your organization. To fetch this, refer to the following steps: a. Login to your Salesforce account. b. Click on the app launcher and choose **Service Console**. c. Click on the setup button at the top right corner and select **Setup**. d. In the **Quick Find** section, search for **Deployments** in the **Chat** section. e. Click on the deployment that is already created (if not, create a deployment). f. In the deployment script, locate an ID **not starting with 00D**, which is the Deployment ID. 5. In **Button Id**, enter the unique identifier for the chat button that initiates a live chat session. Ensure that the agent is available with the Button ID you are configuring for the integration to connect successfully. To obtain this ID, follow these steps: a. Login to your Salesforce account. b. Click on the app launcher and choose **Service Console**. c. Click on the setup button at the top right corner and select **Setup**. d. In the **Quick Find** section, search for **Chat Buttons and Invitations** in the **Chat** section. e. Click on the button that is already created (if not, create a button). f. In the **Chat Button Code**, locate an ID starting with **573**, which is the Button ID. 6. In **Organization Base URL**, enter the chat API endpoint of a particular salesforce organization. To fetch this, refer to the following steps: a. Login to your Salesforce account. b. Click on the app launcher and choose **Service Console**. c. Click on the setup button at the top right corner and select **Setup**. d. In the **Quick Find** section, search for **Chat Settings** in the Chat section. e. Find the **Chat API Endpoint** present and copy the URL value till **.com**. This is your Organization Base URL. 7. In **Agent device**, specify the type of device the agent will use (e.g., desktop, mobile) 8. In **Agent screen resolution**, enter the screen resolution of the agent's device to ensure optimal chat interface display. Example: For desktop, it could be 2560 x 1600. 9. Configure other details: Option | Description ------ | ----------- **Language** | Language preferred by the user to chat with the live agent. **Agent Timeout** | The time duration (in minutes) after which an agent will be timed out if inactive. Default Value: 5 minutes **Enable queue updates** | Enable this for users to receive updates on their position in the queue during chat interactions. **Enable sticky agent** | Enable this option to assign chats to a specific agent based on the agent ID provided in the Raise Ticket. **Disconnect chat from** | Enable this to immediately close tickets for users waiting in the queue but not yet assigned to an agent. **Send queue updates event to** | Enable this to inform users about their queue position with real-time updates sent as events to the bot, allowing developers to customize bot flows based on the queue status. **Customise chat headers** | Enable this to personalize the bot headers with agent names and descriptions. The bot headers will be restored ot original settings once the ticket is closed. 10. Once you're done, click **Connect**. 11. If you have multiple accounts, click on **+ Add account** and follow the above mentioned steps to add each of them. You can add a maximum of 15 accounts. ## Connect bot users to live agents on Salesforce This integration lets you connect with live agents on the **Salesforce** platform from your yellow.ai account. :::note - When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. - During the testing process, agents should be **online** for the specific button ID or group mapped in the configuration. ::: :::info Use **Ticket-closed** in the **Raise Ticket node** to perform specific actions when a live chat closes, instead of using the **ticket-close** event. ::: 1. In the Automation flow builder, select the **Raise Ticket** node. 2. Select **Salesforce Live Chat** from the **Live chat agent** drop-down list. ### Raise Ticket Node — Field Details | Field Name | Sample Value | Data Type | Description | |-----------------------------------|----------------------------------------------------------------------------------------------------------------------|-----------|---------------------------------------------------------------------------------------------------------------------| | Message after ticket assignment | Requesting live agent connection. | String | The message that will be displayed to the end user after a ticket is successfully assigned to an agent | | Name | Rajesh | String | Name of the user | | Mobile | 9870000000 | String | Mobile number of the user | | Email | test@gmail.com | String | Email address of the user | | Query | I have a concern regarding my flight ticket | String | The subject/topic/reason why the ticket was created | | Salesforce Live Chat Custom Fields | ```json [ { "label": "Mobile", "value": "...", "transcriptFields": [...] }, { "label": "Chat", "value": "...", "transcriptFields": [...] } ] ``` | Array | The list of details provided by the user before initiating the chat with the live agent | | Salesforce Live Chat Custom Entities | ```json [ { "entityName": "Contact", "saveToTranscript": "contact", ... } ] ``` | Array | The records created/searched depending on what `[EntityFieldsMaps](...)` has enabled | | Agent ID | agent_12345 | String | Unique ID of the agent to assign to the bot user. Applies only when Sticky Agent option is enabled | **Advanced options** ### Advanced Options – Field Details | Field Name | Sample Value | Data Type | Description | |-----------|--------------|-----------|-------------| | Message after agent assignment | `You are now connected to {{liveAgent}}.` | String | Message shown to the end user when an agent is assigned. Use `{{liveAgent}}` to display the agent's name. | | Language preference | English | String | Language preferred by the end user to chat with the live agent. | | Message to display queue position | `Your queue position is {{position}}` | String | Message shown when the ticket is in queue. Use `{{position}}` to show current queue position. | | Message to display updated queue position | `Your current queue position is {{position}}` | String | Message shown when queue position updates. Use `{{position}}` to display the latest position. | | Message after agent transfer | `Your chat has been transferred to {{liveAgent}}` | String | Message shown when chat is transferred. Use `{{liveAgent}}` to show new agent's name. | | Message to display estimated wait time before agent assignment | `The estimated wait time for the chat to get assigned is {{waitTime}} seconds` | String | Notifies user about estimated wait time. Use `{{waitTime}}` to display the duration. | | Display agent name | true | Boolean | When enabled, displays the chat agent’s name on assignment or transfer. | | Warning message to display after end user inactivity | Idle warning | String | Message displayed if the user is inactive. | | Timeout message to display after end user inactivity | Idle timeout | String | Message shown when live chat ends due to user inactivity. | | Message after failure in establishing connection | Connection failure | String | Message shown when there is a failure connecting to a live agent. | | Message after agent has disconnected from the chat | Agent has disconnected | String | Message shown when agent disconnects. If no other agent is available, the fallback message from "failure in establishing connection" is used. | | Message to display after chat ends due to agent inactivity | Agent timeout occurred | String | Message shown when agent exceeds the configured inactivity threshold. | | Send chat transcript | **True** or **False** | Boolean | Whether to send conversation history to the agent. Pass **True** to send, **False** to skip. | :::note **For "Send chat transcript":** If the entire transcript exceeds Salesforce's single message character limit, it will be split and sent as multiple messages. For example: If the transcript is **8000 characters** and the limit is **4000**, it will be sent as **two packets** of 4000 characters each. ::: | **Sample success response** ```json { "assignedTo": true, "success": true, "status": "ASSIGNED", "ticketInfo": "{{apiresponse}}" } ``` :::note apiresponse represents the raw response from the Salesforce create ticket API ::: **Sample failure response** ```json { "success": false, "assignedTo": false, "agentNotAvailable": true, "message": "TicketId is not created and transferring the control back to the bot", "ticketInfo": "{{apiresponse}}" } ``` ## Steps to set up bot in Salesforce Live Chat 1. Login to your [Salesforce account](https://login.salesforce.com/?locale=in) and click **Setup** ![](https://i.imgur.com/oMnJ2yc.png) 2. On the left side bar search, search for **Visualforce Pages** and click on it. 3. Click **New** to create a new VF page. ![](https://i.imgur.com/M1h9H27.png) 4. Perform the following actions: * Enter the **Label**,**name** and check the **Available for Lightning. Experience, Experience Builder sites, and the mobile app** option. * Paste the embedded bot code into the markups section between the tags. * Click **Save**. ![](https://i.imgur.com/ddX5fGC.png) 5. Go back to the left side bar search and search for **App Manager** and click it. ![](https://i.imgur.com/ddX5fGC.png) 6. Scroll down to **Service Console** and click **Edit**. ![](https://i.imgur.com/mbiy9SW.png) 7. Click **Utility items(Desktop only)** and click **Add Utility Item**. ![](https://i.imgur.com/1UT4ElB.png) 8. Select **VisualForce** from the drop-down. ![](https://i.imgur.com/WOZgdEV.png) 9. Perform the following actions in the following page. * Add **Label** , **Icon**, **Panel Width**, **Panel Height**. * Under **Component Properties** deselect **Show Label**. * In **Visualforce Page Name**, add the name of the VF page created in **step 4**. * Click **Save**. ![](https://i.imgur.com/FDOn8Ht.png) 10. Go to **App launcher** and navigate to Service Console. You should see the bot at the bot footer. ![](https://i.imgur.com/PuNynWd.png) ### Reference [Salesforce Chat REST API Resources](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_API_requests.htm) --- ## SAML integration for AI agent SAML (Security Assertion Markup Language) authentication allows you to authenticate users during their conversations with our AI agent. It ensures that only logged-in users can access specific journeys, such as viewing calendars, personal records, or restricted enterprise information. This guide explains how to configure SAML authentication for your AI agent, including prerequisites, mandatory fields, session management, and the authentication flow. ## When to Use SAML Authentication Use SAML authentication if you want to: * Restrict AI agent access to authenticated users only. * Enable single sign-on (SSO) with any identity provider. ## Prerequisites Before configuring SAML authentication, ensure that you have: * An active identity provider (IdP) such as Azure AD, Okta, or JumpCloud. * Admin access to configure an application on the IdP. * Access to the following details from your IdP: * **Authorization URL** (IdP SSO login endpoint) * **IdP Certificate** (X.509 certificate, usually downloadable from IdP metadata) * **Audience** ## Configure SAML for AI agent authentication ### 1. Create a SAML Application in Your IdP 1. Log in to your identity provider (Azure, Okta, JumpCloud, etc.). 2. Create a new SAML application. 3. Add the following configuration values in the IdP: * **Redirect URI**: Provide the AI agents [Redirect URI](#add-redirection-uri). * **Audience**: Use the Audience value provided by the agent platform. 4. Download the **IdP Certificate** or copy it from the metadata. ### 2. Configure your SAML in the Yellow.ai cloud platform 1. Switch to development (Sandbox/Staging) environment, go to **Extensions** > **Integrations** > **Tools & utilities**. 2. Click **Generic SAML**. You can also use the search bar to find the integration. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/saml-connected.png) 3. Fill in the following mandatory fields: ![](https://cdn.yellowmessenger.com/assets/yellow-docs/add-account.png) * **Account name** – A unique identifier for this SAML setup (e.g., "AzureSSO"). * **Authorization URL** – The IdP login endpoint. * **IdP certificate** – Paste the X.509 certificate from the IdP. * **Audience** – Enter the unique identifier for the Service Provider (SP). This is a crucial security field that specifies the application this SAML assertion is intended for. The application will reject any assertion where the Audience URI does not match its own ID. This value is provided by the SP and is often a URL. (It is typically a URL or a Uniform Resource Name (URN), such as `https://yourapp.com/saml/metadata` or `urn:google:workspace`.) * **Session expiry (in hours)**: Set how long a user’s authenticated session remains valid. After the session expires, users will be prompted to re-authenticate via SAML before continuing restricted conversation flows. Default value is 3 hours and maximum value is 6 hours. 4. Click **Connect**. ## Add Redirection URI The **Redirection URI** is the endpoint on our AI agent platform where the identity provider (IdP) sends the authentication response after a user logs in. This URI is to ensure that the authentication handshake is completed successfully. 1. On the **Generic SAML Integration** configuration page, click the **Redirection URI** displayed on the right to copy it. 2. Add this URI to your **Identity Provider (IdP) configuration**. This step is mandatory—authentication will not succeed unless the Redirect URI is registered with the IdP. **Example format**: ``` https://r6.cloud.yellow.ai/api/galaxy/genericsaml ``` ## Adding Redirect URI to Your Identity Provider (IdP) After copying the **Redirect URI** from the Generic SAML Integration page, you must add it to your IdP configuration. This ensures the IdP knows where to send authentication responses after a user successfully signs in. :::note The **Redirect URI differs by region and environment**. Make sure you copy the URI directly from your **Generic SAML Integration configuration page** in the platform. Do not reuse values from another environment (e.g., staging vs. production) or region, as authentication will fail if mismatched. ::: ### Azure Active Directory (Azure AD) 1. Sign in to the [Azure portal](https://portal.azure.com). 2. Navigate to **Azure Active Directory** > **Enterprise Applications**. 3. Select your application or create a new one for the AI agent. 4. Under **Manage**, go to **Single sign-on** > **Basic SAML Configuration**. 5. In the **Reply URL (Assertion Consumer Service URL)** field, paste the copied Redirect URI. 6. Save the configuration. ### Okta 1. Sign in to the [Okta Admin Console](https://admin.okta.com). 2. Go to **Applications** > **Applications** and select your app. 3. Under the **General** tab, click **Edit**. 4. In the **Single sign-on URL** field, paste the Redirect URI. 5. Save the changes. ### JumpCloud 1. Sign in to the [JumpCloud Admin Portal](https://console.jumpcloud.com). 2. Navigate to **User Authentication** > **SSO Applications**. 3. Select your app or create a new SAML app. 4. In the **ACS URL (Assertion Consumer Service URL)** field, paste the Redirect URI. 5. Save the configuration. --- ## Enable SAML success and failure events After integrating SAML, it is important to track whether authentication attempts succeed or fail. To ensure your AI agent is notified of the authentication status, enable the `generic-saml-success` and `generic-saml-failure` events. To enable: 1. Go to **Automation** > **Events** > **Integration** 2. Search for the SAML events mentioned above. * `generic-saml-success`: Triggered when the SAML authentication request completes successfully. * `generic-saml-failure`: Triggered when the SAML authentication request fails. 3. Click the **More options** icon and select **Enable**. --- ## Add SAML Authentication in your agent Flow Once SAML configuration is complete, you can enable authentication in your agent flow as explained below: ![](https://cdn.yellowmessenger.com/assets/yellow-docs/flow-chart.png) 1. Navigate to the specific Flow where you want to add authentication process. 2. In the agent flow, add an **Integration** node and select **Generic SAML**. 3. Choose the **Account name** associated with your SAML configuration. 4. In the **Action** field, you can set one of the following: * **Check user session** – Verifies if the user is already logged in. * **Generate SAML request** – Initiates a new authentication request. 5. In **Parse API response**, choose the desired function (needed only if you want the AI agent to automatically extract and process values from the SAML response). :::note You can write custom functions to process success and failure events. The authentication response is passed to the AI agent through the `{{{data}}}` object variable. In your function, you can extract details such as authentication status, error messages, or user attributes and use them to guide the conversation flow or handle fallbacks. ::: --- ### Troubleshooting | Issue | Possible Cause | Resolution | | -------------------------------- | ------------------------------------ | ------------------------------------------------------------- | | Authentication fails immediately | You will see proper reason in Failure event | Ensure Redirect URI matches in both IdP and AI agent configuration | | Certificate validation error | Expired or incorrect IdP Certificate | Download a fresh certificate from the IdP | | Users logged out too soon | Short session expiry configured | Increase session expiry up to 6 hours | | AI agent not redirecting | Missing Check User Session node, Redirect URI mismatch | Ensure the flow includes session validation | --- ## SAP Cloud For Customers (SAP IO) Yellow.ai Integration with SAP.io allows you to seamlessly connect your SAP cloud instance with the yellow.ai platform. With this integration, you can seamlessly connect their SAP instance with yellow.ai by providing the user name, password and the instance base URL. This connector will enable users to receive events for SAP objects. Furthermore, this connector will enable you to take actions, such as create, update, get and delete the tickets. Action | Description ------ | ------------ Create Service Request | Creates a new service request. Update Service Request | Updates an existing service request. Get Service Request | Retrieves details of a service request. Delete Service Request | Deletes a service request. :::note This integration will support the latest version releases. For more details, click [here](https://help.sap.com/doc/d0f9ba822c08405da7d88174b304df84/CLOUD/en-US/index.html). ::: ## Integrating SAP for cloud customers with your bot In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. To connect SAP with yellow.ai, follow these steps: 1. Switch to Development/Staging environment and go to **Extensions** > **Integrations** > **ITSM** > **SAP for cloud customers**. ![](https://i.imgur.com/YHdgNYZ.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (`_`). ![](https://i.imgur.com/esCBsax.png) 3. In **Username** and **Password**, enter your SAP cloud account's login credentials. 4. In **SAP base URL**, enter your account's domain URL. 5. Click **Connect**. 6. To connect another account, click **+Add Account** and proceed with the previous steps. You can add a maximum of 15 accounts. ## Accessing SAP Functions through Bot Conversation The SAP integration enables bot to perform various actions. These include creating new records, reading, updating, and deleting existing records. ![](https://i.imgur.com/5gjmTpH.png) :::note In cases with multiple accounts, you can select which account to use for accessing a specific action. ::: On-click the SAP cloud for customers node, and you can customize the object and action type along with the attributes you wish to pass. --- ## ServiceNow Integration ## ServiceNow integration overview The ServiceNow integration with Yellow.ai allows your AI agent to manage IT service requests and streamline service desk operations directly through conversations. With this integration, your bot can create, update, and retrieve ServiceNow tickets, helping teams handle incidents more efficiently and maintain consistent service experiences. | Action | Description | |-------------------------|-----------------------------------------------------| | Create ticket | Create a ticket in ServiceNow. | | Update ticket | Update a ticket in ServiceNow. | | Search ticket | Search for a ticket in ServiceNow. | | Upload file | Upload a file to ServiceNow. | | Get file | Fetch a file from ServiceNow. | | Get File list | Fetch a file list from ServiceNow. | | Get Category | Retrieves the list of available categories from your ServiceNow instance. A category represents a high-level classification of a service request or incident| | Get Sub Category | Fetches the sub-categories related to a selected category in ServiceNow. A sub-category represents a specific classification under a selected category| ## Connect ServiceNow with Yellow.ai Create an app on ServiceNow to fetch instance URL, client ID and client secret and input the details in Yellow.ai to establish this integration. ### Create an app on ServiceNow 1. Go to your **ServiceNow** instance, search for **Application Registry** in the **Filter Navigator**. ![](https://i.imgur.com/qBJ5dY5.png) 2. Go to **New** (on the top right corner) and click **Create an OAuth API endpoint for external clients** to create an application. ![](https://i.imgur.com/xBiqezj.png) 3. Fill in the following fields: ![](https://i.imgur.com/zgrRAo1.png) * **Name**: Enter a unique name for your application. * **Redirect URL**: Click the lock icon to open the field and add this [Redirect URL](https://cloud.yellow.ai/integration/oauth/serviceNow). * **Accessible from**: Choose **All Application Scopes** and click **Submit**. 4. Once the app is created, it will get listed as shown below. Click on it. ![](https://i.imgur.com/wLMT7Lp.png) 5. Copy the **Instance URL** (the URL on the address bar of your Service now account(as shown below), **Client ID** and **Client Secret**. To copy the client secret, click the lock icon and then copy. ![](https://i.imgur.com/rfa8kRA.png) ### Connect your ServiceNow accout with Yellow.ai This section guides you through linking your ServiceNow instance with Yellow.ai. Once connected, your AI agent can interact with your ServiceNow environment to manage service requests, fetch details, and automate routine IT support tasks. :::note In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. ::: 1. Switch to the Development/Staging environment and go to **Extensions** > **Integrations** > **ITSM** > **Service Now**. ![](https://i.imgur.com/8zjFIiE.png) 2. In **Give account name**, provide a name for the integration. You can use only lowercase alphanumeric characters and underscores (_). 3. Copy and paste the **Instance URL**, **Client ID** and **Client Secret** (as mentioned in the previous section) 4. Click **Connect**. 5. You will be prompted to grant authorization, click **Allow**. 7. To connect another account, click +Add Account and proceed with the previous steps. You can add a maximum of 15 accounts. ![](https://i.imgur.com/THcIVaJ.png) :::info 1. In a two-tier environment, add account names in Development and use them in Live. 2. In a three-tier environment, add accounts in Staging and Sandbox, and they'll be available in Production. ::: ## Manage ServiceNow actions from AI agent conversations From Yellow.ai you can access your ServiceNow instance and create, update and search a ticket, upload,get file and file list. 1. Go to **Automation** and [create a flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys#2-create-a-flow) that suits your use case. 2. Go to the specific point in the conversation where you want to add the node. Click **Add Node**, then go to **Integrations** and select **ServiceNow**. 3. Configure the node using the available options. 4. In **Account name**, xhoose the account to use for accessing a specific action. 5. In **Action:**, select the action to perform. | **Action** | **Description** | **Live Example in Bot Conversation** | |-----------------------|------------------|--------------------------------------| | **Create Ticket** | Creates a new incident or service request in ServiceNow. Use this when users report an issue. | 🗨️ *“My laptop won’t boot.”* 🤖 *“I’ve created a ticket for you — #INC78901. Our IT team will get back to you shortly.”* | | **Update Ticket** | Updates an existing ticket with new information, such as a status change, comment, or additional notes. | 🗨️ *“The issue still persists even after restarting.”* 🤖 *“Got it. I’ve updated ticket #INC78901 with your latest comment.”* | | **Search Ticket** | Searches ServiceNow for tickets based on filters like status, priority, or keywords. | 🗨️ *“Can you show me my open requests?”* 🤖 *“You currently have 2 open tickets: #INC78901 and #INC78902.”* | | **Upload File** | Attaches a file to a specified ticket. Common for logs, error screenshots, or policy documents. | 🗨️ *“Here’s the screenshot of the error.”* 📎 *(User uploads file)* 🤖 *“Thanks! I’ve uploaded this to ticket #INC78901.”* | | **Get File List** | Returns a list of all files attached to a specific ticket. | 🗨️ *“Did I attach the policy PDF to my ticket?”* 🤖 *“Ticket #INC78901 has the following files: policy_doc.pdf, error_log.txt.”* | | **Get File** | Retrieves a specific file from a ticket. | 🗨️ *“Please show me the error log I uploaded.”* 🤖 *“Here it is: [error_log.txt]”* (link or file preview) | | **Get Category** | Retrieves a list of available issue categories. | 🤖 *“Please select a category for your issue: Hardware, Software, Network.”* | | **Get Sub Category** | Fetches subcategories based on a selected category. | 🗨️ *“I selected ‘Hardware’.”* 🤖 *“Please choose a sub-category: Laptop, Printer, Monitor.”* | 6. **Select Objects:** Choose the object (**Incident**/**Request**) in which the chosen action should be performed. **Get File** action is an exception, the **Select Objects** field doesn't apply to this action. 7. Once you choose the object, the corresponding fields for that action and object is displayed. Fill these fields by adding nodes before the ServiceNow node to collect user information, or click 'Or' to manually input the details. To collect the information from user, add a [prompt node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#docusaurus_skipToContent_fallback) and [store the response in a variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#store-data-in-variables). Pass that variable in the respective field. * **Parse API response:** Select the function that will parse the API response(optional). To know more about how to use this, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/api/send-receive-apiresponses#parse-api-responses). 4. [Store the API response in a variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#store-data-in-variables) and pass it in a [message node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) to display the response to the end user. ## Configuring AI Agent for a sample Service Now use case Let's say that you want to fetch a ticket's information in **Requests** using the ticket number. 1. Add a [prompt node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-nodes#docusaurus_skipToContent_fallback) and collect the ticket number value in a variable. 2. Include the **ServiceNow** node wherever you want the bot to access ServiceNow and click the node. * **Account name:** Choose the **ServiceNow** account in which you want to perform this action. * **Action:** Choose **Search Ticket**. * **Select Objects:** Choose **Requests**. * **Select Fields:** Choose the field based on which you want to search. Here it's **Number**. * **Value:** Pass the variable which contains the number value (from step 1). You can also click **Or** and type the value if it is a static value. * **Parse API response:** Select the function that will parse the API response(optional). To know more about how to use this, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/api/send-receive-apiresponses#parse-api-responses). Store the response in a variable. 3. Use a [message node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) and pass this variable in it to display this response to the end user. **Alternative**: You can also [store the API response in a variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#store-data-in-variables) and use a syntax in a message node to display certain info from the API response. Refer to this [article](https://docs.yellow.ai/docs/platform_concepts/studio/api/add-api-apinode#display-api-response) for syntaxes. For example, you can use ``{{{variables.variablename.result.0.number}}}`` to retrieve the ticket number from the following response. ```json { "result": { "sys_updated_on": "2021-11-12 14:16:35", "task_effective_number": "INC0010005", "number": "INC0010005", "sys_updated_by": "admin", "opened_by": { "link": "https://dev61928.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04be441", "value": "6816f79cc0a8016401c5a33be04be441" }, "sys_created_on": "2021-11-12 14:16:35", "sys_domain": { "link": "https://dev61928.service-now.com/api/now/table/sys_user_group/global", "value": "global" }, "state": "1", "sys_created_by": "admin", "knowledge": "false", "opened_at": "2021-11-12 14:16:35", "short_description": "This is short description", "description": "Hardware Name : Dell Inspiron 27 7790nRequester Name : Shubhi SaxenanColor : Dark Black", "close_notes": "", "sys_class_name": "incident", "closed_by": "", "sys_id": "e788251187333010fc0763150cbb358c", "incident_state": "1", "urgency": "2", "severity": "3", "approval": "not requested", "upon_approval": "proceed", "category": "inquiry" } } ``` --- ## Service now live chat Yellow.ai seamlessly integrates with ServiceNow live chat, allowing you to connect your live agents from ServiceNow live chat with Yellow.ai. When a user seeks assistance from a live support agent, they'll be directly connected to ServiceNow's live agent through our platform. ## Connect ServiceNow live in Yellow.ai To integrate ServiceNow live on yellow.ai, follow these steps: :::note Agents should have AWA agent roles for accessing agent workspace. ::: 1. Go to the ServiceNow's [devloper portal](https://developer.servicenow.com/dev.do#!/home) and click on your profile picture. ![](https://i.imgur.com/22sdFN5.png) 2. Click **Activate Plugin** under **Instance action**. ![](https://i.imgur.com/U7UFeuw.png) 3. Search for **Glide Virtual Agent** and click **Activate** next to it. ![](https://i.imgur.com/6dTRctN.png) 4. Once your plugin gets activated, click **Start building**. ![](https://i.imgur.com/qEpausH.png) 5. Go to **All** > search for **System Application** and click **All** under **Automation**. ![](https://i.imgur.com/P21iwLs.png) 6. In the following screen search for **Virtual Agent API** and click **Install**. ![](https://i.imgur.com/9KJjXO6.png) 7. Once the installation is complete, create a **Service Channel** for the agents to handle user chats from Service Now. Go to **All** > **Advanced Work Assignment** > **Service Channels** > **New**. Click [here](https://docs.servicenow.com/en-US/bundle/vancouver-servicenow-platform/page/administer/advanced-work-assignment/task/awa-create-service-channel.html) for a detailed guide on creating service channels. ![](https://i.imgur.com/6ClMj0F.png) 8. Create a queue criteria for the chats to route to the agent. Go to **All** > **Advanced Work Assignment** > **Settings** > **Queues** > **New**. Click [here](https://docs.servicenow.com/en-US/bundle/vancouver-servicenow-platform/page/administer/advanced-work-assignment/task/awa-create-queue.html) for a detailed guide on creating queues. ![](https://i.imgur.com/7L1aEso.png) 9. To add webhook URL, go to **System Mailboxes**> **Outbound** > **REST Messages** > **VA Bot to Bot**. ![](https://i.imgur.com/qaFlqR1.png) 10. To enable authentication in Servicenow APIs go to **System web services** > **Scripted REST APIs** > **VA Bot Integration** > **Resource tab** > **Require**. ![](https://i.imgur.com/uhyR9UU.png) 11. Add trusted domains in **System Tables** > **Provider Channel Identity** > **VA Bot to Bot Provider Application**. For example, yellow.ai, yellowmessenger.com ![](https://i.imgur.com/QsQgnah.png) 12. Go to **All** > **System OAuth** > **Application Registry** > **New** > **Create an OAuth API endpoint for external clients**. ![](https://i.imgur.com/ngbC38r.png) 13. In the **Redirect URL** field, copy the redirect url from the inetgration section of yellow.ai and paste it here. To copy it from yellow.ai, go to cloud.yellow.ai > **Integrations** > search for **ServiceNow Live** > click **Redirect URL** (refer image below) ![](https://i.imgur.com/8W8AdTG.png) 14. In **Accessible from** field, choose **All Application Scopes** and click **Submit**. ![](https://i.imgur.com/MUKn4ar.png) 15. After it gets saved, click on the created app and copy the **Client ID** and **Client secret**. ![](https://i.imgur.com/Zc61P9n.png) 16. Go to cloud.yellow.ai > **Integrations** > search for **ServiceNow Live**. ![](https://i.imgur.com/EfONLBQ.png) 17. Fill in the following fields * **Give account name:** Provide a unique name to your account. * **Instance URL**: Enter your Service now instance URL. * **Client Id** and **Client Secret**: Paste the **Client ID** and **Client Secret** of your **ServiceNow** account from step 12. 15. Click **Connect**. :::info You can add a maximum of 15 accounts. Follow the above mentioned steps to add multiple accounts. ::: ## Activate ServiceNow events in Yellow.ai To inform the bot about specific events in ServiceNow, you must enable these events within Yellow.ai. By doing so, you can configure the bot to take specific actions in response to these events. The following are the events available for ServiceNow in Yellow.ai | Events | Descriptions | |-----------------------------------|--------------------------------------------------------| | servicenow-agent-joined | When a support agent in ServiceNow accepts the chat request | | ticket-closed | When agents in ServiceNow close tickets due to bot user inactivity | | servicenowlivechat_agent_messages | When a live agent messages the bot user | | servicenow-conversation-ended | When the live agent ends the conversation with the user | To activate these events: 1. Go to **Automation** > **Event** > **Integrations** > search for **ServiceNow**. ![](https://i.imgur.com/MZ8QNhN.png) 2. Click the ellipsis button and click **Activate** on the respective events. ## Connect users to ServiceNow Live Agents :::info Use **Ticket-closed** in the **Raise Ticket node** to perform specific actions when a live chat closes, instead of using the **ticket-close** event. ::: You need to build a flow that redirects your users to the ServiceNow agents and the agent needs to close the chat to end the chat in ServiceNow. 1. Go to **Automation** and [build a flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys) based on your requirement. ![](https://i.imgur.com/z7QtZM5.png) 2. Insert the **Integration node** wherever you want the flow to connect the user to the ServiceNow agent. To do so, drag and drop a [Raise ticket node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) and choose the integrated ServiceNow account in the **Live chat agent** drop down. 3. Fill in the following fields in the node. The variables chosen for these fields must be previously collect in the flow via node. To know more about this in detail, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#41-store-data-in-variables). | Field name | Sample value | Data type |Description | -------- | -------- | -------- |-----| |Pre-Agent Assignment Message|Requesting live agent connection.|String| The message that will be displayed to the end user after a ticket is successfully assigned to an agent| |Name| Rajesh|String|Name of the end user| |Mobile| 9870000000| String|Mobile number of the end user| Email|test@gmail.com|String|Email address of the end user Query|I have a concern regarding my flight ticket|String| The subject/topic/reason why the ticket was created| Priority|MEDIUM|String|The priority of the ticket| You can enable **Advanced Options** to access the advanced features of this node. 4. Once you have set up the flow, chats will get automatically forwarded to live agents on Service now live chat when this flow gets triggered. --- ## SFTP integration Use SFTP integration to securely sync and manage user data with your platform. This setup allows you to transfer files from your server to sync with **User 360**, enabling you to view and analyze user data in one place. To connect an SFTP server: 1. In Development/Staging environment, go to **Extensions** > **Integration** and search for the *SFTP* app. 2. Click **+Add account**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/img/cdp/sftp.png) 3. In **Give account name**, enter a unique name for the account. Use only lowercase alphanumeric characters and underscores (_) with a limit of 20 characters. Example value: `support_team_account`. 4. In **Host IP**, enter the IP address of your SFTP server. Example: `192.168.1.1` 5. In **Port**, enter the port number used for SFTP connection. Default: `22` 6. In **Username**, enter your SFTP server username. 7. Enable **Private key based authentication** if you want to authenticate with a private SSH key instead of uploading your SFTP account password. See [Private key setup](#private-key-setup) for how to obtain the key and allow access on your server. 8. In **Password**, enter the associated SFTP password. Applicable only if **Private key based authentication** is disabled. ### Private key setup {#private-key-setup} If you do not want to use a password, enable **Private key based authentication** (step 7) and reach out to our team at [support@yellow.ai](mailto:support@yellow.ai) for the SSH key material. Support will provide the **private key** to configure in the Yellow.ai SFTP integration and the matching **public key** for your SFTP server. On your SFTP host, only the **public key** must be trusted (never put the private key in `authorized_keys` or share it outside your organization). Add Yellow.ai’s public key for the SFTP user so the platform can connect without a password. To add Yellow.ai’s public key on your remote SFTP server, you can follow these steps (run as the SFTP user or adjust paths if your server uses a different home layout): ```bash # on remote system (SFTP user home or account used for this integration) mkdir -p .ssh nano .ssh/authorized_keys # append Yellow.ai's public key as one line (e.g. ssh-ed25519 or ssh-rsa ...) chmod 600 .ssh/authorized_keys chmod 700 .ssh ``` ### Sync SFTP data with User 360 Once the connection is established, you can enable automatic syncing of user data by turning on the **Sync SFTP with user 360 and view users’ data in your user 360** option. This allows the system to regularly import user information from your SFTP server, keeping your User 360 view up to date with the latest data. Learn more about [user data import through SFTP](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data/sync_users). --- ## Shopify ## 1. Introduction Shopify is an e-commerce platform that lets merchants worldwide to build and customize online stores to sell theor products. Integrating Shopify with Yellow.ai enables seamless access to Shopify data within our platform. This integration facilitates data utilization for effective campaigns, event management, and enhanced customer support. **Here are some key benefits of leveraging this integration**: * **Unified customer data & customer self-serve**: Gain a 360-degree view of your customers by integrating their Shopify data with other touchpoints. You can enable customers to access their data and order details conveniently through bot conversations. * **Personalized campaigns and automated workflows**: Leverage customer data to create targeted marketing campaigns, boost sales and create automated workflows. * **Better support with multi-channel**: Provide better customer support by accessing order history and customer details directly from Shopify and interact across various channels, including chat, email, Whatsapp and more. * **Time and Cost Saving**s: Reduce manual data entry, streamline processes, and save time and resources by automating tasks. ## 2.Integrate Shopify with Yellow.ai ### Step 1: Create a Shopify app in the developer portal 1. Open the Shopify developer portal and create a new app for your store. 2. Give the app a clear name (for example, "Yellow.ai Integration") and save it. 3. In the app settings, open **Versions** and click **Create version**. 4. In **Redirect URLs**, add `https://cloud.yellow.ai/integration/oauth/shopify_v2` and save the version. 5. From the app page, click **Install** to install the app in your Shopify admin. ### Step 2: Collect the credentials you will use in Yellow.ai You will need three values from Shopify. Keep them handy before you connect the integration: Option | What it means | How to find it ------ | ------------- | ------------- **shopName** | Your store's myshopify subdomain. | Open Shopify Admin → **Settings** → **Domains** and copy the `.myshopify.com` URL. If it is `https://acme-store.myshopify.com/admin`, then `shopName = acme-store`. **clientId** | The app's Client ID. | In the developer portal, open your app → **Settings** and copy the Client ID. **clientSecret** | The app's Client Secret. | In the developer portal, open your app → **Settings** and copy the Client Secret. ### Step 3: Connect the Shopify app to Yellow.ai 1. Login to [yellow.ai platform](https://cloud.yellow.ai/). 2. Go to **Integrations** > **Retail & ecommerce** > **Shopify shop**. Alternatively, you can use the Search box to find the integration app. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/shopify.png) 3. To **Add account**, fill in the required details. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/shopify-details.png) Option | Description ------ | ----------- **Give account name** | Provide a name for the Shopify account you want to connect. **Shop Name** | Enter the `shopName` you noted earlier (the part before `.myshopify.com`). **Client ID** | Paste the `clientId` from the developer portal settings. **Client Secret** | Paste the `clientSecret` from the developer portal settings. **Subscription topics** | Choose the events you want to receive, such as customer creation or order updates. These events appear in the [Events](https://docs.yellow.ai/docs/platform_concepts/studio/events/event-hub) section of Yellow.ai. **Domain name** | Enter the full store domain, such as `acme-store.myshopify.com`, so Yellow can ingest store events for User 360. 4. Click **Connect**. If the integration is successful, you will see the **Shopify Shop** app on the **Integrations** page. :::note * Please ensure that you enter your store name exactly as it appears in your Shopify account. * For the initial user backfilling of the recent 10k user data, please reach out to the team to initiate the process. ::: *** ## 3. Shopify user data syncing in User 360/Engage This integration automates the creation of user records in User 360 using Shopify event data. By default, it is configured to capture userIds, emails, and phone numbers. Additionally, the integration enables the automatic synchronization of the following event data with User 360. This empowers User 360 as a valuable resource for personalized and effective user engagement strategies. :::note Shopify events will be generated only from the store channel and passed to User 360. If event tracking is enabled in the bot, these events will also be sent to the bot. Events originating from other channels, such as orders created through a bot or WhatsApp, will generally not be relayed unless the user profile exists in User 360. ::: ### Supported standard user properties from Shopify events The following standard user properties are automatically added or updated in User 360 directly from Shopify events. * userId * email * firstName * phone * city * country ### Supported Shopify events syncing in User 360 The integration enables the automatic synchronization of the following event data with User 360. This empowers User 360 as a valuable resource for personalized and effective user engagement strategies. The following table provides a comprehensive list of Shopify events along with their descriptions and sample use cases. | Event | Description | Sample use cases | |--------|----------------|----------------------| | shopifyNewOrder | A new order is created in the Shopify store. | Trigger order confirmation email or update inventory when a new order is created in your Shopify store. | | shopifyNewProduct | A new product has been added to the Shopify store. | Update product catalog, create product listings, or send a WhatsApp notification when a new product is added to your Shopify store. | | shopifyOrderCancelled | An order is cancelled. | Handle order cancellation: Update inventory levels, refund payments, or notify customers when their orders are canceled. | | shopifyOrderFulfilled | An order was fulfilled or completed. | Update shipping information, send shipping notifications to the customer, or update order status when an order is fulfilled or completed. | | shopifyOrderPaid | Payment made for an order. | Send payment receipt, or update financial record when a payment is made for an order. | | shopifyRefundCreated | A refund was created for an order. | Update financial records, notify customers about their refund, or adjust inventory levels when a refund is issued for an order. | | shopifyReturnRequest | A return request is initiated. | Helpful for handling return-related processes, such as notifying customers and managing inventory. | | shopifyNewCustomer | A new customer is registered. | Add the customer to User 360, send welcome email, or track customer acquisition when a new customer registers in your Shopify store. | | shopifyCustomerUpdate | A customer’s profile details have been updated. | Keep your customer database up to date or send profile change notification when a customer's profile details are updated. | | shopifyCheckoutCreated| Order checkout is initiated in Shopify. | Track order progress when an order checkout is initiated in your Shopify store. | | shopifyOrdersUpdated | Shopify order is updated. | Monitor order changes, adjust inventory, or notify the customer on order updates to handle order updates in Shopify store. | | shopifyCartCreate | A cart is created in Shopify. | Track shopping cart activity, gather data on abandoned carts, or initiate cart-related marketing efforts when a cart is created in Shopify store. | :::note To know how to run campaigns based on Shopify events, see [here](#run-campaigns-based-on-shopify-events). ::: ### Payload samples of Shopify events in User 360 The following are the event schemas associated with various Shopify events. These event schemas define the structure and data that get sent to the CDP when specific events occur in your Shopify store. **From SDK** ```js { "token": "c1-830e691d16f1093cfcde75960320d9cd", "note": "", "attributes": {}, "original_total_price": 3000, "total_price": 3000, "total_discount": 0, "total_weight": 0, "item_count": 1, "items": [ { "id": 43453026762901, "properties": {}, "quantity": 1, "variant_id": 43453026762901, "key": "43453026762901:159c30471db14672fe636da24f9346f2", "title": "Adania Pant - Black", "price": 3000, "original_price": 3000, "discounted_price": 3000, "line_price": 3000, "original_line_price": 3000, "total_discount": 0, "discounts": [], "sku": "", "grams": 0, "vendor": "twewr", "taxable": true, "product_id": 7907558064277, "product_has_only_default_variant": false, "gift_card": false, "final_price": 3000, "final_line_price": 3000, "url": "/products/adania-pant?variant=43453026762901", "featured_image": { "aspect_ratio": 0.714, "alt": "Adania Pant", "height": 2048, "url": "https://cdn.shopify.com/s/files/1/0458/0252/0725/files/2015-03-30_Jake_Look_16_20656_16533.jpg?v=1684943817", "width": 1462 }, "image": "https://cdn.shopify.com/s/files/1/0458/0252/0725/files/2015-03-30_Jake_Look_16_20656_16533.jpg?v=1684943817", "handle": "adania-pant", "requires_shipping": true, "product_type": "", "product_title": "Adania Pant", "product_description": "\\nThis is a demonstration store. You can purchase products like this from Baby & Company\\nSuper stretch Adaina Pant offers the classic skinny with all the fun bits. Zip closure at back with concealed zip openings at ankles. By Malene Birger. Color Blue. 90% Polyamide, 10% Elastane. Made in China. Ashley is wearing a European 36. ", "variant_title": "Black", "variant_options": [ "Black" ], "options_with_values": [ { "name": "Color", "value": "Black" } ], "line_level_discount_allocations": [], "line_level_total_discount": 0, "quantity_rule": { "min": 1, "max": null, "increment": 1 }, "has_components": false } ], "requires_shipping": true, "currency": "INR", "items_subtotal_price": 3000, "cart_level_discount_applications": [], "userId": "x1660667398488_WIv23Iv-fr-McW_SZme-l" } ``` ```js { "id": 35481578373269, "token": "3d58ad45d661cd34d882fda5c68a36b8", "cart_token": "c1-830e691d16f1093cfcde75960320d9cd", "email": null, "gateway": null, "buyer_accepts_marketing": false, "buyer_accepts_sms_marketing": false, "sms_marketing_phone": null, "created_at": "2023-09-22T12:13:51+00:00", "updated_at": "2023-09-22T08:13:59-04:00", "landing_site": "/", "note": "", "note_attributes": [], "referring_site": "", "shipping_lines": [], "shipping_address": [], "taxes_included": false, "total_weight": 0, "currency": "INR", "completed_at": null, "phone": null, "customer_locale": "en-IN", "line_items": [ { "key": "43453026762901", "fulfillment_service": "manual", "gift_card": false, "grams": 0, "presentment_title": "Adania Pant", "presentment_variant_title": "Black", "product_id": 7907558064277, "quantity": 1, "requires_shipping": true, "sku": "", "tax_lines": [ { "position": 1, "price": "2.70", "rate": 0.09, "title": "CGST", "source": "Shopify", "compare_at": null, "zone": "country", "channel_liable": false, "identifier": null } ], "taxable": true, "title": "Adania Pant", "variant_id": 43453026762901, "variant_title": "Black", "variant_price": "30.00", "vendor": "twewr", "unit_price_measurement": { "measured_type": null, "quantity_value": null, "quantity_unit": null, "reference_value": null, "reference_unit": null }, "compare_at_price": null, "line_price": "30.00", "price": "30.00", "applied_discounts": [], "destination_location_id": null, "user_id": null, "rank": null, "origin_location_id": null, "properties": null } ], "name": "#35481578373269", "abandoned_checkout_url": "https://twewr.myshopify.com/45802520725/checkouts/ac/c1-830e691d16f1093cfcde75960320d9cd/recover?key=a745691198001ff07b2f08d7233541a8", "discount_codes": [], "tax_lines": [ { "price": "2.70", "rate": 0.09, "title": "CGST" } ], "presentment_currency": "INR", "source_name": "web", "total_line_items_price": "30.00", "total_tax": "2.70", "total_discounts": "0.00", "subtotal_price": "30.00", "total_price": "32.70", "total_duties": "0.00", "device_id": null, "user_id": null, "location_id": null, "source_identifier": null, "source_url": null, "source": null, "closed_at": null } ``` ```json { "id": 5159806763157, "admin_graphql_api_id": "gid://shopify/Order/5159806763157", "app_id": 580111, "browser_ip": "49.43.249.107", "buyer_accepts_marketing": false, "cancel_reason": null, "cancelled_at": null, "cart_token": "c1-830e691d16f1093cfcde75960320d9cd", "checkout_id": 35481578373269, "checkout_token": "3d58ad45d661cd34d882fda5c68a36b8", "client_details": { "accept_language": "en-IN", "browser_height": null, "browser_ip": "49.43.249.107", "browser_width": null, "session_hash": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" }, "closed_at": null, "company": null, "confirmation_number": "XPLMPXRME", "confirmed": true, "contact_email": "tom@gmail.com", "created_at": "2023-09-22T08:14:46-04:00", "currency": "INR", "current_subtotal_price": "30.00", "current_subtotal_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "current_total_additional_fees_set": null, "current_total_discounts": "0.00", "current_total_discounts_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "current_total_duties_set": null, "current_total_price": "30.00", "current_total_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "current_total_tax": "0.00", "current_total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "customer_locale": "en-IN", "device_id": null, "discount_codes": [], "email": "tom@gmail.com", "estimated_taxes": false, "financial_status": "paid", "fulfillment_status": null, "landing_site": "/", "landing_site_ref": null, "location_id": null, "merchant_of_record_app_id": null, "name": "#1085", "note": null, "note_attributes": [], "number": 85, "order_number": 1085, "order_status_url": "https://twewr.myshopify.com/45802520725/orders/24a0946393b4889192c0d7056751e889/authenticate?key=c60f3a72f52578b00cc7cb8551811cbc", "original_total_additional_fees_set": null, "original_total_duties_set": null, "payment_gateway_names": [ "bogus" ], "phone": null, "po_number": null, "presentment_currency": "INR", "processed_at": "2023-09-22T08:14:43-04:00", "reference": "6925f7d584e825b7f3fdbf5de7b3a5e1", "referring_site": "", "source_identifier": "6925f7d584e825b7f3fdbf5de7b3a5e1", "source_name": "web", "source_url": null, "subtotal_price": "30.00", "subtotal_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "tags": "", "tax_exempt": false, "tax_lines": [], "taxes_included": false, "test": true, "token": "24a0946393b4889192c0d7056751e889", "total_discounts": "0.00", "total_discounts_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "total_line_items_price": "30.00", "total_line_items_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "total_outstanding": "0.00", "total_price": "30.00", "total_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "total_shipping_price_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "total_tax": "0.00", "total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "total_tip_received": "0.00", "total_weight": 0, "updated_at": "2023-09-22T08:14:47-04:00", "user_id": null, "billing_address": { "first_name": null, "address1": "Chennai", "phone": "90909 09090", "city": "Chennai", "zip": "600012", "province": "Tamil Nadu", "country": "India", "last_name": "Baid", "address2": "Chennai", "company": null, "latitude": 13.098633, "longitude": 80.2596083, "name": "Baid", "country_code": "IN", "province_code": "TN" }, "customer": { "id": 6989864763541, "email": "tom@gmail.com", "accepts_marketing": false, "created_at": "2023-09-22T08:14:44-04:00", "updated_at": "2023-09-22T08:14:46-04:00", "first_name": null, "last_name": "Baid", "state": "disabled", "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "phone": null, "email_marketing_consent": { "state": "not_subscribed", "opt_in_level": "single_opt_in", "consent_updated_at": null }, "sms_marketing_consent": null, "tags": "", "currency": "INR", "accepts_marketing_updated_at": "2023-09-22T08:14:44-04:00", "marketing_opt_in_level": null, "tax_exemptions": [], "admin_graphql_api_id": "gid://shopify/Customer/6989864763541", "default_address": { "id": 8320474546325, "customer_id": 6989864763541, "first_name": null, "last_name": "Baid", "company": null, "address1": "Chennai", "address2": "Chennai", "city": "Chennai", "province": "Tamil Nadu", "country": "India", "zip": "600012", "phone": "90909 09090", "name": "Baid", "province_code": "TN", "country_code": "IN", "country_name": "India", "default": true } }, "discount_applications": [], "fulfillments": [], "line_items": [ { "id": 12623712354453, "admin_graphql_api_id": "gid://shopify/LineItem/12623712354453", "fulfillable_quantity": 1, "fulfillment_service": "manual", "fulfillment_status": null, "gift_card": false, "grams": 0, "name": "Adania Pant - Black", "price": "30.00", "price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "product_exists": true, "product_id": 7907558064277, "properties": [], "quantity": 1, "requires_shipping": true, "sku": "", "taxable": true, "title": "Adania Pant", "total_discount": "0.00", "total_discount_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "variant_id": 43453026762901, "variant_inventory_management": "shopify", "variant_title": "Black", "vendor": "twewr", "tax_lines": [], "duties": [], "discount_allocations": [] } ], "payment_terms": null, "refunds": [], "shipping_address": { "first_name": null, "address1": "Chennai", "phone": "90909 09090", "city": "Chennai", "zip": "600012", "province": "Tamil Nadu", "country": "India", "last_name": "Baid", "address2": "Chennai", "company": null, "latitude": 13.098633, "longitude": 80.2596083, "name": "Baid", "country_code": "IN", "province_code": "TN" }, "shipping_lines": [ { "id": 4303065809045, "carrier_identifier": "650f1a14fa979ec5c74d063e968411d4", "code": "Standard", "discounted_price": "0.00", "discounted_price_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "phone": null, "price": "0.00", "price_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "requested_fulfillment_service_id": null, "source": "shopify", "title": "Standard", "tax_lines": [], "discount_allocations": [] } ] } ``` ```js { "id": 820982911946154500, "admin_graphql_api_id": "gid://shopify/Order/820982911946154508", "app_id": null, "browser_ip": null, "buyer_accepts_marketing": true, "cancel_reason": "customer", "cancelled_at": "2021-12-31T19:00:00-05:00", "cart_token": null, "checkout_id": null, "checkout_token": null, "closed_at": null, "confirmed": false, "contact_email": "jon@example.com", "created_at": "2021-12-31T19:00:00-05:00", "currency": "USD", "current_subtotal_price": "398.00", "current_subtotal_price_set": { "shop_money": { "amount": "398.00", "currency_code": "USD" }, "presentment_money": { "amount": "398.00", "currency_code": "USD" } }, "current_total_discounts": "0.00", "current_total_discounts_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "current_total_duties_set": null, "current_total_price": "398.00", "current_total_price_set": { "shop_money": { "amount": "398.00", "currency_code": "USD" }, "presentment_money": { "amount": "398.00", "currency_code": "USD" } }, "current_total_tax": "0.00", "current_total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "customer_locale": "en", "device_id": null, "discount_codes": [], "email": "jon@example.com", "estimated_taxes": false, "financial_status": "voided", "fulfillment_status": "pending", "gateway": null, "landing_site": null, "landing_site_ref": null, "location_id": null, "merchant_of_record_app_id": null, "name": "#9999", "note": null, "note_attributes": [], "number": 234, "order_number": 1234, "order_status_url": "https://jsmith.myshopify.com/548380009/orders/123456abcd/authenticate?key=abcdefg", "original_total_duties_set": null, "payment_gateway_names": [ "visa", "bogus" ], "phone": null, "presentment_currency": "USD", "processed_at": null, "processing_method": "", "reference": null, "referring_site": null, "source_identifier": null, "source_name": "web", "source_url": null, "subtotal_price": "388.00", "subtotal_price_set": { "shop_money": { "amount": "388.00", "currency_code": "USD" }, "presentment_money": { "amount": "388.00", "currency_code": "USD" } }, "tags": "", "tax_lines": [], "taxes_included": false, "test": true, "token": "123456abcd", "total_discounts": "20.00", "total_discounts_set": { "shop_money": { "amount": "20.00", "currency_code": "USD" }, "presentment_money": { "amount": "20.00", "currency_code": "USD" } }, "total_line_items_price": "398.00", "total_line_items_price_set": { "shop_money": { "amount": "398.00", "currency_code": "USD" }, "presentment_money": { "amount": "398.00", "currency_code": "USD" } }, "total_outstanding": "398.00", "total_price": "388.00", "total_price_set": { "shop_money": { "amount": "388.00", "currency_code": "USD" }, "presentment_money": { "amount": "388.00", "currency_code": "USD" } }, "total_shipping_price_set": { "shop_money": { "amount": "10.00", "currency_code": "USD" }, "presentment_money": { "amount": "10.00", "currency_code": "USD" } }, "total_tax": "0.00", "total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "total_tip_received": "0.00", "total_weight": 0, "updated_at": "2021-12-31T19:00:00-05:00", "user_id": null, "billing_address": { "first_name": "Steve", "address1": "123 Shipping Street", "phone": "555-555-SHIP", "city": "Shippington", "zip": "40003", "province": "Kentucky", "country": "United States", "last_name": "Shipper", "address2": null, "company": "Shipping Company", "latitude": null, "longitude": null, "name": "Steve Shipper", "country_code": "US", "province_code": "KY" }, "customer": { "id": 115310627314723950, "email": "john@example.com", "accepts_marketing": false, "created_at": null, "updated_at": null, "first_name": "John", "last_name": "Smith", "state": "disabled", "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "phone": null, "email_marketing_consent": { "state": "not_subscribed", "opt_in_level": null, "consent_updated_at": null }, "sms_marketing_consent": null, "tags": "", "currency": "USD", "accepts_marketing_updated_at": null, "marketing_opt_in_level": null, "tax_exemptions": [], "admin_graphql_api_id": "gid://shopify/Customer/115310627314723954", "default_address": { "id": 715243470612851200, "customer_id": 115310627314723950, "first_name": null, "last_name": null, "company": null, "address1": "123 Elm St.", "address2": null, "city": "Ottawa", "province": "Ontario", "country": "Canada", "zip": "K2H7A8", "phone": "123-123-1234", "name": "", "province_code": "ON", "country_code": "CA", "country_name": "Canada", "default": true } }, "discount_applications": [], "fulfillments": [], "line_items": [ { "id": 866550311766439000, "admin_graphql_api_id": "gid://shopify/LineItem/866550311766439020", "fulfillable_quantity": 1, "fulfillment_service": "manual", "fulfillment_status": null, "gift_card": false, "grams": 567, "name": "IPod Nano - 8GB", "price": "199.00", "price_set": { "shop_money": { "amount": "199.00", "currency_code": "USD" }, "presentment_money": { "amount": "199.00", "currency_code": "USD" } }, "product_exists": true, "product_id": 632910392, "properties": [], "quantity": 1, "requires_shipping": true, "sku": "IPOD2008PINK", "taxable": true, "title": "IPod Nano - 8GB", "total_discount": "0.00", "total_discount_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "variant_id": 808950810, "variant_inventory_management": "shopify", "variant_title": null, "vendor": null, "tax_lines": [], "duties": [], "discount_allocations": [] }, { "id": 141249953214522980, "admin_graphql_api_id": "gid://shopify/LineItem/141249953214522974", "fulfillable_quantity": 1, "fulfillment_service": "manual", "fulfillment_status": null, "gift_card": false, "grams": 567, "name": "IPod Nano - 8GB", "price": "199.00", "price_set": { "shop_money": { "amount": "199.00", "currency_code": "USD" }, "presentment_money": { "amount": "199.00", "currency_code": "USD" } }, "product_exists": true, "product_id": 632910392, "properties": [], "quantity": 1, "requires_shipping": true, "sku": "IPOD2008PINK", "taxable": true, "title": "IPod Nano - 8GB", "total_discount": "0.00", "total_discount_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "variant_id": 808950810, "variant_inventory_management": "shopify", "variant_title": null, "vendor": null, "tax_lines": [], "duties": [], "discount_allocations": [] } ], "payment_details": { "credit_card_bin": null, "avs_result_code": null, "cvv_result_code": null, "credit_card_number": "•••• •••• •••• 1234", "credit_card_company": "Visa", "buyer_action_info": null, "credit_card_name": null, "credit_card_wallet": null, "credit_card_expiration_month": null, "credit_card_expiration_year": null }, "payment_terms": null, "refunds": [], "shipping_address": { "first_name": "Steve", "address1": "123 Shipping Street", "phone": "555-555-SHIP", "city": "Shippington", "zip": "40003", "province": "Kentucky", "country": "United States", "last_name": "Shipper", "address2": null, "company": "Shipping Company", "latitude": null, "longitude": null, "name": "Steve Shipper", "country_code": "US", "province_code": "KY" }, "shipping_lines": [ { "id": 271878346596884000, "carrier_identifier": null, "code": null, "delivery_category": null, "discounted_price": "10.00", "discounted_price_set": { "shop_money": { "amount": "10.00", "currency_code": "USD" }, "presentment_money": { "amount": "10.00", "currency_code": "USD" } }, "phone": null, "price": "10.00", "price_set": { "shop_money": { "amount": "10.00", "currency_code": "USD" }, "presentment_money": { "amount": "10.00", "currency_code": "USD" } }, "requested_fulfillment_service_id": null, "source": "shopify", "title": "Generic Shipping", "tax_lines": [], "discount_allocations": [] } ] } ``` ```js { "id": 5159806763157, "admin_graphql_api_id": "gid://shopify/Order/5159806763157", "app_id": 580111, "browser_ip": "49.43.249.107", "buyer_accepts_marketing": false, "cancel_reason": null, "cancelled_at": null, "cart_token": "c1-830e691d16f1093cfcde75960320d9cd", "checkout_id": 35481578373269, "checkout_token": "3d58ad45d661cd34d882fda5c68a36b8", "client_details": { "accept_language": "en-IN", "browser_height": null, "browser_ip": "49.43.249.107", "browser_width": null, "session_hash": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36" }, "closed_at": null, "company": null, "confirmation_number": "XPLMPXRME", "confirmed": true, "contact_email": "tom@gmail.com", "created_at": "2023-09-22T08:14:46-04:00", "currency": "INR", "current_subtotal_price": "30.00", "current_subtotal_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "current_total_additional_fees_set": null, "current_total_discounts": "0.00", "current_total_discounts_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "current_total_duties_set": null, "current_total_price": "30.00", "current_total_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "current_total_tax": "0.00", "current_total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "customer_locale": "en-IN", "device_id": null, "discount_codes": [], "email": "tom@gmail.com", "estimated_taxes": false, "financial_status": "paid", "fulfillment_status": null, "landing_site": "/", "landing_site_ref": null, "location_id": null, "merchant_of_record_app_id": null, "name": "#1085", "note": null, "note_attributes": [], "number": 85, "order_number": 1085, "order_status_url": "https://twewr.myshopify.com/45802520725/orders/24a0946393b4889192c0d7056751e889/authenticate?key=c60f3a72f52578b00cc7cb8551811cbc", "original_total_additional_fees_set": null, "original_total_duties_set": null, "payment_gateway_names": [ "bogus" ], "phone": null, "po_number": null, "presentment_currency": "INR", "processed_at": "2023-09-22T08:14:43-04:00", "reference": "6925f7d584e825b7f3fdbf5de7b3a5e1", "referring_site": "", "source_identifier": "6925f7d584e825b7f3fdbf5de7b3a5e1", "source_name": "web", "source_url": null, "subtotal_price": "30.00", "subtotal_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "tags": "", "tax_exempt": false, "tax_lines": [], "taxes_included": false, "test": true, "token": "24a0946393b4889192c0d7056751e889", "total_discounts": "0.00", "total_discounts_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "total_line_items_price": "30.00", "total_line_items_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "total_outstanding": "0.00", "total_price": "30.00", "total_price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "total_shipping_price_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "total_tax": "0.00", "total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "total_tip_received": "0.00", "total_weight": 0, "updated_at": "2023-09-22T08:14:47-04:00", "user_id": null, "billing_address": { "first_name": null, "address1": "Chennai", "phone": "90909 09090", "city": "Chennai", "zip": "600012", "province": "Tamil Nadu", "country": "India", "last_name": "Baid", "address2": "Chennai", "company": null, "latitude": 13.098633, "longitude": 80.2596083, "name": "Baid", "country_code": "IN", "province_code": "TN" }, "customer": { "id": 6989864763541, "email": "tom@gmail.com", "accepts_marketing": false, "created_at": "2023-09-22T08:14:44-04:00", "updated_at": "2023-09-22T08:14:46-04:00", "first_name": null, "last_name": "Baid", "state": "disabled", "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "phone": null, "email_marketing_consent": { "state": "not_subscribed", "opt_in_level": "single_opt_in", "consent_updated_at": null }, "sms_marketing_consent": null, "tags": "", "currency": "INR", "accepts_marketing_updated_at": "2023-09-22T08:14:44-04:00", "marketing_opt_in_level": null, "tax_exemptions": [], "admin_graphql_api_id": "gid://shopify/Customer/6989864763541", "default_address": { "id": 8320474546325, "customer_id": 6989864763541, "first_name": null, "last_name": "Baid", "company": null, "address1": "Chennai", "address2": "Chennai", "city": "Chennai", "province": "Tamil Nadu", "country": "India", "zip": "600012", "phone": "90909 09090", "name": "Baid", "province_code": "TN", "country_code": "IN", "country_name": "India", "default": true } }, "discount_applications": [], "fulfillments": [], "line_items": [ { "id": 12623712354453, "admin_graphql_api_id": "gid://shopify/LineItem/12623712354453", "fulfillable_quantity": 1, "fulfillment_service": "manual", "fulfillment_status": null, "gift_card": false, "grams": 0, "name": "Adania Pant - Black", "price": "30.00", "price_set": { "shop_money": { "amount": "30.00", "currency_code": "INR" }, "presentment_money": { "amount": "30.00", "currency_code": "INR" } }, "product_exists": true, "product_id": 7907558064277, "properties": [], "quantity": 1, "requires_shipping": true, "sku": "", "taxable": true, "title": "Adania Pant", "total_discount": "0.00", "total_discount_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "variant_id": 43453026762901, "variant_inventory_management": "shopify", "variant_title": "Black", "vendor": "twewr", "tax_lines": [], "duties": [], "discount_allocations": [] } ], "payment_terms": null, "refunds": [], "shipping_address": { "first_name": null, "address1": "Chennai", "phone": "90909 09090", "city": "Chennai", "zip": "600012", "province": "Tamil Nadu", "country": "India", "last_name": "Baid", "address2": "Chennai", "company": null, "latitude": 13.098633, "longitude": 80.2596083, "name": "Baid", "country_code": "IN", "province_code": "TN" }, "shipping_lines": [ { "id": 4303065809045, "carrier_identifier": "650f1a14fa979ec5c74d063e968411d4", "code": "Standard", "discounted_price": "0.00", "discounted_price_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "phone": null, "price": "0.00", "price_set": { "shop_money": { "amount": "0.00", "currency_code": "INR" }, "presentment_money": { "amount": "0.00", "currency_code": "INR" } }, "requested_fulfillment_service_id": null, "source": "shopify", "title": "Standard", "tax_lines": [], "discount_allocations": [] } ] } ``` ```js { "id": 820982911946154500, "admin_graphql_api_id": "gid://shopify/Order/820982911946154508", "app_id": null, "browser_ip": null, "buyer_accepts_marketing": true, "cancel_reason": "customer", "cancelled_at": "2021-12-31T19:00:00-05:00", "cart_token": null, "checkout_id": null, "checkout_token": null, "closed_at": null, "confirmed": false, "contact_email": "jon@example.com", "created_at": "2021-12-31T19:00:00-05:00", "currency": "USD", "current_subtotal_price": "398.00", "current_subtotal_price_set": { "shop_money": { "amount": "398.00", "currency_code": "USD" }, "presentment_money": { "amount": "398.00", "currency_code": "USD" } }, "current_total_discounts": "0.00", "current_total_discounts_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "current_total_duties_set": null, "current_total_price": "398.00", "current_total_price_set": { "shop_money": { "amount": "398.00", "currency_code": "USD" }, "presentment_money": { "amount": "398.00", "currency_code": "USD" } }, "current_total_tax": "0.00", "current_total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "customer_locale": "en", "device_id": null, "discount_codes": [], "email": "jon@example.com", "estimated_taxes": false, "financial_status": "voided", "fulfillment_status": "pending", "gateway": null, "landing_site": null, "landing_site_ref": null, "location_id": null, "merchant_of_record_app_id": null, "name": "#9999", "note": null, "note_attributes": [], "number": 234, "order_number": 1234, "order_status_url": "https://jsmith.myshopify.com/548380009/orders/123456abcd/authenticate?key=abcdefg", "original_total_duties_set": null, "payment_gateway_names": [ "visa", "bogus" ], "phone": null, "presentment_currency": "USD", "processed_at": null, "processing_method": "", "reference": null, "referring_site": null, "source_identifier": null, "source_name": "web", "source_url": null, "subtotal_price": "388.00", "subtotal_price_set": { "shop_money": { "amount": "388.00", "currency_code": "USD" }, "presentment_money": { "amount": "388.00", "currency_code": "USD" } }, "tags": "", "tax_lines": [], "taxes_included": false, "test": true, "token": "123456abcd", "total_discounts": "20.00", "total_discounts_set": { "shop_money": { "amount": "20.00", "currency_code": "USD" }, "presentment_money": { "amount": "20.00", "currency_code": "USD" } }, "total_line_items_price": "398.00", "total_line_items_price_set": { "shop_money": { "amount": "398.00", "currency_code": "USD" }, "presentment_money": { "amount": "398.00", "currency_code": "USD" } }, "total_outstanding": "398.00", "total_price": "388.00", "total_price_set": { "shop_money": { "amount": "388.00", "currency_code": "USD" }, "presentment_money": { "amount": "388.00", "currency_code": "USD" } }, "total_shipping_price_set": { "shop_money": { "amount": "10.00", "currency_code": "USD" }, "presentment_money": { "amount": "10.00", "currency_code": "USD" } }, "total_tax": "0.00", "total_tax_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "total_tip_received": "0.00", "total_weight": 0, "updated_at": "2021-12-31T19:00:00-05:00", "user_id": null, "billing_address": { "first_name": "Steve", "address1": "123 Shipping Street", "phone": "555-555-SHIP", "city": "Shippington", "zip": "40003", "province": "Kentucky", "country": "United States", "last_name": "Shipper", "address2": null, "company": "Shipping Company", "latitude": null, "longitude": null, "name": "Steve Shipper", "country_code": "US", "province_code": "KY" }, "customer": { "id": 115310627314723950, "email": "john@example.com", "accepts_marketing": false, "created_at": null, "updated_at": null, "first_name": "John", "last_name": "Smith", "state": "disabled", "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "phone": null, "email_marketing_consent": { "state": "not_subscribed", "opt_in_level": null, "consent_updated_at": null }, "sms_marketing_consent": null, "tags": "", "currency": "USD", "accepts_marketing_updated_at": null, "marketing_opt_in_level": null, "tax_exemptions": [], "admin_graphql_api_id": "gid://shopify/Customer/115310627314723954", "default_address": { "id": 715243470612851200, "customer_id": 115310627314723950, "first_name": null, "last_name": null, "company": null, "address1": "123 Elm St.", "address2": null, "city": "Ottawa", "province": "Ontario", "country": "Canada", "zip": "K2H7A8", "phone": "123-123-1234", "name": "", "province_code": "ON", "country_code": "CA", "country_name": "Canada", "default": true } }, "discount_applications": [], "fulfillments": [], "line_items": [ { "id": 866550311766439000, "admin_graphql_api_id": "gid://shopify/LineItem/866550311766439020", "fulfillable_quantity": 1, "fulfillment_service": "manual", "fulfillment_status": null, "gift_card": false, "grams": 567, "name": "IPod Nano - 8GB", "price": "199.00", "price_set": { "shop_money": { "amount": "199.00", "currency_code": "USD" }, "presentment_money": { "amount": "199.00", "currency_code": "USD" } }, "product_exists": true, "product_id": 632910392, "properties": [], "quantity": 1, "requires_shipping": true, "sku": "IPOD2008PINK", "taxable": true, "title": "IPod Nano - 8GB", "total_discount": "0.00", "total_discount_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "variant_id": 808950810, "variant_inventory_management": "shopify", "variant_title": null, "vendor": null, "tax_lines": [], "duties": [], "discount_allocations": [] }, { "id": 141249953214522980, "admin_graphql_api_id": "gid://shopify/LineItem/141249953214522974", "fulfillable_quantity": 1, "fulfillment_service": "manual", "fulfillment_status": null, "gift_card": false, "grams": 567, "name": "IPod Nano - 8GB", "price": "199.00", "price_set": { "shop_money": { "amount": "199.00", "currency_code": "USD" }, "presentment_money": { "amount": "199.00", "currency_code": "USD" } }, "product_exists": true, "product_id": 632910392, "properties": [], "quantity": 1, "requires_shipping": true, "sku": "IPOD2008PINK", "taxable": true, "title": "IPod Nano - 8GB", "total_discount": "0.00", "total_discount_set": { "shop_money": { "amount": "0.00", "currency_code": "USD" }, "presentment_money": { "amount": "0.00", "currency_code": "USD" } }, "variant_id": 808950810, "variant_inventory_management": "shopify", "variant_title": null, "vendor": null, "tax_lines": [], "duties": [], "discount_allocations": [] } ], "payment_details": { "credit_card_bin": null, "avs_result_code": null, "cvv_result_code": null, "credit_card_number": "•••• •••• •••• 1234", "credit_card_company": "Visa", "buyer_action_info": null, "credit_card_name": null, "credit_card_wallet": null, "credit_card_expiration_month": null, "credit_card_expiration_year": null }, "payment_terms": null, "refunds": [], "shipping_address": { "first_name": "Steve", "address1": "123 Shipping Street", "phone": "555-555-SHIP", "city": "Shippington", "zip": "40003", "province": "Kentucky", "country": "United States", "last_name": "Shipper", "address2": null, "company": "Shipping Company", "latitude": null, "longitude": null, "name": "Steve Shipper", "country_code": "US", "province_code": "KY" }, "shipping_lines": [ { "id": 271878346596884000, "carrier_identifier": null, "code": null, "delivery_category": null, "discounted_price": "10.00", "discounted_price_set": { "shop_money": { "amount": "10.00", "currency_code": "USD" }, "presentment_money": { "amount": "10.00", "currency_code": "USD" } }, "phone": null, "price": "10.00", "price_set": { "shop_money": { "amount": "10.00", "currency_code": "USD" }, "presentment_money": { "amount": "10.00", "currency_code": "USD" } }, "requested_fulfillment_service_id": null, "source": "shopify", "title": "Generic Shipping", "tax_lines": [], "discount_allocations": [] } ] } ``` ```js { "userId":"6989864763541", "email":"andrew@gmail.com", "fistName": "andrew", "lastName":"farak", "phone": "9909889090", "coutry": "IN", "sessionId":"ym_1695384819786_bzldxorc5q", "source":"shopify" } ``` ```json { "id": 3547267221, "admin_graphql_api_id": "gid://shopify/Return/3547267221", "status": "requested", "order": { "id": 5196695273621, "admin_graphql_api_id": "gid://shopify/Order/5196695273621" }, "total_return_line_items": 1, "name": "#1106-R2", "return_line_items": [ { "id": 6200524949, "admin_graphql_api_id": "gid://shopify/ReturnLineItem/6200524949", "fulfillment_line_item": { "id": 10736341352597, "admin_graphql_api_id": "gid://shopify/FulfillmentLineItem/10736341352597", "line_item": { "id": 12695210000533, "admin_graphql_api_id": "gid://shopify/LineItem/12695210000533" } }, "quantity": 1, "return_reason": "unwanted", "return_reason_note": "", "customer_note": null } ], "customer": { "id": 7029431102139, "email": "andrew@gmail.com", "accepts_marketing": false, "created_at": "2023-10-18T07:18:03-04:00", "updated_at": "2023-10-19T06:19:34-04:00", "first_name": "Andrew", "last_name": "B", "state": "disabled", "note": null, "verified_email": true, "multipass_identifier": null, "tax_exempt": false, "phone": null, "email_marketing_consent": { "state": "not_subscribed", "opt_in_level": "single_opt_in", "consent_updated_at": null }, "sms_marketing_consent": null, "tags": "", "currency": "INR", "accepts_marketing_updated_at": "2023-10-18T07:18:03-04:00", "marketing_opt_in_level": null, "tax_exemptions": [], "admin_graphql_api_id": "gid://shopify/Customer/7029431102139", "default_address": { "id": 836448003234781, "customer_id": 7029431102139, "first_name": "Andrew", "address1": "Kerala", "address2": null, "city": "Manglore", "province": "Kerala", "country": "India", "zip": "574241", "phone": "09008692935", "province_code": "KL", "country_code": "IN", "country_name": "India", "default": true } } } ``` ### Run campaigns based on Shopify events You can initiate Flow campaigns based on Shopify events that you have enabled in Yellow.ai. In [Flow campaigns](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign), choose **Condition** as *Has done event check* and in **Campaign triggers when user**, choose the event that you want to use to trigger campaigns.
Here are some examples: In an online store on Shopify, you notice that some customers abandon their shopping carts during the checkout process. To recover those potential sales, set up a Flow campaign to automatically send reminders to users who have abandoned their shopping carts on your Shopify store. **Entry trigger**: `shopifyCartCreate` event **Exception to trigger notification**: `ShopifyCheckoutCreated` event **Flow configuration**: 1. **Trigger the flow**: Initiate the campaign when a user adds items to their cart, identify it using the `shopifyCartCreate` event. ![](https://i.imgur.com/qxmCKM3.gif) 2. **Wait condition**: Check if the user has completed the purchase by waiting for the `ShopifyCheckoutCreated` event. Set time delay, say 10 min. If no `ShopifyCheckoutCreated` event is detected within 10 min, proceed to the next step. ![](https://i.imgur.com/2210dOW.gif) 3. **Send abandonment reminder**: If the user has not completed the purchase within the specified time, send a WhatsApp notification. Here is a sample message: ![](https://i.imgur.com/MSyaUBa.gif) - *Sample Notification Message:* "Hello [User's Name], we noticed you left some wonderful items in your cart. 🛒 Don't miss out on these great finds! Tap here to complete your purchase: [Checkout Link]. Thank you for choosing our store!" When a new customer registers in your Shopify store, initiate a series of welcome emails, introducing them to your products and offering exclusive discounts on their first purchase. * **Event**: ShopifyNewCustomer * **Wait time**: Immediately When an order is successfully placed (shopifyNewOrder event), send an order confirmation campaign. This includes order details, expected delivery date, and a thank-you message. For customers who cancelled an order on Shopify store, trigger a well-crafted campaign aimed at enticing customers to initiate a new transaction. The campaign is designed to re-engage customers who experienced an order cancellation and guide them toward completing a new purchase. * **Event**: ShopifyOrderCancelled * **Wait time**: 24 hours * **Sample message**: ``` Subject: Exclusive Offer for Your Next Purchase 🛒 Message: Dear [Customer's Name], We noticed that your recent order was canceled, and we're here to make it up to you with an exclusive offer. To show our appreciation for your continued support, we're pleased to offer you a special 20% discount on your next purchase. Use code: REORDER20 at checkout to enjoy your savings. We've also handpicked some fantastic product recommendations based on your previous preferences, which we think you'll love: Recommended Products: [Product 1] [Product 2] [Product 3] Explore these selections and easily add them to your cart with just a click. [Shop Now] ``` :::note You will see only events that you have enabled for the bot. For more details, [see how to activate events](#activate-shopify-events-you-wish-to-use-in-automation). ::: To know more about Flow campaigns, click [here](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign). *** ## 4. Access Shopify data in bot conversations Once the integration is set up, Shopify events start flowing to Yellow.ai. These events serve as triggers for bot flows, enabling the creation of personalized conversations, running effective campaigns, storing customer data in User360,personalized responses, data enrichment, and the creation of efficient workflows. ### Supported Shopify events you can use in Automation The following table provides a comprehensive list of Shopify events along with their descriptions and sample use cases. | Event | Description | Sample use cases | |--------|----------------|----------------------| | shopifyNewOrder | A new order is created in the Shopify store. | - Trigger order confirmation emails- Update inventory when a new order is created in your Shopify store. | | shopifyNewProduct | A new product has been added to the Shopify store. | - Update the product catalog- Create product listings- Send WhatsApp notifications when a new product is added to your Shopify store. | | shopifyOrderCancelled | An order is cancelled. | - Handle order cancellations- Update inventory levels- Refund payments- Notify customers when their orders are canceled. | | shopifyOrderFulfilled | An order was fulfilled or completed. | Update shipping information- Send shipping notifications to customers- Update order status when an order is fulfilled or completed. | | shopifyOrderPaid | Payment made for an order. | - Send payment receipts- Update financial records when a payment is made for an order. | | shopifyRefundCreated | A refund was created for an order. | - Update financial records- Notify customers about their refunds- Adjust inventory levels when a refund is issued for an order. | | shopifyNewCustomer | A new customer is registered. | - Add the customer to User 360- Send welcome emails- Track customer acquisition when a new customer registers in your Shopify store. | | shopifyCustomerUpdate | A customer’s profile details have been updated. | - Keep your customer database up to date- Send profile change notifications when a customer's profile details are updated. | | shopifyCheckoutCreated| Order checkout is initiated in Shopify. | - Track order progress when an order checkout is initiated in your Shopify store. | | shopifyOrdersUpdated | Shopify order is updated. | - Monitor order changes- Adjust inventory- Notify the customer about order updates to handle order updates in the Shopify store. | ### Events enabled by default in Studio Once your integration is set up, the following events are sent to bot directly are available by default with this integration. * shopifyRefundCreated * shopifyNewProduct * shopifyOrderPaid :::note The availability of events within the integration depends on the scopes you have enabled when generating the API token. ::: ### Activate Shopify events you wish to use in Automation Apart from the events mentioned in the previous section, you can enable other events that you want to make use in Automation. For a list of events supported in Automation, see [here](#supported-shopify-events-you-can-use-in-automation). To enable events: 1. Go to **Automation** > **Event** > **Integrations**. You will see all the events related to Shopify with the prefix `shopify`. 2. Navigate to the event that you want to enable and click on the more options icon > **Activate**. 3. Once you enable required shopify events, you can use these Shopify events to: * [Trigger bot flows via events](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/configureflow#trigger-flow-using-event) * [Initiate flow campaigns based on events](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign#user-events) * [Store user variables that come from user events into user properties](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data/store_conv_data#store-user-properties-from-bot-conversations) :::note **Error: Webhook is failing**: * Ensure you have activated the respective event as mentioned above. If your webhook fails more than twice, it will be removed and your application will not receive any notifications. ::: ### Fetch Shopify data in bot conversations To make use of Shopify events in bot flows: 1. Go to your bot in **Automation** and navigate to the flow where you want to use a Shopify event. 3. Navigate to the Integration node - **Node** > **Integration** > **Shopify Shop**. 4. Choose your **Account name** 5. Select the respective **Action** that you need to perform. 5. In **Var** pass the parameter variable that contains the required information in the format `variables.objVariableName.key`. 6. Use **Show sample response** to see all the details (in the JSON format) that the function can retrieve. 7. To store the response, use **Store the response in** a [variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables). 8. You can decide which info to display to the user. Use the **Function** node to customise that information in the **Code** tab. For example, in the previous screenshot, order details are stored in the variable `order_details`. You can access this data using order_details.order.name. ### Shopify action nodes with Sample payloads You can see all the Shopify action nodes in **Integration** > **Shopify** node (Refer to the previous section for more details). The following are some limitations with these action nodes: 1. **Data Fetch Limitation**: You can retrieve a maximum of 50 records (products/orders/collections etc.) in a single query or request. 2. **Object Size Restriction**: The response object size is limited to 90KB. The data you send or receive should not exceed this limit. 3. **Product Display Limitation**: When displaying product details, you can showcase up to 8 carousel images. This limitation is due to the inability to use a "Next" option to view additional products in subsequent lists. These points highlight the specific constraints and limitations that users or developers should be aware of when working with this system or application. This function retrieves order details using the provided order ID. Parameter | Datatype | Example -------- | --------- | ------- order_id | Number | 632910392 Here is a sample response schema: ```json { "order": { "id": 450789469, "cancel_reason": null, "cancelled_at": null, "confirmed": true, "email": "bob.norman@example.com", "financial_status": "partially_refunded", "fulfillment_status": null, "name": "#1001" } } ``` This function retrieves order details using the provided order number. Parameter | Datatype | Sample value --------- | -------- | ------------ order_number | Number | 1001 ```json { "orders": [ { "id": 450789469, "cancel_reason": null, "cancelled_at": null, "confirmed": true, "email": "bob.norman@hostmail.com", "financial_status": "partially_refunded", "fulfillment_status": null, "name": "#1001" } ] } ``` This function retrieves the details of a specific product using the `product_id`. Parameter | Datatype | Example --------- | -------- | ------- product_id | Number | 632910392 ```json { "product": { "id": 632910392, "title": "IPod Nano - 8GB", "product_type": "Cult Products", "variants": [ {}] } } ``` This function retrieves the list of all the variants of a product using the `product_id`. Parameter | Datatype | Example -------- | --------- | -------- product_id | Number | 632910392 ```json { "variants": [ { "id": 39072856, "product_id": 632910392, "title": "Green", "price": "199.00", "sku": "IPOD2008GREEN" } ] } ``` This function retrieves all the products under a specific collection from shopify using the `collection_id`. Parameter | Datatype | Example --------- | -------- | ------- collection_id | String | 76854321 Here is a sample response schema: ```json { "products": [ { "id": 632910392, "title": "IPod Nano - 8GB", "variants": [ { "id": 808950810, "product_id": 632910392, "title": "Pink", "price": "199.00" } ] } ] } ``` This function fetches products by `title`. Parameter | Datatype | Example -------- | -------- | ------- title | String | Ipad Nano ```json { "products": [ { "id": 632910392, "title": "IPod Nano - 8GB", "variants": [ { "id": 808950810, "product_id": 632910392, "title": "Pink", "price": "199.00" } ] } ] } ``` This function retrieves all the orders of a customer using the `customer_id`. Parameter | Datatype | Sample value -------- | --------- | ----------- customer_id | String | 207119551 ```json { "orders": [ { "id": 450789469, "email": "bob.norman@hostmail.com", "created_at": "2008-01-10T11:00:00-05:00", "updated_at": "2008-01-10T11:00:00-05:00", "total_price": "598.94", "financial_status": "partially_refunded" } ] } ``` This function fetches all the available collections from shopify using the `collection_id`. Parameter | Datatype | Sample value --------- | -------- | ------------ collection_id | Number | 482865238 ```json { "collection_listings": [ { "collection_id": 482865238, "updated_at": "2022-02-03T16:53:36-05:00", "body_html": "The best selling ipod ever", "default_product_image": null, "handle": "smart-ipods", "image": { "created_at": "2022-02-03T16:53:36-05:00", "src": "https://cdn.shopify.com/s/files/1/0005/4838/0009/collections/ipod_nano_8gb.jpg?v=1643925216" }, "title": "Smart iPods", "sort_order": "manual", "published_at": "2017-08-31T20:00:00-04:00" } ] } ``` ### Map shopify data to user properties You can add/update user properties with Shopify data through bot conversations by mapping them to user properties. This enables you to create highly personalized and engaging interactions with your users.
For detailed instructions, see [Add user variables that come from user events into user properties](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data/store_conv_data#store-user-properties-from-bot-conversations). You can create personalized conversations using stored properties, [know how](https://docs.yellow.ai/docs/platform_concepts/engagement/cdp/user_data/personalise_conversations). --- *** ## 5. Import Shopify bot from Marketplace template Importing a Shopify bot template into your Yellow.ai account is a straightforward process that streamlines the integration of Yellow.ai with your Shopify store. This template provides pre-configured floes and actions designed to enhance your e-commerce operations. This includes flows such as Browse products, Get order details, authenticate user via OTP, show customer details, connect to support, and raise ticket. To import the Shopify shop template in your bot: 1. Navigate to the **Marketplace** and search for Shopify. You will see Shopify E-commerce with Shopify integration. ![](https://i.imgur.com/e0VrAuC.png) 2. Select the template and click **+Use Template**. ![](https://i.imgur.com/kDmytlM.png) The template will start importing. Wait until the import is complete. 5. Open the **Flows** dropdown to see the new flows added to the bot. --- ## 6. Troubleshooting **Error: Your webhook is failing** Ensure you have enabled Shopify's event in **Event Hub**. If your webhook fails more than twice, it will be removed and your application will not receive any notifications. --- ## 7. Disconnect Shopify integration To remove this integration from your bot: 1. On the bot configuration page, go to **Integrations**. 2. Search for **Shopify shop** > **Disconnect**. ![](https://i.imgur.com/5rb2Fxd.png) --- ### Important References 1. [Shopify Custom Apps](https://help.shopify.com/en/manual/apps/custom-apps) 2. [Configuring Storefront data for getAllCollections integration node](https://community.shopify.com/c/shopify-apis-and-sdks/404-error-from-get-admin-collection-listings-json-for-one-store/m-p/367034/highlight/true#M19606) --- ## Stripe Payment integration Yellow.ai Integration with Stripe Payment Gateway allows the AI agent to generate Stripe payment links and view a specific payment status. ## Connecting Stripe payment with yellow.ai ### Get Secret key from your Stripe app * Go to the **Stripe** dashboard > **Developer** > **API Keys** > Copy the **Secret key**. ### Connect Stripe with yellow.ai In a two-tier environment, you can connect an integration app in the Development environment. In a three-tier environment, you can connect the integration app either in Staging or Sandbox. All connected integrations are available in the live environment. To connect your Airpay account with Yellow.ai, follow these steps: 1. Navigate to the Development/Staging environment and go to **Extensions** > **Integrations** > **Payment**  > **Stripe**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/stripe.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (_). ![](https://i.imgur.com/4SbuWD5.png) 3. Enter the **Key secret** that you copied using the previous sections. 4. Click **Connect**. 5. To add another account, click **+ Add account** and proceed with the previous steps. You can add a maximum of 15 accounts. ### Configure webhook URL in Stripe dashboard. The webhook URL serves as a callback endpoint where Stripe can send notifications or updates regarding payment events, enabling your application to respond accordingly. 1. Copy the webhook URL from Stripe integration card. 2. Go to the Stripe **Dashboard** > **Developers** > **Webhooks** > **Add endpoint**. 3. Enter the webhook URL in **Endpoint** field. 4. Select **checkout.session.completed** event in the select events to listen field. ## Receiving Stripe payment status event in your AI agent Enable the following event under Events section: 1. In Development/Staging environment, go to **Automation** > **Event** > **Custom events**. 2. Navigate to the `stripe-payment-gateway` event, click on the more options icon and select **Activate**. ![alt_text](https://cdn.yellowmessenger.com/assets/yellow-docs/custom-events.png "image_tooltip") Event | Description ----- | ----------- Stripe Payment Status | In case of payments/refunds the status can be checked with these details. ## Generate Stripe payment link through AI agent conversation Once the Stripe account is connected, you can generate the payment link directly in AI agent conversations. 1. Go to Development/Staging environment and navigate to **Automation** > **Build** > Select the flow where you want to add the Generate payment link node. 2. Click **Add node** > **Integrations** > **Stripe payment gateway**. Option | Datatype | Description ------ | -------- | ----------- Amount* | number | Choose a variable that contains the amount to be used in the payment link. Currency* | String | Choose a variable that contains the currency to be used in the payment link Description* | String | Choose a variable that contains the description to be included in the payment link. Custom metadata* | Object | Choose a variable that contains the custom metadata to be included in the payment link. Product image* | string | Choose a variable that contains the URL of the product image to be included in the payment link. Product name* | String | Choose a variable that contains the name of the product to be included in the payment link. After Completion type | String | The action to be taken after the payment is completed. You can choose to redirect the user to a specific URL or display a custom message. URL or Custom Message | String | For Redirect URL: Enter the URL to which the user should be redirected. For Show Custom Message: Enter the custom message that you want to display to the user. Parse API response | - | Choose the function that you want to use to parse and handle the response received from the API after completing the payment. Parsing the API response allows the AI agent to extract relevant information and take appropriate actions based on the response. # Reference For more information about action nodes you use here, refer this [doc](https://stripe.com/docs/payments/payment-links) --- ## SuccessFactors Integration ## Configuration Requirements ### API Endpoint ``` https://[API-Server]/odata/v2/[Entity]/$metadata ``` ### Authorization ``` Basic Base64(username@companyId:password) ``` ### Supported Filters ``` eq, in, and, or, ge, le, not, like, etc. $filter=username eq 'abc@abc.com' and location in 'In','Eu' ``` --- ## Employee Profile ### Active Employee ```bash curl --location --request GET 'https://api44.sapsf.com/odata/v2/User?$filter=username%20eq%20%27abc@yellowmessenger.com%27&$format=json' \ --header 'Authorization: Basic XXXXX' ``` ### Deactivate / Ex-Employee ```bash curl --location --request GET 'https://api44.sapsf.com/odata/v2/User?$filter=username%20eq%20%27abc@yellowmessenger.com%27%20and%20status%20eq%20%27f%27&$format=json&$select=defaultFullName,userId,jobCode,email,hireDate' \ --header 'Authorization: Basic XXXXX' ``` ### Employment Termination Info ```bash curl --location --request GET 'https://api44.sapsf.com/odata/v2/EmpEmploymentTermination?$filter=userId%20eq%20300&$format=json' \ --header 'Authorization: Basic XXXXX' ``` --- ## Leave Management ### SuccessFactors Leave Entities | Entity | Description | |------------------|-----------------------------------------------------------------------------| | Time Account Type | Rules to accrue balance for each leave type | | Time Type | Types of leave (e.g., Annual Leave, Sick Leave) | | Time Profile | Leave types applicable to employees | | Time Account | Holds the obtained leave balance | ![](https://paper-attachments.dropbox.com/s_ED1FF0E74DEAD763FBDB69A56B6E83345A98D794FA7338EBFB12935A0745F67A_1613030763471_image.png) ### Managing Time Off Entities 1. Log in to SuccessFactors with admin access. 2. Search for **Manage Time Off Structure**. 3. Select desired entity from dropdown. 4. Select a record to update. 5. Take Action → Make Correction → Save. ### Adding a New Record Use the right-side dropdown to select entity category and add a record. ### Assigning Time Profile to Employee 1. Search employee in the top search bar. 2. Go to Job Information → Edit. 3. Update time profile, work schedule, holiday calendar. 4. Save changes. A time account is auto-created. ![](https://paper-attachments.dropbox.com/s_ED1FF0E74DEAD763FBDB69A56B6E83345A98D794FA7338EBFB12935A0745F67A_1613032729109_image.png) ### Sample Config - **Time Profile**: Time off Test (`TIME_OFF_TEST`) - **Time Types**: - Sick Leave: `SICK_LEAVE` - Annual Leave 2: `ANNUAL_LEAVE` --- ## Leave Balance Calculation ### Past Leaves (Response1) ```bash curl --location --request GET 'https://api44.sapsf.com/odata/v2/EmpTimeAccountBalance?$filter=userId%20eq%20%27273%27%20and%20timeAccountType%20eq%20%27SICK_LEAVE%27&$format=json' \ --header 'Authorization: Basic XXXXX' ``` ### Future Approved Leaves (Response2) ```bash curl --location --request GET 'https://api44.sapsf.com/odata/v2/EmployeeTime?$filter=userId%20eq%20%27273%27%20and%20timeType%20eq%20%27ANNUAL_LEAVE%27%20and%20startDate%20ge%20datetime%272020-02-04T00:00:00%27%20and%20approvalStatus%20eq%20%27PENDING%27&$format=json&$select=deductionQuantity,approvalStatus,timeType,endDate,startDate,externalCode' \ --header 'Authorization: Basic XXXXX' ``` ### Final Balance Formula ```text finalBalance = Response1.balance - SUM(Response2[].deductionQuantity) ``` --- ## Apply Leave ```bash curl --location --request POST 'https://api44.sapsf.com/odata/v2/upsert?workflowConfirmed=true&$format=json' \ --header 'Authorization: Basic XXXXX' \ --header 'Content-Type: application/json' \ --data-raw '{ "__metadata": { "uri": "https://api44.sapsf.com/odata/v2/EmployeeTime('273')" }, "startDate": "{{todayDate}}", "endDate": "/Date(1611792000000)/", "externalCode": "TRY1234", "approvalStatus": "PENDING", "userIdNav": { "__metadata": { "uri": "https://api44.sapsf.com/odata/v2/User('273')", "type": "SFOData.User" } }, "timeTypeNav": { "__metadata": { "uri": "https://api44.sapsf.com/odata/v2/TimeType('SICK_LEAVE')", "type": "SFOData.TimeType" } } }' ``` ### Sample Responses **Failure:** ```json { "d": [ { "key": "EmployeeTime/externalCode=TRY1234", "status": "ERROR", "message": "Expected return date must be one day later than end date.", "httpCode": 500 } ] } ``` **Success:** ```json { "d": [ { "key": "EmployeeTime/externalCode=TRY1234", "status": "OK", "editStatus": "UPSERTED", "httpCode": 200 } ] } ``` --- ## Verification in Portal - **User Profile:** Navigate to _User Profile → Actions → Manage leave of absence._ - **Manage Data:** Go to _Manage Time Off Structures → Employee Time → [externalCode]_ ![](https://lh3.googleusercontent.com/elq_Uw24PyqLl-s17NbhjHpJlFBr4JLMviAhyp_O1ZfzWLpWJ2TlVz4hHcVnDFB95io1YI0M_IvnmSj-4nko7QnrMtd7Q-SvnLs9B2ipuwRNVKX-5ja5kYUVUJDXb9ZmKoIQAqT9) ## References 1. SAP API Guide : https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/2011/en-US 2. https://blogs.sap.com/2015/10/16/ec-time-off-for-on-time-hr-management/ --- ## Talisma Livechat Integration ## 1. Configuration - Inside your project, navigate to the Configuration tab and click **Integrations**. Search for **Talisma live chat**. - Click **Connect**. Enter **Talisma Api Base Url** and **Agent Timeout** value. ![](https://i.imgur.com/z3ORF31.png) If you have multiple accounts, follow the above mentioned steps to add each of them. :::note 1. Enter a unique name for each account to easily identify them within the yellow.ai platform. It is recommended to use a name that aligns with its purpose for better usability. 2. You can add a maximum of 15 accounts. 3. In a two-tier environment, such as bots with only Development/Live environments, you can add account names only in the development mode. Once added and flows have been built, in the Live mode, you can only choose the account names and not edit them. 4. In a three-tier environment, such as bots with Staging/Sandbox/Production modes, in Staging and Sandbox modes, you can add and edit new accounts. However, in Production, only the account details added in Staging will be available. You can only map in the production environment. ::: ## 2. Use Case :::info Use **Ticket-closed** in the **Raise Ticket node** to perform specific actions when a live chat closes, instead of using the **ticket-close** event. ::: In this integration, you can use [raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) node to create a conversation with Talisma agent. Once the conversation is initiated the user can talk to the talisma agent. After the conversation between them ends, the bot takes over the conversation with the user. ![](https://i.imgur.com/V37htaq.png) :::note When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. ::: **Support** The text and attachments (image, file) is being supported from the user and agent's side. --- **Reference** --- ## Twilio Verify ## Scope of Integration Yellow.ai Integration with Twilio Verify allows you to seamlessly connect your Twilio Verify service with the yellow.ai platform. Any customer who has a Twilio account will be able to seamlessly connect their verify service with yellow.ai using basic auth with account SID, Auth Token and Verify Service SID. This connector will enable users to verify end user identity using OTP verification by means of SMS, call or email. ## Configuration Configuring the integration with Twilio Verify is straightforward. Follow the steps defined below to start integrating: 1. Navigate to Integrations Tab: Inside your project, navigate to the Configuration tab and then click on the Integrations Tab. Search for Twilio Verify. 2. Connect your Twilio Verify account: Enter the values for Account SID, Auth token and verify service SID to connect to your Twilio account. Voila! And just like that, you are now connected with your Twilio account. If you have multiple accounts, follow the above mentioned steps to add each of them. :::note 1. Enter a unique name for each account to easily identify them within the yellow.ai platform. It is recommended to use a name that aligns with its purpose for better usability. 2. You can add a maximum of 15 accounts. 3. In a two-tier environment, such as bots with only Development/Live environments, you can add account names only in the development mode. Once added and flows have been built, in the Live mode, you can only choose the account names and not edit them. 4. In a three-tier environment, such as bots with Staging/Sandbox/Production modes, in Staging and Sandbox modes, you can add and edit new accounts. However, in Production, only the account details added in Staging will be available. You can only map in the production environment. ::: ## Use Case Following are the use-cases which are currently accommodated in the Integration: Simple Integration using credentials To enable integration with Twilio verify, you need account SID, authentication token and verify service SID. You can get account SID, authentication token and verify service SID from twilio dashboard. Take actions with Twilio Verify nodes Using the Twilio Verify integration nodes, you can send and verify OTP to the end user. You can choose the action node corresponding to the channel (SMS, call and email) via which you want to send the OTP. After choosing the appropriate action node, you need to enter the receiver to whom you want to send OTP. Then you need to ask the user for OTP to verify it. After that you need to create a Twilio Check Verification action node and provide values for receiver and OTP to verify if OTP provided by the user is correct. If it is correct, you’ll get “status”: “approved” in response object. :::note When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. ::: # Reference This integration will support the latest version releases, latest one being v2 API Documentation: [https://www.twilio.com/docs/verify](https://www.twilio.com/docs/verify) --- ## WebEngage Yellow.ai integration with WebEngage allows you to seamlessly send WhatsApp campaigns to your customers. Any business user who has a WebEngage account can simply login to their WebEngage account, choose Yellow.ai as their WSP (WhatsApp Service Provider). Provide the API key to setup the configuration, upload the audience list and initiate the whatsapp campaign. Yellow.ai uses its notification engine service to run the whatsapp campaign based on the events received from WebEngage. The notification delivery status report is sent to WebEngage by invoking their static REST endpoint. In this article, you will learn how to integrate WebEngage on yellow cloud platform. **Detailed workflow** ![](https://i.imgur.com/WwPMRiq.png) :::note While using a bot of app.yellow.ai, navigate to the Data explorer section in the Growth Module, which will redirect you to the cloud.yellow.ai UI. After that, you can move to the Integrations section and search for WebEngage to get the instructions. ::: ## 1. Configuration Configuring the integration with WebEngage is straightforward. Follow the steps below to integrate WebEngage: 1. From the switcher, click on the **Integrations**. ![](https://i.imgur.com/HeM0vYn.jpg) 2. Search for **WebEngage**. ![](https://i.imgur.com/atOZEPJ.png) 3. Provide the **API key** from the description. Click **Connect** to see the list of instructions provided in the description card and then click **Update** to enable the integration. ![](https://i.imgur.com/jIyp5pO.jpg) 4. If you have multiple accounts, follow the above mentioned steps to add each of them. :::note 1. Enter a unique name for each account to easily identify them within the yellow.ai platform. It is recommended to use a name that aligns with its purpose for better usability. 2. You can add a maximum of 15 accounts. 3. In a two-tier environment, such as bots with only Development/Live environments, you can add account names only in the development mode. Once added and flows have been built, in the Live mode, you can only choose the account names and not edit them. 4. In a three-tier environment, such as bots with Staging/Sandbox/Production modes, in Staging and Sandbox modes, you can add and edit new accounts. However, in Production, only the account details added in Staging will be available. You can only map in the production environment. ::: ## 2. Use case Following are the use-cases which are currently accommodated in the Integration: :::note When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. ::: 1. **Take actions with WebEngage nodes**: You can send the delivery status report of the notification sent by using the Delivery Report Action Nodes. There are two action nodes, one for India Region and the other for US Region. The selection of action nodes is conditional(based on the country code received from WebEngage’s end. If the country code is IN, the Delivery Report India Region action node needs to be used, else the US Region action node needs to be used). ![](https://i.imgur.com/mQMa9Rf.png) 2. **Receive events**: On sending the WhatsApp notification using yellow.ai’s notification engine service, an event is received stating the details of the delivery report. ![](https://i.imgur.com/pjv3C2I.png) --- ## Custom Webhook integration This custom webhook integration helps the bot to receive instant notifications about user actions, such as adding products to their cart or completing purchases. Pre-built integrations may not suit all client setups. Implementing webhooks ensures seamless communication between our bot and both in-house and third-party systems, accommodating various client configurations. For example, clients utilizing third-party systems can still receive timely updates about user actions. To configure a Webhook account, follow these steps: 1. In Development/Staging environment, go to **Extensions** > **Integrations** > **Tools & Utilities** > **Custom Webhook**. Alternatively, you can use the Search box to find a specific integration. ![](https://i.imgur.com/0ptkEAy.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (_). ![](https://i.imgur.com/feKFZhL.png) 3. Configure the other details based on the description provided in the following table. Option | Description ------ | ----------- Provider | Either choose *Custom webhook* to add a new webhook account or select a preconfigured webhook that you want to use. Domain name | Enter the domain for example Webhook payload | The data format or structure of the payload sent via the webhook. Describe the content and format expected in the JSON payload. Send event data to user | Toggle to *Yes* to send event data received via the webhook to the user. By default, this option is set to *No*. For example, show status of the payment. For audit or any other purposes, the bot developer should add logic based on the event to store event data. Choose from default source? | Toggle to *Yes* to Specifies whether to select from a default source. Authenticate key | Enter the auth key for authentication purposes. Sender path | Specifies the path or endpoint from which the webhook sender transmits data. Choose the relevant parameter used in the webhook payload. Source path | The path or endpoint from which the webhook source sends data. Describe the format or structure of the source path. Other parameters | Map any additional parameters relevant to the webhook integration. For example, account name. :::note - We have preconfigured the most common custom webhooks and will continue to add more commonly used webhooks over time. Simply select the provider, and no further configurations are required. - The following screenshot shows how the Webhook payload parameters appear in Sender path and Source path: ![](https://i.imgur.com/htcLyEB.png) ::: 4. Click **Connect**. 5. To add more accounts, click **+Add account** and repeat the above procedure. 6. Once an account is added, you can copy the webhook URL by clicking on the Webhook link. ![](https://i.imgur.com/jGn2NzO.png) :::note - Once the account is added, you can copy the Webhook URL. ::: ## Enable Webhook events in Automation Once integration is complete, to make use of events in the bot, users need to enable events. 1. Go to **Automation** > **Event** > **Integrations**. 2. Search for *Custom webhook*, click on more options and Activate the event. If there are multiple accounts, you need to activate for each account separately. ![](https://i.imgur.com/DzcNzc7.png) --- ## Workday Integration Guide Workday is a leading Human Capital and Financial Operations managing platform that offers centralized access to critical business data—employee records, payroll, financial transactions, supplier contracts, and more. This guide helps you integrate Workday with the Yellow.ai platform to automate data exchange, improve operational efficiency, and support business decision-making. Whether you're looking to sync employee information, trigger workflows based on Workday events, or use Workday data to personalize interactions, this guide will walk you through setup and best practices. ## Connect Workday with Yellow.ai To integrate Workday with the Yellow.ai platform, follow the steps below: 1. Switch to the Development/Staging environment and go to **Extensions** > **Integrations** > **HR** > **Workday**. Alternatively, you can use the Search box to quickly find the required integration. ![](https://i.imgur.com/WJoWvEI.png) 2. In **Give account name**, enter a unique name for the integration. You can use only lowercase alphanumeric characters and underscores (_). ![](https://i.imgur.com/xTllnFx.png) 3. Configure the following fields required for integration and click **Connect**. Below is a detailed list of required fields to connect your Workday integration, along with instructions on how to obtain each value. | **Field** | **Description** | **How to Obtain** | |--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **API Base URL** * | The root URL for your Workday API environment. This varies based on your tenant and environment (e.g., production or sandbox).**Example:** `https://wd3-impl-services1.workday.com` | 1. Log in to your Workday account. 2. Search for and open the **View API Clients** report. 3. Locate the **Workday REST API Endpoint** — this is your base URL. | | **Instance ID** * | A unique identifier for your Workday tenant. **Example:** If your Workday URL is `https://acme.workday.com`, then `acme` is your instance ID. | 1. Log in to Workday. 2. Look at the browser’s address bar — it typically follows the format `https://[instance_id].workday.com`. | | **Client ID** * | A unique identifier for your registered application in Workday. Used during OAuth to identify your integration. | 1. In Workday, search for **Register API Client**. 2. Fill in the required details (Client Name, Redirect URI, etc.). 3. After saving, copy the **Client ID** shown — store it securely. | | **Client Secret** *| A confidential string generated alongside your Client ID. It’s used to securely authenticate OAuth requests. | 1. During the API client registration process, Workday will generate a **Client Secret**. 2. Copy and store it securely — it may not be displayed again. | | **Refresh Token** *| A token that allows your integration to obtain new access tokens without re-authentication. Enables long-term connection to Workday. | 1. Go to the **View API Clients** report. 2. Open the API client you registered. 3. Click the ellipsis (...) → **API Client → Manage Refresh Tokens for Integrations**. 4. Select the Workday user account and click **Generate New Refresh Token**. 5. Copy and store it. | :::note You can add a maximum of 15 accounts. Use **+Add account** and proceed with the previous steps to add each accoount. ::: ## Actions supported via AI Agent (Bot) Once you integrate Workday, you can perform the following actions to directly from the AI Agent conversations:
### Fetch employee information Retrieve key employee details such as job title, department, manager, employee ID, and contact information. Useful for quick lookups during HR or IT support conversations. #### Required inputs * Employee ID (`number`): Unique numeric identifier assigned to each employee in the Workday system. ### Fetch employee time off plan details View an employee’s time off plan, including accrual policies, available leave balances, and plan eligibility. Helps users better understand their leave entitlements. #### Required inputs * Employee ID (`number`): Unique numeric identifier assigned to each employee in the Workday system. ### Get employee time off types for a plan Return a list of time off types (e.g., vacation, sick leave, personal leave) associated with an employee's time off plan. Ideal for guiding employees during leave application. #### Required inputs * Employee ID (`number`): Unique numeric identifier assigned to each employee in the Workday system. ### Apply time off Allows employees to apply for time off directly through the bot by specifying the number of days and relevant identifiers. Useful for streamlining HR requests and improving employee experience. #### Required inputs - **Days** (`:array`): The list of dates for which time off is being requested. Each date should be in the appropriate format (e.g., `YYYY-MM-DD`). - **Employee WID** (`:string`): The unique Workday ID assigned to the employee. This is required to correctly associate the time-off request with the employee’s record. ### View employee benefits Provide employees with an overview of their enrolled benefits, including healthcare, insurance, retirement plans, and other offerings. Helps reduce dependency on HR teams. #### Required inputs * Effective Date (:string - date): The date for which the benefits information should be retrieved. Format should be YYYY-MM-DD. This helps pull the accurate benefits as of that point in time. * Employee ID (WID) (:string): The unique Workday ID associated with the employee whose benefit details are being requested. ### Change preferred name Allow employees to update their preferred name in Workday through a simple conversational flow. This may include updating first and last names, or opting to use the legal name as the preferred name. #### Required inputs - **Use Legal Name as Preferred Name** (`:boolean`): Set to `true` if the legal name should be used as the preferred name. If `false`, provide a new preferred first and/or last name. - **Employee ID** (`:number`): The unique numeric identifier assigned to the employee in Workday. #### Optional inputs (if not using legal name) - **Country Reference (ISO_3166-1_Alpha-2_Code)** (`:string`): The country code to determine locale-based formatting and naming standards. Example: `US`, `IN`. - **First Name** (`:string`): New preferred first name. - **Last Name** (`:string`): New preferred last name. ### Update marital status Let employees update their marital status with appropriate documentation or input validation via the bot. #### Required inputs - **Employee ID** (`:number`): The unique numeric identifier assigned to the employee in Workday. - **Marital Status (Marital_Status_ID)** (`:string`): The updated marital status code. Example values may include `SINGLE`, `MARRIED`, `DIVORCED`, depending on your Workday configuration. ### Update home contact information Empower employees to change their home address, phone number, or other contact details through the bot, ensuring quick and easy updates to personal information. #### Required Inputs - **Contact Type** (`:string`): The type of home contact information to update. Values could include `Phone`, `Email`, or `Address`. --- ## Zendesk offline ticketing Integrating Zendesk with Yellow.ai allows you to create offline support tickets. This ensures that users can raise the offline support requests even when live agents are unavailable. When live agents are offline, Zendesk’s offline ticketing system allows you to create offline support request. These requests are then converted into support tickets in Zendesk. Once agents are available, they can access these tickets and follow up with users via email to resolve their queries. **Key benefits of using this Integration**: * **Creating offline tickets**: Generates the support tickets from offline messages when the agents are unavailable. * **User management:** Allows the addition of new users, retrieval of user details, and creation of offline support requests within Zendesk. ## Integrate Zendesk Offline Ticketing with Yellow.ai To integrate Zendesk Offline Ticketing with Yellow.ai, follow these steps: ### Get your domain address & API Key from Zendesk 1. Log in to your [Zendesk account](https://www.zendesk.com/in/login/). 2. From your browser's address bar, copy your Zendesk domain URL. Example: `https://yourcompany.zendesk.com`. 3. Click on the Zendesk icon and select **Admin center**. 3. In the Admin center, go to **Apps and Integrations** > **Zendesk API**. 4. Copy the **API key** and **User name**. ### Add API key and domain to the Yellow platform 1. Login to the [Yellow platform](https://cloud.yellow.ai/) and navigate to the **Development** environment. * In a two-tier environment, you can only add accounts in the Development environment. * In a three-tier environment, you can only add accounts in Staging/Sandbox environment. 2. Go to **Extensions** > **Integrations** > **Zendesk offline ticketing**. ![](https://i.imgur.com/AkxyIdH.png) 2. In **Give account name**, enter a unique name for the account. Supports only lowercase alphanumeric and underscore characters. It is recommended to use a name that aligns with its purpose for better usability. ![](https://i.imgur.com/bs15t1e.png) 3. In **API key**, paste the API token you generated from Zendesk. 4. In **Domain name**, enter your Zendesk domain URL (example, `https://yourcompany.zendesk.com`). 5. Enter the **User name** that you have copied from your Zendesk account. 6. Click the **Connect**. * To connect more accounts, repeat the steps outlined above for each account. You can add a maximum of 15 accounts. ## Manage Zendesk tickets through AI Agent This integration allows your bot to perform actions such as [get user information](#get-user-details), [adding new users](#add-user), and [creating offline tickets](#create-request) in Zendesk. 1. Navigate to **Automation** > **Node** > **Integrations** > **Zendesk**. 2. Select the Zendesk account that you want to use for managing tickets. 3. Select the desired action: * **Get user**: Retrieve information about a specific user in Zendesk. * **Add user**: Create a new user in Zendesk. * **Create request**: Generate a new support ticket in Zendesk. ### Get user details This action allows you to retrievie information about a specific user from your Zendesk account. You can get the user details using the External ID or query. For more information, click [here](https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#query-syntax). **Node Input Params**: Field name | Description | Datatype ------------|-------------|---------- External ID | Enter the unique identifier of the user. The API treats the id as case insensitive. Example: "ian1" and "IAN1" are the same value. | String ### Add user The Add user action creates a new user in your account. **Node Input Params**: Field name | Description | Datatype ------------|-------------|---------- Email | Enter the email address of the user. Example: rio.doe@yellow.ai| String Name | Enter the name of the user. Example: Rio Doe| String | Role | Enter the user's role within Zendesk. Supported roles: end-user, agent, admin. Default is end-user. | String | Custom role ID | Enter custom role ID, if the user is an agent on the Enterprise plan or above | String | Default group ID | Enter ID of the user's default group| String | External ID | Enter the unique identifier of the user | String | Locale | Enter user's locale (language). If both locale and locale_id are provided, locale_id is ignored. | String Locale ID | Enter user's language identifier | Number Notes | Enter any additional notes about the user| String Organization ID | Enter the ID of the user's organization. If the user has [organization memberships](https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/) memberships, this ID represents the default organization. | Number Phone | Enter the user's primary phone number | String) Tags | Enter the tags associated with the user. Only applicable if user tagging is enabled in your account | Array **Sample response:** ```json { "user": { "name": "John Doe", "email": "john.doe@example.com", "role": "end-user", "custom_role_id": 123, "default_group_id": null, "external_id": null, "locale_id": 1176, "notes": null, "organization_id": null, "tags": [] } } ``` ### Create request Use this action to submit support requests. These will be converted into offline tickets in your Zendesk account. **Node Input Params**: Field name | Description | Datatype ------------|-------------|---------- Comment | Describe the problem, incident, question, or task. For more informtion, see [Request comments](https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/#request-comments) | Object Priority | The priority of the request. Acceptable values are "low", "normal", "high", or "urgent". | String Requester | Required for anonymous requests. Specifies the requester of the anonymous request. For more details, see [Creating anonymous requests](https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-managing-requests/#creating-anonymous-requests) | object Subject | The subject of the request. If the subject field is visible to end users, this value is used; otherwise, a truncated version of the description is used. | string Tags | Enter the tags associated with the user | Array Via | Describes how the object was created. See the [Via object reference](https://developer.zendesk.com/documentation/ticketing/reference-guides/via-object-reference/) | Object **Sample response:** ```json { "request": { "requester": { "name": "Rio", "email": "rio@yellow.ai" }, "subject": "Test ticket", "comment": { "body": "test ticket" }, "priority": "urgent", "via": { "channel": "chat" }, "tags": [ "yellow_handoff", "GoFan_Support" ] } } ``` --- ## Zoho CRM You can integrate Zoho CRM with Yellow.ai to allow syncing of customer data, and improve customer engagement. This integration enables you to effortlessly create, update, and search for records within various modules of Zoho CRM. :::note Yellow.ai supportes integration with both **Zoho CRM** and [Zoho SalesIQ](https://docs.yellow.ai/docs/platform_concepts/appConfiguration/zoho-live-chat). ::: ## Supported Zoho CRM actions with Yellow.ai Action | Description | |---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | createRecord | Creates a record in the integrated Zoho CRM account. The following are the modules in which records can be created: 1. Home2. Leads3. Contacts4. Accounts5. Deals6. Tasks7. Events 8. Activities9. Invoices10. SalesInbox11. Campaigns12. Vendors 13. PriceBooks14. Cases15. Solutions16. Documents17. Forecasts18. Visits19. Social 20. Notes21. Attachments22. Actions Performed | | updateRecord | Updates a record in the integrated Zoho CRM account in the following modules: 1. Leads2. Contacts3. Accounts4. Deals5. Tasks6. Events 7. Activities8. Invoices9. SalesInbox10. Campaigns11. Vendors 12. PriceBooks13. Cases14. Solutions15. Documents16. Forecasts17. Visits18. Social 19. Notes | | searchRecord | Fetches a particular record in the integrated Zoho CRM account in the following modules:1. Leads2. Contacts3. Accounts4. Deals5. Tasks6. Events 7. Activities8. Invoices9. SalesInbox10. Campaigns11. Vendors 12. PriceBooks13. Cases14. Solutions15. Documents16. Forecasts17. Visits18. Social 19. Notes| ## Connect Zoho CRM with Yellow.ai **Prerequsites:** 1. An active Zoho CRM account 2. An active yellow.ai account. To connect your Zoho CRM account with Yellow.ai, follow the these steps: Add accounts only in the development or staging environment. You can access the connected accounts in the Live/Production environment. 1. On the left navigation bar, go to **Extensions** > **Integrations**. ![](https://i.imgur.com/JagYT5w.png) 2. Navigate to **CRM** > **Zoho CRM**. Alternatively, you can use the Search box to find the integration app. ![](https://i.imgur.com/KiYwOg2.png) 3. Under **Give account name**, provide a unique identifier. Only lowercase alphanumeric characters and underscores (_) are allowed. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/Zohoaccount.png) 4. Go to your **Zoho account** > **Profile settings** to identify your data center location. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/zohoprofile.png) 5. Based on your Zoho profile, choose the matching data center from the options listed in the drop-down. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/datacenter.png) 6. You need to sign-in to your Zoho CRM account. Once you have signed-in, click **Accept** to authorize Yellow.ai to access **Zoho CRM**. ![](https://i.imgur.com/3bBqQIe.png) 5. You can add up to 15 accounts. To add another Zoho CRM account, click on **Add account** and follow the steps mentioned above. ![](https://i.imgur.com/ncw7DQU.png) ## Use actions in bot conversations To carry out a [certain action](#supported-zoho-crm-actions-with-yellowai) in your Zoho CRM account, follow these steps: 1. Go to **Automation** and [create a flow](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys#2-create-a-flow) based on your requirement. 2. In whichever point you want the bot to access Zoho CRM, inlcude the Zoho CRM node. For that drag the node connector, go to **Integrations** > **Zoho CRM**. ![](https://i.imgur.com/cgrEHM9.png) 3. In the **Zoho CRM** node, fill the following: ![](https://i.imgur.com/UeuaTVh.png) * **Account name:** Choose the Zoho CRM account. If you have only one account, the account name is automatically populated. If you have multiple accounts, the first account added is auto-populated. Select the one you want to use at that moment. * **Action:** Choose the [action](#supported-zoho-crm-actions-with-yellowai) to be performed. * **Select Objects:** Choose the Zoho CRM module in which the chosen action should be performed. * Depending on the selected object, the corresponding fields will be shown. To fill those fields, you need to collect it as an input from users beforehand. Construct the flow accordingly and [store the data in variables](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#41-store-data-in-variables). These variables will then be passed in those fields. 4. Each Zoho CRM action returns a response as a JSON object. [Store that response in an object variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#41-store-data-in-variables) and to extract the required information from the payload, [pass that variable](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#42-retrieve-data-from-variables) in a [message node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/message-nodes1/message-nodes) to display that response to the end user. For example, if you receive the following response, you can use this syntax ``` {{{variables.variablename.data.0.Owner.name}}} ``` to display only the account owner's name. ``` { "data": [ { "Owner": { "name": "Bhaskar K", "id": "231200000000180001", "email": "karanam.bhaskar@yellow.ai" }, "Company": null, "Email": "bhaskar@abcl.com", "$currency_symbol": "$", "id": "231200000000321003", "$approved": true, "Created_Time": "2021-10-05T11:52:54+05:30", "Created_By": { "name": "Bhaskar K", "id": "231200000000180001", "email": "karanam.bhaskar@yellow.ai" }, "First_Name": "Bhaskar", "Full_Name": "Bhaskar K", "Modified_By": { "name": "Bhaskar K", "id": "231200000000180001", "email": "karanam.bhaskar@yellow.ai" }, "Phone": "9087654321", "Modified_Time": "2021-10-05T11:52:54+05:30", "$converted_detail": {}, "$approval_state": "approved" } ], "info": { "per_page": 200, "count": 1, "page": 1, "more_records": false } } ``` --- ## Zoho SalesIQ ## Scope of Integration Yellow.ai Integration with Zoho Live Chat allows you to seamlessly connect your Zoho SalesIQservice with the yellow.ai platform. Any customer who has a Zoho SalesIQ account will be able to seamlessly connect their service with yellow.ai using Oauth. This connector will enable it to connect end users to live agents. ## Configuration Setting up an account for Zoho SalesIQ : 1. You can create an account on Zoho and use [this](https://api-console.zoho.com/add?client_type=ORG) link to create a client. Use appropriate top level domain according to your location (for example .in for Indian users). 2. Set [this](https://cloud.yellow.ai/integration/oauth/zoho-live-chat) as a redirect URI. You'll need client Id and client secret for connection which you'll get on the "Client Secret" tab on the same window. 3. Then you can navigate to the salesIQ dashboard where you can find your screen name in the URL. 4. You can find Department Id in the settings section. For App Id, you'll need to call [this](https://www.zoho.com/salesiq/help/developer-section/rest-api-apps-list.html) API with appropriate credentials. Simple Integration with client ID, Client Secret, Screen Name, App ID and Dept ID: Once you have all these credentials, you can connect with Zoho Live Chat integration on yellow.ai dashboard. For connecting, you'll need to navigate to the integrations page and search for Zoho Live Chat integration. On this screen you need to enter Client ID, Client Secret, Screen Name, App ID and Dept ID. After that you can click on the Connect to Zoho Live Chat button to be prompted for the Oauth process where you need to give us access to your account for: 1. Initiating the conversation 2. Creating webhook 3. Viewing webhook 4. Deleting webhook. After you click accept, a webhook will automatically be created on your SalesIQ dashboard, which will empower the user-agent conversation. If you have multiple accounts, follow the above mentioned steps to add each of them. :::note 1. Enter a unique name for each account to easily identify them within the yellow.ai platform. It is recommended to use a name that aligns with its purpose for better usability. 2. You can add a maximum of 15 accounts. 3. In a two-tier environment, such as bots with only Development/Live environments, you can add account names only in the development mode. Once added and flows have been built, in the Live mode, you can only choose the account names and not edit them. 4. In a three-tier environment, such as bots with Staging/Sandbox/Production modes, in Staging and Sandbox modes, you can add and edit new accounts. However, in Production, only the account details added in Staging will be available. You can only map in the production environment. ::: ## Use Case :::info Use **Ticket-closed** in the **Raise Ticket node** to perform specific actions when a live chat closes, instead of using the **ticket-close** event. ::: - In this integration you can use **raise ticket** node to create a conversation with Zoho SalesIQ agent and once conversation initiates the user can talk to the agent. :::note When multiple accounts are added, select the appropriate account for each node, allowing you to leverage the unique functionalities of each account for their intended purposes. ::: ### Events Following are the events which are currently accommodated in the Integration: Event | Description ----- | ----------- zoho_operator_replied | This event reaches to bot when a salesIQ agent replies to the user. ticket-closed | This event reaches to bot when salesIQ agent closes the user ticket. :::info If you have added multiple accounts in your platform, enable events for each of those accounts. ::: ## Limitations - Images, audio or video attachments are being supported only from the user side currently. Attachments from agents are not supported. ## Steps to perform if webhook deletion fails while disconnecting the integration: 1. Check if you can access the webhook page on the client dashboard 2. If you can access it, please try to delete it manually from the dashboard itself. 3. If you can't access it, please address the reason why you are not able to access it. (for example, the plan needs to be upgraded or the free trial expired). - Navigate to Settings -> Webhooks. - If your free trial has expired for Zoho SalesIQ, you will see the above error. - Please upgrade the plan if you need to register/ deregister webhooks for live chat use cases. - If you can view the webhook, then please try to delete it manually. # Reference API Documentation: [https://www.zoho.com/salesiq/help/developer-section/rest-api-v2.html](https://www.zoho.com/salesiq/help/developer-section/rest-api-v2.html) --- ## Agent Best Practices These are the practices that consistently produce good Nexus bots. They come from teams that have shipped Nexus agents to production - read them once when you start, and revisit them before each release. Flip through them as flashcards - try to answer each question before you reveal it - or switch to **Read as article** for the full text. ## Start small {#start-small} The single biggest mistake new builders make: building five agents on day one. **Do this instead:** 1. Start with just the bot's configuration. Get it answering 80% of common questions correctly. 2. Look at real (or test) transcripts. Find the place the bot consistently fails. 3. *Then* introduce an agent or a tool to handle that case. Extra agents add complexity. Add them deliberately, not preemptively. The same restraint applies to tools *within* an agent. An agent with a long tool list and lots of inline "decide, then call, then decide again" logic becomes unpredictable - every extra tool is one more thing routing has to choose between, and every inline decision is a place the model can drift. Keep an agent's job conversational: understand the user, pick the right next step, talk back. Push deterministic multi-step logic - call API, branch on the result, call another API, format the output - into a **workflow** and attach it as a single tool the agent calls. The agent owns the conversation; the workflow owns the procedure. If you find an agent juggling many tool calls per turn, that's the signal to move the orchestration into a workflow (or a [guided agent](../build/guided-agents/index.md)). ## Treat bot identity as a contract {#treat-bot-identity-as-a-contract} Your **bot identity** is the most important field on the entire platform. It's also the field most builders treat carelessly. **Do this:** - Lead with role, then responsibilities, then constraints, then tone. - Be concrete about what the bot must NOT do. "You never quote pricing" stops bad behavior; "You're a helpful assistant" doesn't. - Stable identity = stable behavior. Don't tweak identity casually - every change ripples through every conversation. **Don't do this:** - Don't write marketing copy. ("You're the best assistant on Earth!" - the model will not behave better.) - Don't be vague. ("You help customers with anything" gives the model no constraints.) - Don't pile on contradictions. ("Be brief. Always explain in detail.") ## Writing prompts {#writing-prompts} Every prompt field rewards the same habits: short plain sentences, one instruction per line, concrete do's and don'ts, and saying what *not* to do as clearly as what to do. The bot identity above is the headline example, but the detailed, field-by-field guidance lives with each surface - keep this page as the index and follow the links: - **Agent instructions and Triggers** - keep *when to take over* (Trigger) separate from *how to behave* (Agent instructions); see [Conversational agents → Writing agent instructions](../build/agents/conversational-agents.md#writing-agent-instructions). - **Memory variables** - name only the variables a later turn actually reads, and prefer tool input mapping for single-turn values; see [Memory in Nexus agents](../build/configuration/memory.md). - **Tool descriptions and calling** - write descriptions like a docstring (what / inputs / when / when-not) so the model calls the right tool with the right arguments; see [Tools - Best Practices](./tools.md). ## Pick rules carefully {#pick-rules-carefully} There are two rule lists, and people mix them up: | | Conversation Rules | Routing Logic | |---|---|---| | **What it shapes** | Tone, do's and don'ts | Where messages get routed | | **Available on** | Nexus and the legacy platform | Nexus only | | **Use when…** | "The bot should always confirm before submitting" | "Billing questions must go to billing-agent" | Both have the same per-rule limits in the studio (20-500 characters). Both let you add many rules. **Best practices:** - One rule, one concern. Compound rules are hard to debug. - Phrase positively when possible - "Confirm the order ID before sharing details" beats "Don't proceed without an order ID." - Test each rule with a single, dedicated test prompt. If you can't write that test, the rule is too vague. ## Don't ship static welcome and fallback strings {#dont-ship-static-welcome-and-fallback-strings} A hardcoded "Hi! How can I help?" works for a hackathon, not for production. In Nexus, both Welcome and Fallback let you go dynamic: - **Welcome → Instruction** lets the model pick the right opening based on context (returning user vs new, logged-in vs anonymous, channel-specific tone). Welcome can also trigger a **welcome workflow** if the greeting needs to look something up first (loyalty status, account info). - **Fallback → Instruction** lets the model do real recovery - rephrase the user's intent, suggest a likely topic, or offer a hand-off - instead of a generic apology string. Pair it with the **Retries** count for validation failures. If your welcome or fallback needs to *act* (search the KB, route to a human, render rich media), reach for a workflow - either picked directly in the welcome picker, or invoked as a **workflow** or **knowledge-base** tool the model calls from the Instruction prompt. ## Don't put everything into Memory {#dont-put-everything-into-memory} Memory in Nexus isn't a context-window slider - it's a typed key-value store, shared across all agents in a conversation (see [Memory](../build/configuration/memory.md)). The temptation is to stash everything you might need later. Resist it. **Why restraint matters:** - Every variable you declare becomes a prompt input. More variables = larger prompts = more cost and latency per turn. - Two agents writing to the same variable name silently overwrite each other. - Memory persists for 2 days. Single-turn values don't belong there - pass them through tool input mapping instead. **Best practice:** start with the minimum. Add a variable only when you can name the specific later turn (or specialised agent) that needs to read it. ## Turn safety filters on before you ship {#turn-safety-filters-on-before-you-ship} If your account has **AI Safety & Conduct**: - Enable customer-query filters and AI-response filters before going live. - Test adversarial prompts (jailbreaks, off-topic, hostile) in [Testing Lab](../test-debug/index.md). - Pair filters with a fallback that says something safe and helpful when a filter fires - silence is worse than a graceful redirect. ## Test like you mean it {#test-like-you-mean-it} The Nexus testing tools are good. Use them. - **Playground** (▶ on each agent) - test individual conversations as a user would. - **AI Trust Centre → Dataset** - store a curated set of test cases. - **AI Trust Centre → Testing Lab** - bulk-replay your dataset before every release. A typical regression suite has 10-30 test cases covering: golden-path successes, common edge cases, every routing rule, every tool, and a few adversarial prompts. Saving these once pays for itself the first time you tweak identity and need to verify nothing regressed. ## Voice ≠ chat {#voice--chat} If your bot serves voice: - Lower memory than chat (latency matters more). - Lower validation retry limits (failed retries compound latency). - Test in the **Voice Playground** specifically - TTS pacing, interruptions, and barge-in behave differently than chat. ## Build a release checklist {#build-a-release-checklist} Before each release: - [ ] Identity changes reviewed and approved by stakeholders - [ ] All routing rules have a test prompt that proves they fire - [ ] Fallback uses an Instruction that can recover gracefully (not a static apology) - [ ] Safety filters enabled and tested with adversarial prompts - [ ] Regression dataset replayed and passing - [ ] Voice playground spot-checked (if voice channel) The first time this checklist saves you from a regression, you'll keep using it forever. ## When to ask for help {#when-to-ask-for-help} If your bot is doing something genuinely puzzling - wrong agent fires consistently, identity instructions seem ignored - open the **Playground** (▶ on the misbehaving agent) and re-send the message. Read the bot's reply carefully, then re-check the agent's Trigger, identity, and any Routing Logic rules - most "weird behavior" traces back to one of those three. --- ## Tools - Best Practices Practical patterns from teams running Nexus agents in production. Read once before you start, revisit before each release. Flip through them as flashcards - try to answer each question before you reveal it - or switch to **Read as article** for the full text. ## Naming {#naming} - **Verb-first, scoped to the domain.** `getOrderStatus`, `updateAddress`, `escalateToBilling`. Avoid `tool1`, `helper`, `doStuff`. - **Keep names stable.** Tool names show up in routing rules and traces. Renaming is a chore - pick well the first time. - **One name, one purpose.** Don't reuse `lookup` for three different tools across domains. Be specific: `lookupOrder`, `lookupCustomer`, `lookupTicket`. ## Descriptions {#descriptions} The description field is the most important text on the page. The LLM reads it to decide *whether* to call your tool. Treat it like a function docstring written for a junior teammate. A good description answers all four: 1. **What does the tool do?** ("Look up a customer's current shipment status…") 2. **What inputs does it need?** ("…by order ID.") 3. **When should it be used?** ("Use when the user asks about an existing order.") 4. **When should it NOT be used?** ("Do not use for new orders or pricing questions.") Omitting any of these makes the LLM guess. ## Input schema {#input-schema} - **Always include `description` for each property.** Naming a field `orderId` is half the message; describing it as "The customer's order ID, typically a 10-character alphanumeric string" closes the loop. - **Mark requireds explicitly.** Without `required`, the LLM may call your tool with missing arguments. - **Use `enum` for fixed sets.** Enum values prevent the LLM from inventing inputs. - **Keep schemas small.** Every input is one more thing the LLM has to extract correctly. Cut what's not strictly needed. - **Don't ask for what you can derive.** If the user is authenticated and you have their email in session state, don't ask the LLM to extract their email. ## Output schema {#output-schema} - **Always define one.** Without an output schema, the LLM doesn't know how to read the response. - **Match the actual shape.** If your workflow returns `{status, trackingNumber}`, your output schema should declare exactly those keys. - **Use clear types.** Don't return numbers as strings or vice versa. The LLM will get confused. ## Granularity {#granularity} **One tool, one job.** A tool that does five things via a "mode" parameter is harder for the LLM to use correctly than five focused tools. ✅ Good: - `getOrderStatus(orderId)` - `cancelOrder(orderId, reason)` - `updateShippingAddress(orderId, newAddress)` ❌ Bad: - `manageOrder(orderId, action: "status" | "cancel" | "updateAddress", ...)` - the LLM will mis-pick the action. ## Choose the right tool type {#choose-the-right-tool-type} | You want to… | Use | |---|---| | Run multi-step backend logic, hit an API, branch on data | **Workflow tool** | | Answer from your documents and FAQs | **Knowledge Base tool** | | Hand off a chat to a human | **Escalate to Agent** | | Forward a voice call to a human | **Transfer Call** | | Hit a single REST endpoint (no branching) | Wrap in a one-step workflow today; **HTTP Webhook** when it ships | | Connect a custom data source | **Connect MCP Server** when it ships | When two types could work, pick the more specific one. KB > workflow for content questions. Escalate to Agent > workflow for handoffs. ## Test before you save {#test-before-you-save} The **Test** tab in the configuration drawer exists for a reason. Use it. - Run the tool with a realistic input. Confirm output is what you expect. - Run it with a missing/invalid input. Confirm it fails gracefully. - For workflow tools, run with mocks during development so you don't burn through production data or paid API credits. ## Make critical tools deterministic {#make-critical-tools-deterministic} The LLM will *usually* pick the right tool from descriptions alone. For anything critical - escalations, payments, account changes - don't rely on usually. Add a Routing Logic rule: > "If the user asks about billing, you must call the **getInvoice** tool before composing a reply. Do not answer billing questions from memory." See [Routing Logic](../build/configuration/routing-logic.md). ## Tool descriptions and routing rules work together {#tool-descriptions-and-routing-rules-work-together} - Descriptions tell the LLM *how* the tool works. - Routing rules tell the LLM *when* to use it. Both matter. A great description with no routing rule means the LLM is guessing in ambiguous cases. A great rule with a vague description means the LLM may call the tool with bad arguments. ## Iterate on real conversations {#iterate-on-real-conversations} Your first guesses about descriptions and schemas will be wrong in places. The fix loop: 1. Run a batch of test conversations in **AI Trust Centre → Testing Lab**. 2. Open the **Playground** (▶ on any agent) and re-run the failing input - watch how the agent uses the tool's output. 3. Look at where the bot picked the wrong tool, missed inputs, or misread output. 4. Adjust the offending tool's description / schema. 5. Re-run. Three rounds of this beats six months of "it should work." ## Keep the catalog tidy {#keep-the-catalog-tidy} - **Delete tools you no longer use.** The LLM sees every available tool. Stale tools dilute its decisions. - **Don't keep "test" tools in production.** If you need a sandbox tool, build it in a non-prod bot. - **Document the catalog.** Keep a brief external doc - a Notion page, a wiki - listing every tool, what it does, and who owns it. Future builders will thank you. ## Pre-release checklist {#pre-release-checklist} - [ ] Every production tool has a clear description with when-to-use and when-not-to-use. - [ ] Every input schema has property descriptions and `required` set correctly. - [ ] Output schemas match what the underlying workflow / KB / API actually returns. - [ ] Critical tools (escalation, payments, account changes) have a Routing Logic rule. - [ ] Each tool tested in isolation via the Test tab. - [ ] Stale or test tools removed from the catalog. - [ ] Regression dataset includes test cases for every tool path. ## Common mistakes {#common-mistakes} - **Vague descriptions.** "Order tool" tells the LLM nothing useful. - **Ten-input schemas.** The LLM will fail to extract all of them. Trim. - **No output schema.** The LLM ignores the response or hallucinates. - **Five overlapping tools.** Two tools with similar descriptions confuse the LLM. Sharpen each so triggers are distinct. - **Forgetting Routing Logic for critical paths.** Hoping the LLM picks the right tool every time is wishful thinking. - **Skipping the Test tab.** "It looked right in the config" is not the same as "it works." - **Leaving stale tools in the catalog.** Every unused tool is noise the LLM has to filter out. --- ## Voice - Best Practices Practical guidance from teams shipping Nexus voice bots. Read once before launch, revisit before any voice-related change. Flip through them as flashcards - try to answer each question before you reveal it - or switch to **Read as article** for the full text. ## Pick the right runtime mode {#pick-the-right-runtime-mode} | If your goal is… | Pick | |---|---| | Production voice bot, broad provider/language support, full custom voice access | **Text & TTS (pipeline)** | | Lowest possible latency for a short demo, with a small voice catalog | **Realtime Audio** | | Anything multilingual or with a custom-cloned voice | **Text & TTS (pipeline)** - Realtime can't use your custom voices | Most production deployments stay on Text & TTS for the lifetime of the bot. Don't switch modes unless you have a specific reason. ## Pick the right TTS provider {#pick-the-right-tts-provider} | Provider | Sweet spot | |---|---| | **Yellow AI** *(default)* | Broad coverage, full custom-voice support. Right default for most bots. | | **ElevenLabs** | Best-in-class English voice quality. Premium voices for high-stakes brand interactions. | | **MiniMax** | Multilingual presets including Mandarin. Good for Asia-Pacific deployments. | Don't switch providers per agent within the same bot if you can avoid it - keeps the brand voice consistent. ## Pick the right STT (speech recognition) {#pick-the-right-stt-speech-recognition} Yellow AI is the default and right for most cases. Switch only when: - Your audience speaks a language Yellow handles less well - try Deepgram, Sarvam (Indic), or Microsoft Azure. - You're getting consistently bad transcripts despite good audio - try a different provider as a diagnostic. Test STT with **real recordings of your audience**, not just your own voice. Accents, background noise, and domain vocabulary all matter. ## Cloning a voice {#cloning-a-voice} - **Record clean.** A 5-second clean clip beats a 30-second noisy one. Quiet room, good mic, single take. - **Read the suggested sample text.** It's tuned for clean clones. - **Name for the voice character, not the use case.** "Aria - warm support EN" beats "Customer Support Voice." - **Test cloned voices in the [Voice Playground](../voice/testing.md)** *and* on a real phone before assigning to a production bot. ## VAD tuning {#vad-tuning} Default values (threshold 0.85, prefix 300 ms, silence 500 ms) are right for most calls. Don't tune speculatively. When you do tune: - Slow / non-native speakers → raise silence duration to 700-800 ms. - Fast-paced sales / outbound → drop silence duration to 300 ms. - Noisy environments → raise threshold to 0.9. Tune one knob at a time, retest, and document why you changed it. ## Voice instructions vs bot identity {#voice-instructions-vs-bot-identity} - **Bot identity** says *what the agent does and is*. - **Voice instructions** say *how it speaks* - pace, language, tone delivery. Don't repeat identity in voice instructions. Layer, don't duplicate. ## Latency {#latency} Conversational voice feels broken above ~2 seconds end-to-end (user finishes speaking → user hears reply start). Aim for under 1.5 seconds. Where latency hides: - **Slow model** - large prompts, slow model choice. Trim the system prompt and try a faster model. - **Slow KB lookup** - too many results, too-aggressive history concatenation. Tune the KB tool. - **Slow TTS** - provider choice, voice choice. Some voices are slower to start than others. - **VAD too patient** - silence duration high. Drop it. - **Telephony round-trip** - fixed cost; can't tune from the bot config. Measure before you optimize. Isolate model latency from TTS latency by swapping each in turn and re-testing in the Voice → Telephony Web Call. ### Tool-call acknowledgements (`_voice_ack`) The other big latency hide is the **silent gap on tool calls**. When the model dispatches a tool call (KB lookup, workflow, API call), the tool may take a second or two to return. Without anything to play, TTS goes silent - and to a voice user that silence reads as "the bot is broken." Nexus voice handles this automatically. On voice channels, the runtime decorates every tool's parameter schema with a `_voice_ack` field - a short spoken phrase the LLM is expected to fill in whenever it dispatches a tool ("Let me check that for you", "One moment while I pull that up"). The runtime emits the `_voice_ack` value to TTS immediately, then strips it from the tool's actual arguments so the tool implementation never sees it. You don't configure `_voice_ack` - it's automatic on voice channels. **But:** - If the model skips the field (uncommon, but happens), the runtime falls back to your bot's static `toolCallFiller`. Make sure you've set a sensible fallback ("One moment.") in the voice config. - The acknowledgement is one short utterance per tool call, not a sentence per argument. If a tool routinely takes more than 3 seconds, follow up the ack with a second message inside the tool's response stream rather than relying on the ack alone to cover the wait. - Realtime Audio mode (OpenAI Realtime) handles this differently - see [Voice on Nexus](../voice/index.md) for the realtime-mode notes. ## Multilingual voice bots {#multilingual-voice-bots} - **Set the spoken language explicitly in voice instructions.** "Respond in Hindi" is more reliable than expecting language detection. - **Cloned voices generalize across languages**, but always test in the target language before going live. - **STT accuracy varies dramatically by language.** Pick the STT provider that's best for your audience's language(s) - not just the default. ## Escalation paths {#escalation-paths} A voice bot without an escalation path is a customer service liability. - Add a **Transfer Call** tool. Wire it to a human destination. - Add a Routing Logic rule that forces escalation on explicit triggers ("agent", "human", "representative", or repeated failure). - Customize the escalation announcement so the user knows what's happening. See [Escalation tools](../build/tools/escalation.md). ## Recording compliance {#recording-compliance} Recording rules vary by jurisdiction. Before enabling recording: - Confirm the legal posture for each region you operate in. - Add a clear consent prompt at the start of the call when required. - Configure the **Recording action** on Transfer Call tools according to policy. When in doubt, talk to legal before launch. ## Pre-launch checklist {#pre-launch-checklist} - [ ] Voice mode set deliberately (Text & TTS for production, Realtime only for narrow use cases). - [ ] Provider and voice tested on a real call, not just the playground. - [ ] Cloned voices (if any) tested in target languages. - [ ] VAD tuned for the audience's speaking pace and environment. - [ ] Voice instructions cover language and pace explicitly. - [ ] Telephony provider configured for inbound and outbound. - [ ] Caller ID set sensibly. - [ ] Escalation tool wired and tested end-to-end. - [ ] Fallback wired to a human-handoff workflow (not a generic apology string). - [ ] Recording compliance reviewed for each region. - [ ] Voice regression suite (5+ real test prompts) defined and run before each release. ## Common mistakes {#common-mistakes} - **Switching voice providers casually.** Each provider has different voice character and latency profile. Customers notice. - **Skipping outbound testing.** "It sounds great in WebRTC" doesn't mean it sounds great over PSTN. - **Tuning VAD without measurement.** Random changes usually make things worse. - **No escalation path.** A frustrated voice user without a human option churns immediately. - **Long welcomes.** Voice users tolerate even shorter intros than chat users. Get to the point. - **Multilingual without locking the language.** Don't trust auto-detection in production. State the language in voice instructions. - **Not listening to real calls.** Production recordings (where compliant) are the only ground truth. Schedule time to listen. Return to: **[Voice Overview](../voice/index.md)**. --- ## Widget Builder Best Practices Practical tips from teams that have shipped widgets to production. Skim before you start, revisit before each release. Flip through them as flashcards - try to answer each question before you reveal it - or switch to **Read as article** for the full text. ## Decide if you really need a widget {#decide-if-you-really-need-a-widget} Before opening Widget Builder, ask: can I do this with a rich message or a flow? | Use case | Reach for | |---|---| | Quick replies, a carousel, a single short input | Rich message node | | Custom UI with multiple fields, conditional logic, or its own UI state | **Widget** | | Branching logic with no UI | Flow or agent | Widgets are powerful, but they cost more to build and maintain than rich messages. Use them when you genuinely need custom UI. ## Schema design {#schema-design} - **Keep inputs flat.** Deeply nested `properties` are harder to bind in flow nodes and harder to debug in traces. - **Mark requireds explicitly.** Without the `required` array, the flow node won't warn you about unfilled inputs at design time. - **Use `enum` for known sets.** "status: pending | approved | rejected" is clearer and validates for free. - **Don't over-ask.** Inputs you don't actually use just slow everyone down — yourself included. ## State design {#state-design} - **Default state is for local UI only.** The selected option, the active step, the form errors. That's it. - **Don't put session or account data here.** That belongs in agent state, fetched from a tool, or passed in via schema. - **Keep state shallow.** A flat object with primitives is the safest to serialize and the easiest to debug. - **Don't duplicate schema inputs.** If `userName` came in via schema, read it from props — don't copy it into state. ## Output design {#output-design} - **Match output keys to what the next flow node expects.** If the next node reads `selectedSlotId`, name your output `selectedSlotId`. Renaming downstream is more painful than picking the right name once. - **Emit on submit, not on every change.** Continuous emissions clutter traces and rack up turn counts. - **Keep output flat.** Same reasoning as schema — agents read these by key. ## Naming and slugs {#naming-and-slugs} - **Names are user-facing; slugs are stable.** The slug (`widget_TkpB0njZg9`) is auto-generated and used by flows. Rename a widget freely — the slug doesn't change, so existing flows keep working. - **Pick descriptive names.** `BookingForm — APAC` beats `Form2`. Names appear in the saved-widget list and in the flow's rich-media picker. ## Versioning (or lack thereof) {#versioning-or-lack-thereof} There is no built-in versioning of widget content. Saving overwrites the previous content. For a major redesign: 1. Save a copy of the current widget under a new name (`MyWidget — v2 draft`). 2. Wire the copy into a test flow. 3. Validate end-to-end in the Playground (▶ on the agent that emits the widget). 4. Switch your production flow over to the new widget. 5. Delete the old one (or keep it around briefly as a rollback option). ## Performance {#performance} - **Cap widget complexity.** Hundreds of dynamic children in one widget will hurt mobile rendering. If a widget feels heavy, split it across two flow nodes that each show a smaller widget. - **Avoid heavy work in render.** Move computation into event handlers or out to a tool call. - **Watch the trace.** If a turn that includes a widget has surprising latency, the trace will show whether it's the widget render or something upstream. ## When to use widgets vs. simpler alternatives {#when-to-use-widgets-vs-simpler-alternatives} **Use a widget when:** - You need persistent local state across user clicks within the same node. - The UI has conditional logic (show this if that). - The interaction is multi-step. **Use a rich message when:** - The interaction is a single quick reply, carousel, or short input. - You don't need local state. - A standard component would do. **Use a flow when:** - The branching is purely backend logic, no UI involved. ## Voice considerations {#voice-considerations} If your widget can be triggered from a voice channel: - **Provide a voice-friendly fallback** for any UI-only affordance. A button with no spoken equivalent confuses voice users. - **Keep the output shape identical** for voice and chat. The agent should be channel-agnostic when reading your output. - **Test the voice path explicitly** in the Voice Playground — TTS phrasing, pacing, and barge-in behave differently than chat. ## Pre-launch checklist {#pre-launch-checklist} Before pushing a widget into a live conversation: - [ ] Schema marks every required input. - [ ] Default state has values for every key the JSX reads. - [ ] Output keys match what the next workflow node expects. - [ ] Widget renders correctly with realistic test inputs in the builder preview. - [ ] Widget renders inside the Playground (▶ on the agent), not just in the builder preview. - [ ] The agent reads the widget output correctly in the next turn (re-send the same prompt and watch the reply). - [ ] Voice fallback exists if the widget runs on voice. ## Common mistakes {#common-mistakes} - **Building a widget for a one-field input.** Use a prompt node instead. - **Forgetting `required` in schema.** Loops back as confused flow owners and silent failures. - **Naming widgets `Form1`, `Form2`.** Two months later, nobody knows which one is which. - **Editing a live widget's schema without warning.** Breaks every flow that depends on it. Coordinate with flow owners first. - **Skipping the Playground test.** "It looked fine in the builder preview" is not the same as "it works in a real conversation." --- ## Conversational agents A **conversational agent** is an LLM-driven specialist: it understands the question, asks for anything it's missing, and works out each reply on its own from your instructions and knowledge. It's the right choice for open-ended work - troubleshooting, support, and anything where the path depends on what the user says. (The deterministic, flow-based alternative is a [guided agent](../guided-agents/index.md), which runs a fixed set of steps in the same order every time. To pick between the two and create one, start at [Create an agent](create.md).) Ask the [Nexus AI Layer](../../ai-layer/index.md) to create an agent and a starter tool in one go - it scaffolds the agent, writes a trigger, and wires the tool, then waits for your confirmation before saving. ## Agents in one minute A conversational agent is a specialised assistant designed for one job. You might have an **order-status agent** that answers "Where's my order?", a **demo-booking agent** that helps prospects pick a time, a **billing agent** that handles refunds and invoices. Each has its own: - Persona and identity - Conversation rules - Welcome and fallback - Tools When a message belongs to a specialty - say, the user asks "Can I get a refund on order #4421?" - the conversation is handed off to the billing agent. That agent runs the conversation until it's done, then control returns to the bot's configuration. Agents can also follow their own rules (separate from the rules in your configuration). Most of the time the configuration's rules are enough; reach for per-agent rules only when one agent genuinely needs a different policy (a stricter tone for legal, a softer one for support). ## When to add an agent Add an agent when: - You have a clearly **distinct domain** with its own knowledge, vocabulary, or process. *Example:* order-tracking lives in a different world from demo-booking - make them separate agents. - The domain has its own tools or workflows that other parts of the bot don't need. *Example:* the billing agent calls a refund workflow; no other agent needs it. - You'd describe the work as belonging to a different "team" if humans were doing it. *Example:* a sales-development rep books demos; a support rep handles complaints. Different agents. **Don't** add an agent when: - The work is just a short detour (use a flow or a tool call instead). *Example:* "look up the user's tier" doesn't need its own agent - it's one tool call. - You only need to change tone for one topic (use Conversation Rules in your configuration). - Splitting the work makes the conversation feel choppy to the user. A common mistake: building five agents on day one. Start with just your configuration. Add an agent when you have a real reason - usually when you can name the task it owns ("books demos", "looks up order status") and explain why it shouldn't just be handled by the bot's default behaviour itself. ## Step 1: Create an agent Go to **AI Agent → Agents**. Click **New agent**. The Create agent dialog asks for the bare minimum: - A clear **name** that says what the agent does - `order-status-agent`, `demo-booking-agent`, `billing-agent`. This is the slug your routing rules and `@`-mentions will reference, so make it self-explanatory. - An optional **Parent agent**. Leave this on `None - create a root agent` to make a top-level agent that routing can reach directly. Pick an existing agent to make this a [sub-agent](#sub-agents-hierarchical-children). - An optional **Category** for grouping in the Agents list. Click **Create**. The agent's profile page opens - that's where you'll fill in the rest. ![Create agent dialog with the Agent name set to billing-agent, Parent agent on the default None - create a root agent, and Category left empty](https://cdn.yellowmessenger.com/assets/image-1778842212369.jpg) ## Step 2: Configure the agent's behaviour The agent's profile has three sections, top to bottom: - **Trigger** - a one- or two-sentence description of *when* this agent should take over. This is the agent's pitch to routing and the single most important field for routing. *Example:* "When the user asks about billing, invoices, refunds, payment-method changes, or charges." A sharp Trigger ("invoices, refunds, payment-method changes") leads to predictable routing; a vague one ("handles money stuff") doesn't. Keep it to *when* to fire - long Triggers with do/don't lists ("Trigger ONLY when… Do NOT trigger for… route to the KB instead") actually hurt matching. Push any "don't handle X" exclusions into a [Routing Logic rule](#step-3-make-the-handoff-explicit-optional-but-recommended) instead. - **Lifecycle** - Setup flow, Tools, Rich Media, Sub-agents, Memory, Global memory. This is where the agent's actual behaviour lives. Each row is covered in the rest of this guide and the related pages. - **Agent instructions** - the agent's identity, scope, and rules. A rich-text editor where you describe the persona and any do/don't constraints. *Example:* "You handle billing inquiries for Acme. You can look up invoices and process refunds, but never quote new pricing - let pricing questions be routed elsewhere." Write these in short, plain sentences with one action per line - see [Writing agent instructions](#writing-agent-instructions) below. Keep **Trigger** for *when to take over*, and **Agent instructions** for *how to behave once you have the conversation*. Mixing them up - putting persona in the Trigger or routing hints in the Instructions - is the most common source of confused routing. ![A specialised agent's profile (Test Ride & Lead Capture) showing the three sections: Trigger at the top, the Lifecycle block with Setup flow / Tools / Rich Media / Sub-agents / Memory / Global memory rows, and Agent instructions below as a rich-text editor](https://cdn.yellowmessenger.com/docs/v3/specialised-agent-profile.png) > **Note:** Every agent's profile shows two memory rows - **Memory** (local to that agent) and **Global memory** (bot-wide). They're a documentation/scope convention; at runtime both flow into a single shared pool keyed by `(botId, userId)`, so every agent can read each other's writes. See [Memory in Nexus agents](../configuration/memory.md) for the full model. **Best practice:** keep agent identity tight. If the billing agent's identity tries to also handle shipping, you'll get unpredictable handoffs because routing now sees two agents that both look like good candidates for a shipping question. ### Writing agent instructions The model follows clear, plain instructions far more reliably than emphatic ones. A few habits that pay off: **Keep it simple and direct.** Short, plain-English steps beat a wall of capitalised emphasis. Shouting at the model doesn't make it comply - it just buries the actual instruction. > **Bad:** "MANDATORY - DO NOT SKIP. You MUST collect the order ID and you must keep repeating until they get it right. THIS IS A CRITICAL STEP." > > **Good:** > - Ask the user for their order ID and collect the response. > - Call **@validateOrderId** with the response. > - Valid → continue to the next step. > - Invalid → ask again, then repeat. **One instruction per sentence.** When you chain two actions with "and" or "then", the model often does the first and drops the second. Put each action on its own line. > **Bad:** "Ask for the appointment date and confirm it back to the user and then book the slot." > > **Good:** > - Ask the user for the appointment date. > - Confirm the date back to the user. > - Book the slot. **Clean messy input before it reaches a tool.** People rarely answer in the exact shape a tool expects, so tell the agent how to normalise the reply before calling the tool. Pass a raw answer straight through and validation fails. > **Bad:** User says "I'm based out of Mumbai, Maharashtra" → the agent passes the whole sentence to **@validateCity**, which rejects it. > > **Good:** "Extract only the city name - strip the state, country, and any filler - then call **@validateCity** with just the city." ### Sub-agents (hierarchical children) In an agent's Lifecycle section you'll also see a **Sub-agents** row with an `+ Add sub-agent` button. Sub-agents are a different concept from the peer agents you create from the main **Agents** page: | | Specialised agents (peers) | Sub-agents (hierarchical children) | |---|---|---| | **Created from** | `Agents` page → New agent (root) | Inside another agent's Lifecycle → `+ Add sub-agent`, or `New agent` with a Parent agent selected | | **Who routes to them** | Top-level routing (driven by descriptions + Routing Logic) | Only their parent agent - they are hidden from the top-level router | | **Use when** | The work is a distinct journey that should be considered for any incoming message (billing, order status, demo booking, …) | The work is a narrower step *inside* an agent's flow that benefits from its own persona, tools, or memory (e.g. a `refund-eligibility-check` sub-agent under the billing agent) | For most bots you'll only need peer agents. Reach for sub-agents when one agent's flow has a self-contained sub-task that's complex enough to warrant its own identity, tools, or memory. ## Step 3: Make the handoff explicit (optional but recommended) By default, routing uses each agent's **Trigger** (the textarea at the top of every agent's profile) to decide when to hand off. For simple bots with very distinct Triggers, that's enough - open the **Playground** (the ▶ icon in any agent's title bar) and send a test message; if the right agent picks it up, you're done. **You do not need any routing rules to ship.** Reach for **Routing Logic rules** when you want a *deterministic* override on top of trigger-based routing. *Example:* > "If the user mentions billing, invoices, refunds, or charges, hand off to the **@billing-agent**. Do not answer billing questions yourself." A routing rule is harder than a Trigger - Triggers are signals routing weighs alongside the message, rules are explicit instructions ("always", "never") it must follow. Use rules when: - Two agents have Triggers that overlap and routing isn't picking the one you want. - A topic is sensitive enough that you don't want it answered by default behaviour at all (legal, regulated content, escalations). - You need to express a compound condition the description can't capture ("If the user is in region X *and* asking about feature Y, route to…"). See [Routing Logic](../configuration/routing-logic.md) for the full guide on writing rules. See also [Routing Logic vs Start triggers](../configuration/routing-logic.md#routing-logic-vs-start-triggers) if you're wondering whether an agent's Start trigger could replace this step. ## Step 4: Add tools Tools are the actions an agent can take in the real world: run a workflow, search a knowledge base, escalate to a human, transfer a call. You define them once in **AI Agent → Tools** and any agent in this bot can use them. Tools aren't required to live under an agent; a tool can be called directly if that's all the answer needs. When you attach a tool to a specific agent, you're signalling "this tool belongs to this agent's job" - which is a useful routing hint. *Example:* attach the `getOrderStatus` workflow to the order-status agent, and routing learns to send order-tracking questions to that agent (with that tool available) instead of trying to answer with a different tool. The four built-in tool types available today: | Tool | What it does | Common use | |---|---|---| | **Workflow** | Connect to a workflow you built in the workflow editor. | Multi-step business logic, API integrations. *Example:* the `getOrderStatus` workflow inside an order-status agent. | | **Knowledge Base** | Search documents and FAQs. | Product questions, policy lookup. *Example:* a returns-policy KB attached to the support agent. | | **Escalate to Agent** | Route a chat to a human agent in Inbox. | Customer support escalation. *Example:* hand off when the user types "talk to a human". | | **Transfer Call** | Forward a voice call to a human or SIP extension. | Voice escalation. | More are coming (Connect MCP Server, HTTP Webhook, Custom Function, Slack/PostgreSQL/Google Calendar) - they appear in the picker today as "coming soon". > **Guided agents are tools too.** A [guided agent](../guided-agents/index.md) is available as a tool to any conversational agent - call it when a conversation reaches a part that needs a fixed procedure (an order return, a KYC check), and it runs the deterministic flow and returns control. There's no separate "use agentic flows as tools" toggle to enable; guided agents are callable like any other tool. ![Add a new tool picker showing the four core built-in types (Knowledge Base, Workflow, Escalate to Agent, Transfer Call) with Connect MCP Server and HTTP Webhook tagged as Coming soon, and category counts in the sidebar (All tools 10, Core Built-in 4, Integrations 3, Custom & MCP 3)](https://cdn.yellowmessenger.com/assets/image-1778842506789.jpg) The full guide for each lives under **[Tools - Overview](../tools/index.md)**: - [Workflow tool](../tools/workflows.md) - connect a workflow as a tool. - [Knowledge Base tool](../tools/knowledge-base.md) - answer from your docs and FAQs. - [Escalation tools](../tools/escalation.md) - Escalate to Agent (chat) and Transfer Call (voice). - [Tools best practices](../../best-practices/tools.md) - naming, descriptions, schemas, and routing. ## Step 5: Test the handoff Open the **Playground** on any agent (▶ in the title bar) and send a message that should trigger your agent - e.g. "Can I get a refund?" for the billing agent. Watch: - The **chat** - did the right agent's persona take over? - Read the bot's response - did the right agent's persona take over on the first try? Did the right context carry over? If the handoff didn't fire, two places to look: (1) sharpen the agent's **Trigger** - vague Triggers lead to fuzzy routing; (2) add or tighten a Routing Logic rule. If the handoff fired but the agent answered poorly, the issue is inside the agent - revisit its identity, rules, and tools. > **Tip - manage tests from the Conversation Builder.** The Conversation Builder topbar exposes a **Tests** button. Open it to see linked test count, latest run summary, and live progress for any in-flight run. From there you can deep-link straight to the Testing Lab with this agent's tests pre-selected, or create a new test case pre-populated with this agent. See [Testing Lab → Manage tests from the Conversation Builder](../../test-debug/trust-centre/testing-lab.md#manage-tests-from-the-conversation-builder). ## `@`-mentioning vs handing off to an agent {#mentions-vs-handoff} These two are easy to mix up - they look similar in the studio but do very different things. Understand the distinction once and you'll save yourself a lot of confusing routing bugs. **`@`-mention** - In any markdown prompt field (bot identity, conversation rules, welcome and fallback messages, routing logic), type `@` to open a picker. You can mention four kinds of things: an **agent**, a **workflow**, a **tool**, or a **rich-media item**. The mention shows up as a colored chip whose label stays linked even if you rename the target - so your prompts don't go stale. Behind the scenes the chip stores the slug, not the name. **A mention is a *reference*, not an action.** It puts the slug into the prompt as a semantic hint ("the user can ask the **@billing-agent** for refunds"). It does **not** trigger a handoff. What's mentioned may be *considered* when composing a reply, but a handoff only fires when something actually triggers routing. **Agent handoff** - An agent only takes over the conversation when the conversation is **explicitly handed off** to it. Two things make a handoff fire: 1. A **Routing Logic rule** that names the agent (`"If the user asks about billing, hand off to the @billing-agent…"`). 2. A **Call agent / tool invocation** that targets the agent. Once the handoff fires, the agent owns the conversation until it returns control. ### Side-by-side comparison | | `@`-mention | Agent handoff | |---|---|---| | **Purpose** | Reference an agent / workflow / tool inline in prose. | Hand the conversation to a specialist. | | **Where you set it** | Anywhere a markdown prompt editor accepts text (bot identity, rules, welcome, fallback, routing logic). | **AI Agent → Profile → Routing Logic** *or* a Call-agent / tool invocation. | | **What's stored** | A markdown chip referencing the target's slug, e.g. `@[agent:billing-agent]`. | A first-class routing rule or tool config. | | **Runtime effect** | None on its own - it's a hint that may be considered. | Hard handoff: the named agent takes over. | | **What can be referenced** | Agents, workflows, tools, rich-media items. | Agents (or workflows / tools via dedicated tool types). | | **Survives a rename?** | Yes - the chip resolves the live name from the slug. | Yes for tool / agent slugs; routing rules that hard-code names should also use `@`-mentions to stay current. | ### When to use which | You want to… | Use | |---|---| | Make it known *that* a billing agent exists, so it can be mentioned in conversation. | `@`-mention inside bot identity. | | Make sure billing questions *always* go to the billing agent. | Routing Logic rule (agent handoff). | | Reference a workflow inside an instruction without binding the agent to call it. | `@`-mention. | | Make the bot call a workflow when a condition fires. | Add it as a **Workflow** tool and reference from a routing rule. | | Suggest a self-service path ("you can also visit our **@help-center** workflow") without forcing it. | `@`-mention. | | Force escalation when the user asks for a human. | Routing Logic rule + Escalate-to-Agent tool. | ### A pattern that uses both The strongest setup combines them: > "If the user asks about billing, invoices, or refunds, hand off to the **@billing-agent**. Do not answer billing questions yourself." The Routing Logic *rule* makes the handoff deterministic. The `@`-mention inside the rule keeps the agent's name resolved live - rename `billing-agent` to `billing-team` and the rule keeps working without an edit. **Best practice:** in any rule, instruction, or message that names an agent, workflow, or tool, use `@`-mentions instead of typing the name as plain text. Plain text rots when slugs are renamed; chips don't. ## Best practices - **Name agents by the task.** `order-status-agent`, `demo-booking-agent`, `billing-agent` beat `agent2`. The name shows up in routing rules and traces - make it self-explanatory. - **Sharp descriptions beat clever rules.** A precise one-sentence description ("Handles billing: invoices, refunds, payment-method changes - does not quote new pricing.") routes correctly without any rule at all. Reach for rules only when descriptions can't disambiguate. - **Don't double up.** If two agents have overlapping Triggers, you'll get inconsistent routing. Either merge them or sharpen the boundary. - **Write instructions plain and one action per line.** Short steps beat capitalised "MANDATORY" walls, and chaining actions with "and"/"then" makes the model drop the second one. Tell the agent to clean messy replies (strip filler, extract the one field) before passing them to a tool. See [Writing agent instructions](#writing-agent-instructions). - **Limit tool sprawl.** An agent with 20 tools is harder to predict than one with 4. If you find yourself adding many tools, consider whether some belong in a different agent. - **Reuse with Global Components.** If multiple agents need the same policy text, brand voice, or disclaimer, define it as a Global Component and pull it in. One source of truth. - **Document handoffs as you build.** Keep a short list: "Routing rule X sends Y type of question to Z agent." Future-you (or the next builder) will thank you. - **Use `@`-mentions for any name that might be renamed.** The chip resolves to the current name; plain text doesn't. Continue to: **[Best Practices](../../best-practices/agents.md)** or **[Test your agent](../../test-debug/index.md)**. --- ## Create an agent Agents are the specialists that do the work in your bot. Nexus has **two types**, and the first thing you do when creating one is choose which: a **conversational agent** that reasons out each reply on its own, or a **guided agent** that runs a fixed flow you design. This page covers the **Create** picker, how to choose, and where to go next for each type. Both types share the same **Agents** page and the same **Create** entry point - they only diverge once you pick. (Whichever you build, the bot-wide [Configuration](../configuration/index.md) still applies to it; Configuration is project-level and shapes every agent.) Don't want to start from scratch? Ask the [Nexus AI Layer](../../ai-layer/index.md) to scaffold an agent from a one-line description - it picks a sensible type, lays out the first steps, and waits for you to refine. ## Step 1: Open the Agents page In your bot, go to **AI Agent → Agents**. The page header reads **Agents**, with **What's new**, **Publish**, and **Create** in the top-right. Below the header are two tabs: - **Conversational (N)** - your LLM-driven agents (prompt + trigger, Live/Draft status, round avatar). - **Guided (N)** - your guided agents (flow icon, a Category tag, no status). The active tab is saved in the URL (`?tab=guided`), so a link you share reopens on the same tab. ## Step 2: Click Create and choose a type Click **Create** in the top-right. The **"What would you like to create?"** picker opens with two options: | Option | Studio description | |---|---| | **Conversational agent** | "Understands the question, asks for anything it's missing, and works out each reply on its own from your knowledge. Great for use cases like troubleshooting and support - diagnosing errors, fixing login and device issues, or guiding people to a resolution, step by step." | | **Guided agent** | "Runs the exact steps you design, in the same order every time, so nothing is missed and every run stays consistent and auditable. Great for multi-step use cases like order returns, loan applications, KYC checks, or booking an appointment." | ### Which one should I pick? | You want… | Build a… | |---|---| | Open-ended help where each reply is reasoned from your knowledge - troubleshooting, support, diagnosing errors, free-form Q&A | **Conversational agent** | | A fixed sequence of steps that runs identically every time and stays auditable - returns, KYC, loan applications, bookings | **Guided agent** | | Mostly open-ended help, but with one procedure that must run the same way every time | **Conversational agent** that calls a guided agent as a tool | | A deterministic flow with one or two steps that need open-ended reasoning | **Guided agent** with a [Conversational Agent node](../guided-agents/agent-node.md) inside it | > **Tip - you can mix both.** A guided agent can include **Conversational Agent nodes** for the steps that genuinely need open-ended reasoning, while the flow keeps the overall sequence deterministic. And every guided agent is automatically available as a **tool** to your conversational agents - so a conversational agent can pull a deterministic journey into an otherwise open-ended conversation. You rarely have to pick one type forever. ## Step 3: Name your agent Whichever type you chose, give the agent a clear, task-based name that says what it *does* - `order-status`, `billing`, `order-return`, `kyc-verification`. The name is the slug your routing rules, `@`-mentions, and other agents will reference (a conversational agent calls a guided agent by this name when it uses it as a tool), so make it self-explanatory. **Naming tips:** - **Name the job, not the topic.** `order-return` beats `returns-stuff`; `loan-application` beats `loans`. - **Use the same casing as your other agents** so the list stays scannable. - **Avoid duplicate names** - each agent needs a distinct name. ## Step 4: Continue based on the type you chose The two types diverge from here: - **Conversational agent** → you land on the agent's profile, where you write its **Trigger**, **Agent instructions**, and attach tools. Continue to **[Conversational agents](conversational-agents.md)**. - **Guided agent** → you land on the **flow canvas**, where you add nodes and wire them into a flow. Continue to **[Guided agents overview](../guided-agents/index.md)** and then **[The guided flow canvas](../guided-agents/flow-canvas.md)**. > **Note:** The two types share the **Agents** page but are separate entities under the hood. A guided agent has **no Live/Draft status** - a flow has no draft lifecycle - and it shows a generated flow icon instead of an avatar. For the full distinction, see [Guided agents overview](../guided-agents/index.md). --- ## Build by use case You know what you want the bot to *do* - the question is which kind of agent to build. Nexus has [two types](create.md): a **conversational agent** that reasons out each reply on its own from your instructions and knowledge, and a **guided agent** that runs a fixed flow you design, the same way every time. This page is a jobs-to-be-done router: find the scenario closest to yours, see which type fits and why, and jump straight to the build path. > **Not sure which fits?** Start at **[Create an agent](create.md)** - it walks through the Create picker and the conversational-vs-guided choice in one place. The rule of thumb: if you'd describe the work as *"it depends on what they ask,"* build a conversational agent; if you'd describe it as *"first this, then this, then this - every time,"* build a guided agent. ## What are you building? | Goal | Best fit | Why | Start here | |---|---|---|---| | **Open-ended support / FAQ** - answer questions, troubleshoot, diagnose, guide to a resolution | **Conversational** | The path depends on what the user says; the agent works out each reply from your knowledge and adapts turn by turn. | [Conversational agents](conversational-agents.md) + [Knowledge base](../tools/knowledge-base.md) | | **Order tracking / status lookups** - fetch a record and report back ("where's my order?") | **Conversational** + a workflow tool | Still open-ended (users phrase it many ways), but the lookup itself must hit a system of record - so attach a workflow that does the fetch. | [Conversational agents](conversational-agents.md) + [Tools](../tools/index.md) | | **Appointment booking / KYC / returns** - a fixed multi-step procedure that must run identically every time | **Guided** | The steps and their order are fixed; you want every run consistent and auditable, with no step skipped or reordered. | [Guided agents](../guided-agents/index.md) | | **Lead qualification** - gather details and score/route a prospect | **Conversational** (or **Guided** if scripted) | If the questions adapt to the answers, conversational. If sales mandates the exact questions in the exact order, make it a guided flow. | [Conversational agents](conversational-agents.md) · [Guided agents](../guided-agents/index.md) | | **Voice agent** - handle the same job over a phone call | **Either** | Type is independent of channel - a conversational *or* guided agent can run on voice. Pick the type by the job above, then enable voice. | [Voice on Nexus](../../voice/index.md) | ## The scenarios in detail ### Open-ended support / FAQ Reach for a **conversational agent**. There's no fixed path to enforce - the agent understands the question, asks for anything it's missing, and reasons out each reply from your knowledge. Give it a [Knowledge base](../tools/knowledge-base.md) tool so its answers stay grounded in your content, and write a clear trigger and instructions on the [conversational agent](conversational-agents.md) profile. ### Order tracking / status lookups Also a **conversational agent**, because users ask in a hundred different ways - but the answer has to come from a system of record, not from the model. Attach a **workflow** tool that does the lookup (an API call keyed by order ID, account number, or ticket reference) and the agent calls it when it has what it needs. See [Tools](../tools/index.md) for how workflows plug into an agent, and the [conversational agent](conversational-agents.md) page for wiring the tool to a trigger. ### Appointment booking / KYC / returns (fixed multi-step) Build a **guided agent**. These are regulated or procedural journeys where skipping or reordering a step is unacceptable - collect details, check eligibility, confirm, then act. A guided agent draws the path explicitly on a canvas, so every run is consistent and auditable. Start at [Guided agents](../guided-agents/index.md); a step that genuinely needs open-ended reasoning can still be a Conversational Agent node *inside* the flow. ### Lead qualification This one goes either way. If the conversation should adapt - probing deeper when a prospect sounds qualified, moving on when they don't - build a **conversational agent** and let it reason. If your sales process mandates the *exact* questions in the *exact* order (for scoring parity or compliance), build a **guided agent** so every lead is qualified identically. See [Conversational agents](conversational-agents.md) and [Guided agents](../guided-agents/index.md). ### Voice agent Agent **type is independent of channel**. The same conversational or guided agent you'd build for chat can run a phone call - so choose the type by the job (use the rows above), then turn on voice. Start at [Voice on Nexus](../../voice/index.md) for the runtime modes, voice library, and testing. Describe your use case to the [Nexus AI Layer](../../ai-layer/index.md) and it'll suggest a type and scaffold the first steps - then refine from there. > **Tip - you can mix both.** A conversational agent can call a guided agent as a tool when a conversation reaches a part that needs a fixed procedure (for example, a support agent that hands off to a `kyc-verification` guided agent). And a guided agent can include Conversational Agent nodes for the steps that need open-ended reasoning. You rarely have to pick one type forever. ## Read next - **[Create an agent](create.md)** - the Create picker and the type choice, end to end. - **[Conversational agents](conversational-agents.md)** - triggers, instructions, and attaching tools. - **[Guided agents](../guided-agents/index.md)** - the flow canvas, nodes, and exit branches. - **[Tools](../tools/index.md)** - workflows, knowledge base, escalation, and more. --- ## AI safety & conduct **AI safety & conduct** is where you set the content-moderation guardrails that apply to every agent in your project - conversational and guided alike. These filters inspect what users send in and what your bot sends back, blocking unsafe content before it reaches a person. Because **Configuration** is project-level, whatever you enable here protects the whole bot, not a single agent. This page is part of **Configuration**. Settings here apply to all your [agents](../agents/conversational-agents.md) and [guided agents](../guided-agents/index.md). For an overview of how Configuration fits together, see [Configuration](index.md) and the [Harness overview](../index.md). > **Note:** The AI safety & conduct sub-page only appears if it's enabled for your account. If you don't see it under **Others** in the left menu, your project doesn't have safety filters provisioned - talk to your account team. ## Step 1: Open the AI safety & conduct page In your bot, go to **AI Agent → Configuration** and click **AI safety & conduct** (under **Others** in the left menu). The page splits filters into a foundational, always-on layer and an advanced layer you toggle per check: - **Standard content safety** - a foundational, always-on content-moderation check. It runs by default and can't be turned off. - **Customer query filters** (advanced) - individual checks on what the user sends *in*: toggle **Banned Topics**, **Violence**, **Sexual content**, and similar to block unsafe inputs before the bot acts on them. - **AI response filters** (advanced) - individual checks on what the bot sends *back*: **Toxicity**, **Bias**, and **Sensitivity** (sensitive-data leakage) in the generated reply. ![Configuration → AI safety & conduct sub-page showing the Standard content safety section (always on) and the Advanced safety checks section with Customer query filters (Banned Topics, Violence, Sexual content - all enabled) and AI response filters (Sensitivity, Toxicity, Bias - all enabled)](https://cdn.yellowmessenger.com/docs/v3/configuration-ai-safety.png) ## Step 2: Choose your advanced filters **Standard content safety** is on for everyone - you don't configure it. Decide which **advanced** checks you need on top of it: | Layer | Filter | Catches | |---|---|---| | Customer query filters | **Banned Topics** | User messages about topics you've ruled out of scope. | | Customer query filters | **Violence** | Violent or harmful user inputs. | | Customer query filters | **Sexual content** | Sexually explicit user inputs. | | AI response filters | **Toxicity** | Hostile, abusive, or offensive wording in the bot's reply. | | AI response filters | **Bias** | Biased or discriminatory framing in the bot's reply. | | AI response filters | **Sensitivity** | Sensitive-data leakage in the bot's reply. | Turn on a filter by toggling it. Query filters guard the **input** path; response filters guard the **output** path - most regulated use-cases want coverage on both sides. ## Step 3: Mind the latency trade-off Every advanced filter you enable adds a moderation pass, and each pass costs time. > **Note:** The page warns: *"Enabling filters adds latency. For time-sensitive use-cases like VoiceAI agents, consider disabling them."* For voice channels, weigh filter coverage against your turn-latency budget - a moderation pass that's invisible on chat can become an audible pause on a call. > **Tip - voice vs chat.** If the same project serves both chat and voice, decide which layers are non-negotiable for compliance and keep only those on for voice. You can run a fuller filter set on chat where the extra latency doesn't hurt the experience. Not sure which checks your industry needs? Ask the [Nexus AI Layer](../../ai-layer/index.md) to recommend a filter set for your use-case, then tune it against the latency budget for your channels. ## Best practices - **Turn safety filters on _before_ you ship**, not after a customer hits one. A filter that blocks unsafe content in production is worth far more than one you added in a post-incident review. - **Test adversarial prompts** in the [Testing Lab](../../test-debug/index.md) before each release. Send the kinds of inputs you most want blocked (banned topics, hostile language, attempts to extract sensitive data) and confirm the filter catches them. - **Pair filters with safe landings.** For regulated industries (finance, healthcare), back these checks with legal-approved [fallback](fallback.md) messages so a blocked turn has somewhere safe to land instead of a generic error. - **Cover both directions for high-stakes bots.** Query filters stop unsafe inputs; response filters stop unsafe outputs. For anything handling regulated or personal data, enable both. - **Re-measure latency after each change.** Enabling a filter shifts your latency profile - especially on voice. Re-test turn timing whenever you add or remove a check. --- **Next:** [Voice settings](voice-settings.md) --- ## Conversation rules **Conversation rules** are persona-level guidelines - *always do* and *never do* - that are applied to every reply your bot sends. Because they live in [Configuration](index.md), they are **project-level**: every agent in the bot follows them, whether it's a [conversational agent](../agents/conversational-agents.md) answering open-ended questions or a [guided agent](../guided-agents/index.md) running a fixed flow. Think of them as the house rules the whole team works by. The [bot identity](profile.md) says who the bot is; conversation rules say what the bot always does and never does, no matter which agent is replying. > **Per-node opt-out.** A [Conversational Agent node](../guided-agents/agent-node.md#conversation-rules) inside a guided flow can opt out of these global rules with its **Apply global conversation rules** toggle - useful for a tightly scripted step whose exact wording the general rules would interfere with. The rules still apply everywhere else. Not sure where to start? Ask the [Nexus AI Layer](../../ai-layer/index.md) to suggest a starter set of conversation rules from a one-line description of your bot, then trim and reword them to fit. ## Step 1: Open Conversation rules In your bot, click **AI Agent → Configuration**, then open **Conversation rules** (under **General** in the left menu). Rules are numbered and capped at **30 per bot**. The header shows how many you've used (for example, *3 / 30 rules*). Click **Edit** to add, reword, or remove rules. ![Configuration → Conversation rules sub-page showing three numbered rules (3 / 30 rules) applied on every reply, with an Edit entry point to add or change them](https://cdn.yellowmessenger.com/docs/v3/configuration-conversation-rules.png) ## Step 2: Write your rules Each rule is a single, plain-language instruction. Add one rule per line and keep each one to a single concern. Examples: | Rule | What it does | |---|---| | "Always confirm the user's order ID before sharing shipment details." | Guards against leaking the wrong order's data. | | "Never share another customer's information, even if asked." | A hard safety boundary that holds across every agent. | | "If the user expresses frustration, acknowledge it before continuing." | Shapes tone on difficult turns. | > **Note:** Conversation rules apply to *every* reply. If a behaviour should only happen inside one agent or one flow, put it in that agent's instructions or [guided-agent steps](../guided-agents/index.md) instead - not here. ## The 30-rule cap A bot can hold at most **30** conversation rules. The cap is deliberate: the more rules you stack, the more likely two of them quietly contradict each other, and the harder it is to predict which one wins. If you're brushing up against 30, that's usually a sign that some rules belong inside a specific agent's instructions rather than in the project-wide list. ## Best practices - **One rule = one concern.** Don't combine "always confirm order ID and never share other customers' info" into one line; split them into two rules. - **Phrase rules positively when you can.** "Confirm the order ID" beats "don't proceed without an order ID" - positive instructions are easier for the model to follow. - **State the hard "never do" rules explicitly.** Safety and compliance boundaries ("never share another customer's data") belong here so they apply to every agent, every turn. - **Re-read your list after writing.** If two rules contradict, the bot's behaviour will too. Conflicting rules are the most common cause of inconsistent replies. - **Keep it lean.** Treat the 30-rule cap as a guide, not a target - a short, clear list beats a long, tangled one. > **Tip - test before you ship.** After editing rules, open the **Playground** (the play ▶ icon on any agent) and send messages that should trigger each rule. If a reply ignores a rule, check whether another rule or the [bot identity](profile.md) is pulling the other way. See [Testing & debugging](../../test-debug/index.md) for the full loop. ## Next With your conversation rules in place, set up how the bot picks an agent or tool for each message: **[Routing logic](routing-logic.md)**. --- ## Fallback **Fallback** controls what your bot does when it can't handle a request - a question that's clearly out of scope, gibberish it can't parse, or input that fails validation one too many times. Because fallback lives under **Configuration**, it's a project-level setting: the recovery behaviour you define here applies to **all** your agents, both [conversational](../agents/conversational-agents.md) and [guided](../guided-agents/index.md). A good fallback turns a dead end into a next step. A bad one - the default apology string - leaves the customer stuck and reaching for a human. ## Step 1: Open the Fallback page In your bot, click **AI Agent → Configuration**, then open **Fallback** (under **Agents** in the left menu). This sub-page has two controls: - **Next steps after failure** - how the bot recovers when it can't answer. - **Retries for information validation failures** - how many times to re-ask when a user's input doesn't validate. ![Configuration → Fallback sub-page - Next steps after failure with the Instruct super agent mode selected, an Instructions rich-text editor showing the fallback prompt, and a Retries for information validation failures control (default 3)](https://cdn.yellowmessenger.com/docs/v3/configuration-fallback.png) ## Step 2: Write the fallback instruction (Instruct mode) In Nexus, fallback uses **Instruct** - a prompt fragment you write that defines *how to recover* when a request can't be handled. Instead of returning a fixed apology, the bot uses your instruction to compose a helpful, in-context response that offers the user a real way forward. Write the instruction the way you'd brief a support agent on what to do when they're stuck: ``` You couldn't handle the user's request. Apologise briefly, then offer concrete next steps: ask them to rephrase, point them to the FAQ, or offer to connect them to a human via the Escalate-to-Agent tool. Never invent an answer. Keep it to two short sentences. ``` > **Tip - `@`-mentions.** Type `@` in the Instructions editor to insert a live reference to an agent, workflow, or tool - for example `@escalate-to-agent` so the model knows exactly how to hand off. The chip stays linked to the target's slug, so it won't break if the target is renamed. ## Step 3: Set retries for validation failures Below the instruction, set **Retries for information validation failures** - how many times the bot re-asks the user when their input doesn't pass validation (for example, an order ID in the wrong format, or an unparseable date). The default is **3**. Once the retry budget is exhausted, the bot stops re-prompting and falls back to the **Instruct** behaviour above - so the two controls work together: retries handle the *recoverable* case (the user just needs to try again), and the instruction handles the *give-up gracefully* case. > **What the fallback reply can read.** When no sub-agent is active, the fallback/root-responder composes the reply. Its read scope follows the super agent's [**Allowed variables**](memory.md#allowed-variables-per-agent-read-scope): set an allowlist there to keep the fallback prompt scoped to just the variables it needs. | Control | What it does | Default | |---|---|---| | **Next steps after failure (Instruct)** | Prompt that defines how the bot recovers when it can't handle a request | - | | **Retries for information validation failures** | How many times to re-ask when input doesn't validate before falling back | 3 | ## Best practices - **Don't leave fallback as the default apology string.** Use the instruction to offer concrete next steps - rephrase the question, browse FAQs, or escalate to a human via the [Escalate-to-Agent tool](../tools/index.md). - **Always give the customer somewhere to land.** Pair the instruction with an explicit handoff path so a stuck user is never left at a dead end. This matters most in regulated industries (finance, healthcare), where the safe fallback is often a human. - **Keep retries low.** Re-asking more than 3 times reads as nagging; if a user can't pass validation after a few tries, falling back to a human is usually kinder than another retry. - **Test it.** Send obvious gibberish and questions clearly outside scope to confirm the fallback fires the way you expect. Run these checks in the [Testing Lab](../../test-debug/index.md) before each release. Not sure how to phrase the recovery? Ask the [Nexus AI Layer](../../ai-layer/index.md) to draft your fallback instruction from a one-line description of what should happen when the bot gets stuck. --- **Next:** [Conversation rules](conversation-rules.md) - the *always do* / *never do* guidelines applied to every reply. --- ## Configuration **Configuration** is project-level. The settings you define here apply to **all your agents** - every [conversational agent](../agents/conversational-agents.md) and every [guided agent](../guided-agents/index.md) in the bot inherits them. It is where you set the behaviour that shapes every conversation: persona and identity, conversation rules, routing logic, memory, fallback, lifecycle hooks, AI safety, and voice. Every incoming message is read and routed to the right place - answered directly, handed off to one of your conversational agents, reached through a guided agent, or resolved with a [tool](../tools/index.md) - and the response is shaped by these project-level settings. Configuring them well is the single highest-leverage thing you can do for your bot's quality. This page is the map of the **Configuration** category. Each section below has its own sub-page; the order shown is the one we recommend you fill them out in. > **Note:** If you came from the legacy platform, you'll find the same fields here with a few additions for Nexus. Stuck on the wording? Ask Nexus to draft your bot identity from a one-line description, then refine it. It can also tighten an existing identity or add a "never do" rule for you. ## Open the Configuration page In your bot, click **AI Agent → Configuration**. The page has a left menu grouped into three sections: - **General** - Profile settings - Conversation rules - **Agents** - Routing logic - Memory - Lifecycle hooks - Fallback - **Others** - AI safety & conduct *(if enabled for your account)* - Voice settings Start at **Profile settings** and work down the list. ![AI Agent → Configuration left menu in a Nexus bot, showing the General, Agents, and Others groups with all eight sub-pages](https://cdn.yellowmessenger.com/assets/image-1778841547513.jpg) ## What each section does | Section | What it controls | Sub-page | |---|---|---| | **Profile** | Persona, bot identity, and welcome message - who your bot is and how it greets users. | [Profile](profile.md) | | **Conversation rules** | Persona-level *always do* / *never do* guidelines applied to every reply (max 30). | [Conversation rules](conversation-rules.md) | | **Routing Logic** | Optional plain-English rules that override or refine how each message is routed between agents and tools. | [Routing Logic](routing-logic.md) | | **Memory** | Variables shared by all agents across conversations - `customer_id`, `account_tier`, and similar shared context. | [Memory](memory.md) | | **Fallback** | What the bot does when it can't handle a request, plus retry behaviour for failed input validation. | [Fallback](fallback.md) | | **Lifecycle hooks** | Optional cross-cutting behaviour - on session start and on inactivity - for nudges, logging, and context injection. | [Lifecycle hooks](lifecycle-hooks.md) | | **AI safety & conduct** | Content-safety filters on user inputs and bot responses *(if enabled for your account)*. | [AI safety & conduct](ai-safety.md) | | **Voice settings** | TTS provider and voice, voice instructions, and VAD tuning for voice channels. | [Voice settings](voice-settings.md) | > **Tip -** You don't have to fill in every section. **Profile** is the only one most bots can't skip; **Routing Logic**, **Lifecycle hooks**, and **Voice settings** are optional and only matter when your use case needs them. ## Save and test After editing any section, click **Save**. Then go to **AI Agent → Agents**, click the **play (▶)** icon on any agent to open the **Playground**, and send a few test messages. Read each response to confirm the bot is behaving as you intended. For deeper checks - adversarial prompts, regression suites - use the [Testing Lab](../../test-debug/index.md). If something looks off, it's almost always one of: - Bot identity too vague → tighten it in [Profile](profile.md). - Conversation rules contradict → simplify them in [Conversation rules](conversation-rules.md). - Routing is sending messages to the wrong place → add a rule in [Routing Logic](routing-logic.md). --- **Next:** [Profile](profile.md) - pick a persona, write the bot identity, and set the welcome message. --- ## Lifecycle hooks **Lifecycle hooks** let you run cross-cutting behaviour at key moments in a conversation - at the start of a session, or when a user goes quiet. Because Lifecycle hooks live in **Configuration**, they are **project-level**: they apply across the bot, regardless of which agent ([conversational](../agents/conversational-agents.md) or [guided](../guided-agents/index.md)) happens to be handling the turn. Most bots don't need any hooks. Reach for them when you want behaviour that isn't tied to a single reply - analytics, custom logging, dynamic context injection, or proactive nudges when a user stalls. > **Note:** Hooks are optional. Leaving them all off is a perfectly valid configuration - skip this page until you have a concrete cross-cutting need. ## Step 1: Open Lifecycle hooks In your bot, open **AI Agent → Configuration**, then select **Lifecycle hooks** (under **Agents** in the left menu). The sub-page lists the available hooks. Each hook has an **active toggle** and an **expand arrow** to configure its rules and actions. A hook does nothing until you toggle it on and configure it. ![Configuration → Lifecycle hooks sub-page - Hooks list with the "On session start" hook shown as Active, with a toggle and an expand arrow to configure its behaviour](https://cdn.yellowmessenger.com/docs/v3/configuration-lifecycle-hooks.png) Two hook types are available today: | Hook | Fires when | Typical use | |---|---|---| | **On session start** | The user sends the first message and a new session begins. | One-time setup at the start of a conversation. | | **On inactivity** | The user has been idle for a configurable duration. | Proactive nudges to re-engage a stalled user. | ## Step 2: On session start The **On session start** hook fires once, when a user sends their first message and a new session begins. Use it for one-time setup at the start of a conversation: - Pre-load context (look up the customer, set [Memory](memory.md) variables). - Log the session for analytics. - Run an onboarding workflow before the first reply. Toggle the hook on, expand it, and attach the workflow or action you want to run on session start. ## Step 3: On inactivity The **On inactivity** hook fires after the user has been idle for a configurable duration. It is **rules-based**: you add up to **5 rules per agent**, each with: - A **threshold** - the idle duration before the rule fires (up to **59 minutes**). - A single **workflow action** - the workflow that runs when the threshold trips. The workflow runs **without an LLM round-trip** - it's a deterministic nudge, so it's fast and predictable. ### How it works - Each inbound user message **resets the timers**. - When a threshold elapses without a new user message, the matching rule fires its workflow. - If multiple rules elapse at once (caused by a backend lag, say), only the **largest-eligible threshold** fires - so customers don't get a stack of stale nudges all at once. ### Customer Support preset A **Customer Support preset** ships an out-of-the-box ladder you can drop in as a starting point: | Threshold | Intent | |---|---| | 60 s | Gentle nudge - "Are you still there?" | | 180 s | Stronger nudge | | 300 s | Hand-off | > **Note:** The preset is visible **only in the empty state**, so you can't accidentally clobber rules you've already authored. Once you add your own rules, the preset is no longer offered. ### When to reach for it - **Customer support:** re-engage idle users with "Are you still there?", then offer human handoff. - **Sales / booking:** send an abandoned-cart-style nudge when a user stalls mid-form. - **Long-running flows:** capture lead data before the session times out. Not sure how to word the nudge? Ask the [Nexus AI Layer](../../ai-layer/index.md) to draft a short, friendly re-engagement workflow message for you, then refine the threshold ladder to fit your channel. ## Best practices - **Keep thresholds short → long** (60 s → 5 min). Stacking three nudges in quick succession reads as harassment. - **Start from the CS preset** and tune the workflow contents to your tone and channel. - **Handle the missing-context case** in the inactivity workflow - by the time it runs, the user may have left, so don't assume earlier session state is still meaningful. - **Don't over-hook.** If a behaviour belongs to one agent's flow, put it in a [tool](../tools/index.md) or the agent itself rather than a project-level hook. Once you've configured (or skipped) your hooks, validate them by sending a first message and then letting a session sit idle in the [Testing Lab](../../test-debug/index.md). --- **Next:** [Fallback](fallback.md) --- ## Memory in Nexus agents Memory is how your Nexus bot retains context about the customer across turns - and across switches between your **conversational agents** (the LLM-driven specialists). This page covers what memory **is**, what it **isn't**, and the difference between an agent's local **Memory** and the bot-wide **Global memory**. ## Memory ≠ Variables If you only need to pass a value into an attached tool or workflow, **you don't need memory**. The tool will pick the value up directly from its input mapping at execution time. Use memory only when you want to **intentionally retain context about the customer / end-user** so a later turn (or a different agent) can read it. ``` Tool input mapping → for data flow between a turn and a tool call Memory → for context you want to remember across turns ``` ## Memory vs Global memory Your Nexus bot declares memory in two places, both backed by the same runtime store: - **Configuration → Memory** (under **Agents** in the Configuration nav) - variables that are *shared across every agent in the bot*. The page calls them "memory variables accessible to all agents across conversations". These same variables appear on every specialised agent's profile as the **Global memory** row. - **Each specialised agent's Memory row** (in its Lifecycle section) - variables that are *local to that one agent*. So on a single agent's profile you see **two memory rows side by side**: **Memory** (this agent's local vars) and **Global memory** (the bot-wide vars defined on the Configuration → Memory page). Both surfaces use the same entry fields: | Field | Required | Notes | |---|---|---| | Variable name | ✅ | Letters, digits, underscores. Must start with a letter or underscore. | | Data type | ✅ | `string`, `number`, `boolean`, `object`, `array`. | | Default value | - | Seeded into memory when the conversation starts. | | Description | ✅ | What the variable means and when to use it. Helps the model decide whether to write to it. | Use **Memory** for context only this agent's flow needs to track (`bike_model_picked`, `preferred_test_ride_slot`). Use **Global memory** for context every agent should be able to read and write (`customer_id`, `account_tier`, `preferred_language`). Variable names in **Memory** are validated against **Global memory** to prevent duplicates within the same agent's view. ![An agent's profile showing the Lifecycle section with both the Memory row (five local variables - bike, city, preferreddateandtime, contact, Intent) and the Global memory row (one bot-wide variable, test)](https://cdn.yellowmessenger.com/assets/image-1778842479888.jpg) ## How memory actually behaves at runtime **This is the part most people get wrong.** At runtime, an agent's **Memory** and the bot's **Global memory** flow into **the same memory store** - a key-value pool scoped to `(botId, userId)`, persisted for **2 days**. The Memory / Global memory split is a *declaration* convention that documents intent and scopes the UI; it is not a runtime isolation boundary. In practice: - **Memory survives agent handoffs.** If the billing agent writes `last_invoice_id`, the support agent can read it on the next turn. - **Memory survives short breaks.** If the customer comes back within 2 days, prior memory is still there. - **Memory is per customer, per bot.** Two different customers talking to the same bot have independent memory. :::caution **Pick variable names with this in mind.** Because every agent in the conversation can see every other agent's writes, name collisions across agents will silently overwrite each other. Prefix or namespace agent-local variables (`billing_last_invoice_id`) when there's any chance of overlap. ::: ## Allowed variables (per-agent read scope) By default an agent can read the whole memory pool plus the caller's user properties. **Allowed variables** lets you narrow that down: pick an explicit list of variables and user properties, and the agent may **read** only those. You'll find it on **AI Agent → Configuration → Profile settings**, in the **Allowed variables** section (available when the bot uses unified memory). It's a chip picker over your **Global memory** variables and **user properties**, with its own **Save**. The helper text reads *"This agent can only read the variables and user properties you add here."* Add `*` to allow **all** user properties. - **Leave it empty** and nothing is restricted — the agent reads memory and user properties as before. The allowlist only takes effect once you add at least one entry. - Allowed variables scopes **reads only**. It doesn't change what the agent can write. :::tip Scope the super agent's routing and fallback Set **Allowed variables** on the **super agent** (the router) to control what the routing decision and the fallback / root-responder reply are allowed to read. With an allowlist set, the router's Context Expert prompt and the no-active-sub-agent fallback reply see **only** those variables — not the entire user profile and every global. Use it to keep routing focused and to keep PII out of prompts that don't need it. ::: ## Sharing parent memory with sub-agents (opt-in) For tightly-coupled parent / sub-agent pairs you can *opt in* to projecting a parent agent's agent-scoped Memory into its sub-agents' prompt context - without using Global memory and without inlining values into Trigger instructions. How it works: - Set `exposeMemoryToSubAgents: true` on the parent agent's compiled config. - When a sub-agent runs, the parent's Memory keys appear in the sub-agent's `` under a `parentAgent` section, with each key rewritten as `parent.`. - The projection is **read-only**: the sub-agent sees the values but cannot write to the parent's scope through this surface. The existing merge-on-pop behaviour (where a child's local vars merge back into the parent on completion) is unchanged. The `parent.` prefix prevents collisions - a child's own `customer_id` and the parent's `parent.customer_id` are distinct keys the LLM can address separately. **When to use it** - A sub-agent needs to read state the parent already collected (verified identity, order context) without that state leaking to peer specialised agents via Global memory. - The parent / sub-agent pair is a tightly-scoped delegation and you don't want to namespace-pollute by writing to Global. **When not to** - The value is needed by *multiple* root agents - that's what Global memory is for. - You want the sub-agent to be able to *write back* to a shared key - there's no write path through this surface; use Global memory or rely on the merge-on-pop behaviour. > **Today this is a runtime-only flag.** The agent profile editor doesn't expose a toggle yet - the runtime accepts `exposeMemoryToSubAgents` as soon as the platform sends it, but you'll need platform-side configuration or a future builder UX to enable it. A builder UI for this is a planned follow-up. ## Best practices - **Declare what you depend on.** If an agent reads `customer_tier`, declare it - even if another agent writes it. Declarations are the only documentation the next person editing your bot has. - **Reference declared memory in prompts; don't improvise variables.** Before writing an **Agent instructions** prompt, map the Global memory (Configuration → Memory) the agent will read and write, and reference those names. A conversational agent's prompt should point at declared memory rather than inventing an ad-hoc variable mid-prompt that nothing seeds or persists. (Flow-local variables inside a **guided flow** are different - those are scoped to the flow and don't need to live in Global memory.) - **Name variables for what they store.** `user_details`, `delivery_full_address`, `name_on_order` tell the next editor - and the model - what's inside. `data1`, `temp`, `data_temp2` tell them nothing and make collisions harder to spot. - **Use workflow-returned values as-is.** When a tool or workflow returns a value, store and reuse it verbatim - don't ask the model to reformat or "correct" it, or you get silent corruption. > **Bad:** prompt the model to re-title-case the city a lookup returned. **Good:** store `result.normalized_city` (the value the workflow already normalised) and treat it as canonical. - **Default values matter.** Without a default, the variable is `undefined` until something writes to it, and downstream tools may get an empty payload. - **Don't use memory as a scratchpad.** Memory persists for 2 days. If a value only matters within a single turn, pass it through tool input mapping instead. - **Don't put secrets in memory.** Memory is conversation-scoped, not session-encrypted. Tokens and credentials belong in tool configuration, not in memory. --- ## Profile **Profile** is the first sub-page under **AI Agent → Configuration → General**, and it's where you set who your bot is and how it greets people. Because [Configuration](index.md) is project-level, everything you set here applies to **all** your agents - both [conversational agents](../agents/conversational-agents.md) and [guided agents](../guided-agents/index.md). Get the profile right and every reply, from any agent, inherits the same persona and identity. This page covers three things, in the order we recommend filling them out: 1. **Pick a persona** - set the tone with a preset. 2. **Write the bot identity** - the system instruction that defines who the bot is. 3. **Set the welcome message** - how the first turn of every conversation begins. To open it, go to **AI Agent → Configuration** in your bot and click **Profile settings** in the left menu. Stuck on the wording? Ask the [Nexus AI Layer](../../ai-layer/index.md) to draft your bot identity from a one-line description, then refine it. It can also tighten an existing identity or add a "never do" rule for you. ## Step 1: Pick a persona Choose one of the available presets - for example *Polite and persuasive*, *Empathetic and helpful*, or *Witty*. The persona is a quick way to set tone without writing prompt text yourself. **Best practices** - Pick **one** persona and let your bot identity (next step) carry the nuance. Mixing presets in your head ("I want it warm but witty") usually leads to a less coherent voice. - Match persona to channel. Voice flows benefit from *Empathetic and helpful*; sales pages often want *Polite and persuasive*. ## Write the bot identity This is the most important field on the page. **Bot identity** is the system instruction that tells your bot who it is, what it does, and what it must not do. Write it as if you were briefing a new hire on day one: ``` You are Aria, the support assistant for Acme Logistics. You help customers track shipments, file claims, and update delivery preferences. You never quote pricing - that's handled by the sales team. If a customer asks about pricing, route them to the @sales-agent. Use a calm, professional tone. Do not make up tracking numbers under any circumstance. ``` ![Edit configuration drawer in Configuration Profile settings - Name, Avatar, Company, the three persona presets (Polite and persuasive, Empathetic and helpful, Witty), and the Role textarea where bot identity lives](https://cdn.yellowmessenger.com/assets/image-1778841746113.jpg) **Best practices** - **Lead with the role**, then the responsibilities, then the constraints, then the tone. The model pays the most attention to your first lines. - **Be concrete.** "You help customers" is too vague; "You help customers track shipments and file claims" is testable. - **State what the bot must NOT do**, not just what it should do. The "never quote pricing" instruction in the example above is what stops bad behavior. - **Don't write marketing copy here.** This is an instruction to a model, not a brand brochure. > **Tip - `@`-mentions.** Type `@` in this field (or any prompt field) to insert a live reference to an agent, workflow, or tool. The chip stays linked to the target's slug, so it doesn't break when the target is renamed. Mentioning is a *hint* to routing - it does **not** trigger a handoff. To make an agent actually take over, use a [Routing Logic](routing-logic.md) rule. ## Step 3: Set the welcome message Still on **Profile settings**, scroll to the **Choose how to welcome** section. Click **Change** to open the picker - Nexus shows three kinds of options: | Option | Studio label | When to use | |---|---|---| | **Instruction** | *Instruct super agent* | Generate a greeting from a prompt fragment you write. Good for personalised welcomes (returning user vs new, channel-specific tone). | | **Send message** | *Send message* | A fixed greeting with optional quick-reply chips. Best for simple welcomes. | | **A welcome workflow** | *(workflow name, e.g. `runWelcomeWorkflow`)* | Pick any workflow registered for welcome use. Use this when the greeting needs to *do* something first (look up a customer, show rich media). The picker lists each workflow as its own option. | The default for fresh bots is **Instruct super agent**. Quick-reply chips ("Conversation starters") are available in both Instruct and Send message modes - they appear under the message body on the same Profile settings page. ![Welcome message Change picker on the Configuration Profile settings - three options shown: Instruct super agent (selected), a welcome workflow (runWelcomeWorkflow), and Send message](https://cdn.yellowmessenger.com/assets/image-1778841945076.jpg) > **The two non-Instruct options skip the LLM.** Both **Send message** and **welcome workflows** are *deterministic* - they emit a pre-built or workflow-rendered message without a model round-trip on the welcome turn. Only **Instruct super agent** generates the welcome via the LLM. Pick a workflow option when you need to *do* something on welcome (look up the customer, render rich media) without the cost or latency of an LLM call. If you choose a static response, you can add **quick reply chips** so users have suggested next actions. **Best practices** - Keep welcomes short. Long welcomes scare users away on chat. - Show 2-4 quick-reply chips for the most common journeys. More than 4 becomes noise. - If your welcome needs personalisation but no lookups, **Instruction** is usually the right choice. For lookups (loyalty status, account info), do them in a [workflow tool](../tools/index.md) called *after* the welcome. --- **Next:** [Conversation Rules](conversation-rules.md) - the persona-level *always do* / *never do* guidelines applied to every reply. --- ## Routing Logic **Routing Logic** is an optional Nexus surface where you write plain-English rules that override or refine how each message is routed between agents and tools. > **Routing Logic rules are NOT mandatory.** Most Nexus bots route correctly with no rules at all - routing reads each agent's **Trigger** and picks based on that. Reach for Routing Logic only when you want a *deterministic* override on top of trigger-based routing. ## How routing actually works Every turn, one of three things happens: the message is answered directly, it is handed off to one of your **agents** (conversational agents - the LLM-driven specialists; a [guided agent](../guided-agents/index.md) is reached as a **tool**, not a routing target), or a **tool** is called. The primary signal is **each agent's Trigger** - the natural-language description you write at the top of an agent's profile that says *when* that agent should take over. Routing reads every agent's Trigger and picks the best match against the current user message. *Example Trigger:* "When the user wants to book or schedule a test ride, request a quote, ask for a callback, share contact details, or says they are interested in buying a bike soon." If your Triggers are sharp and non-overlapping, this is enough - you don't need anything else. **Routing Logic rules** are the override layer. Add a rule when: - Two agents have overlapping Triggers and routing keeps picking the wrong one. - You want a topic to *always* go to a specific agent, with no LLM judgement involved (sensitive topics, regulated content, escalations). - You need a compound condition that's hard to express in a Trigger ("if region = X **and** topic = Y, route to…"). When a rule applies, it overrides the trigger-based pick. When no rule applies, the router falls back to the Triggers. The same model applies to **tools**: any tool can be called directly, using each tool's description (and the agents the tool is attached to) as routing signals. Write a Routing Logic rule when you need a topic to *always* go through a specific tool. > **Scope what routing can read.** The routing decision reads memory and user properties as context. To restrict which variables the router — and the fallback reply — are allowed to see, set [**Allowed variables**](memory.md#allowed-variables-per-agent-read-scope) on the super agent. Leave it empty for no restriction (the default). ### Start trigger = the agent's Trigger {#routing-logic-vs-start-triggers} The field labelled **Trigger** at the top of each agent's profile is sometimes called the agent's **Start trigger**. It's the same thing - the natural-language description that routing reads to decide *when* this agent should activate. Don't confuse it with **Routing Logic**: | | Start trigger (per agent) | Routing Logic (Configuration) | |---|---|---| | **Where it lives** | At the top of each agent's profile, in the **Trigger** section | On the **Configuration → Routing logic** sub-page | | **What it does** | The primary routing signal - read on every turn to pick the best matching agent | Optional override rules that pin specific topics to specific agents/tools | | **Mandatory?** | Yes - every agent needs a Trigger | No - bots route fine with no rules | You almost always start by writing sharp Triggers. Reach for Routing Logic only after you've seen routing-logic-vs-trigger collisions in real conversations. ## When to use Routing Logic vs Conversation Rules People often mix these up. Here's the rule of thumb: | You want to… | Use | |---|---| | Force a topic to always go to a specific agent or tool | **Routing Logic** | | Set tone, style, "always do / never do" guidelines | **Conversation Rules** | Routing Logic = hard constraints on **routing decisions**. Conversation Rules = soft guidance on **how to talk**. When the two collide, Routing Logic wins. ## Step 1: Open the Routing logic page Go to **AI Agent → Configuration** and click **Routing logic** (under **Agents** in the left menu). The page only appears for Nexus agents. The page header says *"Rules to help disambiguate and refine agent routing"* - that's accurate. Agent **Triggers** alone get you a long way; add rules only when you need to tighten. Rules are numbered and capped at **30 per bot**. ## Step 2: Add a rule Click **Add rule**. Type your rule in plain English. Keep it concise - one or two short sentences usually beats a paragraph. ![Routing logic sub-page in Configuration showing a populated rule list (1 / 30 rules) and the Edit entry point](https://cdn.yellowmessenger.com/docs/v3/configuration-routing-logic.png) ## Step 3: Write rules that are testable A good rule meets all three of these: 1. **It names the trigger.** What user message or condition does this rule apply to? 2. **It names the action.** Which agent or tool should fire? 3. **It can be proven by a single test conversation.** ### Examples that work - "If the user mentions billing, invoices, or refunds, hand off to the **@billing-agent**. Do not answer billing questions yourself." - "If the user asks about an order's status, route to the **@order-status-agent** and call the `getOrderStatus` workflow before composing a reply." - "If the user wants to book a demo, hand off to the **@demo-booking-agent**." - "If the user types 'agent' or 'human', transfer to a live agent immediately. Do not try to resolve the issue first." ### Examples that don't work - "Be helpful." → Not testable. Move to Conversation Rules - and even there, it's too vague. - "Route correctly." → Doesn't name a trigger or an action. - "If billing, route." → Names the trigger and action but ambiguously; "billing" could mean many things, and the rule doesn't say *where* to route. ## Step 4: Reference agents and tools by name When your rule names an agent or tool, use **`@`-mentions** instead of typing the name as plain text. Type `@` in the rule editor to open the picker - pick the agent, workflow, or tool, and it inserts a live chip: > "If the user mentions billing, invoices, or refunds, hand off to the **@billing-agent**. Do not answer billing questions yourself." ![Routing logic page in Edit mode - the rule textarea is now editable, with a + Add button to add another rule and Cancel / Save controls at the bottom](https://cdn.yellowmessenger.com/docs/v3/routing-logic-edit-mode.png) The chip is linked to the target's slug, so it resolves to the current name even if you later rename `billing-agent` to `billing-team`. Plain text doesn't - it goes stale silently. A mention inside a rule is still just a *reference* - it's the rule that makes the handoff happen. Mentioning an agent in your bot identity, by contrast, doesn't route anywhere. See [`@`-mentions vs agent handoff](../agents/conversational-agents.md#mentions-vs-handoff). ## Step 5: Save and test Click **Save**. Then open any agent and click the **play (▶)** icon in the title bar to launch the Playground. For each rule you wrote: 1. Send a prompt that should trigger it. 2. Confirm the expected agent's persona takes over (or the expected tool fires). 3. If the wrong thing happens, your rule wording isn't specific enough - or an agent's **Trigger** is competing for the same topic. Tighten the rule (more precise trigger words, clearer action), or sharpen the Triggers of the agents involved, and retry. ## Best practices - **Start with Triggers, add rules when needed.** A precise agent **Trigger** handles most routing on its own. Add a routing rule when (a) Triggers overlap and routing isn't picking the agent you want, (b) a topic is sensitive enough that you don't want it answered directly, or (c) you need a compound condition Triggers can't express. - **One rule, one concern.** "If the user mentions billing or asks about an order, route to billing or fulfillment" is a compound rule. Split it into two separate rules. - **Order doesn't matter much.** Rules are evaluated together as a constraint set, not top-to-bottom. Don't agonize over ordering. - **Test edge cases.** Users phrase things weirdly. After the obvious test prompt works, try misspellings, partial matches, and adjacent topics that should *not* match. - **Prefer specific over clever.** "If the user mentions cancellation" is better than "If the user wants to leave." - **Keep a list of test prompts** alongside your rules. When you tweak wording later, you'll have a regression check ready. ## Common pitfalls - **Vague triggers.** "If the user is upset" - what counts as upset? Use concrete signals: "If the user mentions 'frustrated', 'angry', 'unacceptable', or types in all caps, …". - **Contradictory rules.** Two rules pointing at different agents for overlapping triggers will produce inconsistent routing. Re-read your list whenever you add a rule. - **Fighting your own Triggers.** If your rule and the agent's Trigger point in different directions ("route refunds to support-agent" but the billing-agent's Trigger claims it handles refunds), routing will feel unpredictable. Keep rules and Triggers consistent. - **Forgetting to add a "do not" clause.** "Route billing to billing-agent" is good. "Route billing to billing-agent. Do not answer billing yourself." is better - the second sentence stops the message from being answered directly instead of routed. Continue to: **[Conversational agents](../agents/conversational-agents.md)**. --- ## Voice settings > **Note:** Voice settings is part of **Configuration**, so it is **project-level** - it applies to every agent in the bot, conversational and guided alike. Voice settings is where you configure how your bot sounds and listens. It's the **Voice settings** sub-page inside **AI Agent → Configuration**, alongside Profile settings, Conversation rules, and Routing logic. ## Step 1: Open Voice settings In your bot, go to **AI Agent → Configuration** and click **Voice settings** in the left menu. The page is split into four sections: 1. Voice Configuration (mode, provider, voice). 2. Voice Instructions. 3. Audio Settings. 4. Advanced VAD. You can leave most defaults alone for a first build - the only sections you must touch are the first two. ![Voice settings sub-page in Configuration - Voice configuration (Mode, TTS provider, Voice), Voice instructions textarea, Audio settings (Noise Cancellation), and Advanced settings with VAD threshold, Prefix Padding, and Silence Duration controls](https://cdn.yellowmessenger.com/docs/v3/configuration-voice-settings.png) ## Step 2: Pick a mode The first decision is **Mode**. Two options: | Mode | What you get | |---|---| | **Text & TTS** *(default)* | Speech recognized → text answered by your agent → text spoken back. Three independent stages, lots of provider choice. | | **Realtime Audio** | Realtime audio API (OpenAI today; multi-provider adapters in flight for Gemini Live, Anthropic, MiniMax). Audio straight in, audio straight out - lowest end-to-end latency. Now supports registered tools (DynamicTool / MCP / KB), mid-call agent switch, greet-on-connect, per-turn traces. | **How to choose:** - Stick with **Text & TTS** when you need the widest provider catalog, broadest language coverage, and access to your custom voices. - Pick **Realtime Audio** when end-to-end latency matters more than fine-grained provider control. With the May 2026 update, realtime has reached parity with pipeline mode on tools, agent switching, and traces - it's a viable production option for new builds, not just demos. You can switch between modes any time. Each mode has its own voice and provider list, so you'll re-pick a voice if you change. > **Realtime mode internals:** routing is driven by the existing UI-editable `voiceOptions.mode === "realtime"` field - no separate feature flag. Schema config (`provider`, `audio.{input,output}SampleRate`, `audioFormat`, `greetOnConnect`) is exposed through the same Voice Settings sub-page; defaults are sensible for the OpenAI provider. ## Step 3: Pick a provider (Text & TTS mode) The **TTS Provider** dropdown lists what's available for the speak-back stage. Currently: | Provider | Notes | |---|---| | **Yellow AI** | The default. Good general quality, broad language coverage, and full access to your custom voices. | | **ElevenLabs** | Premium voice quality, strong English. 10 built-in presets (Rachel, Domi, Bella, Antoni, Adam, etc.). | | **MiniMax** | Multilingual presets including Mandarin, Japanese, French, Spanish. | Speech-to-text (STT) provider is configured separately in pipeline runtime config. Yellow AI is the default STT choice. ## Step 4: Pick a voice The **Voice** dropdown shows every voice available for the chosen provider: - Built-in presets (Rachel, Domi, Bella, etc. for ElevenLabs; Mandarin and multilingual options for MiniMax). - Yellow's **global curated voices**. - **Your custom voices** - anything you've cloned for this bot. See [Custom Voices](../../voice/custom-voices.md). Click the play icon next to a voice to preview it before saving. **Best practice:** match the voice to your audience. A persuasive sales bot wants a different voice than a calm support bot. Preview a few before committing. ## Step 5: (Realtime Audio mode) Pick an OpenAI voice If you switched to Realtime Audio, the voice list narrows to OpenAI's options: Alloy, Ash, Ballad, Coral, Echo, Sage, Shimmer, Verse, Marin, Cedar. Each has a distinct character - preview to pick. ## Step 6: Write voice instructions The **Voice Instructions** field (≤500 characters) is freeform text that biases the bot's spoken behavior: - "Respond only in Hindi, even if the user types in English." - "Speak slowly and clearly. Pause briefly between sentences." - "Sound friendly but concise - keep replies under two sentences." **Best practices:** - Use this for **delivery** (pace, tone, language); use **bot identity** for *what* to say. - Don't repeat your bot identity here. Voice instructions layer on top. - For multilingual bots, this is often the cleanest place to lock the spoken language. ## Step 7: Audio Settings There's currently one option here: - **Noise Cancellation** - on by default. Suppresses background noise on the user's mic. Leave it on unless you have a specific reason (some studio setups can do better with raw audio). ## Step 8: Advanced VAD (Voice Activity Detection) VAD is what tells the bot "the user has finished speaking, my turn." Default values work for most calls; tune only if testing reveals a specific problem. | Setting | Default | What it does | |---|---|---| | **VAD Threshold** | 0.85 | How aggressively to detect speech vs silence. Higher = stricter (less likely to trigger on background noise but may cut off quiet speech). | | **Prefix Padding** | 300 ms | How much audio *before* detected speech to include. Keeps the start of words from being clipped. | | **Silence Duration** | 500 ms | How long the user must be silent before the bot considers the turn ended. Lower = snappier, more interruptions; higher = more natural pauses, but a small delay. | **Tuning by use case:** - **Outbound sales / fast-paced chat** → drop Silence Duration to ~300 ms; you'll feel more responsive. - **Slow / elderly / non-native speakers** → raise Silence Duration to 700-800 ms so the bot doesn't cut them off. - **Noisy environments** (vehicles, public spaces) → raise VAD Threshold to 0.9. ![VAD section at the bottom of the Voice settings page - VAD Threshold (0.85 default), Prefix Padding (300 default), and Silence Duration controls](https://cdn.yellowmessenger.com/docs/v3/configuration-voice-settings.png) ## Step 9: Save Click **Save**. The configuration applies to all conversations on this bot from the next call onward. ## Best practices - **Pick the mode that matches your goal**, not the newest one. Pipeline (Text & TTS) is right for most production bots. - **Preview voices before committing.** A 10-second preview saves a lot of "this voice is wrong" feedback later. - **Keep voice instructions short and behavioral.** This isn't where you re-state the agent's purpose. - **Don't change VAD without a measurement.** Test the bot, find a specific problem, then tune. Random changes can make things worse. - **For multilingual bots, set the spoken language explicitly** in Voice Instructions. Don't rely on auto-detection unless you've tested it on real calls. Continue to: **[Custom Voices](../../voice/custom-voices.md)**. --- ## The Conversational Agent node A **Conversational Agent node** is the workhorse of a [guided agent](index.md). It embeds a single focused conversational turn - one job, with explicit exits - inside the flow you design on the [flow canvas](flow-canvas.md). The node speaks to the user, follows its instructions, and finishes by choosing one of the **exits** you defined; each exit is wired to whatever comes next. Think of it as a small, sharply-scoped agent that the flow *invokes* at exactly the right moment. It does not have a trigger and it is never picked by routing - the flow decides when control reaches it. That's the whole point of a guided agent: the order is fixed, so every run is consistent and auditable. Ask the [AI layer](../../ai-layer/index.md) to scaffold a Conversational Agent node - it can draft the instructions, suggest exit labels and descriptions, and wire the exits into your flow, then wait for your confirmation before saving. ## How it differs from a standalone conversational agent A [conversational agent](../agents/conversational-agents.md) and a Conversational Agent node share the same engine - an LLM that reads the conversation, uses tools, and replies - but they sit in very different places: | | Conversational agent | Conversational Agent node | |---|---|---| | **Lives** | On the Agents page (Conversational tab) | Inside a guided agent, on the flow canvas | | **How it's reached** | Routing **routes** to it based on its **Trigger** | The **flow** hands control to it - no trigger, no routing | | **Scope** | Owns a whole domain ("billing", "order status") and reasons openly | Owns **one step** and finishes on an explicit exit | | **Finishes by** | Returning control for routing when it's done | Choosing one of its **exits**, which decides the next node | | **Lifecycle** | Has Live / Draft status, an avatar, conversation rules | No status - it's part of the flow's lifecycle | > **Note:** Because they share an engine, the writing skills carry over. A good Trigger on a standalone agent and a good exit description on a node are the same craft: say precisely what's true when the agent is done. The difference is that a node's outcome is a *branch in a flow*, not a handoff back to a router. ## Open the node Click the node on the canvas to open its **configuration drawer**. The drawer header shows the node's **Name** and a **Version history** button (to review and restore earlier versions of the node), with **Cancel** and **Save** at the bottom. Nothing you change is committed until you click **Save**. The drawer has two columns: - **Left** - Name, Capabilities (Tools, Rich Media, Variables), First response, and Exits. - **Right** - Instructions (the rich-text goal/prompt). ![The Conversational Agent node configuration drawer - the header (node name, Version history, Cancel/Save), the left column (Capabilities, First response, Exits) and the right-column Instructions editor](https://cdn.yellowmessenger.com/assets/nexus-conversational-agent-node-config.png) ## Name Give the node a name that says what the step *does* - `identify-request`, `collect-shipping-address`, `confirm-order`. The name appears on the node in the canvas and in run logs, so a self-explanatory name makes the flow readable at a glance and easier to debug later. Keep it a verb-phrase for the task, not the domain. `collect-address` reads better on a node than `address-agent`. ## Instructions The **Instructions** editor (the right column) is the node's **goal and prompt** - what this single agent should accomplish and how it should behave while it's in control. It's a rich-text editor with the usual formatting (bold, italic, underline, strikethrough, headings H1-H3, lists, code, quote, divider, table) and markdown shortcuts, so you can structure longer instructions clearly. You can **`@`-mention tools** inside the instructions - for example `@Quick Replies` - to reference a capability you've attached to the node. The mention stays linked to the tool even if it's renamed. Write instructions for a node, not for an open-ended assistant. A node has one job: - **State the single goal** in the first line. "Your job is to find out whether the customer wants a return or an exchange." - **Tell it to finish on an exit, not with a message.** A node ends by choosing an exit. Instruct it to stop talking once the outcome is clear: *"As soon as you know which one it is, finish on the matching exit. Do not send any extra message."* Without this, agents tend to append a chatty "Great, I'll help you with that!" before exiting, which the next node may then repeat. - **Scope it hard.** A node should not wander outside its step. The most reliable pattern is to say so explicitly: *"This agent can do nothing beyond what is described here. If the user asks about anything else, finish on the `out_of_scope` exit."* That single line stops a step from quietly turning into a general-purpose chatbot mid-flow. - **Be specific about what to collect or decide**, and in what shape, especially if a later node or tool depends on it. A generic example for a node that decides between a return and an exchange: ``` You are the first step in an order-return flow. Your only job is to find out whether the customer wants a RETURN (send the item back for a refund) or an EXCHANGE (swap it for a different size or variant). Ask one short question to clarify if it isn't already obvious from what the user said. If the customer asks for anything outside returns and exchanges (order status, cancellation, a human), do not try to handle it. As soon as the intent is clear, finish on the matching exit and send no further message. You can do nothing beyond this - you only classify the request into return or exchange. ``` > **Tip - keep instructions narrow on purpose.** The reason guided agents are predictable is that each node is small. If you find a node's instructions growing to cover three jobs, that's a sign it should be three nodes wired together - not one node with a long prompt. ## Capabilities The **Capabilities** group (left column) gives the node the means to do its job. Each row has an **Add** control to attach more. | Capability | What it does | |---|---| | **Tools** (`+ Add tool`) | The actions this node can take - run a [workflow](../tools/workflows.md), search a [knowledge base](../tools/knowledge-base.md), escalate to a human, and so on. Tools are defined once in **AI Agent → Tools** and any agent or node in the bot can use them. Attach only the tools this step actually needs. | | **Rich Media** (`+ Add`) | UI elements the node can present - for example a **Quick Replies** chip set for the user to tap instead of typing. Once attached, reference it from the instructions with an `@`-mention (e.g. `@Quick Replies`) so the agent knows to show it. | | **Variables** (`+ Add`) | The flow's **local memory** - named values this node can read and write so that later nodes can use them. See [Memory & conversation history](#memory--conversation-history) below. | Keep a node's capabilities tight. A node with one tool and one variable is far easier to predict and debug than one carrying every tool in the bot. If two nodes need the same tool, attach it to both - that's fine and expected, since tools are shared across the bot. ## First response **First response** is a toggle in the left column, **OFF by default**, labelled *"The agent's first response when control reaches it."* It's the optional opening message the node speaks the moment the flow hands it control. - **Turn it ON** when the node should **greet or announce** on entry - "Let's get your return started" before it begins asking questions, or a short status line when the flow moves into a new phase. The message you set here is sent before the agent does anything else. - **Leave it OFF** (the default) when the node should **act silently** - just follow its instructions without a canned opener. This is usually right for steps in the middle of a flow, where a fresh greeting would feel repetitive. With the toggle off, the node simply does its job per its instructions the moment it takes over. > **Tip:** Use First response sparingly. One announcement at the *start* of a flow reads naturally; an announcement on every node makes the conversation feel like it keeps restarting. For most mid-flow nodes, leave it off and let the instructions carry the turn. ## Exits **Exits** are how a node *finishes*. Each exit is one outcome the agent can land on, and the list lives at the bottom of the left column. Every exit has: - a **label** - a short chip (e.g. `return`, `exchange`, `max_retry`), used to wire the branch on the canvas and shown in logs; - a **description** - natural language that tells the agent *when this outcome is true* (e.g. an intent exit → "if the intent is a return"; a `max_retry` exit → "when the user can't decide after 3 attempts"); and - a **delete (×)** to remove it. Add more with **`+ Add exit`**. ### How the agent chooses an exit When the agent decides its job is done, it reads the exit **descriptions** and picks the one that best matches the current state of the conversation, then finishes on it. The label is just the wiring handle - **the description is what the model matches on.** Vague descriptions lead to the wrong branch; sharp, mutually-exclusive descriptions lead to reliable branching. ### Conventions Two exits show up on almost every node: - **`max_retry`** - a safety valve for when the agent can't get a clean outcome after a few attempts (e.g. "when the user can't decide after 3 attempts" or "after 3 failed validation attempts"). Wire it to a recovery node - re-ask, offer a human, or hand off - so the flow never gets stuck looping. - **`on_error`** - a node also exposes an **`on_error`** handle on the canvas for failures (a tool errored, something broke mid-step). Wire it to a graceful fallback rather than leaving it dangling, so an unexpected failure lands somewhere sensible instead of stalling the run. ### Writing exit descriptions the agent can match - **Make them mutually exclusive.** "if the intent is a return" and "if the intent is an exchange" don't overlap. "if the customer seems unhappy" and "if there's a problem" do - the agent will hesitate between them. - **Describe the *condition*, not the next step.** Write "if the user wants to swap for a different size", not "go to the exchange handler". The agent matches on the situation; the canvas owns where it goes. - **Cover the unhappy paths.** Add an exit for "the request is outside returns and exchanges" or for "the user wants a human" so those don't get forced into one of the main branches. - **Keep the set small.** Two to five exits per node is the sweet spot. If you need ten, the node is doing too much - split it. ## How exits drive the flow An exit isn't just an outcome - it's a **branch**. On the [flow canvas](flow-canvas.md), each exit you define becomes an **output handle** on the node, and you connect that handle to the next node. The agent finishing on exit `return` is exactly what makes the flow follow the `return` branch. So the loop is: 1. You define exits on the node (label + description). 2. Each exit appears as a branch handle on the node in the canvas. 3. You wire each branch to a target node (the `on_error` handle too). 4. At runtime, the agent picks an exit; the flow follows that branch to the wired node. Because of this, **every exit should go somewhere.** An unwired exit is a dead end - if the agent picks it, the run has nowhere to go. The canvas highlights unwired branches; see [Build on the flow canvas](flow-canvas.md) for how to connect them and for the other node types you can wire to (a [workflow](../tools/workflows.md) via an Execute Workflow node, a human via Transfer to Agent, another Conversational Agent node, and so on). ## Memory & conversation history A node has two ways to carry context. **Variables (flow-local memory).** The **Variables** you attach under Capabilities are the flow's local memory: named values a node can write and later nodes can read. Use them to pass a decision or a collected value down the flow - `return_or_exchange`, `order_id`, `preferred_size`. A variable a node writes is available to every node after it in the same run. This is the same memory model used across Nexus - a node's local variables and the bot's [global memory](../configuration/memory.md) share one per-customer pool at runtime, so a node can also read values written elsewhere in the conversation. See [Memory in Nexus agents](../configuration/memory.md) for the full picture: when to use a variable vs a tool input, naming conventions, and how runtime sharing works. > **Tip:** Pass a *decision* down the flow as a variable rather than re-deriving it in a later node. If the first node already decided `return` vs `exchange`, store it; don't make a downstream node ask again. **Conversation history.** A node can also be given the **prior conversation history** so it has the context of what's already been said. Turn this on for a node when its job depends on earlier turns - for example a node that confirms details the user gave several steps ago, or that needs to interpret a follow-up like "the second one". Leave it off for a clean, self-contained step that only needs the user's current input; that keeps the node focused and the prompt smaller. ## Conversation rules Your primary agent can define **[global conversation rules](../configuration/conversation-rules.md)** - shared behaviour guidelines (tone, do's and don'ts) that every agent, including each node in a flow, follows automatically. An agent node inherits those rules by default. Turn **Apply global conversation rules** off for a node that should ignore them - for example a tightly scripted step whose exact wording those general rules would interfere with. The choice is per node: the same agent placed in another node still follows the rules there unless you turn it off on that node too. > Routing rules (which decide *which* agent handles a turn) are never sent to a flow agent node - the flow, not the model, controls the order - so this setting only concerns the behaviour rules above. ## Lifecycle Hooks The **Lifecycle Hooks** section (left column) lets a node run a **workflow** at a set moment in its lifecycle, separately from its exits. The available event today is **When the turn ends** - the hook fires after the node finishes a turn, before control moves on. The node **waits for each hook to finish** before continuing. Each hook has an **event** (when the turn ends), a **workflow** to run, and optional **conditions** that decide whether the workflow actually runs. ### Conditions A hook runs on every matching event unless you add conditions to narrow it. The condition chip reads **"Always"** when there are none, or **"N condition(s)"** once you add some. Open the editor to build a condition set: - **Variable** - click *Select a variable* and pick the value to test. Variables can come from **memory**, **journey** (values owned by the current flow run, seeded when the node is entered), **profile**, **user**, or **system** scope. - **Operator** - one of **is** (equals), **is not**, **is empty**, or **is filled in**. - **Value** - for **is** / **is not**, supply the value to compare against. A boolean variable shows a yes/no selector; other types show a value box. - **Quantifier** - when you add more than one condition, choose whether **all of these are true** (AND) or **any of these are true** (OR). Comparisons are **type-aware**: a boolean or number condition matches only its exact value (`true` matches the boolean `true`; `42` matches the number `42`), and strings compare exactly. So a condition on a boolean variable won't accidentally match the string `"true"` written elsewhere. > **Tip:** Use a turn-end hook with a condition for fire-and-forget side effects that should only happen in certain states - log a transcript only when `escalated` is true, or push a CRM update only once `order_id` **is filled in**. Keep the reply logic in the node's instructions and exits; use hooks for the "and also, when X, do Y" work. ## Example: a generic router node A common first node in a flow is a small **router** that classifies the request and branches. Here's a fully generic one for an order-management flow. **Name:** `identify-request` **First response:** OFF (this node should just ask its question, not greet again). **Instructions:** ``` You are the first step in an order-management flow. Your only job is to identify whether the customer wants a RETURN (send an item back for a refund) or an EXCHANGE (swap it for a different size or variant). If it's already clear from what the user said, don't ask - just classify. Otherwise ask one short question to clarify. Offer @Quick Replies so the user can tap "Return" or "Exchange". As soon as the intent is clear, finish on the matching exit and send no extra message. If the customer can't decide or keeps going back and forth, finish on max_retry after three attempts. You can do nothing beyond classifying the request into a return or an exchange. ``` **Capabilities:** Rich Media → **Quick Replies** (`Return`, `Exchange`). **Variables:** `return_or_exchange` (written by this node so later steps can read it). **Exits:** | Label | Description | |---|---| | `return` | if the customer wants to send an item back for a refund | | `exchange` | if the customer wants to swap an item for a different size or variant | | `max_retry` | when the customer can't decide after 3 attempts | On the canvas you'd then wire `return` to your return flow, `exchange` to your exchange flow, and `max_retry` to a recovery node (offer a human, or re-ask once more). The `on_error` handle goes to the same graceful fallback. Now every run routes the same way, and the logs show exactly which exit fired and why. ## Best practices - **One node = one job.** If you can't name the node's single task in a short verb-phrase, it's doing too much. Split it into wired nodes. - **Sharpen exit descriptions.** The description is what the agent matches on. Make them specific and mutually exclusive; that's where branching reliability comes from. - **Tell the node to exit silently when matched.** Add "finish on the matching exit and send no extra message" to the instructions so steps don't append chatter that the next node repeats. - **Always handle the unhappy paths.** Add a `max_retry` exit and wire `on_error`. Every exit and handle should go somewhere - no dead ends. - **Keep instructions scoped.** Use the "this agent can do nothing beyond these instructions" pattern so a step can't drift into a general chatbot. - **Keep capabilities lean.** Attach only the tools and variables the step needs. One tool, one or two variables per node is a healthy default. - **Reuse via tools, not by widening a node.** When several nodes need the same action, attach the same shared tool to each - don't pile capabilities onto one node to serve many steps. - **Pass decisions forward as variables.** Store what a node decides so downstream nodes don't re-ask. Continue to: **[Test a guided agent](testing.md)**. --- ## Guided agents best practices A guided agent is only as good as the way you've broken the work down. The builder makes it easy to wire nodes together - these practices keep the result predictable, debuggable, and safe to publish. Read them after you've built your first flow on the [flow canvas](flow-canvas.md) and configured a [Conversational Agent node](agent-node.md). Ask the [AI layer](../../ai-layer/index.md) to scaffold a guided agent from a one-line description of the steps. It drops the nodes, drafts each node's instructions and exits, and waits for your confirmation before saving - a fast way to get a first draft you then tighten with the practices below. ## Choose guided when the steps must be consistent The first decision is whether the use case even wants a guided agent. Use this table. | Build a… | When the work is… | Examples | |---|---|---| | **Conversational agent** | Open-ended - the answer is worked out per message from your knowledge, and the path varies user to user. | Troubleshooting, support, diagnosing errors, guiding someone to a resolution step by step. | | **Guided agent** | Multi-step and **must run the same way every time** - every run should be consistent and auditable, with nothing skipped. | Order returns, loan applications, KYC checks, booking an appointment. | If you can't predict the order of steps, you want a conversational agent. If skipping a step is a compliance or correctness problem - collecting consent, verifying identity, confirming an amount before a charge - you want a guided agent so the sequence is enforced, not left to the model's judgement. > **Tip - start conversational, graduate to guided.** If a conversational agent keeps getting one multi-step journey wrong (it asks for things out of order, or finishes without confirming), that's the signal to rebuild *that journey* as a guided agent. You don't have to convert the whole bot. ## One node, one job Each Conversational Agent node should do exactly one thing and then exit. "Collect the order ID", "Check return eligibility", "Book the pickup slot" - three nodes, not one node trying to do all three. Why this matters: - **Adherence.** A node with a single, scoped goal follows its instructions far more reliably than one juggling several. - **Debuggability.** When a run goes wrong, a narrow node tells you exactly which step failed. A do-everything node leaves you guessing. - **Reuse of exits.** Distinct jobs produce distinct outcomes, which gives you clean exit labels to branch on (see below). A good test: if you can't name a node in three or four words ("Collect order ID"), it's probably doing too much. Split it. > **Note:** "One job" is about the node's *goal*, not its turn count. A single node may take several turns with the user to finish its one job (ask, re-ask on bad input, confirm) - that's fine. What you're avoiding is one node owning multiple *unrelated* jobs. ## Write sharp exit labels and descriptions A node's **Exits** are the outcomes it can finish on. Each exit is a short label chip plus a natural-language description, and each exit is what you wire a branch from. Good exits are the backbone of a reliable flow. - **Label = the outcome, in a word or two.** `eligible`, `not_eligible`, `slot_booked`, `max_retry`. The label is what shows on the node's output handle and what you connect on the canvas, so keep it short and meaningful at a glance. - **Description = when this exit fires, in plain language.** This is how the agent decides which exit to take, so be specific: "if the item is within the 30-day window and unopened" beats "eligible". For a retry exit, describe the give-up condition: "when the user can't provide a valid order ID after 3 attempts". - **Cover the unhappy paths.** Don't only model success. Add exits for the user refusing, an item being out of policy, or the agent running out of retries - otherwise the flow has nowhere to go when reality doesn't cooperate. The runtime also surfaces an **`on_error`** path for unexpected failures; wire it somewhere graceful (a handoff, an apology, a retry), don't leave it dangling. > **Tip - match exits to branches.** Every exit you define should map to a distinct downstream behaviour. If two exits always go to the same next node, they probably should be one exit. If one exit needs to fork based on a value, that decision belongs in the *next* node's instructions and its exits, not crammed into this one. ## Wire every exit An exit with nothing connected to it is a dead end: when the agent finishes on that outcome, the run has nowhere to go. Before you publish, walk every node and confirm each exit handle - including `max_retry` and `on_error` - connects to a next node (or to a deliberate end of the flow). Practical habit: build the happy path end-to-end first, then go back and wire each node's failure and retry exits. Common destinations for the unhappy paths: - An **Execute Workflow** node that logs the drop-off or files a ticket. - A **Transfer to Agent** node that hands the user to a human when the flow can't resolve it. - Back to an earlier node to re-collect input (a back-edge to a *different* node - for example, "amount wrong" routing from a confirm node back to the collect node). Use the canvas auto-layout and minimap to scan for orphaned handles, and run the flow in **Execute** to catch any branch that silently terminates. ## Keep each node's instructions scoped A node's **Instructions** are its goal and prompt - the rich-text editor in the right column of the node config. Write them for the one job the node owns, and nothing else. - **State the goal, the inputs to collect, and the finish condition.** "Collect the order ID. Validate it's an 8-digit number. When you have a valid ID, finish on `collected`." Leave routing decisions to the exits. - **Don't restate the whole journey in every node.** The flow's structure carries the sequence; each node only needs to know its own step. Repeating the end-to-end process in node after node makes them drift and contradict each other. - **Reference capabilities by `@`-mention.** If the node uses a tool or rich-media item (for example a "Quick Replies" chip), `@`-mention it inside the instructions so the reference stays linked even if the target is renamed. - **Use the node's capabilities for what they're for.** Put data the step needs to remember into **Variables** (the flow's local memory), put actions into **Tools**, and keep the **First response** toggle off unless the node genuinely needs a canned opener - by default the node acts per its instructions without a scripted opening line. > **Note:** Scoped instructions and the "one node, one job" rule reinforce each other. If a node's instructions are getting long and start branching ("if X do this, else do that"), that's usually a sign the node should be two nodes with an exit between them. ## Use guided agents as tools from conversational agents Guided agents are automatically **available as tools** to your conversational agents - there's no toggle to enable. This is the recommended way to combine the two styles: let a conversational agent handle the open-ended conversation, and call a guided agent when the user reaches a step that must run deterministically. A typical pattern: - A conversational **support agent** diagnoses a problem in free-form conversation. - When the resolution is "process a return", it invokes the **order-return guided agent**, which runs the fixed collect → check → book sequence. - When the guided agent finishes, control returns to the conversational agent to wrap up. This keeps each style doing what it's best at: conversation where the path varies, guided where the steps can't. See [Conversational agents](../agents/conversational-agents.md) and the [Configuration](../configuration/index.md) guide for how the conversational side routes work, and [routing logic](../configuration/routing-logic.md) for making the handoff deterministic when you need it. ## Test before you publish A guided agent has no Live/Draft status - when you **Publish**, it's live. So validate it first, the same way you would any agent. - **Run it on the canvas.** Use the **Execute** tab to walk the flow turn by turn, and the **Logs** tab to see which node fired, which exit it took, and what each variable held. This is the fastest way to catch a mis-wired branch or an exit description that's firing on the wrong condition. - **Test the unhappy paths, not just the happy one.** Feed it bad input, refusals, and out-of-policy cases. Confirm `max_retry` and `on_error` lead somewhere graceful. Most guided-agent bugs live in the branches you didn't think to exercise. - **Add test cases in the Trust Centre.** For repeatable, multi-turn coverage - and to keep the flow honest as you change it - build test cases in the [Testing Lab](../../test-debug/index.md). Run them before every publish. > **Tip - debug from the Logs tab.** When a run does something unexpected, the Logs tab tells you the *exact* node and exit, so you can fix the right node's instructions or exit description instead of guessing. Treat a surprising exit choice as a prompt to sharpen that exit's description. ## A few things to keep in mind These are builder-level realities to design around, not bugs: - **Each node mints its own agent.** A Conversational Agent node's configuration is local to that node - you don't share one agent across multiple nodes. If two steps need the same behaviour, configure both nodes (or factor the shared logic into a workflow you call from each via an **Execute Workflow** node). - **Branch on outcomes, not on raw values inside one node.** Decisions belong in exits. If you find a node trying to decide between many downstream paths, give it more exits or split it. - **Name the flow uniquely.** Two guided agents can't share a name. ## Read next - **[Guided agents overview](index.md)** - what a guided agent is and when to reach for one. - **[Harness overview](../index.md)** - where guided agents fit alongside conversational agents and tools. - **[Test and debug](../../test-debug/index.md)** - build test cases and run them before every publish. --- ## The guided flow canvas A **guided agent** runs the exact steps you design, in the same order every time. You author those steps on the **flow canvas** - a visual node graph where each node does one job and the lines between them decide what happens next. Open a guided agent from the **Guided** tab on the [Agents page](./index.md), or create a new one from the [Create picker](../agents/create.md), and the canvas opens at `/build/flows/?from=guided-agents`. This page is a tour of the canvas: the tabs and toolbar, the **Start** node, the node types you wire together, how **branches** connect them, and the **journey variables** that carry data across the flow. The [Conversational Agent node](./agent-node.md) - the workhorse node where most of your logic lives - is documented in depth on its own page. Ask the [AI layer](../../index.md) to scaffold a guided agent from a one-line description. It lays out the Start node, the Conversational Agent nodes, and the branches between them on the canvas for you to refine - you don't have to drag every node by hand. ## The canvas tour When you open a guided agent, the header carries the flow's name plus a few actions, and the body is a scrollable, zoomable node graph. A guided flow is a graph of nodes wired by each node's **exits**. A typical order-return flow looks like this: ```mermaid flowchart TD S(["Start (trigger)"]) --> A["Conversational Agent nodeidentify the request"] A -->|return| RET["Execute Workflowprocess the return"] A -->|exchange| EX["Conversational Agent nodecollect the new variant"] A -->|max_retry| HO["Transfer to Agent(human)"] A -. on_error .-> HO RET --> DONE(["End"]) EX --> DONE ``` ![A guided flow on the canvas - the Editor, Execute and Logs tabs, Run and Publish in the header, the node graph and minimap](https://cdn.yellowmessenger.com/assets/nexus-guided-flow-canvas.png) ### Tabs The canvas has three tabs: | Tab | What it's for | |---|---| | **Editor** | Build the flow - add nodes, write their instructions, and wire branches. This is where you spend most of your time. | | **Execute** | Run the flow end to end and watch it step through your nodes, so you can confirm the path a given input takes. | | **Logs** | Inspect past runs - which nodes fired, which exit each one took, and the variables along the way. Use this to debug a run that didn't go where you expected. | ### Toolbar actions - **Run** - start a test conversation against the current draft of the flow, without publishing. Use it constantly as you build. - **Publish** - make your edits live. Unlike conversational agents, a guided agent has **no Live/Draft status badge** in the list - publishing is how your canvas changes reach customers. - **What's new** - release notes for the canvas itself. - **Search for nodes** - a search box that finds a node by name and jumps to it. On a large flow with a dozen nodes, this is faster than panning the canvas. ### Navigating the graph The canvas is a node graph built on React Flow. To find your way around: - **Minimap** - a small overview of the whole graph in the corner; click or drag within it to jump to a region. - **Zoom and fit** - zoom in/out and a fit-to-screen control to frame the entire flow. - **Auto-layout** - re-tidies the nodes into a clean top-to-bottom arrangement after you've added or rewired several. Reach for it when the graph starts to look tangled. > **Tip - let auto-layout do the tidying.** Don't fuss over pixel-perfect node placement while you build. Wire the logic first, then run auto-layout to make the flow readable. Position is cosmetic; the branches are what matter. ## The Start node Every guided flow begins at a single **Start** node. It is the entry point of the graph and it carries the **trigger** - the natural-language description of *when* this guided agent should run. The trigger plays the same role here that an agent's Trigger plays for a [conversational agent](../agents/conversational-agents.md#step-2-configure-the-agents-behaviour): it's how the bot decides this guided agent is the right thing to run for an incoming request. Write it the same way - concrete about the situations it covers, and explicit about what it does *not* handle. > **Example trigger.** *"When the customer wants to return or exchange an item they've already received - start a return. Do not handle order tracking or delivery-status questions; those have their own agent."* The Start node has exactly one outgoing edge: it hands control to the first real node in your flow (usually a Conversational Agent node). From there, the path is decided by each node's exits. > **Note:** Guided agents are automatically **available as tools** to your conversational agents. A conversational agent can hand a multi-step task to a guided agent the same way it would call any other tool - you don't need to flip a separate "use as tool" toggle. See the [Agents page overview](./index.md) for how the two agent types relate. ## Node types you wire together A guided flow is built from nodes, each with a focused job. You drop a node onto the canvas, configure it, and connect it to the next node by its exits. The most common node types: | Node | What it does | |---|---| | **Start** | The flow's single entry point. Carries the trigger that decides when the guided agent runs. One per flow. | | **Conversational Agent** | A focused agent that owns one step of the conversation - collect details, confirm a choice, answer a scoped question. It has its own instructions, tools, variables, and **exits** (the outcomes it can finish on). This is where most of your logic lives. See [The Conversational Agent node](./agent-node.md). | | **Execute Workflow** | Calls a [workflow](../tools/workflows.md) - a callable, deterministic skill (an API call, a lookup, a record update). Use it when a step is pure business logic with no conversation, e.g. *check return eligibility* or *book a pickup slot*. Available in **every v3 flow**. | | **Transfer to Agent** | Hands the conversation off to a human agent (or routes it onward). Use it as the exit path when the flow can't or shouldn't continue automatically - for example, an item outside the return window, or an explicit "talk to a person" request. | The node search/palette offers **more node types** than the four above - open it from the canvas to see everything available for your bot. Build the backbone of your flow with Conversational Agent nodes, and reach for Execute Workflow and Transfer to Agent at the points where the journey leaves the conversation (to run logic) or leaves the bot (to reach a human). ![The node palette / Search-for-nodes panel open on the canvas, listing node types including Conversational Agent, Execute Workflow and Transfer to Agent](https://cdn.yellowmessenger.com/assets/nexus-guided-node-palette.png) :::caution **A guided agent is never a "workflow."** "Workflow" is a reserved, distinct term - a callable scheduler skill you build in the workflow editor and invoke from an **Execute Workflow** node (or as a [Workflow tool](../tools/workflows.md)). The guided agent is the *conversation*; a workflow is a subroutine it can call. Don't conflate the two. ::: ## Branches and edges Nodes connect to each other through **exits**. Each node finishes on one of its named exits, and each exit is an **output handle** that you wire - with a **branch** (the line on the canvas, an edge) - to the next node that should run. How it works: - A **Conversational Agent node** declares a list of **exits**, each a label plus a short natural-language description of when it applies. For example, an order-return node might exit on `eligible`, `not_eligible`, or `max_retry` (the user couldn't decide after a few attempts). Every node also has an **`on_error`** exit for the failure path. - You connect each exit to a target node by dragging a branch from the exit's handle to the next node's input. That branch *is* the routing: when the node finishes on an exit, control follows that exit's branch. - An exit that isn't wired anywhere **ends the flow** after that node. Wire the exits you want to continue; leave terminal outcomes (e.g. a successful completion) unwired to finish. - Branches can point **forward** (collect → confirm) or **back to an earlier node** (e.g. *confirm → collect* to re-collect a changed detail), letting you build loops and retries. Because every path is an explicit branch you drew, a guided agent's behaviour is **deterministic and auditable**: there's no path through the flow that you didn't wire. That predictability is the whole point of choosing a guided agent over a conversational one for multi-step, must-not-miss-a-step journeys. > **Note:** An exit's *description* is for the **Conversational Agent node** - it's how that node's agent decides which outcome it has reached (e.g. *"if the intent is a return"*, *"when the user can't decide after 3 attempts"*). The *branch* is how the canvas turns that outcome into the next node. You author exits and their descriptions inside the node; you draw branches on the canvas. See [The Conversational Agent node](./agent-node.md) for authoring exits. ## Journey variables A guided flow has its own **journey variables** - flow-local memory shared across every node in the flow. Use them to carry data from one step to the next: an `order_id` collected by an early node, a `return_eligible` flag set by an Execute Workflow node, a `pickup_slot` chosen later on. - **Scope.** Journey variables are local to the flow. They're the flow's working memory, separate from the bot-wide [global memory](../configuration/memory.md) that every agent shares. A Conversational Agent node reads and writes them through its **Variables** capability; an Execute Workflow node can read inputs from them and write its results back. - **They persist across nodes within a run.** A value written in step one is available in step five - that's what lets a guided agent "remember" what it has collected as it walks the journey. - **Global memory still works.** If a value needs to be visible to the rest of the bot (not just this flow), use a [global memory](../configuration/memory.md) variable instead. Reach for a journey variable when the data only matters inside this flow. See [Memory in Nexus agents](../configuration/memory.md) for the full memory model and when to choose local (journey) vs global. ## Step 1: Add a node In the **Editor** tab, open the node search/palette and pick the node type you want - for an order-return flow, you might add a **Conversational Agent** node to collect the order ID. Drop it onto the canvas. (You can also let the [AI layer](../../index.md) scaffold the node from a description.) ## Step 2: Configure the node Click the node to open its configuration drawer and give it a clear job. For a Conversational Agent node that means a **Name**, its **Instructions** (the goal/prompt), any **Tools**, **Variables**, and its **Exits** - the outcomes it can finish on. The full walkthrough is on [The Conversational Agent node](./agent-node.md). For an **Execute Workflow** node, pick the workflow to call and map its inputs from your journey variables. ## Step 3: Wire its exits Drag a **branch** from each exit handle to the node that should run next: - Wire the success exit (e.g. `eligible`) to the next step in the journey. - Wire fallback exits (e.g. `not_eligible`, `max_retry`, `on_error`) to a **Transfer to Agent** node, or back to an earlier node to retry. - Leave any terminal exit unwired so the flow ends cleanly there. ## Step 4: Run and refine Click **Run** to start a test conversation and walk the path your input takes. If a run goes somewhere unexpected, open the **Logs** tab to see which node fired and which exit it took, then adjust the node's instructions, its exit descriptions, or the branch wiring. When the flow behaves the way you want, click **Publish** to make it live. > **Tip - test the unhappy paths first.** It's easy to get the success path right. The value of a guided agent is that the *edge cases* also stay consistent. Run the flow with inputs that should hit `not_eligible`, `max_retry`, and `on_error`, and confirm each lands somewhere sensible (usually a Transfer to Agent or a graceful end). See [Testing a guided agent](./testing.md). --- Continue to: **[The Conversational Agent node](./agent-node.md)** - the node where each step's goal, tools, variables, and exits live. --- ## Guided agents A **guided agent** runs the exact steps you design, in the same order every time - so nothing is missed and every run stays consistent and auditable. It's the deterministic counterpart to a [conversational agent](../agents/conversational-agents.md): instead of working out each reply on its own from your knowledge, a guided agent follows a flow *you* lay out on a canvas. Reach for one whenever a task has a fixed procedure that must run the same way every time - order returns, loan applications, KYC checks, booking an appointment. These are the cases where an LLM-driven agent, however well-prompted, is hard to keep on the rails: it can skip a step, ask things out of order, or finish early. A guided agent removes that risk by making the path explicit. Guided agents live on the same **Agents** page as conversational agents, under their own tab. You create one from the same **Create** picker, then build it on the flow canvas. Ask the [AI layer](../../ai-layer/index.md) to scaffold a guided agent from a one-line description - it lays out the start, the steps, and the exit branches between them, then waits for your confirmation before saving. Refine it on the canvas afterwards. ## Conversational vs guided - which should I build? Both are agents you create from the Agents page; the difference is *how* they decide what to do next. | If the task is… | Build a… | Why | |---|---|---| | Open-ended Q&A - answering questions from your knowledge | **Conversational agent** | It works out each reply on its own; no fixed path to enforce. | | Troubleshooting and support - diagnosing errors, fixing login/device issues, guiding someone to a resolution step by step | **Conversational agent** | The path depends on what the user says; the agent adapts turn by turn. | | A multi-step procedure that must run the same way every time - order returns, loan applications, KYC checks, booking an appointment | **Guided agent** | The steps and their order are fixed; you want every run consistent and auditable. | | A regulated or audited process where skipping or reordering a step is unacceptable | **Guided agent** | The flow guarantees each step runs, in order, on every run. | A useful test: if you'd describe the work as *"it depends on what they ask,"* build a conversational agent. If you'd describe it as *"first do this, then this, then this - every time,"* build a guided agent. You don't have to choose only one. The two compose: a conversational agent can call a guided agent as a tool when a conversation reaches a part that needs a fixed procedure (for example, a support agent that hands off to a `kyc-verification` guided agent once the user is ready to verify their identity). The conversational agent stays in charge of the open-ended conversation; the guided agent runs the deterministic part and returns control. See [Guided agents as tools](#guided-agents-as-tools) below. ## What's in a guided agent A guided agent *is* a flow on a canvas - a graph of nodes wired together by **exit branches**. When you open one, you'll see: - **Start** - the entry node. It carries the **trigger description** (what the guided agent is for / when it runs). - **Nodes** - the steps. The main node types are: - **Conversational Agent node** - a focused agent that owns one step of the flow (collect details, confirm, answer a sub-question). It has its own instructions, tools, and exits. This is the workhorse node - see [The Conversational Agent node](agent-node.md). - **Execute Workflow node** - runs a [workflow](../tools/index.md) (a callable, deterministic skill - an API call, a lookup, a calculation) as a step. - **Transfer to Agent node** - hands the conversation to a human agent in Inbox. - **Exit branches** - every node finishes on one of its **exits**, and each exit is wired by a branch to the next node. This is how the flow's order is enforced: a Conversational Agent node that exits on, say, `eligible` goes to one node; on `not_eligible` it goes to another; on `max_retry` or `on_error` it goes somewhere else. The wiring *is* the procedure. Because the path is drawn out explicitly, a guided agent is easy to reason about and audit: you can look at the canvas and see every route the conversation can take. ![A guided flow on the canvas - a Start node wired to a Conversational Agent node that branches by its exits into an Execute Workflow node and a Transfer to Agent node](https://cdn.yellowmessenger.com/assets/nexus-guided-flow-canvas.png) For a full tour of the canvas, see [The flow canvas](flow-canvas.md). ## Where guided agents live Guided agents share the **Agents** page (**AI Agent → Agents**) with conversational agents, but each type has its own tab: - **Conversational** - your LLM-driven agents. Each row shows a round **avatar**, the agent's name, its trigger description, and a **Live/Draft** status. - **Guided** - your guided agents. Each row shows a generated **flow icon** (not an avatar), the agent's name, a **Category** tag, and a short description. The active tab is saved in the URL, so a link to the Guided tab reopens there. Two things are deliberately different about guided agents in this list: - **No Live/Draft status.** A flow has no live/draft lifecycle, so the Guided tab has no Status filter - it filters by **Category** and a sort only. (The Conversational tab keeps Status, Category, Updated By, and Last Updated.) - **A generated icon instead of an avatar**, so you can tell the two types apart at a glance. To create one, click **Create** in the page header and pick **Guided agent** from the *"What would you like to create?"* picker. (The same picker offers **Conversational agent**.) See [Create an agent](../agents/create.md). ![The Agents page - the header with the Conversational and Guided tabs and the Create button](https://cdn.yellowmessenger.com/assets/nexus-agents-page.png) ![The Guided tab listing guided agents, each with a generated flow icon, name, Category tag and description, with Category and sort filters above the list](https://cdn.yellowmessenger.com/assets/nexus-agents-guided-tab.png) ## Guided agents as tools Every guided agent is **automatically available as a tool** to your conversational agents. There's no toggle to switch on - if a guided agent exists in the bot, your conversational agents can call it. This is what makes the two types compose cleanly. A conversational agent handles the open-ended conversation, and when it reaches a part that needs a fixed procedure, it calls the relevant guided agent the same way it would call any other tool. The guided agent runs its steps to completion and returns control. > **Note:** A guided agent is **not** a [workflow](../tools/index.md). "Workflow" is a reserved term for a callable scheduler skill (an API call, a lookup, a job). A guided agent is a conversational journey across nodes - it can *call* a workflow (via an Execute Workflow node), but it is never itself a workflow. > **Tip - name guided agents by the task.** `order-return`, `kyc-verification`, `book-appointment` read clearly both in the Guided list and when a conversational agent calls one as a tool. A vague name like `flow2` tells the calling agent nothing about when to use it. ## Availability Guided agents are gated. They appear only on **Nexus** bots that also have the flow-agent capability enabled. When the gate is off, the Agents page behaves exactly as before - no Guided tab, no Guided option in the Create picker. > **Note:** If you don't see the **Guided** tab on the Agents page, or the Create picker shows only **Conversational agent**, the capability isn't enabled for your account. Talk to your account team to turn it on. ## Read next - **[Create an agent](../agents/create.md)** - start from the Create picker and open the flow canvas. - **[The flow canvas](flow-canvas.md)** - the Editor / Execute / Logs tabs, nodes, and exit branches. - **[The Conversational Agent node](agent-node.md)** - instructions, exits, tools, variables, and first response. --- ## Test a guided agent A guided agent runs the same steps in the same order every time - which is exactly what makes it testable. Your job when testing is to walk every branch of the flow at least once: confirm each **Conversational Agent node** finishes on the exit you expect, that every exit is wired to the right next node, and that the run holds together end to end. This page covers the three places you test a guided agent: **Run** on the canvas and the **Execute** tab to drive it, the **Logs** tab to inspect a run, and the **AI Trust Centre** to lock in regression coverage before you ship. > **Note:** Guided agents have **no Live/Draft status** - there's nothing to "set live." A guided agent runs as soon as it's published and is automatically available as a tool to your conversational agents. So testing isn't a release gate you flip; it's the thing you do every time you change a node, an exit, or a branch. See [Build a guided agent on the canvas](flow-canvas.md). Ask the [Nexus AI Layer](../../ai-layer/index.md) to drive a guided agent through every branch, then summarise which exits fired and which never matched - a fast way to find a dead branch before you open the Logs yourself. ## Where you test | Surface | Where it lives | Use it when | |---|---|---| | **Run** | The button in the flow canvas header | You want a quick, interactive pass through the flow while you're still editing it. | | **Execute** | A tab on the flow canvas (Editor / **Execute** / Logs) | You want to drive the agent turn by turn and watch it move from node to node. | | **Logs** | A tab on the flow canvas | You want to inspect a finished run - which exit each node took, what each branch did, where it stopped. | | **AI Trust Centre** | [Test & debug → AI Trust Centre](../../test-debug/index.md) | You want durable, repeatable regression coverage that runs on every future change. | Use them in that order: **Run / Execute** while you build, **Logs** to diagnose, then promote the cases that matter to the **AI Trust Centre** so they run automatically forever after. ## Step 1: Run the agent on the canvas Open your guided agent from the **Guided** tab on the Agents page (it opens the flow canvas at `/build/flows/`). In the canvas header you'll see **Run** alongside **What's new**, **Publish**, and the **Search for nodes** box. Click **Run** to start an interactive session against the current state of the flow. The run begins at the **Start** node and follows your wiring: the first **Conversational Agent node** takes control, acts on its instructions, and - when it reaches an outcome - finishes on one of its exits. The exit's **branch** hands control to the next node, and so on until the flow ends or transfers. This is the fastest way to sanity-check a change. Edit a node, hit **Run**, play the conversation, repeat. ![A guided flow open on the canvas Editor tab - a Start node wired into a Conversational Agent node, with Run, What's new and Publish in the header](https://cdn.yellowmessenger.com/assets/nexus-guided-flow-canvas.png) > **Tip - drive it like a real user.** Don't only type the "happy" answer. If a node has a `max_retry` exit described as *"when the user can't decide after 3 attempts,"* test it by being indecisive on purpose. Branches you never exercise are branches you never verified. ## Step 2: Drive it turn by turn from the Execute tab Switch to the **Execute** tab on the canvas. This is the dedicated harness for stepping the flow as an end user: you send a message, the agent responds, control moves to the next node when the current one finishes on an exit, and you keep going. As you converse, confirm three things on each step: 1. **The right node has control.** A node only takes over when a branch from the previous node points to it. If the wrong node speaks, the wiring upstream is off. 2. **The node finished on the exit you expected.** A Conversational Agent node ends on one of its exits - for example an intent exit (`vpf`, `nps`), a `max_retry` exit, or `on_error`. The exit it picks is driven by its **Instructions** and the natural-language **description** on each exit. 3. **The branch sent you to the right place.** Each exit is wired by a branch to a next node. Walk the conversation down each branch at least once. Run through the flow several times, taking a different path each time, until you've covered every branch - including `max_retry` and `on_error`. ![The Execute tab on a guided flow - a turn-by-turn conversation on the left and the flow graph on the right with the active node highlighted](https://cdn.yellowmessenger.com/assets/nexus-guided-execute-tab.png) ## Step 3: Inspect a run in the Logs tab When a run does something you didn't expect - wrong node took over, the flow stopped early, an exit never matched - open the **Logs** tab. Logs give you the run's history so you can see *why* control moved the way it did, node by node. Read the log top to bottom and ask: - **Which exit did each node finish on?** If a node you expected to take the `refund` exit took `max_retry` instead, its **Instructions** or that exit's **description** isn't steering the model the way you think. Sharpen them (see [Configure a Conversational Agent node](agent-node.md)). - **Did a branch go nowhere?** If a node finished on an exit but the run stopped there, that exit has no branch wired to a next node. Go back to the **Editor** tab and connect it. - **Did `on_error` fire?** An `on_error` exit means the node hit a failure (a tool error, an unhandled condition). Follow that branch and confirm it lands somewhere graceful - a retry, a `Transfer to Agent` node, or a clean message - not a dead end. > **Tip - match Logs against the graph.** Keep the **Editor** tab's node graph in mind as you read Logs. The exit labels in the log are the same labels you see on the node's output handles in the canvas - tracing one against the other is the quickest way to spot a misrouted branch. ## Step 4: Promote durable cases to the AI Trust Centre Run / Execute / Logs are for the loop you run *while building*. They don't persist - close the tab and the run is gone. For coverage that survives every future edit, promote the conversations that matter into the **[AI Trust Centre](../../test-debug/index.md)**. The Trust Centre is the durable, dataset-driven side of testing. Capture a guided-agent conversation as a **test case**, add it to a dataset, and it runs automatically on every future change - so a branch you wired correctly today can't silently break next month. See the **[Testing Lab](../../test-debug/trust-centre/testing-lab.md)** for capturing and curating cases, and the [Test & debug overview](../../test-debug/index.md) for the full picture. A good regression set for a guided agent covers, at minimum: - **One case per branch.** Every exit on every Conversational Agent node should have at least one case that drives the conversation down it - including `max_retry` and `on_error`. - **The unhappy paths.** Indecisive users, invalid inputs, mid-flow topic changes. These are where consistency breaks. - **The full journey end to end.** A single case that walks the whole flow from Start to its terminal node, so you catch wiring regressions across the whole graph at once. > **Tip - guided agents are tools too.** Because a guided agent is automatically available as a tool to your conversational agents, also test it *from the calling side*: open the conversational agent that invokes it and confirm it hands off to the guided agent at the right moment. See [Conversational agents](../agents/conversational-agents.md). ## Common pitfalls | Symptom | Likely cause | Fix | |---|---|---| | A node never takes the exit you expect | The exit's **description** is too vague for the model to match against (e.g. "if relevant" instead of "if the intent is a refund request"). | Rewrite the exit description in plain, specific language; tighten the node's **Instructions**. See [agent-node.md](agent-node.md). | | The run stops dead after a node | An exit was left **unwired** - it has no branch to a next node. | Open the **Editor** tab and connect the exit's output handle to the next node. | | Two exits both seem to match | Overlapping exit descriptions on the same node. | Sharpen the boundary between them, or merge them into one exit. | | `on_error` fires unexpectedly | A tool the node calls is failing, or the node hit an unhandled condition. | Check the failing step in **Logs**; fix the tool or add handling, and make sure the `on_error` branch lands somewhere graceful. | | The first node says nothing on entry | **First response** is off (the default) - the node acts on its instructions without a canned opener. | If you want a spoken opening when control reaches the node, turn **First response** on. See [agent-node.md](agent-node.md#first-response). | | It passes once, then behaves differently | The agent layer is stochastic - a single pass doesn't prove a branch is reliable. | Run the same path more than once; promote it to a Trust Centre dataset so it's checked every time. | > **Note:** Don't confuse a *vague exit description* with a *missing branch*. A vague description means the node finishes on the wrong exit (Logs shows it picking the wrong label); a missing branch means the node finishes on the **right** exit but the run stops because that exit isn't wired (Logs shows it ending after a node that should have continued). The first is fixed in the node config, the second in the canvas. ## Best practices - **Walk every branch before you publish.** A guided agent's whole value is determinism - but only the branches you've actually run are the ones you've verified. - **Test the retry and error paths on purpose.** `max_retry` and `on_error` are where real conversations go sideways. Be indecisive; feed bad input; make a tool fail if you can. - **Read Logs against the graph.** The exit labels in Logs map one-to-one to the output handles in the Editor - trace them together to pin a misroute. - **Promote anything that matters to the Trust Centre.** Run/Execute is throwaway; a Trust Centre dataset is the only test that runs again next month. - **Re-test after every wiring change.** Moving one branch can reroute a whole journey. Don't trust a flow you edited but didn't re-run. Continue to: **[Guided agents best practices](best-practices.md)**. --- ## AI agents A Nexus agent is a small team of specialised agents working together, with their behaviour shaped by a shared Configuration, running on the Nexus engine. The engine adds platform-enforced refinements (two-stage routing, automatic step execution, parent-child agent triggers with auto-return, history compaction, structured traces) and authoring surfaces like Routing Logic, Widget Builder, the AI Trust Centre, and versioned configuration. See [What the Nexus engine does for you](#what-the-nexus-engine-does-for-you) below for the details. ## The building blocks ![AI Agent → Agents page showing three peer specialised agents (Test Ride & Lead Capture, Bike Finder, Order Tracking & Delivery) that routing picks between](https://cdn.yellowmessenger.com/docs/v3/agents-list-clean.png) Specialised agents now come in two types: - **Conversational agents** - LLM-driven specialists that work out each reply on their own from your instructions and knowledge. Best for open-ended Q&A, troubleshooting, and anything where the path depends on what the user says. - **Guided agents** - deterministic agents that run the exact steps you lay out on a flow canvas, in the same order every time. Best for fixed procedures that must run consistently and auditably - order returns, KYC checks, booking flows. See [Guided agents](guided-agents/index.md). ### Configuration **Configuration is project-level** - the settings you define here apply to **all your agents**, conversational and guided alike. It's where you set persona, identity, conversation rules, routing logic, memory, fallback, lifecycle hooks, AI safety, and voice. At runtime: - Every incoming message is read. - Routing decides whether to answer directly or hand off to one of your agents. - Your persona, identity, and rules shape the reply. - Tools (workflows, knowledge base lookups, escalations) are called when data is needed or an action must be taken. You set this up in **AI Agent → Configuration**. See [Configuration](configuration/index.md) for the full tour. ### Agents Agents are specialists you design for one job each - an **order-status agent** that answers "Where's my order?", a **demo-booking agent** that helps users pick a slot, a **billing agent** that handles refunds and invoices. Every agent inherits the project-level Configuration above; on top of that, agents come in two types: - **Conversational agents** - LLM-driven specialists that work out each reply on their own. ([guide](agents/conversational-agents.md)) - **Guided agents** - deterministic agents that run a fixed flow you lay out on a canvas. ([guide](guided-agents/index.md)) You create either type from the same **Create** picker - start at [Create an agent](agents/create.md). Each agent can also follow its own rules in addition to the shared Configuration's, though you'll rarely need that on day one. Routing decides *when* to hand off to an agent. It reads each agent's **Trigger** (the natural-language description at the top of the agent's profile) as the primary routing signal. You can *optionally* add [Routing Logic](configuration/routing-logic.md) rules to make specific handoffs deterministic when Triggers alone aren't precise enough. Once an agent takes over, it owns the conversation until control returns. You manage agents in **AI Agent → Agents**. ### Global components These are reusable pieces - shared prompts, policy text, tone snippets - that you can pull into any agent. Define them once, reuse them everywhere. Update them in one place and every agent using them gets the change. You manage these in **AI Agent → Global Components**. ### Tools Tools are the actions an agent can take in the real world: call a workflow, search a knowledge base, escalate to a human, transfer a call. You define them once and any agent in the bot can use them - and they can be called directly at the Configuration level too. Attach a tool to a specific agent when it belongs to that agent's job; that also helps route a topic to the right place. ## How routing decides what to do ```mermaid flowchart TD M["User message"] --> R{"Routing - reads each agent's Triggerand your optional Routing Logic rules"} R -->|best-matching agent| A["Hand off to an agent"] R -->|no agent needed| D["Answer directly"] R -->|needs data or an action| T["Call a tool"] A --> Resp["Reply, shaped by Configuration"] D --> Resp T --> Resp ``` When a user sends a message, one of three things happens: the message is answered directly, the conversation is handed off to one of your **agents** (an order-status agent, a billing agent, a demo-booking agent, etc.), or a **tool** is called. The primary input is: - **Each agent's Trigger** - the natural-language description at the top of every agent's profile that says *when* the agent should activate ("When the user wants to book or schedule a test ride…"). Routing reads every Trigger and picks the best match. For simple bots with clearly distinct Triggers, that's all you need - agent routing works out of the box. You can *optionally* add **Routing Logic rules** (plain-English overrides like "If the user mentions billing or refunds, hand off to `@billing-agent`") when you want a deterministic override on top of trigger-based routing. Tools work the same way: any tool can be called directly, using each tool's description as a routing signal. Attach a tool to a specific agent when it belongs to that agent's job - that also helps routing. ## Where to find each surface in the studio | Want to… | Go to | |---|---| | Edit Configuration (project-level - applies to all your agents) | **AI Agent → Configuration** | | Add or edit agents | **AI Agent → Agents** | | Manage shared snippets | **AI Agent → Global Components** | | Build a custom widget | **AI Agent → Widget Builder** | | Test your agent | **AI Trust Centre** (top-level menu item) | ## A typical build flow If you're starting fresh, work in this order: 1. **Set up Configuration** - project-level persona, identity, welcome, fallback that apply to every agent. ([guide](configuration/index.md)) 2. **Create an agent** for each distinct task (order status, demo booking, billing) - conversational or guided. ([guide](agents/create.md)) 3. **Write Routing Logic rules** when you want a topic to *always* route to a specific agent. ([guide](configuration/routing-logic.md)) 4. **Add tools** to whichever agents need them. 5. **Test interactively** in the Playground (▶ on each agent), then **regression-test** with datasets in the AI Trust Centre. ([guide](../test-debug/index.md)) 6. **Build widgets** if you need custom UI. ([guide](../widget-builder/index.md)) 7. **Deploy** - connect your agent to channels (web, WhatsApp, voice, …) and publish it. ([Channels & Deploy](../channelConfiguration/overview.md)) 8. **Monitor** - track conversations, performance, and quality once it's live. ([Analytics](../analyze/analyseintro.md)) Steps 1-6 live in **Harness**; deploy and monitor are handled by the sibling **Channels & Deploy** and **Analytics** products - the build → test → deploy → monitor lifecycle spans the product rail, not just this section. ```mermaid flowchart LR B["Build(Harness)"] --> T["Test(AI Trust Centre)"] T --> D["Deploy(Channels & Deploy)"] D --> Mo["Monitor(Analytics)"] Mo -. insights .-> B ``` ## What the Nexus engine does for you These are the platform-enforced behaviours you get out of the box, on top of the specialised-agents + shared-Configuration + tools model. | Area | Nexus change | Why it matters | |---|---|---| | **Routing** | Two-stage LLM call - a small **Context Expert** picks the agent from each agent's **Trigger description** only, then a **Conversation Agent** runs that agent's instructions + tools. | Faster routing (smaller Stage 1 model), narrower Stage 2 prompt, fewer wrong-tool calls. | | **Continuity** | The platform enforces a fixed continuity rule every turn - keep on the same agent unless the user has clearly switched topics. | Fewer mid-flow drop-offs without writing defensive "stay here" logic. | | **Numbered steps** | If your **Agent instructions** list `Step 1: / Step 2: …`, the platform auto-injects sequential-execution rules: one step per turn, with step progress tracked automatically. | Multi-step procedures stay on track without per-flow boilerplate. | | **Parent-child agent triggers** | A parent agent can call a child agent: the platform snapshots the parent's state, runs the child, and auto-restores the parent when the child completes. **1 level deep.** | Reusable sub-tasks (verify identity, capture payment) callable from any parent without writing return logic. | | **Conversation history** | Once history exceeds ~15 messages / ~10K characters, older turns are automatically summarised; the last 2 user turns stay verbatim. | Long support conversations don't blow context; recent turns stay verbatim. | | **Tool failure** | Platform rule: don't retry the same tool. Return the error as the tool result so the LLM phrases a recovery message. | Predictable failure UX; no silent retries. | | **Execution trace** | Every turn stores a structured `executionTrace` - tool calls + results, memory writes, intent classifications, the Context Expert decision. | Testing lab and Copilot Debug share one underlying record. A buggy production conversation becomes a regression test in one click. | | **Routing Logic surface** | New sub-page under Configuration (**Configuration → Routing logic**) where you write *optional* plain-English rules ("if billing → @billing-agent"). | Deterministic handoff when you want it; routing falls back to each agent's Trigger when you don't. | | **Widget Builder** | New top-level surface for designing custom in-conversation UI (forms, pickers, multi-step wizards). | Custom UI without channel-specific code. | | **AI Trust Centre** | New top-level menu - Testing lab + Evaluators & Rules (Quality / Safety scoring with thresholds). | Durable regression coverage and automated scoring. | | **Versioned configuration** | Every Configuration change is versioned with history. | Roll back; review behaviour shifts over time. | | **`@`-mentions in prompts** | Type `@` in any prompt field to insert a live reference to an agent, workflow, tool, or rich-media item. Chips stay linked through renames. | Prompts don't go stale when you rename a target. | | **Welcome / Fallback options** | Welcome supports Instruct, Send message, or any welcome workflow you've defined (each workflow shows up as its own option). Fallback supports Instruct + a retry count for validation failures. | Cleaner UX; workflows attach as options instead of via a generic "Trigger a flow" item. | ## Best practices - **Start small.** Just your Configuration with no extra agents is a perfectly good starting point. Add agents only when you have clearly separable tasks. - **Name agents by the task they own.** `order-status-agent`, `demo-booking-agent`, `billing-agent` beat `agent2`. Sharp names lead to sharp routing. - **Don't build a "general" agent.** A general-purpose agent is a sign routing isn't doing its job. Keep each agent focused on one task. - **Write rules in plain English, then test.** It's easier to refine wording after seeing how routing interprets it than to engineer a perfect rule upfront. - **Use Global Components for anything you copy more than once.** Policy text, brand voice instructions, common disclaimers - define once, reuse. - **Test before every release.** Even small wording changes to identity or rules can shift behavior. Regression-test with a saved dataset before you ship. Continue to: **[Configuration](configuration/index.md)**. --- ## Nexus Edge Tools Nexus Edge tools run **on the end-user's desktop** via the NexusEdge desktop client, not in the cloud. When the agent calls an edge tool the runtime sends a request down the chat stream to the desktop, which executes the tool locally (file access, printers, browsers, system APIs) and posts the result back. ## Who it's for Builders deploying Nexus agents on the NexusEdge desktop client — IT helpdesk, device support, and any use-case where the agent needs to interact with hardware or the local machine. ## Tool types: read-only vs. mutating Every edge tool is classified as either **read-only** or **mutating** in its definition. | Type | Examples | Widget behaviour | |---|---|---| | **Read-only** | Get printers, Print queue, System info | Runs immediately, no prompt | | **Mutating** | Cancel print job, Restart spooler, Set default printer | Shows an **Allow / Deny** gate before running | You can see the classification in **Tools → Add Tool → Nexus EDGE → Device**: mutating tools are labelled "Mutating — requires user Allow" in the picker. ## Approval gate for mutating tools When the agent calls a mutating edge tool, the widget pauses and shows the user an **Allow / Deny** prompt. This gives the user explicit control over actions that change state on their machine. How the timing works: 1. **Server starts a 10-minute decision window.** The LLM turn is paused — the user can take their time. 2. **User clicks Allow.** The widget sends `edge.tool.approved` immediately. The server resets the timer to the tool's normal execution timeout (typically a few seconds), so deliberation time does not count against the tool run. 3. **User clicks Deny.** The tool resolves with a denial error and the agent continues the conversation. 4. **No response within 10 min.** The tool times out and the agent continues with a `tool_timeout` error. If a user needs more than 10 minutes to decide (e.g. they stepped away), they can ask the agent to retry — the agent will issue a new tool call and restart the gate. ## Parallel dispatch When an LLM turn calls multiple edge tools at once, the runtime sends **all tool-call events to the desktop simultaneously** (fan-out), then waits for all results in parallel. Previously tools were dispatched one-by-one. Practical effect: a turn that calls three read-only tools (printers + print queue + spooler health) now takes as long as the slowest single tool instead of the sum of all three. ## Printer test page The `printer.testPrint` edge tool generates a diagnostic test page. As of this release it sends **plain text** (rendered via `texttopdf → cups-raster`) instead of PostScript. This ensures compatibility with AirPrint-only printers (Brother, some HP models) that do not declare PostScript support in their PPD and previously silently rejected the `.ps` file. ## Screenshots --- ## Escalation tools - Escalate to Agent & Transfer Call When your agent can't resolve a request, it should hand off to a human cleanly. Nexus ships two purpose-built escalation tools: - **Escalate to Agent** - for chat conversations. Routes the user to a human agent in Inbox. - **Transfer Call** - for voice conversations. Forwards the call to a human agent or SIP extension. Configure both in **AI Agent → Tools → Add Tool**. ## Why have a dedicated escalation tool? You *could* trigger a workflow that does the handoff. But a dedicated tool gets you: - A **standardized config** for collecting customer info before handoff. - **Priority and assignment rules** built in. - A **clear LLM contract** - the agent knows "this is the escalation path", not "one of seven workflows that might do something escalation-shaped." Use the dedicated tool unless you have a very specific reason not to. --- ## Escalate to Agent (chat) This is the right tool when the user asks for a human, the agent recognizes a complex case it can't solve, or a Routing Logic rule sends them to support. ### Step 1: Add the tool **AI Agent → Tools → Add Tool → Escalate to Agent**. The drawer opens with **Settings**, **Chat Escalation**, and **Test** tabs. ### Step 2: Settings - name and description Name: something like `escalateToSupport`, `transferToBilling`, or `talkToHuman`. Description: tell the LLM exactly when to call this. Example: > "Hand the conversation to a human support agent. Use this when the user explicitly asks for a human, when you've failed to resolve their issue after two attempts, or when they express strong frustration. Do not use this for billing questions - use the **escalateToBilling** tool instead." ### Step 3: Chat Escalation tab This is where you configure the handoff itself. #### Priority and assignment | Setting | Purpose | |---|---| | **Default priority** | `low`, `medium`, or `high`. Sets the ticket priority on creation. | | **Queue ID** | The Inbox queue this escalation lands in. | | **Tags** | Tags applied to the resulting ticket - useful for routing and reporting. | | **Assignment strategy** | `round-robin`, `least-busy`, or `specific-group`. How the ticket is assigned. | | **Assign to group** | The specific Inbox group when strategy is `specific-group`. | **Best practices:** - Set **priority** based on the *trigger*, not on optimism. Frustrated users escalating after multiple failed attempts are usually `high` - not `medium` "to be safe." - **Use specific-group** assignment for domain escalations (billing → billing group, technical → tier-2 engineering). Round-robin works for general support. - **Tag every escalation tool distinctly.** Reporting later (e.g. "how often does the bot fail at billing?") is impossible without good tags. #### Pre-handoff data collection | Setting | Effect | |---|---| | **Collect name** | Agent asks for the user's name before escalating (if not already known). | | **Collect mobile** | Same for mobile number. | | **Collect email** | Same for email. | | **Require reason** | The agent must capture *why* the user is escalating before handing off. | | **Require summary** | The agent generates a short summary of the conversation for the human to read. | The human agent in Inbox sees this info immediately on pickup - no "what's going on?" first message. **Best practices:** - **Always require summary.** Saves the human agent 30 seconds per ticket. Multiplied over a year, that's hours. - **Only collect contact info when needed.** If the user is already authenticated and you have their email, don't ask again. The agent should be aware of session context. - **Require reason for non-obvious escalations.** "User asked for a human" is enough context. "User is frustrated about \" needs a reason. #### Custom fields Add structured fields the agent should collect before escalating. Each custom field has: - **Name** (e.g. `orderId`) - **Type** (`string`, `number`, `boolean`) - **Description** (LLM uses this to know what to ask for) - **Required** (yes/no) Use this for domain-specific data: order ID for shipping issues, account ID for billing, error code for technical bugs. #### Escalation message The message shown to the user *as the handoff happens*. Default is something neutral like "Connecting you to an agent now…". Customize it for tone or to set expectations ("A specialist will join in under two minutes…"). ![Chat Escalation tab on an Escalate to Agent tool - Message to user, User details toggles (Name, Mobile number, Email), and the Context for the agent section (What the user wants, Conversation summary)](https://cdn.yellowmessenger.com/docs/v3/tool-chat-escalation-tab.png) ### Step 4: Test The Test tab simulates the escalation. You won't actually create a real ticket - you'll see the structured payload that *would* be created and any prompts the agent would say. ### Step 5: Wire it in Most teams want escalation to be deterministic, not at the LLM's discretion. Add a Routing Logic rule: > "If the user asks for a human agent, says 'agent' or 'human', or expresses strong frustration (e.g. 'this is unacceptable', 'I want to speak to someone'), call the **escalateToSupport** tool immediately. Do not try to resolve the issue first." --- ## Transfer Call (voice) For voice channels - when the user is on a call and needs a human. ### Step 1: Add the tool **AI Agent → Tools → Add Tool → Transfer Call**. The drawer opens with **Settings**, **Voice Transfer**, and **Test** tabs. ### Step 2: Settings Name: `transferToHuman`, `transferToBillingAgent`, or similar. Description: explicit, like in the chat case. The LLM uses this to decide. ### Step 3: Voice Transfer tab #### Action type Pick one: | Action | What it does | |---|---| | **Forward call** | Forward the call to a phone number (PSTN). | | **SIP transfer** | Transfer via SIP to an internal extension. | Forward is the right default. Use SIP when integrating with on-premise PBX or specialist routing systems. #### Forward call settings - **Forward number** - the destination phone number. - **Caller line identity** - what the caller ID shows on the receiving end (typically the user's number, sometimes your own). #### SIP transfer settings - **SIP extension** - the SIP URI to transfer to. - **Custom SIP headers** - key/value pairs for SIP-level metadata (e.g. customer ID, conversation summary). Custom headers are how you pass conversation context into your contact-center stack so the receiving agent has it on pickup. #### Recording action What happens to the call recording when the transfer fires: | Action | Meaning | |---|---| | **Continue** | Keep recording through the human portion. Default for compliance setups. | | **Pause** | Pause recording during the human portion (resume after). | | **Stop** | End recording at transfer. | Pick based on your privacy/compliance posture. When in doubt, talk to legal. #### Announcement A spoken message played to the user *just before* the transfer ("Connecting you now…"). Customize the wording and tone - voice users notice handoff awkwardness more than chat users. ### Step 4: Test The Test tab simulates the transfer - you'll see the call-control instructions that would fire. ### Step 5: Wire it in Same pattern as chat - add a Routing Logic rule for explicit triggers: > "If the user says 'agent', 'human', 'representative', or asks to speak to someone, call the **transferToHuman** tool immediately." --- ## Best practices for both - **Always have an escalation tool.** A bot with no escape hatch is a bad bot. - **Make escalation deterministic with Routing Logic.** Don't leave "user asked for a human" up to the LLM's interpretation. - **Collect just enough info upfront.** Saves human agent time, but don't grill the user with five questions before handing off - frustration goes up. - **Tag escalations precisely.** Reporting on "where does the bot fail?" depends on good tags. - **Test the path.** Walk through an escalation end-to-end yourself in the **Playground** (▶ on any agent). The first time you actually try it shouldn't be in production. - **Voice and chat behave differently.** Don't assume what's right for chat is right for voice. Voice users are less patient with announcements and pre-handoff questions. ## Common pitfalls | Symptom | Likely cause | |---|---| | Bot escalates too eagerly | Description is too broad, or no Routing Logic rule defines the trigger. Tighten both. | | Bot never escalates | LLM doesn't see the trigger. Add a Routing Logic rule and use words real users say ("human", "agent", "representative"). | | Human agent has no context on pickup | "Require summary" not enabled, or no tags on the escalation. Fix both. | | Wrong queue / group | Assignment strategy or queue ID is misconfigured. Test in non-prod first. | | Voice transfer drops the call | SIP headers / forward number formatting issue. Test against your PBX before going live. | ## Legacy reference The legacy [Transfer to live agent](../../../platform_concepts/AIAgent/transfer-live-agent.md) doc covers escalation on the legacy platform. Nexus's Escalate to Agent tool is the equivalent and adds richer config. --- ## Tools - Overview **Tools** are the actions your agent can take in the real world: run a workflow, search a knowledge base, escalate to a human, or transfer a call. Without tools, your agent can only talk. With tools, it can *do*. This section walks you through every tool type that's live today, when to use each, and how to configure them. ## Where to find tools In your bot, go to **AI Agent → Tools**. You'll land on the Tools list page - one place that shows every tool defined for this bot. From here you can: - **See every tool** at a glance, with its type, name, and description. - **Filter by type** (Workflow, Knowledge Base, Escalate to Agent, Transfer Call, API, Skill, Function). - **Add a new tool** via the **Add Tool** button. - **Edit a tool** by clicking its row - the configuration drawer opens on the right. The page paginates 50 tools at a time. Searching by name works as you'd expect. ![AI Agent → Tools page showing two existing tools - Escalate to agent and a knowledge-base tool - with the Create tool button in the top right](https://cdn.yellowmessenger.com/assets/image-1778842501569.jpg) ## What tool types are available today? Click **Add Tool** and you'll see a picker with three categories: ### Core Built-in (live now) | Tool | What it does | |---|---| | **Workflow** | Connect to an existing workflow you've built in the visual flow editor. Run multi-step business logic, integrations, or backend work. | | **Knowledge Base** | Let your agent answer from documents and FAQs. Configurable confidence threshold, filters, history context, and result formatting. | | **Escalate to Agent** | Route the chat to a human agent in Inbox. Optionally collect name/email/phone first, set priority, assign to a group. | | **Transfer Call** | Forward an in-progress voice call to a human agent or SIP extension. | ### Custom & MCP (coming soon) - **Connect MCP Server** - connect any custom data source or API via Model Context Protocol. - **HTTP Webhook** - trigger an external REST endpoint. - **Custom Function** - write a JS snippet for the LLM to execute. ### Integrations (coming soon) - **Slack**, **PostgreSQL**, **Google Calendar**. Coming-soon tools render in the picker but aren't clickable yet. ## Anatomy of a tool Every tool - regardless of type - has the same top-level shape: | Field | Why it matters | |---|---| | **Name** | What you (and the LLM) refer to the tool as. | | **Description** | A plain-English explanation of what the tool does. The LLM reads this to decide *when to call the tool*. This is the single most important field on the page. | | **Type** | The execution type (Workflow, Knowledge Base, etc.). Set when you create the tool; not changed afterwards. | | **Input schema** | The arguments the tool expects. The LLM extracts these from the conversation. | | **Output schema** | The shape the tool returns. The agent reads these values to continue the conversation. | | **Type-specific config** | Workflow target, KB filters, escalation rules, transfer settings - depending on type. | ### Why description is the most important field The LLM doesn't read your code. It reads your tool's name and description and decides whether to call it. A vague description gets you vague behavior: > ❌ "Check stuff." A precise description gets you reliable behavior: > ✅ "Look up an order's status by order ID. Returns the current shipment state, tracking number, and ETA. Use this when the user asks about an order they've already placed - not for new orders." The same trap applies to the **name + description together** - a goal-shaped name and a description that restates the name teach the LLM nothing: > ❌ Name `bookAppointment` · Description "Book an appointment." State plainly what each input and output means, and *when* to call it: > ✅ Name `bookAppointment` · Description "Reserve an open slot for the user. Needs the service type and a preferred date; returns the confirmed slot and a booking reference. Call this only after the user has chosen a date - use `@AppointmentDateValidator` first to confirm it's available." Spend time on tool descriptions. It pays off every conversation. ## Tabs you'll see in the configuration drawer When you open or create a tool, the right-side drawer shows several tabs depending on the type: | Tab | When you'll see it | Purpose | |---|---|---| | **Settings** | Always | Name, description, input/output schema. | | **Actions** | Workflow tools | Pick the target workflow. | | **KB Config** | Knowledge Base tools | Confidence, filters, history, result formatting. | | **Chat Escalation** | Escalate to Agent | Priority, assignment, fields to collect. | | **Voice Transfer** | Transfer Call | Forward number, SIP, recording behavior. | | **Mocks** | Workflow tools | Stub responses for testing without firing the real workflow. | | **Test** | Always | Run the tool with sample inputs, see the output. | Always **Test** before saving. The Test tab lets you call the tool with sample arguments and inspect what comes back - saves you a debugging round-trip later. ![Tool config drawer for an Escalate to Agent tool, showing the Settings tab (Tool name, Description) with Chat Escalation and Test tabs alongside. The exact tab set depends on the tool type](https://cdn.yellowmessenger.com/docs/v3/tool-config-escalate.png) ## A typical "add a tool" workflow 1. Open **AI Agent → Tools**. 2. Click **Add Tool**. 3. Pick the tool type. 4. Fill in **Name** and **Description**. Be specific about *when* the LLM should call this tool. 5. Configure the type-specific tab (target workflow, KB settings, escalation rules, etc.). 6. Define the **input schema** (what arguments the tool needs). 7. Open the **Test** tab and run the tool against a sample input. Confirm it returns what you expect. 8. Save. 9. The tool is now available to any agent in this bot. It is picked up automatically based on its name and description. ## How agents pick a tool Each agent sees the list of tools available to it, plus each tool's name, description, and input schema. When a user message arrives: 1. Decides whether *any* tool fits. 2. If yes, picks the best-fit tool by description. 3. Extracts the required input arguments from the conversation. 4. Calls the tool. 5. Reads the output and continues the conversation. You influence step 1-3 with **descriptions** and **routing logic**. You influence step 4-5 with **input/output schema design**. ## Referencing tools in prompts When you mention a tool in an agent's instructions, how you phrase it matters. The model takes your wording literally. **Name tools by their goal, then reference them by that name.** A goal-shaped `@` reference tells the model what the tool is for at the point of use. Opaque names force it to guess. > ❌ `@wf1`, `@process2`, `@handler_final` > ✅ `@PhoneNumberValidator`, `@AppointmentDateValidator` **Say "call" the tool - not "execute" or "run" it.** "Call" is the action the model performs; "execute"/"run" reads as prose and is easier to ignore. > ❌ "Execute @FetchOrderDetails to get the order." > ✅ "Call `@FetchOrderDetails` with the order ID." **Rich media and quick replies are tool calls, not descriptions.** Don't ask the model to "display" cards or "show" quick replies in prose - it'll narrate the intent instead of firing the tool. Name the tool and call it. > ❌ "Display the pending items using `@cards-pending-orders`." > ✅ "Call `@cards-pending-orders` to show the pending orders." > ❌ "Show quick replies asking the user to pick a delivery slot." > ✅ "Call `@quick_replies` and ask 'Pick a delivery slot.' with options: Morning / Evening." ## Best practices (high-level) These apply to every tool type. Type-specific tips live on their own pages. - **Write descriptions for the LLM, not for humans.** "What does this tool do, and when should you call it?" - answer both, in plain English, in the description. - **Keep input schemas minimal.** Every input you ask for is one more thing the LLM has to extract correctly. Cut fields that aren't actually needed. - **Test every tool in isolation** before wiring it into routing logic. - **Name tools consistently.** `getOrderStatus`, `updateAddress`, `escalateToBilling` - verb-first, scoped to the domain. Avoid `tool1`, `helper`, etc. - **Use Routing Logic to make critical handoffs deterministic.** "If the user mentions billing, call the `getInvoice` tool" beats hoping the LLM figures it out. - **One tool, one job.** A tool that does five things is harder for the LLM to use correctly than five focused tools. ## Read next - **[Workflow tool](workflows.md)** - connect a flow as a tool. - **[Knowledge Base tool](knowledge-base.md)** - answer from documents and FAQs. - **[Escalation tools](escalation.md)** - Escalate to Agent (chat) and Transfer Call (voice). - **[Best Practices](../../best-practices/tools.md)** - patterns that consistently produce good agents. --- ## Knowledge Base tool The **Knowledge Base tool** lets your agent answer from your documents and FAQs. When the user asks a question your KB can answer, the agent searches it, picks the best matches, and composes a reply grounded in the source content. This is the right tool whenever the answer lives in content you've already authored - policies, product docs, internal wikis, FAQs. Ask the [Nexus AI Layer](../../ai-layer/index.md) to index a website or document set into your knowledge base - and to check why a specific question isn't matching once it's indexed. ## Before you start Make sure your knowledge base actually has content. Upload your documents and FAQs in the Knowledge Hub before connecting the KB tool. The tool searches whatever's there at runtime. ## Step 1: Add the tool In your bot, go to **AI Agent → Tools → Add Tool → Knowledge Base**. The configuration drawer opens with three tabs: **Settings**, **KB Config**, and **Test**. ## Step 2: Settings - name and description Like every tool, KB tools start with **Name** and **Description**. Good description: > "Search Acme's product documentation and FAQs. Use this for any product feature question, troubleshooting, pricing tier comparison, or how-to. Do not use this for billing or order-status questions - those have dedicated tools." The LLM reads this to decide when to fire the KB lookup vs another tool. Be explicit about both *when to use it* and *when not to*. ## Step 3: KB Config - the meaningful settings Switch to the **KB Config** tab. This is where most of the work lives. ### Filters Restrict the search to a subset of your KB: - **Tags** - only search documents tagged with any of these. - **Source** - only search documents from a specific source/connector. - **Document IDs** - pin to a specific list of documents. Use filters to scope a tool to a domain. If you have separate KB tools for "Product Docs" and "Internal Policies", give each its own tag filter so the LLM doesn't pull policy text into a product answer. **Tip:** the **`_inputOverrides`** option lets you decide whether each filter is set by the LLM at runtime (`source: "llm"`) or fixed in the config (`source: "fixed"`). Fix filters when you want guaranteed scoping; let the LLM decide when scoping depends on the user's question. ### Confidence and result tuning | Setting | What it does | Typical value | |---|---|---| | **Confidence** | The minimum match score (0-1) for a result to be used. Below this, results are dropped. | 0.6-0.8 | | **Search size** | How many top results to retrieve from the KB. | 5-10 | | **Results per document** | Cap on how many chunks to use from a single document - prevents one big doc from drowning out others. | 1-3 | **Best practices:** - **Don't crank confidence to 0.9+.** You'll get fewer hits and the agent will say "I don't know" too often. Start at 0.6, raise it only if you're seeing irrelevant matches. - **More search results ≠ better answers.** 5 well-chosen chunks beats 20 noisy ones. - **`Results per document` = 1-3** is usually right. Higher only when your docs have very long sections that genuinely span multiple ideas. ### Result formatting | Setting | Effect | |---|---| | **Show links** | Include source links in the agent's reply (so the user can read the full doc). | | **Show page numbers** | Include page numbers for PDFs / paginated sources. | | **Show confidence** | Display the match score next to each citation. | | **Rich media** | Render images / videos / formatted blocks pulled from the source. | Show links when your audience benefits from reading the source themselves (B2B support, technical docs). Hide them when you want a clean conversational reply (consumer chat, voice). ### Conversation history | Setting | Effect | |---|---| | **Use conversation history** | Pass prior turns into the KB query so context-dependent questions ("and what about the Pro tier?") work. | | **History turns** | How many prior turns to include. | Turn this on for any conversational KB tool. Without it, follow-up questions fall flat. ### Result instructions The **result instructions** field is a freeform prompt fragment that tells the LLM how to use the search results. Examples: - "Always cite the document title in your reply." - "If the user asks about pricing, also mention that pricing tiers are subject to annual contract changes." - "Keep replies under three sentences unless the user asks for detail." This is your hook for shaping the answer style without rewriting your bot's identity. ### Cached answers (advanced) The **Use cached answers** option hits a v2 endpoint with caching enabled. If a pre-computed answer above the confidence threshold exists, it's sent to the user directly - skipping the LLM composition step. This is faster and cheaper but less flexible. Turn it on for high-volume FAQ bots where a known canonical answer is what you want. Leave it off when you want the LLM to phrase the answer in context. ![KB Config tab on a Knowledge Base tool, showing the Search query hint, Filter by tags / Filter by source toggles, Match strictness selector (Loose / Balanced / Strict), and Max results / Per document controls](https://cdn.yellowmessenger.com/docs/v3/tool-kb-config.png) ## Step 4: Define input schema KB tools have a fixed input shape - typically just `{ query: string }`. You can edit the **query description** to bias what the LLM extracts: > "The user's natural-language question, rephrased into a clear, standalone search query." This nudges the LLM to clean up vague questions before searching. ## Step 5: Test before saving Switch to the **Test** tab. Provide a sample query (think of a real user question). Run it. You'll see: - The retrieved chunks with their confidence scores. - The composed reply. - Whether the cached-answer path fired (if enabled). Try several queries - including obvious ones, edge cases, and things you *know* aren't in your KB (the agent should say it doesn't know, not hallucinate). ## Step 6: Save Click **Save**. The KB tool is now available to any agent in this bot. ## Step 7: Tell the agent when to use it KB tools can be invoked implicitly (the LLM picks them up via the description) or explicitly (Routing Logic). For high-quality bots, do both: - Write a clear description that mentions the domain ("product features", "troubleshooting", "pricing"). - Add a Routing Logic rule that names the trigger explicitly: > "If the user asks about product features, troubleshooting, or how to use a feature, you must use the **product-docs-search** tool before composing a reply. Do not answer from memory." ## Best practices - **One KB tool per domain.** Separate "Product Docs" from "Internal Policies" from "FAQs" with different tag filters. Cleaner, more predictable. - **Tune confidence with real queries.** Sit down with a list of 30 representative questions and adjust until precision is high without dropping too many. - **Always enable conversation history** for chat agents. Voice agents may want to skip it for latency. - **Don't expose internal-only docs.** A KB tool with no filter sees everything. Be careful what's in your KB. - **Cite sources when it helps users.** "According to the [Pro Plan docs](#)…" is more trustworthy than an unsourced statement. - **Use cached answers for stable FAQs only.** Anything that changes (pricing, policies, hours) should go through the LLM path. ## Common pitfalls | Symptom | Likely cause | |---|---| | Agent says "I don't know" too often | Confidence threshold too high, or your KB doesn't actually have content for these questions. | | Agent hallucinates facts | Confidence too low (low-quality matches still pass), or no KB tool wired so it answers from memory. | | Wrong-domain results | No filter on the tool. Add tag/source filters to scope it. | | Follow-up questions fall flat | "Use conversation history" is off. Turn it on. | | Slow replies | Search size too high, or rich media is rendering large assets. Trim. | ## Legacy reference The legacy [KB agent config](../../../platform_concepts/AIAgent/kb-agent-config.md) doc describes a related legacy concept (KB *agent*, an entity rather than a tool). Nexus uses the KB *tool* described above - same underlying retrieval, different configuration surface. --- ## Workflow tool A **workflow tool** is a workflow you've built, attached to an agent so it can call it. Whenever an agent needs to *do* something multi-step - hit an external API, read or write a database, branch on data, run business logic - you build that as a workflow and attach the workflow directly as a tool. There's **no separate "tool" object to author and no schema to hand-write**: the workflow's **input variables** are the tool's inputs, its **Output node** is what the agent reads back, and its **name** plus the **"When should the AI use this workflow?"** description tell the agent when to call it. ## Two kinds of workflow When you click **Create** on the Workflows page, you pick one of two kinds. They're built and attached the same way - the difference is what they return: | Type | Returns | Use it for | |---|---|---| | **Workflow** | Data / a result the agent reads | Logic the agent calls as a tool - an API call, a database lookup, a record update, a calculation. | | **Rich media workflow** | **Rich media** - cards, carousels, quick replies, or [widgets](../../widget-builder/index.md) | A *visual* reply the agent shows in chat - a product carousel, an order-status card, quick-reply chips. | Most of this page is about the first kind; rich media workflows get their own [section below](#rich-media-workflows) and their own **Rich media workflows** tab on the Workflows page. ## When to use a workflow tool Use one when: - The agent needs to hit an external API or database (order lookup, CRM update, catalogue read, payment). - The action takes multiple steps, or branches on data. - You want the LLM to *decide when* to act, but the action itself should be deterministic. - You want to reuse the same logic across several agents. Reach for something else when: - You just want to answer from documents - use the [Knowledge Base tool](knowledge-base.md). - You want to hand off to a human - use [Escalation tools](escalation.md). - A fixed, multi-step procedure must run the same way every time as part of a longer journey - consider a [guided agent](../guided-agents/index.md). ## Step 1: Build the workflow In **Studio → Build → Flows**, build the workflow you want the agent to call. A workflow used as a tool typically: - Receives **input variables** at the start - these are the arguments the agent fills when it calls the tool. - Does its work (API calls, database reads/writes, conditional branches). - **Ends with an Output node** that returns a value - Success/Failure plus the data the agent should read. Any workflow can be attached as a tool - there's no special "agent-callable" flag. But workflows meant for agent use should be small, focused, and have a clear input → output contract. ### Send Message nodes still deliver text bubbles The "Output node ends the workflow" pattern is canonical, but **Send Message nodes** placed inside a workflow are also delivered to the user. The runtime captures their text bubbles and pushes them through alongside (or instead of) the Output node payload. - **Use the Output node** for the canonical structured result and anything the agent needs to *read* downstream. (For replies built *from* cards or quick replies, use a [rich media workflow](#rich-media-workflows) instead.) - **Use Send Message nodes** for one-off text bubbles the workflow wants to render directly - common in "informational" workflows that don't return a value the agent should branch on. **Gotcha - don't populate rich-media in both.** If your Output node already returns cards or quick replies, do *not* also emit them from a Send Message node - the runtime ignores rich-media in the Send Message stream to avoid double-emit. Text-only Send Message bubbles always deliver. ## Step 2: Name it and say when the AI should use it Open the workflow's **Edit workflow** dialog and set the two fields that become the tool's contract for the agent: - **Workflow name** - verb-first and task-shaped: `getOrderStatus`, `getBikeDetails`, `bookAppointment`. The agent references it by this name (e.g. `@getOrderStatus`). - **When should the AI use this workflow?** - the description the agent reads to decide *whether* to call it. **This is the highest-leverage field on the page.** Say what the workflow returns and exactly when to call it (and when not): > ✅ "Returns an order's current shipment status by order ID - state (in_transit / delivered), tracking number, and ETA. Use it when the user asks about an order they've already placed; not for new orders or returns." > ❌ "Order tool." / "Call this when order data is needed." The studio warns you about this in the field itself: *vague descriptions cause the workflow to be skipped or run at the wrong time.* See [why the description is the most important field](index.md#why-description-is-the-most-important-field). There's **no separate input/output schema to author.** The workflow's **input variables** are the arguments the agent extracts and fills, and its **Output node** is what the agent reads back. So: - **Name input variables clearly and describe them.** "The customer's order ID" beats a bare `orderId` - the agent reads the variable to know what to extract. - **Keep the input list short.** Every input is one more thing the agent has to get right. - **Return exactly what the agent needs** from the Output node, in a clear shape - nothing more. ## Step 3: Attach it to an agent On the agent's profile, under **Reasoning & Actions → Tools**, click **+ Add tool** and pick your workflow. That's the whole attach step - the agent can now call it, deciding *when* from the "When should the AI use this workflow?" text you wrote. Attach the same workflow to as many agents as need it - **tools are shared across the bot.** Attaching a workflow to a specific agent also signals "this belongs to that agent's job," which helps routing send the right topics there. ## Step 4: Test it Before you rely on the tool: 1. **Run the workflow in the flow editor** with sample inputs and confirm the Output node returns what you expect - wrong field, missing data, or an unexpected shape is much easier to catch here than in a live chat. 2. **Open the agent's [Playground](../../test-debug/index.md)** and confirm the agent calls the workflow at the right moment and reads its result correctly. Use **View trace** on the reply to see the call, the arguments it passed, and the data that came back. ## Step 5 (optional): Make it deterministic with Routing Logic If this workflow *must* fire for certain user messages (not "the LLM might call it"), add a Routing Logic rule. Example: > "If the user asks about an order's status, you must call the **getOrderStatus** tool before composing a reply. Do not answer from memory." See [Routing Logic](../configuration/routing-logic.md). ## Rich media workflows A **rich media workflow** returns a *visual* reply - cards, carousels, quick replies, or [widgets](../../widget-builder/index.md) - that the agent shows directly in the chat, instead of data the agent reads. Create one with **Create → Rich media workflow** on the Workflows page; they live under the **Rich media workflows** tab. You build, name, describe (**"When should the AI use this workflow?"**), and attach a rich media workflow exactly like a regular one (Steps 1-3) - the only difference is that it returns rich media. Pick the **card type** that matches your data; the editor's "View format" hint shows the exact JSON shape (both array-of-cards and single-object shapes are supported): | Card type | What it renders | |---|---| | **Default card** | Generic card (title, subtitle, image, buttons). Accepts an array of card objects. The default when you turn on Cards. | | **Transaction Status** | Single transaction status card (success / failure / pending icon, amount, ref). | | **Order Tracker** | Multi-step delivery / order timeline. | | **Contact Card** | Name, phone, email, optional avatar - typically "your account manager is…" patterns. | | **Payment Receipt** | Itemised receipt with totals and merchant info. | | **Account Details** | Compact account summary card. | | **List** | A vertical list of items with title / subtitle / optional action - different shape from a carousel of Default cards. | | **Slider** | Range / value slider card for numeric input. | | **Product Card** | E-commerce product (image, name, price, CTA). | | **Payment List With Button** / **Without Button** | Itemised payment list with or without the pay-CTA at the bottom. | | **Transaction List With Multi Select** / **Single Select** | A list of transactions the user can pick from. | Pick **Default card** for a standard carousel; pick a specialised type when its native shape matches your data and you want type-specific styling and validation. Leaving the card type unset is equivalent to **Default card**. **How the agent uses it:** - **It's a tool call, not a description.** Reference it in instructions by name, *as a call* - *"Call `@display_cart` to show the cart"*, not *"display the cart"* - otherwise the model narrates the intent instead of rendering the media. See [Referencing tools in prompts](index.md#referencing-tools-in-prompts). - **For custom interactive UI** beyond the built-in card types (forms, multi-step pickers, calculators), build a [widget](../../widget-builder/index.md) and return it from a rich media workflow. ## Best practices - **One workflow, one tool.** Don't build a single mega-workflow that branches on a "mode" argument - the LLM will pick the wrong mode. Build separate, focused workflows. - **Keep workflows fast.** A tool call adds latency to the conversation. Aim for under ~2 seconds end-to-end; cache where you can. - **Always handle the Failure path.** Make sure the workflow has a Failure output and that its payload tells the agent what went wrong, so the agent can recover or apologise gracefully instead of stalling. - **Write "When should the AI use this workflow?" for the model, not for yourself.** Answer "what does it return, and when should you call it?" in plain language. Someone will tweak this bot in six months - make it self-explanatory. - **Name input variables clearly.** They *are* the tool's input contract; clear names and descriptions are what let the agent fill them correctly. ## Common pitfalls | Symptom | Likely cause | |---|---| | Agent calls the workflow with missing/empty inputs | Input variables aren't clearly named or described, or the "When should the AI use this workflow?" text doesn't make the required inputs obvious. | | Agent never calls the workflow | The description doesn't match how users actually phrase things. Reword it, or add a Routing Logic rule. | | Workflow fires but the agent ignores the result | The Output node doesn't return the data the agent needs, or returns it in a confusing shape. | | Workflow fires twice in one turn | Two workflows' descriptions overlap. Sharpen each so its trigger is distinct. | ## Legacy reference The legacy [Call workflow](../../../platform_concepts/AIAgent/call-workflow.md) doc covers similar ground for legacy-platform bots. On Nexus you attach a workflow directly as a tool as shown above; the underlying concept (a workflow the agent can call) is unchanged. --- ## Deploy chatbot using the GTM integration This document provides instructions for deploying a web bot on your website, if it is integrated with Google Tag Manager (GTM). ## Setup chatbot on the website using GTM integration To set up a chatbot using GTM integration, follow the steps outlined below: ### Create a Tag 1. Login to your [Google Tag Messenger](https://tagmanager.google.com/) and create an account. 2. Navigate to [Google Tag Messenger](https://tagmanager.google.com/) account and select the container you want to configure. ![](https://i.imgur.com/cBk3SEF.png) 3. Click **Tags** > **New**. ![](https://i.imgur.com/gRoavVU.png) 4. Choose the **Custom HTML** tag type. ![](https://i.imgur.com/VWWpOHQ.png) 5. Copy the below script and paste it under the **Custom HTML** tag. ```js ``` :::note In the above script, you need to update the "Bot ID" and appended regions - r0/r1/r2/r3/r4/r5. ::: | Region Code | Region | Host | | --- | --- | --- | | R0 | INDIA - India | `https://cloud.yellow.ai` | | R1 | MEA - UAE North | `https://r1.cloud.yellow.ai`| | R2 | JAKARTA | `https://r2.cloud.yellow.ai` | | R3 | SINGAPORE | `https://r3.cloud.yellow.ai` | | R4 | USA | `https://r4.cloud.yellow.ai` | | R5 | EUROPE | `https://r5.cloud.yellow.ai` | ![](https://i.imgur.com/js6hlPz.png) 6. Click **Save** to change the configuration changes. ### Create a Trigger To control when the chatbot loads on your website, you need to define when to load the bot on your website with a trigger. To create a Trigger, follow these steps: 1. Click **Trigger** > **New**. ![](https://i.imgur.com/EazLj3W.png) 2. Choose the trigger type as **Page view**. ![](https://i.imgur.com/xvsZy9d.png) 3. In the Page view section, select **Some page views**. ![](https://i.imgur.com/bCDpc9N.png) 4. In the *Trigger configuration*, under "Page view," perform the following: i. In *This trigger fires on*, select **Some Page Views**. ![](https://i.imgur.com/bCDpc9N.png) ii. In *Fire this event when an event occurs and all of these conditions are true* section, select **Page URL** and **Contains** from the drop-down and enter the URL of your website page. * Click **Save**. ![](https://i.imgur.com/AMZgwDt.png) A reference to your trigger associated with the tag will be displayed. ![](https://i.imgur.com/fOA0ymB.png) 5. On top of the menu bar, click **Preview**. ![](https://i.imgur.com/6dL1joJ.png) 6. Enter your website URL and click **Connect**. ![](https://i.imgur.com/SvfTC79.png) 7. Enter the URL of your site to connect your chatbot, and click **Connect**. This will redirect to your website, and the Tag Assistant will be connected. Open the chatbot to start the conversation. ![](https://i.imgur.com/bAGSAgE.jpg) --- ## IVR for cloud :::note All the Voice agents created after July 2022 operate on the cloud. Refer to [this](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/ivr-bots) article for the latest update. ::: Interactive Voice Response (IVR) channel can be deployed and hosted in a cloud environment. Configuring IVR voice agents on the cloud allows businesses to deliver an efficient and personalised customer experience. While building voice agents, you need to link the voice agent to a phone number so that when users call this number, they can have a conversation with the voice agent. Once you have built the personalized voice agent, you need to connect your voice agent with a number to enable interactive voice responses. This IVR number is also termed as DID (direct inward dailing) number. :::note - The associated number will be used for making (an outbound) call or receiving (an inbound) call. - This is a paid feature. You need to upgrade to enterprise subscription to access this feature. To enable this feature for your voice agent, contact [support](mailto:support@yellow.ai). - Phone numbers are a limited resource and are leased from downstream providers at a monthly cost. Ensure that only the required phone numbers are being added to the voice agent. ::: ## Add IVR number To add a IVR number, follow these steps: 1. Log in to https://cloud.yellow.ai and navigate to **Overview > Channels > Voice > IVR** channel. ![](https://i.imgur.com/gIRvJsF.png) 2. Verify the voice agent is selected in the required environment on the channels page to which you want to associate a number. Click **+Add IVR Number**. ![](https://i.imgur.com/5Jqqt7b.png) 3. Select the voice agent **Region** and assign one or more **IVR number** based on your use case. There could be different types of numbers, like landline or mobile, available for association. Select the number(s) as per the requirements. Click **Add**. 4. Click **Yes, proceed**. :::note Currently, only Karnataka (India) Phone numbers are available, other countries will be added soon. ::: 5. The IVR numbers will be successfully added. ![](https://i.imgur.com/uuT89by.png) ## Delete IVR number To delete an IVR number, follow these steps: 1. Click the delete icon next to the number that you want to delete. ![](https://i.imgur.com/1PgnbR0.png) 2. A pop-up is displayed with a confirmation message **Do you really want to delete? This process cannot be undone**, click **Delete**. :::note * Reclaiming a deleted number is a highly challenging and manual process. Ensure the details before removing a phone number from your Bot. ::: 3. The IVR number will be successfully deleted. --- ## SMS :::note * If businesses wish to set up the SMS channel in a specific country, you need to contact the Yellow [support](mailto:support@yellow.ai) team for assistance and guidance. However, if they prefer to set up SMS channel for USA, you need to utilize the [Twilio SMS channel](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/twilio-sms) for seamless integration and management. * For pricing details, contact [procurement](mailto:procurement@yellow.ai). ::: SMS (Short Message Service) is a messaging channel that allows you to send image and text messages to users through their registered phone numbers. Connecting the SMS channel to the Yellow.ai Cloud platform enables the following: * **One-way conversations**: Send campaigns * **Two-way conversations**: Automated responses and live agent support 1. **[Send campaigns](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/outbound-campaigns/run-campaign#31-sms-campaign)**: Through SMS, you can send campaigns to inform users about discounts, sales, or special offers. * **One-way conversation**: Supports one-way communication where only the sender shares information and recipients cannot respond. These messages include promotional offers, transactional updates, alerts, or notifications. 2. **Automated replies and live agent support**: Enables automatic responses to user messages received via SMS and provides immediate assistance with live agents. * **Two-way conversation**: Supports two-way communication, allowing both sender and recipient to exchange conversations. These messages can include messages such as live agent support, automated replies, order tracking, or feedback. 3. **Supported message types**: You can use Text message type to send the SMS. :::note To send SMS using one-way or two-way communication depends on the regulations, guidelines, or requirements set by each country. ::: #### Limitations of SMS channel | Option | Character limit | --------|------------------| Text message | 160 characters ## Segment in SMS channel A segment is a part of a text message limited to a specific number of characters, typically 160 characters in standard 7-bit encoding. In the context of SMS messaging, particularly in the GSM (Global System for Mobile Communications) standard, an SMS segment consists of up to 160 characters when using standard 7-bit encoding. **Key points about SMS Segments:** * **Character limit:** Each segment can contain up to 160 characters (7-bit encoding) or 70 characters (Unicode). * **Concatenated SMS:** When a message exceeds the character limit of a single segment, it is split into multiple segments. These segments are sent individually and then reassembled by the recipient’s device to display as a single message. Some operators may send it as a single message without splitting. - Each concatenated segment usually contains a few characters less than the maximum (for example, 153 characters for 7-bit encoding) to include information for reassembly. * **Cost implications:** Each segment counts as a separate SMS for billing, so longer messages are more expensive. **Example of SMS segmentation** * **Single segment message:** - **Message**: "Hello, this is a test message to explain SMS segmentation". - **Character count**: 59 characters. - **Segments used**: 1 (fits within the 160-character limit). * **Multi-segment message:** - **Message**: "Hello, this is a test message to explain SMS segmentation. Each part of the message must fit within the character limit. If the message exceeds the limit, it will be split into multiple segments." - **Character count**: 197 characters. - **Segments used**: 2 * **Segment 1**: "Hello, this is a test message to explain SMS segmentation. Each part of the message must fit within the character limit. If the message exceeds the limit, it will be split i" (153 characters) * **Segment 2**: "nto multiple segments." (44 characters) You can configure SMS services for the following countries: * [Configure SMS service for Indian numbers](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/sms-outbound-india) --- ## Create WhatsApp bot This document provides details on the best practises and limitations that you need to follow while creating the WhatsApp (WA) bot. For more information on WA limitations, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/whatsapp-channel#limitations-of-whatsapp-channel). ## Create a flow for WhatsApp bot Before creating a flow for the WhatsApp bot, you need to consider the following points: * Determine the purpose and scope of the bot (use case) to create a flow for a WhatsApp bot, like what type of questions or requests the bot should handle based on your use case. * Select the appropriate environment for flow creation. The following are the bot environments: * Two environments - Develpoment and Live * Three environments - Sandbox, Staging, and Production * If a flow is configured and published in a specific environment, it will not respond to queries in other environments. * If your bot has 3 environments such as sandbox, staging, and production, you need to use sandbox bot for building the chatbot or making changes in existing flows. Once you are done with creating the flows, you can publish the bot from the sandbox to staging. * Include intents for common questions or requests that align with your conversation flow, aiding in proper training of the bot to identify user intent. * Use WhatsApp nodes such as [WhatsApp quick replies](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/quick-replies), [WhatsApp list](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/whatsapp-list-node), and [prompt carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/carousrel-node) to enhance the flow's functionality. ### Using WhatsApp nodes #### **Prompt carousel node** The WA bot will respond with a number list even if the buttons are configured in the quick reply node. In this case, you can use the [prompt carousel](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/carousrel-node) node instead of quick reply to display the buttons in the bot response. ##### **Limitations of prompt carousel** * Supports a single carousel card. * Supports a maximum of 3 buttons. * The maximum number of characters supported is 1024. * Carousel button - The maximum number of characters supported is 20. #### **Quick reply node** ##### **Best Practices** * To know more about how to use the WA quick reply node, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/quick-replies). * You can trigger a flow when a user clicks on the quick reply option on WhatsApp. For more information, click [here](https://docs.yellow.ai/docs/cookbooks/studio/qr-node). * To add a quick reply button, you need to switch the channel filter to Website. Eventually, if you try to add a button in the WA channel filter, then the add button option will be disabled. * If you want to delete a quick reply node, you have to switch to Website from the channels filter and then delete the buttons. :::note Using Quick Replies, you cannot add a message with a CTA in WA. It is recommended to use a WhatsApp template and pass the link as a CTA. ::: ##### **Configure Dynamic WA quick reply and Dynamic WA list message** * For more information on how to create dynamic quick replies, click [here](https://docs.yellow.ai/docs/cookbooks/studio/dynamic-quickreplies). ##### **Pass data to quick reply buttons and title using variable** * You can also pass the data to the quick reply buttons and title using the variable. Use the following code to pass the data: `{{{variables.info}}}, {{{variables.info1}}}` For more information on how to create a variable, to store, and retrieve data from variables, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/bot-variables#31-create-a-variable-via-nodes). ##### **Limitations of Quick reply** * The WhatsApp quick reply supports a maximum of 3 buttons and 20 characters per button. If more than 3 buttons are added, it defaults to a numbered list. * If a quick reply button exceeds 20 characters, the message containing that button will not display while the bot is reacting. #### **WhatsApp list** * To know more about how to use the WA list node, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/prompt-node-overview/quick-replies). #### **WA list options** #### **Limitations** * A maximum of 10 buttons can be added. Multiple buttons cannot be selected at once and are not supported in notifications. * The character limit for the body is 1024. * The character limit for the footer is 60. * The character limit for button text and response is 24. #### **Limitations of supported media types** | Options | Limit | |---------------------|-----------------| | Image type | Supported image types are JPG and PNG. | Image size | Supported image size is 5MB. | Image diemensions | Supported image dimension is 250*250. | Video type | Supported video type is MP4. | Video size | Supported video size is 15MB. | Video dimensions | No restrictions. | File size | Supports any valid MIME type up to 15 MB in size. ### WhatsApp template A WhatsApp template is a predefined message format that is used to send outbound messages to your users on the WhatsApp messaging platform. It is designed to enable businesses to send structured and consistent messages to your users. For more information on the template and guidelines, click [here](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/templates/whatsapptemplate). After creating the template, it must be submitted for Facebook review. Usually, the review process takes up to 48 hours. The template will be accepted if it meets Facebook's rules. :::note To view the status of the template approval, you need to click on the **Sync template** button. ![](https://i.imgur.com/5iO2AK8.png) ::: For more information on how to execute a campaign, click [here](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/outbound-campaigns/run-campaign#33-whatsapp-campaign). For more information on how to trigger a flow when a user clicks on a quick reply option on WhatsApp, click [here](https://docs.yellow.ai/docs/cookbooks/studio/qr-node). ### Quality rating of a WA template When you are executing a WhatsApp campaign, you need to use a template, and if users block or report the number or template, then the quality rating of the template or the number will reduce. If the quality rating of the number is marked as flagged for more than 7 consecutive days, the messaging limit will be reduced to the immediate lower tier. For example, 100000 to 10000 or 10000 to 1000. To ensure that the quality rating does not become low, click [here](https://developers.facebook.com/docs/whatsapp/messaging-limits/). To view the quality rating of the template and phone numbers, follow these steps: 1. Login to your Facebook business manager account and select **Account tools > Message templates**. ![](https://i.imgur.com/GT46xg4.png) 2. To view the quality rating of phone numbers, click **Account tools > Phone numbers**. ![](https://i.imgur.com/GF76rL8.png) ## Set up a WhatsApp channel To set up a WhatsApp channel, you need to have an active WhatsApp business account. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/whatsapp-configuration). ### Apply for official business account Once your account is set up, you need to apply WA for an official business account. To apply for an official business account, follow these steps: 1. Login to your Facebook business manager account and select **Accounts > WhatsApp accounts**. ![](https://i.imgur.com/yXUdLYI.png) 2. Under *Account* tools, select **Phone Number** and click on the **Setting** icon. ![](https://i.imgur.com/DVeJfDp.png) 3. Under *Phone numbers*, select **Profile** > click **Submit Request** to apply for the official business account. ![](https://i.imgur.com/RG8eAHO.png) Once you apply for an official business account, you need to verify your business account with Facebook. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/whatsapp-configuration#12-verify-business-account-with-facebook). ### Change WA display picture and description After setting up your WA channel, you can change the display picture and description. To change the display picture and description, follow these steps: 1. On the WA channel page, click on the icon highlighted below and click **Edit**. ![](https://imgur.com/bpukhiK.png) 2. Under **Basic details**, you can edit the display picture and description based on your requirements. ![](https://i.imgur.com/GpOkqLl.png) :::note * You cannot change the display name on the platform. To change the display name, you have to go to the Facebook business manager account. ::: ### Change WA display name If your WhatsApp Official Business Account (OBA) or non-OBA display name encounters initial rejection during the embedded sign-up process or needs to be changed in the future, you need to reapply from your own FBM. You need to follow the [WhatsApp business account guidelines](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/whatsapp-business-account-guidelines) before applying or changing the display name for your business. To change the WhatsApp OBA (with a green tick mark) or non-OBA display name, follow these steps: 1. Login to your Facebook business manager account and navigate to **Accounts > WhatsApp accounts** > **WhatsApp Manager**. ![](https://i.imgur.com/ck9gziG.png) 2. Select **Phone numbers**. ![](https://i.imgur.com/ifaxupp.jpg) 3. To check the approval status of your display name, click **View** corresponding to the display name. 3. For non-OBA, under *Name*, click **Edit** icon to change the display name. ![](https://i.imgur.com/oQfYgzR.png) 4. Enter the **New display name** and click **Next**. ![](https://i.imgur.com/IJ4cviE.png) 5. To confirm the approval status of your display name, click **View** corresponding to the display name. 6. For OBA, navigate to [Facebook's direct support](https://business.facebook.com/direct-support/?business_id=1333020976800454) and raise a ticket to update the OBA display name. ![](https://i.imgur.com/yY4vQ31.png) * To verify the approval status of your display name, click **View** corresponding to the display name or check your ticket. Once the display name is approved, share the WABA ID, phone number, and new display name details with our [support](mailto:support@yellow.ai) team so that they can update it in the back-end. ### Apply for your WhatsApp Official Business Account To apply for an Official Business Account (OBA) and secure a green tick mark for your business on WhatsApp, follow these steps: 1. Login to your Facebook business manager account and navigate to **Accounts > WhatsApp accounts** > **WhatsApp Manager**. ![](https://i.imgur.com/ck9gziG.png) 2. Select **Phone numbers**. ![](https://i.imgur.com/ifaxupp.jpg) 3. Click **Settings**. ![](https://i.imgur.com/keQSipr.png) 4. Click **Profile** > under *Official business account* > **Submit request**. ![](https://i.imgur.com/86vdKoj.png) 5. Enter the following details in the respective field: * **Country of operation**: Enter the name of your parent business or brand. * **Supporting links**: You have the option to submit up to 5 supporting links, particularly from well-known publications such as India Today, Economic Times, Wall Street Journal, Reuters, Wikipedia, and Business Insider. * Click **Submit**. ![](https://i.imgur.com/ewNLX6H.png) Once your account is reviewed, you will be notified about the status of your OBA. If your account is rejected, you can submit a new request after 30 days. ## Test your WhatsApp bot After successfully creating your WhatsApp business account and configuring the flow, you need to select the **WhatsApp** channel from the **Channels** filter to test your bot and ensure all the flows you configured are working as intended. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/whatsapp-configuration#test-your-bot-on-whatsapp). ![](https://i.imgur.com/9MBMVC6.png) ### Add WhatsApp number for testing You can add the WhatsApp number for testing purposes in the Live environment. :::note You can test the WA bot in staging and sandbox environments by enabling **Development mode**. The numbers that you have added for testing purposes will respond with the Staging/Sandbox configured flows. ::: 1. On the **Channels** page, select WhatsApp messenger in the Live environment, click on the **More options** icon, and select **Edit** icon. ![](https://imgur.com/bpukhiK.png) 3. **Enable development mode** using the toggle button. 4. Enter the number in **Developer WhatsApp number**. 5. To add more WhatsApp business numbers, click **Add phone numbers**. 6. Click **Save**. ### 24-hour WhatsApp policy If a live agent connects with the WhatsApp bot user and does not close the ticket within 24 hours of the last message sent by the user, the chat will be automatically disabled under the **Chats** section > **Bot messages** of the Inbox module. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/chats/reinitiatewachats#expchats). To upgrade your WhatsApp tier and messaging limit, click [here](https://developers.facebook.com/docs/whatsapp/api/rate-limits#quality-rating-and-messaging-limits). --- ## Common errors while sending WhatsApp messages When sending messages via WhatsApp, you may encounter errors that prevent successful delivery. This guide outlines common error messages, their descriptions, and possible resolutions. ## WhatsApp error codes and resolutions | **Error Code** | **Error Message** | **Description** | **Resolution** | |--------------|----------------|---------------|--------------| | **4** | Sending failed because you sent too many messages too quickly. | You reached your API call rate limit. | Try again later. If the issue persists, contact the [Meta Help Center](https://www.facebook.com/business/help). | | **80007** | Sending failed because you reached your rate limit. | You reached your WhatsApp messaging rate limit for your plan. | Try again later or upgrade to a plan with a higher limit. | | **130429** | Sending failed because you reached the maximum number of messages allowed within a period. | Cloud API message throughput has been reached. | Reduce message frequency or upgrade to a plan with higher limits. | | **131048** | Sending failed because too many previous messages were blocked or flagged as spam. | Restrictions have been applied due to multiple blocked or flagged messages. | Reduce message frequency to avoid spam flagging. | | **131056** | Sending failed because you sent too many messages to the same recipient too quickly. | Too many messages were sent to the same recipient in a short time. | Wait before retrying. You can message a different recipient immediately. | | **368** | Sending failed because your account may be blocked temporarily for policy violations. | Your WhatsApp Business Account has been restricted due to a policy violation. | Review [Meta's Policy Enforcement](https://www.facebook.com/business/help) and contact Meta if needed. | | **131031** | Sending failed because your account may be locked temporarily. | Your WhatsApp Business Account has been restricted due to policy violations or unverifiable data. | Verify your account and ensure compliance with Meta's policies. Contact Meta if needed. | | **2** | Sending failed due to an unavailable service. | Temporary server downtime or high traffic. | Try again later. | | **131000** | Sending failed due to a technical glitch. | An unknown error occurred. | Try again later. If the issue persists, contact Meta. | | **131016** | Sending failed due to a technical glitch. | Internal server error while sending the message. | Try again later. If the issue persists, contact Meta. | | **131021** | Sending failed because the sender's and recipient's phone numbers are identical. | The sender phone number is the same as the recipient's. | Use a different recipient number. | | **131026** | Sending failed due to issues with the recipient’s phone number or WhatsApp account. | The recipient’s number is invalid, they use an outdated WhatsApp version, or they have not accepted WhatsApp's latest Terms of Service. | Ask the recipient to: 1. Confirm they can send a message to your WhatsApp business number. 2. Accept WhatsApp’s latest Terms of Service. 3. Update to the latest WhatsApp version. 4. Wait and try again if due to frequency capping. | | **131042** | Sending failed due to issues with your WhatsApp account settings or payment method. | Possible causes: unattached payment account, exceeded credit limit, inactive payment account, timezone or currency issues, or exceeding free-tier conversations without a valid payment method. | Review your account settings and payment method. Contact Meta if needed. | | **131047** | Sending failed because the recipient has not responded in a while. | More than 24 hours have passed since the recipient last replied to your sender number. | Restart the conversation by sending a new message template. | | **131052** | Sending failed due to an unsupported media type. | The media type is not supported. | Ensure you are using a supported media type. Contact Meta for supported formats. | | **132001** | Sending failed because the template is not approved by Meta in this language. | The template does not exist in the specified language or is not approved. | Use an approved template. | | **132007** | Sending failed because the template content violates a WhatsApp policy. | The template violates a policy (e.g., incorrect format, character limitations). | Modify the template to comply with Meta’s policies. Contact Meta if needed. | | **132015** | Sending failed because Meta has paused this template. | Templates with a low-quality rating have been paused. | Edit and improve the template quality before resending. | | **133004** | Sending failed due to an unavailable service. | A technical issue occurred. | Try again later. If the issue persists, contact Meta. | --- ## Checking message errors on the portal 1. You can view these errors in the **Data/Messages API** on yellow.ai portal. 2. Use the following API to retrieve message details for a specific phone number. This API call fetches message logs related to the given phone number. - Search for the failed message in the response. - Check the **error message description** to understand the issue and find the resolution. ``` https://app.yellow.ai/api/agents/data/messages?bot={{{botid}}}&uid={{{phonenumber}}}&limit=100 ``` :::info If the issue persists, refer to the resolution steps above or contact the [Meta Help Center](https://www.facebook.com/business/help) for further assistance. ::: --- ## WhatsApp messaging limits and quality rating This guide helps you understand WhatsApp’s messaging limits, current limits and ratings, and how to increase your messaging level. ## Messaging limits WhatsApp imposes limits on the number of messages a business can send to users, and this is categorized into different tiers based on the volume of messages sent. To learn more about messaging limits, click [here](https://developers.facebook.com/docs/whatsapp/messaging-limits). There are four levels of messaging limits in a rolling 24-hour period: * Tier 1: 1,000 unique customers per day * Tier 2: 10,000 unique customers per day * Tier 3: 100,000 unique customers per day * Tier 4: Unlimited messages :::note * All the above messaging limits are business initiated messages. * Every business account starts at tier 1 after registering a phone number. * It takes at least 7 days to reach unlimited messaging. ::: ## How to increase the messaging limits The messaging limits on WhatsApp are designed to automatically adjust based on the quality and volume of messages sent to users. To increase messaging limits on your number, consider the following conditions: * **Phone number quality**: Ensure that the quality of your phone number is not low, as this can impact your eligibility for a limit increase. * **Messaging volume**: Over a 7-day period, the number of messages sent should be at least twice the number of unique customers supported in the current messaging limit. * **Threshold**: The phone number must consistently operate within the current messaging limit for at least 48 hours. Once the business reaches this threshold, its limits are automatically increased. Let's consider an example to illustrate the tiered structure of WhatsApp messaging limits: Assume that you're using a marketing platform with tiered plans based on the number of users you can reach. Currently, you are in Tier 1, where the limit is 1,000 unique users per 24 hours. Over the course of a 7-day period, if you consistently engaged with more than 2,000 users and maintain a positive engagement rate, WhatsApp will automatically upgrade you to tier 2. In Tier 2, your limit increases to 10,000 users per 24-hour period. Once your account reaches the threshold, the system automatically promotes you to the next tier. The transition period takes at least 48 hours, during which you must send your weekly limit or daily limit of messages for minimum two days. ## Quality rating Quality rating on WhatsApp is an evaluation of how messages have been received by recipients over the past seven days. It is determined by analyzing a combination of quality signals, which include user feedback signals like recent blocks, the reasons users provide when they block a business, and other reporting issues. :::note * If your quality rating reaches low, your account status will change to flagged or restricted, and you will receive an email notification in Business Manager as a warning. ::: ### Quality rating status There are 3 different quality ratings: * High quality: Green * Medium quality: Yellow * Low quality: Red ### Phone number status When the quality rating decreases, the phone number status undergoes the following changes: * **Connected**: Indicates that your phone number is operating correctly and is successfully linked to your account, establishing a connection with the WhatsApp Business API environment. * **Flagged**: Indicates when the quality rating reaches a low state. If the phone number is marked as flagged for more than 7 consecutive days, the messaging limit will be reduced to the immediate lower tier. * **Restricted**: Indicates that the number has reached the [messaging limit](#messaging-limits). During a restricted phase, you cannot send any notification messages until the 24-hour window is reset. * **Pending**: Indicates that your account is awaiting verification, the certificate is currently unavailable, or the phone number is currently linked to another WhatsApp account. * **Offline**: Indicates that your business name has been confirmed, a certificate is available to connect to the WhatsApp Business API, but there is currently no active connection. In the *Status* column, you can verify the current status of your sender phone number. ![](https://i.imgur.com/aXcZSOV.png) ### How to check quality rating You can check your phone number status, quality score, and sending limits for your WhatsApp Business account in your Facebook Business account. #### To check quality rating, follow these steps: 1. Login to your Facebook business manager account and navigate to **Accounts > WhatsApp accounts** > **WhatsApp Manager**. ![](https://i.imgur.com/ck9gziG.png) 2. Select **Phone numbers**. ![](https://i.imgur.com/ifaxupp.jpg) 3. In the Quality rating column, you can view the rating. ![](https://i.imgur.com/4BNPEUq.png) ### How to improve quality rating If your quality rating is low, WhatsApp will automatically reduce your business initiate conversation limit and also you cannot change or request for change to your quality rating. It is recommended to follow WhatsApp's guidelines to maintain high quality. To improve quality rating on WhatsApp, consider the following points: * **Adhere to WhatsApp Business Policy**: Ensure that your message templates comply with WhatsApp's business policy. * **Opt-in messages only**: Send messages only to users who have explicitly opted in to receive communications from your business. Avoid messaging users who have not provided consent. * **Clarity and personalization**: Make sure your messages are clear, personalized, and useful to users. Avoid sending open-ended welcome or introductory messages. * **Messaging frequency**: Be cautious about the frequency of your messages. Avoid sending users too many templates a day. * **Review recent templates**: Check for new templates sent within the last 7 days. This practice can help to identify and rectify any issues with specific templates that might be affecting your quality rating. --- ## WhatsApp pricing policy # WhatsApp Pricing Model (June 2025 Update) Meta has introduced a **new per-message pricing model** for WhatsApp Business Platform and APIs. This marks a significant shift from the previous **per-conversation** billing model. ## Key Changes (Effective July 1, 2025) * **Billing & Pricing** * Conversations → **Messages** * Business-initiated → **Paid messages** * User-initiated → **Free messages** * Referral-initiated → **Deprecated** [Learn more about WhatsApp pricing policy](https://developers.facebook.com/docs/whatsapp/updates-to-pricing/). * **Analytics & Reporting** * `conversation_analytics` field **deprecated in Graph API v25.0 (late 2025)** * All new metrics will be **message-based** * Historical conversation data must be **exported before cutoff** * **Template Management** * Utility templates must meet a **stricter, non-promotional definition** * Expect possible **re-categorization notices** from WhatsApp --- ## Changes required from Service Provider ### 1. Billing and Cost Management * Update all **pricing calculations** from conversation-based to per-message billing. * Review and update **contracts and SLAs** to reflect per-message pricing. * Adapt billing systems to account for **free service/utility messages**. ### 2. Template Management * Audit and **re-categorize templates**. * Ensure **utility templates** remain non-promotional and user-specific. * Prepare for re-categorization enforcement by WhatsApp. ### 3. Reporting & Analytics * Shift dashboards from **conversation-based IDs** → **message-based IDs**. * Educate **finance and analytics teams** about the new KPIs. * Maintain **parallel logic** for transition until old data is phased out. ## Pricing Model Comparison | **Feature/Aspect** | **Before July 1, 2025** | **After July 1, 2025** | | ----------------------------------- | ------------------------------------ | ------------------------------------------- | | **Pricing Model** | Per-conversation (24h session) | Per-message | | **Utility Template Messages (CSW)** | Charged if outside free tier | Free if sent within customer service window | | **Service Conversations** | Free up to 1,000/month, then charged | Unlimited free | | **Volume Tiers** | Not available | Available for utility & authentication | | **Template Category Definition** | Broader definition | Stricter (non-promotional, user-specific) | | **Webhook/Analytics Fields** | Conversation-based IDs (`CBP`) | Message-based IDs (`PMP`) | | **Authentication Rates** | Per conversation, limited markets | Per message, expanded to more markets | | **Marketing Messages Lite API** | Conversation-based rates | Cloud API marketing rates apply | 📌 **Glossary** * **CBP** = Conversation-Based Pricing * **PMP** = Per-Message Pricing * **CSW** = Customer Service Window --- ## Transition Guidance * Export all **conversation analytics data** you may need before **Graph API v25.0** is released. * Expect **non-comparability** between pre-July 1 (CBP) and post-July 1 (PMP) data. * During migration, maintain **dual tracking** of CBP and PMP to ensure continuity in dashboards and billing reports. ## Benefits of Per-Message Pricing * **Simpler billing** – charges directly tied to message volume. * **Unlimited free service messaging** within CSW. * **Expanded global coverage** for authentication messages. * **Volume discounts** available for high-utility use cases. ## Action Checklist ✅ * [ ] Update billing logic to per-message model. * [ ] Export historical conversation analytics. * [ ] Re-categorize existing templates. * [ ] Update reporting dashboards and train teams. * [ ] Review customer contracts for new billing rules. :::note ⚠️ **Important:** After **July 1, 2025**, WhatsApp **will no longer support conversation-based pricing, analytics, or referral categories**. ::: ### Old vs. New WhatsApp Pricing Model | Scenario | Old Model (Conversation-based) | New Model (Per-message) | | ------------------------------------------------------------------ | ------------------------------------------------- | --------------------------------------- | | **Two messages, same category** (e.g., 2 utility) | 1 Utility conversation | 2 Utility messages | | **Two messages, different categories** (e.g., marketing + utility) | 1 Marketing conversation + 1 Utility conversation | 1 Marketing message + 1 Utility message | | **Single mixed message** (utility + marketing content) | 1 Marketing conversation | 1 Marketing message | --- ### What this means for businesses * **More transparency:** Costs now scale directly with the volume and type of messages sent. * **Granular control:** Marketing and utility spends can be tracked and optimized separately. * **Budget predictability:** Teams can forecast spend with higher accuracy, especially for large-scale campaigns. * **Operational shift:** Businesses may need to rethink engagement strategies to avoid unnecessary message sends that could increase costs. --- ## Apple Business Chat Apple Business Chat (ABC) is a messaging app (iOS) that allows you to chat with your businesses through the Messages app on their Apple devices. You can send text, images, videos, files, and attachments with text captions for the businesses to address user queries related to the brand. The platform supports 2-way communication for ABC channel. Apple Business Chat integration helps businesses to provide customer support, promote their brand, and schedule appointments. For instance, if you have a question about a product, you can use the AI-agent integrated with the ABC channel to receive instant assistance without having to connect with an agent. In this article, you will learn: * [How to setup messages for Business account](#setup-your-abc-channel) * [How to connect messages for business with Yellow.ai](#connect-abc-channel-to-your-bot) * [How to test your AI-agent on ABC](#test-your-bot-on-abc) ## Setup your ABC channel You can create a message for business account by using the [Apple business register](https://register.apple.com/business/ui/services/welcome) website. #### Prerequisite * You need to [create an Apple ID](https://appleid.apple.com/account). ### Step 1: Setup messages for Business account To setup messages for Business account, follow these steps: 1. Go to [Apple business register](https://register.apple.com/business/ui/services/welcome) and click **Sign In**. ![](https://i.imgur.com/DBovY2B.png) 2. Enter your Apple ID to continue. 3. Enable the checkbox to agree to the terms and conditions, and click **Agree** to create your business chat account. ### Step 2: Create a message for business account To create messages for business account, follow these steps: 1. Click on **Get started** to create a Business account. ![](https://i.imgur.com/hfDBLF1.png) 2. Perform the following actions to add Messages for Business Account and Messaging for Business Service Providers for your organization: i. In **Messages**, click **+ Add** corresponding to **Messages for business accounts** and **Messaging service providers**. ii. In **Settings**, click **+ Add** corresponding to **Private Access Tokens Issuers**. iii. In **Apple Business Register**, click **+ Add** corresponding to **Brands** and **Members**. iv. Click **Done**. ![](https://i.imgur.com/oT8iqjc.png) 3. Choose **Messages for Business Accounts**. ![](https://i.imgur.com/1bZgLYw.png) 4. Select the checkbox to **Agree terms and conditions** of Apple and click **Agree** to create **Messages for Business Accounts**. ![](https://i.imgur.com/taQYkPa.png) 5. Click **+ Add New** to create a Business Chat account for your brand. For more information, see [Create a commercial business chat account](https://register.apple.com/resources/messages/messaging-documentation/register-your-acct#create-a-commercial-business-chat-account). ![](https://i.imgur.com/GBS7PgO.png) ### Step 3: Register your messages for business service 1. Click **Get Started** to register your Messages for business service. ![](https://i.imgur.com/FGqiZB7.png) 2. Enable the checkboxes to agree on the design guidelines, business policies, and best practises, then click **Next**. ![](https://i.imgur.com/rSFyY6m.png) 3. Enter the following details about your organization and click **Next**. * **Legal Name of Organization**: Enter the display name of your brand. * **Website**: Enter the web URL of your brand. * **Head Office Address**: Enter the head office's address of your organisation. ![](https://i.imgur.com/m9dq6D2.png) ### Step 4: Commercial account A commercial account is used to directly interact with your customers. To create a commercial account, follow these steps: 1. Select the business chat account type as **Commercial account** and click **Next**. ![](https://i.imgur.com/ergfy0w.png) 2. Enter the technical contact user name and sponsoring executive (this field is optional) for your account and click **Next**. ![](https://i.imgur.com/9fFDmbX.png) 3. Select the number of public locations for your business. If your business has only one location accessible to the public, than select One Public Location and enter your location information. ![](https://i.imgur.com/51JWnF3.png) 4. Click **Next** to proceed. ### Step 5: Provide your brand information card details You need to create a brand if your business has multiple locations or an online business. 1. You can either add a new brand or select an existing one. For new brands, you need to enter the brand details and click **Add**. ![](https://i.imgur.com/voNYkFW.png) 2. Select your time zone and estimated timeline for a live agent to respond to your customers during office hours, and click **Next**. ![](https://i.imgur.com/ALby6AL.png) ### Step 6: Add your brand identity details To add your brand identity details, follow these steps: 1. Upload a square logo, you will see it in the conversation list. Click **Next**. ![](https://i.imgur.com/FJX5N8K.png) :::note The square logo should have a full color background, and it cannot be personal or product pictures. ::: 2. Verify your logo’s appearance in both dark and light mode previews. Select the checkboxes and click **Next**. ![](https://i.imgur.com/2ytqErD.png) 3. Add a wide logo, which will be shown at the top of the conversation. Click **Next**. ![](https://i.imgur.com/1gNvN8b.png) :::note The wide logo should have a transparent background and text. ::: 4. Verify the appearance of the logo in both dark and light mode previews and click **Next**. ![](https://i.imgur.com/MekHpyP.png) 5. Verify the color and logo in both dark and light mode previews. Select the checkboxes and click **Next**. ![](https://i.imgur.com/h0GoqOT.png) ### Step 7: Confiure Messaging service provider 1. Select your Messaging Service Provider (MSP) as **Yellow.ai** or provide your MSP's URL. Click **Next** to continue. ![](https://i.imgur.com/crIGdhJ.png) ### Step 8: Ready to launch After configuring your Message Business account, you need to contact the [support](mailto:support@yellow.ai) team to get your account reviewed by Apple. 1. Configure your iOS entry points. Once your business chat buttons are publicly available, go to the [Apple Business Register](https://register.apple.com/business/ui/services/welcome) to enable your business. For more information, click [here](https://register.apple.com/resources/messages/messaging-documentation/customer-journey#entry-points). 2. Configure the business chat button on your website and app. For more information, click [here](https://register.apple.com/resources/messages/messaging-documentation/chat-with-customers#adding-a-messages-button-to-your-website). 3. Click **Send for Review** to submit your request for Apple to review your account. Apple will review your account to verify if it meets the standards for customer interaction. ![](https://i.imgur.com/f3ONF8T.png) 4. Once you submit your profile, a confirmation message is displayed, as shown in the below screenshot. • If you do not have any alerts, the status area on the profile page shows that Your request has been sent and is being reviewed by Apple. ![](https://i.imgur.com/vf85uwR.png) :::note * If you have any alerts, you need to fix them before you submit your profile for review. * The approval process may take 1 or 2 business days. ::: 5. Once your account is reviewed by Apple, it will be in an online state. ![](https://i.imgur.com/cj7EaPf.png) 6. Click on your account, expand the **Links** drop-down, and **Copy ID** to connect your bot. ![](https://i.imgur.com/q8NqHRO.jpg) ## Connect ABC channel to your bot To connect ABC channel to your bot on the platform, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/TnUYi24.png) 2. Click **Channels** > **Messaging** > **Apple Business Chat**. ![](https://imgur.com/BBrF6k6.png) 3. Enter the **Business ID** that you have copied from the Messages for Business Account and click **Save**. ![](https://imgur.com/09RfDtY.png) 4. Navigate to the **Overview** page, under the **Active channels** section, you can see that the ABC channel is successfully connected to your bot. ![](https://imgur.com/y1xWDhN.png) ## Test your bot on ABC After connecting your bot to the ABC channel, you can test your bot. #### Prerequisites * Ensure that you have created the bot with intents and configured the flows with the same intent. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/createfirstbot). * To test your bot on ABC, you need to **Copy Conversational link** from the Messages for Business Account. ![](https://i.imgur.com/6HSI0cR.jpg) To test your bot on ABC, follow these steps: 1. Paste the conversational link that you have copied from the Messages for Business Account in the address bar and click enter. ![](https://i.imgur.com/qbYYmrM.png) 2. Enable the checkbox and click **Open Messages**. ![](https://i.imgur.com/k6IKY4r.png) 3. Start the conversation to test your bot. ![](https://i.imgur.com/U6XYBKz.png) --- ## Alexa Integrating Amazon Alexa with the Yellow.ai bot enables businesses to build voice-enabled experiences for their customers. This integration allows users to interact with the bot using Alexa-powered devices, offering a hands-free, conversational interface for customer support, information retrieval, and task automation. Alexa skill consists of two components: 1. [Voice User Interface (VUI)](https://developer.amazon.com/en-US/docs/alexa/custom-skills/define-the-interaction-model-in-json-and-text.html): This is where you define how to handle a user's voice input. 2. [Amazon Developer Portal](https://www.amazon.com/ap/signin?openid.pape.preferred_auth_policies=Singlefactor&clientContext=133-4657237-7550651&openid.pape.max_auth_age=7200000&openid.return_to=https%3A%2F%2Fdeveloper.amazon.com%2Falexa%2Fconsole%2Fask&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dante_us&openid.mode=checkid_setup&marketPlaceId=ATVPDKIKX0DER&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&#/skills): The backend logic on the Yellow.ai [Platform](https://app.yellowmessenger.com) that determines bot responses. ## Setting up Your Alexa skill in the Developer Portal 1. Login to your [Amazon Developer Portal](https://developer.amazon.com/). ![](https://i.imgur.com/b7OXjkh.png) 2. Navigate **Developer Console** and click **Alexa** > **Alexa Skills Kit**. ![](https://i.imgur.com/N0jmyTl.png) 4. Create Alexa Skill 1. Click **Create Skill** to begin with creating a new Alexa skill. ![](https://i.imgur.com/op9tu8H.png) 2. Build a skill using the instructions provides on [Alexa Documentation](https://developer.amazon.com/en-US/docs/alexa/custom-skills/steps-to-build-a-custom-skill.html). ![](https://i.imgur.com/9JEYmDM.png) 3. Use the Custom Interaction Model and set the primary language. 4. Define Skill information * **Skill Type** - Create all skills using the Custom Interaction Model. This is the default choice. * **Language** - Choose the first language you want to support. You can add additional languages in the future. For now, set it to English(India). * **Name** - This is the name that will be shown in the Alexa Skills Store, and the name your users will refer to. * **Invocation Name** - This is the name that your users will need to say to start your skill. We have provided some common issues developers encounter in the list below, but you should also review the entire [Invocation Name Requirements](https://developer.amazon.com/en-US/docs/alexa/custom-skills/choose-the-invocation-name-for-a-custom-skill.html). 5. Define an Intent for Sending Text to the Chatbot Configure Interaction Model 1. Click the **Continue with template** to move to the Interaction Model. ![](https://i.imgur.com/n3BRd6Z.png) 2. In the **Skill Builder Checklist**, complete the necessary fields. ![](https://i.imgur.com/xPAc74n.png) 6. Create a Custom Slot Type 1. Navigate to Slot Types (0) from the menu. 2. Click **ADD+** to create a new slot type. 3. Name it *FreeText* and provide common utterances. ![](https://i.imgur.com/mRVu5Un.png) 4. Enter 10-15 common utterances that users might say to the chatbot. ![](https://cdn.yellowmessenger.com/c0lmdBuIy1Xl1612448182867.png) 7. Define an Intent for Sending Text to the Chatbot 1. In the **Intents** section, click **ADD+** to create a new intent. 2. Name the intent *RawText*.![](https://cdn.yellowmessenger.com/esWT9Lo71fif1612448167000.png) 3. Select "RawText" from the left panel and navigate to Intent Slots on the right side. 4. Create a new intent called **RawText** and add an intent slot **RawTextData**, linking it to the **FreeText** slot type. 5. Define sample utterances such as `{RawTextData}` to send raw user input to the backend. ![](https://cdn.yellowmessenger.com/Kq4wSatBWxlW1612448343229.png) 8. Build & Configure the Model 1. Click **Build Model** in the top menu. 2. Once the model is successfully built, go to Configuration. 3. Select Endpoint from the menu. 4. Choose HTTPS as the Service Endpoint Type. 5. Enter the following URL in the Default Endpoint: `https://cloud.yellowmessenger.com/integrations/alexa/getResponse`![](https://i.imgur.com/VHhWC15.png) 9. Set Up Permissions & SSL Certificate 1. If your skill requires device location access, refer to Amazon's Device Address API. [Click for more details](https://developer.amazon.com/docs/custom-skills/device-address-api.html) 2. Under SSL Certificate Settings, select the second option as shown in the reference image. ## Link Alexa to Yellow.ai Bot 1. On your Alexa Developer Console Navigate to Skill Information and copy the Application ID (e.g., amzn1.ask.skill.111ffc3d-229f-46f7-b537-0c19bf89aca2). 2. Open the Yellow.ai Cloud Platform and go to **Extensions.** > **Channels** and select **Alexa**. ![](https://i.imgur.com/j856d0L.png) 3. In Alexa skill ID, enter skill ID (example: mzn1.ask.skill.111ffc3d-229f-46f7-b537-0c19bf89aca1). 4. Click **Save**. ![](https://i.imgur.com/NLWTDE3.png) --- ## Android push notifications ## Configure Android push notification ### Step 1: Add project to FCM & generate private key 1. Log on to the [Firebase Developer Console](https://console.firebase.google.com/) and add Firebase to your [Android app](https://firebase.google.com/docs/android/setup). ![](https://i.imgur.com/wWLefrH.png) 2. In Project settings, navigate to **Service accounts**. ![](https://i.imgur.com/3Z1ga3w.png) 3. Click on **Generate new private key**. A JSON file will be downloaded which contains all the credentials. ![](https://i.imgur.com/Qzdl7Cf.png) :::info To set up Firebase Cloud Messaging client app on Android, see the [Firebase official documentation](https://firebase.google.com/docs/cloud-messaging/android/client). ::: ### Step 2: Add key to Yellow.ai Once you get the key JSON file, upload the key on Yellow.ai to establish a connection and grant access to send push notifications from Yellow.ai. To connect FCM to yellow.ai, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Push Notifications** > **Android (FCM)**. ![](https://imgur.com/LAsXF6T.png) 3. Click **+ Connect your account**. ![](https://imgur.com/zrtg4lV.png) 4. Cick **Upload** and choose the downloaded JSON file from your local folder and click **Add**. :::note To know how to create a push notification campaign, see [Mobile push template](/docs/platform_concepts/engagement/outbound/templates/mobilepush.md). ::: ## Code snippets for Android Push notifications Notifications are sent to Firebase which then pushes them to the app using the user's device token. This section provides payloads that are sent to Firebase for different on-tap actions (action performed when the user taps on the push notification). The following table provides descriptions of different parameters: Parameter | Datatype | Description --------- | -------- | --------- notification | Object | Details of the notification title | String | Title of the notification. body | String | Content of the notification. payload | String | Contains additional parameters such as image, botId, deeplink and journeySlug. botId | String | The bot ID for which the notification has been triggered. image | String | Path of the image file or URL of the image. deeplink | String | URL which redirects the user to a particular page of the application. journeySlug | String | The name of the journey which has to be triggered in the bot, when the user taps on the notification token* | String | A unique identifier or device ID generated for the operating system and specific device. Notifications are sent to the user's device ID. :::note * Parameters with * are mandatory. * Either `deviceToken` or `ymAuthToken` is needed. For campaigns, `deviceToken` is mandatory and `ymAuthToken` is optional. However, to push notifications from from your app to User 360, only `ymAuthToken` is required. * Ensure you create users along with their device and ym authentication tokens. * When sending out notifications, the yellow.ai consumes these details automatically, decides the platform, and sends out notifications accordingly. ::: ### Notification without custom action This is used to redirect to the main activity of the app when a user clicks on the notification - On tap action, open the app (your app). See Step 7 of [Push notification template](/docs/platform_concepts/engagement/outbound/templates/mobilepush). We do not send any payload, instead, we just trigger the notification containing the title and body along with the image (if included). There is no action included in the payload. ```js { "notification": { "title": "Hey there", "body": "Body", "image": "{ImageUrl}" }, "token": "{deviceToken}" } ``` ### Notification with deep link This is used for the On tap action to open a deep link to the app - when a user clicks on the notification, it redirects to a specific screen of the app where the deeplink is pointing to. The payload consists of the standard notification details (title, body, and image) along with the `botId` and `deeplink` URI. ```js { "notification": { "title": "Hey there", "body": "Body", "image": "{imageUrl}" }, "data": { "botId": {botId}, "deeplink": "{uri}" }, "token": "{deviceToken}" } ``` ### Notification with bot response This is used for the On tap action to open a specific bot flow - when a user clicks on the notification, it opens the bot that can [trigger a specific bot flow](#payload-to-trigger-bot-flow) or [shows a predefined response](#payload-to-open-the-bot-with-a-predefined-response). #### Payload to trigger bot flow Here is the payload to trigger a specific bot flow when the user clicks on the notification. ```js { "notification": { "title": "Hey there", "body": "Body", "image": "{imageUrl}" }, "data": { "botId": "{botId}", "journeySlug": "{slug}" }, "token": "{deviceToken}" } ``` #### Payload to open the bot with a predefined response Here is the payload to show a specific bot response (text message) when the user clicks on the notification. It just contains `botId` in the response under the `data` parameter. ```js { "notification": { "title": "Hey there", "body": "Body", "image": "{imageUrl}" }, "data": { "botId": "{botId}", }, "token": "{deviceToken}" } ``` ## Implementation codes for Android app developer The following are the code snippets for the Android app developer to get the notifications and handle different scenarios. ### Fetch additional data from notifications when clicked Use the following code snippet fetch additional information from the user when the user clicks on the notification. ```js HashMap < String, Object > payloadData = new HashMap < > (); HashMap < String, Object > botPayloadData = new HashMap < > (); Bundle bundle = getIntent().getExtras(); if (bundle != null) { String tmp = ""; for (String key: bundle.keySet()) { Object value = bundle.get(key); payloadData.put(key, value); tmp += key + ": " + value + "\n\n"; } mTextView.setText(tmp); } ``` ### Start chatbot with bot details and additional data Use the following code snippet to open the bot and trigger a specific bot flow when the user clicks on the notification. ```js if (payloadData.get("botId") != null) { String botId = (String) payloadData.get("botId"); YMChat ymChat = YMChat.getInstance(); ymChat.config = new YMConfig(botId); ymChat.config.version = 2; ymChat.config.ymAuthenticationToken = "2gs20emoof1666164936076"; if (payloadData.get("journeySlug") != null) { String journeySlug = (String) payloadData.get("journeySlug"); botPayloadData.put("JourneySlug", journeySlug); ymChat.config.payload = botPayloadData; } try { ymChat.startChatbot(this); } catch (Exception e) { e.printStackTrace(); } } ``` ### Handle notifications in the foreground when the bot is closed Use the following code snippet to handle the notifications you receive when the app is open in the foreground. ```js class MyFirebaseMessagingService: FirebaseMessagingService() { final var TAG: String = "YMLog" override fun onMessageReceived(remoteMessage: RemoteMessage) { Log.i(TAG + " Remote message", remoteMessage.toString()) Log.i(TAG + " Remote message", remoteMessage.data.toString()) super.onMessageReceived(remoteMessage) } } ``` :::info For more details regarding the integration, see * [Android SDK documentation](https://docs.yellow.ai/docs/platform_concepts/mobile/chatbot/android). * [Test app with Android SDK and Firebase integration](https://github.com/yellowmessenger/YmChatBot-Android-DemoApp) ::: --- ## Channels FAQs ### WhatsApp chatbot related FAQs
Why should you use the WhatsApp chatbot channel? WhatsApp chatbots is one of the fastest growing chatbot messaging channels today. It gives brands a great potential to reach out, enagage and support their customers on the channel consumers are.
What can a customer share on WhatsApp chatbot? - A simple text message- An image in JPEG or PNG format - An audio recording, video or GIF - Can attach a document in PDF or docx format - Can attach a contact or location
In what ways can a WhatsApp chatbot respond? - A simple text message- An image in JPEG or PNG format - An audio recording, video - Can attach a document in PDF or docx format - Can attach a contact (via API) or location
What is not possible with WhatsApp chatbot today? - Cannot send promotional or marketing notifications.- Does not have ‘buttons’ option during conversations. - Cannot send notifications without getting opt-in consent.
What is a conversation? A single conversation is an exchange messages within 24 hours between a user and the chatbot.
What is a notification? Notification is an outbound message (chatbot-initiated) sent by the chatbot to a particular WhatsApp user.
What is the difference between a notification and a conversation? A conversation is an exchange of messages between the chatbot and a user, initiated either by the user or the chatbot. Notification triggers chatbot-initiated conversation.
Is it possible to send marketing or promotional notifications on WhatsApp? No, in order to send a regular notification, the user's opt-in is required.
Are buttons allowed within the conversation? No, WhatsApp can approve a button that is included in a notification template.
What is a template? A template is a notification message that needs to be approved before it is sent to users.
What is the pricing model of WhatsApp? Refer to WhatsApp Pricing
Can WhatsApp chat bot support multiple languages? Yes, the WhatsApp chatbot can support multiple languages during conversations. For notifications, while sending for approval, we can opt for required languages.
Is there a restriction on WhatsApp for any location or country? WhatsApp chatbot is applicable in all the regions where WhatsApp channel is currently operating.
What are the top use cases brands can leverage the WhatsApp chatbot for? WhatsApp chatbot will be useful for proactive notification-based outreach, timely reminders, engaging suggestions on products or services, sales and support.
What is the commerce or business policy of WhatsApp? The updated commerce policy can be found here. The updated business policy can be found here
Is it possible to connect two phone numbers associated with different business manager accounts to a single bot? You cannot connect two phone numbers of different WABA or Facebook business manager to a single bot.
Is it possible to remove the current WABA number and link to the new WABA or FBM? WABA numbers cannot be migrated from one BM (Business Manager) to another. It can only be migrated from one BSP (Business Service Provider) to another, or from one WABA to another, by retrieving the same BM ID attached to both WABAs
Is it possible to change the color of the email ID to black in WhatsApp chatbot? No. By default, the email address is blue in color.
Is the speech-to-text (STT) feature supported in WhatsApp? No, the STT feature is not supported for WhatsApp.
Can we have multiple bots in a single subscription, with different WABAs connected to each? Yes, you can have multiple bots under a single subscription, and each bot can have a different WABA connected to it. It is also possible to have multiple numbers connected to a single bot, but all the numbers have to be under the same WABA ID in this case.
Is it possible to select multiple answers at once on a WhatsApp channel using the quick reply button? WhatsApp does not support Multi select in list or button messages. You can use the Multi Select prompt, which displays the options in the form of a text message, to share the options via text. For example, the bot shared a few options with 1, 2, 3, 4, and so on. and the user has to respond back with the selection as 1 or 3 in a specific accepted format to validate and get the user's selection. This is a workaround that is used in the case of WhatsApp.
Does WhatsApp support sharing locations? Yes, users can share their location by clicking this 📎 icon on WhatsApp and sharing their current location. The bot will receive the latitude and longitude of the user, based on which the user's location can be identified. Note that live location sharing won't work for this case.
Is it possible to display a thumbnail from an URL in WhatsApp? Yes, WhatsApp will render URLs with thumbnails, and you will be able to preview them. URL previews are rendered in the following cases: • The business has sent a message template to the user. • The user initiates a conversation with a Click to chat link. • The user adds the business phone number to their address book and initiates a conversation.
How to configure welcome message for WhatsApp? The welcome message will not be displayed automatically in WhatsApp. You need to train an intent with “hi” or “hello” and configure it in a journey to trigger the flow.
### Facebook (FB) Messenger chatbot related FAQs
What can a user share on FBM chatbot? - A simple text message- An image in JPEG or PNG format - A video, an audio or a sticker - A GIF or an emoji
In what ways can a FBM chatbot respond? - A simple text message- An image in JPEG or PNG format - A video or GIF - Can attach files in PDF or docx format - Can share card or card carousel - Can trigger Quick reply buttons for users to click - Via various message template
What is not possible with FBM chatbot today? Cannot send notification before the user initiates the conversation.
What is a standard message? One conversation is an exchange of messages within 24 hours between one user and the chatbot.
What is a one-time notification? Notification is an outbound message (chatbot-initiated) sent by the chatbot to a particular Facebook Messenger user outside the 24-hour window if the user opts-in for the same.
What is a private reply? When an FB user comments or makes a visitor post, the brand can privately reply to the user on the FBM in context with the user inquiry.
Is it possible to send marketing or promotional messages on FBM? The promotional message can be sent as a standard message within a 24-hour window. To send promotional messages outside a 24-hour window, "sponsored messages" will be useful.
What is a message template? A message template is a predefined message structure that is convenient to showcase products, receipts, and so on. To know more, click here
What is the pricing model of FBM chatbot? Contact [support](mailto:support@yellow.ai) for pricing information.
Can FBM chat bot support multiple languages? Yes, the FBM chatbot can support multiple languages.
How to get onboarded to FBM chatbot and what are the prerequisites? Refer this document
How to make users discover and start using your brand’s chatbot? Some discovery points include: * Drop the CTA to FBM chatbot on the brand’s webpage * Sponsored ads to FBM chatbot CTA * Organic posts to FBM chatbot CTA * FB or Instagram posts having Messenger chatbot CTA
What all are the potential use-cases of FBM chatbot? Timely reminders on carts and payments, sales and support, and proactive suggestions are some good usecases.
Does the Facebook channel support WebView? No, the Facebook channel does not support WebView.
How can we share a location on Facebook Messenger? It is not possible to directly share a location in Facebook Messenger. However, there is an alternative approach you can take:• Ask for City/Zip Code: Instead of sharing the location directly, you can prompt the user to provide their city, zip code, or any other relevant location information.• Use Geolocation API: Once the user provides the location information, you can use the Geolocation API to retrieve the coordinates or specific details about that location.
Is it possible to get the user’s mobile number in the WhatsApp channel? Yes, to get the mobile number when a user is connected to the bot, you need to use a system variable called sender as shown below. `{{{sender}}}`
Is it possible to get user details through payload in the Facebook Messenger bot? Currently, you can retrieve the name and profile picture (if available) for Facebook users using the payload.
### Google Business Messaging (GBM) chatbot related FAQs
Why do we need GBM chatbot channel? The first thing we do when we look for some product or service is to 'Google them'. 90% of overall search traffic globally is using Google. The ability to engage with the potential customers right then when they search is powerful. In other words, GBM helps with fantastic Discovery-to-Engagement.
What can a user share on GBM chatbot? - A simple text message- An image in JPEG or PNG format
In what ways can a GBM chatbot respond? - A simple text message - An image in JPEG or PNG format - Can send URLs to files of PDF or docx - Can share interactive cards about products or service offerings - Can trigger Quick reply buttons for users to click
What is not possible with GBM chatbot today? - The GBM chatbot is not supported in desktop or laptop view but only on mobile phones. - Videos cannot be embedded. Any type of custom, for example, a Slider or dropdown is not available. - The Thumbview or preview link is not possible through GBM chatbot.
Which industries are allowed to use GBM? Please go through this document for detailed industry-wise solution
Is there a restriction on GBM for any location or country? There is no restriction on location or countries where the product would not work yet.
Where can I find data and security details? Click here
Does a brand need to have a specific location mapped to the Google My Business account to use GBM? For time being, countries except for the US, a brand must have a verified location associated with its Google My Business Account to use GBM.
How much time would it take to deploy a chatbot for a customer in GBM? If the bot is ready (Changes to be made for GBM specific bot) and the pre-requisite to onboard a customer is available, the whole process from registration to verification till launch with relevant Google and Brand approval should be tentatively around 3-4 business days in an ideal scenario.
Can GBM support Multiple languages? The multi-language support is not there in the shell of the product for example, the CSAT score popup. Also, a welcome message will have to be in English. But if the bot is multilingual it can handle the language conversation in different languages during conversation messages.
What is the pricing model of GBM? Contact [support](mailto:support@yellow.ai) for pricing information.
What are all the discovery points of GBM chatbot channel? These are the possible entry points to GBM channel.
## General FAQs
What is session timeout? A session lasts for 24 hours and includes any number of interactions the user has in a 24-hour window from the start of the session.
What is session duration? Session duration is based on the time of each user response. It resets if there is a 30-minute gap between responses. The total session duration is the sum of all user response times.
--- ## Limitations and best practices of chat widget and mobile SDK This guide contains the character limits for Chat widget and Mobile SDK. ## 1. Quick Reply The following are the character limits for Quick Reply (QR) options: | Quick reply options | Character limit | |---------------------|-----------------| | Quick reply button | There is no character limit for QR buttons. ![](https://i.imgur.com/yfpMZ8A.png)| | Quick replies | There is no limit on the number of QRs in a single step. ![](https://i.imgur.com/Vc0cGwp.png)| ## 2. Text field | Text field options | Character limit | |---------------------|-----------------| | Multi-line input | Limited to 1024 characters when multi-line input is enabled. **Note:** Multi-line input will be available by default for all bots in the future. ![](https://i.imgur.com/71kBK9G.png) | ## 3. Cards/Carousels | Cards/Carousels options | Character limit | |---------------------|-----------------| | Single card | There is no limit to the number of buttons in a single card. ![](https://i.imgur.com/3fXaiTl.png) | | Buttons | There is no limit on the number of characters in each button (both name and text). ![](https://i.imgur.com/71iF98f.png) | | Title | There is no limit on characters in the title. ![](https://i.imgur.com/nGUyyl2.png) | | Carousel card | In Builder, there is a limit of 10 cards in a single carousel (there is no limit when these are generated via API). The recommended dimensions for carousel images: Width - 248px and Height - 164.2px. ![](https://i.imgur.com/TQdMKle.png) | | Description | There is no limit on characters in the description. ![](https://i.imgur.com/J7EgmYI.png) | ## 4. Multi select | Multi select | Character limit | |---------------------|-----------------| | Options | There is no limit on the number of options in multi-select. ![](https://i.imgur.com/1FYME6a.png) | | Characters | There is no limit on the number of characters used in each option. ![](https://i.imgur.com/vftSXEI.png)| * **File upload:** The maximum file size is 20 MB. --- ## Fetch Chat widget history Chat history is a series of conversations that have happened between a user and an AI-agent. The chat history includes details such as user’s input, AI-agent responses, and the date and time of the conversation. Chat history retrieves past conversations that tailor future interactions. It helps the AI-agent to analyse the user’s inputs and provide accurate automated responses to the user’s queries. Thereby, it improves the overall efficiency and reliability of the AI-agent. Let's say that you want to fetch a user's chat history from an AI-agent. To do so, you need to pass a unique identifier, the ymAuthentication token, via an AI-agent script, payload, or init function. :::note * Ensure that the ymAuthentication token is secured and only authorized users can access it. * Chat history can be retained for a maximum duration of 6 months. * Ensure that ymAuthenticationToken is passed in string format. ::: In this article, you will learn: * [How to pass ymAuthentication token for a chat widget?](#1-pass-ymauthentication-for-a-chat-widget) **Prerequisites to pass ymAuthentication token:** Before you passing the ymAuthentication token via the script, payload, or init function, you need to enable **Show history of the conversation** in the **Settings** page. :::note When the "Create New Tab session" flag is enabled, history will not be retained on page refresh even if "Show History" is set to true and the ymAuthenticationToken is passed. ::: To enable "Show history of the conversation", follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. The Chat widget screen appears as shown below. ![](https://imgur.com/emOQHQU.png) 4. Navigate to the **Settings** tab, expand **Chat history** and enable **Show history of the conversation**. ## 1. Pass ymAuthentication for a chat widget Chat history is fetched with the help of a unique token generated for each user who logs into your platform. Once this token is generated, you can verify if a user has been authenticated. ### 1.1 Pass ymAuthentication token via script To pass ymAuthentication token via script, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. The Chat widget screen appears as shown below. ![](https://imgur.com/emOQHQU.png) 4. Navigate to the **Deploy > Web > COPY CODE TO Install bot**. A bot script is copied. **Sample bot script:** ```c ``` To fetch the user's chat history from a AI-agent, add the **ymAuthentication** token in the following AI-agent script: ```c ``` ### 1.2 Pass ymAuthentication token via init function To fetch the chat history, pass the ymAuthentication token in the below init function: ``` window.YellowMessengerPlugin.init({ ymAuthenticationToken: 'Your_Unique_token' }); ``` ### 1.3 Pass ymAuthentication token for PWA bot You can fetch the user's chat history from a PWA bot by passing the ymAuthentication token. To pass the ymAuthentication token for a PWA bot, follow these steps: 1. Use this `https://cloud.yellow.ai/pwa/v2/live/x1657623696077` URL. 2. In the address bar, append `?ymAuthenticationToken=12345`. For example, `https://cloud.yellow.ai/pwa/v2/live/x1657623696077?ymAuthenticationToken=12345` ![](https://i.imgur.com/74H5PE5.png) 3. Refresh the page to view the chat history. ![](https://i.imgur.com/dvkn3bQ.png) --- ## Chat separator A chat separator is used to separate the conversations between an agent and a user in a chat widget. This helps you identify when the user is connected or disconnected to a live agent. A chat separator is displayed when the following actions are performed: * When an agent is connected to the bot, a divider is displayed along with the message `"{agent name} has joined the conversation"`. Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox_setup/inboxdemo#1-implement-live-chat) for more information on how to connect an agent to the bot. * When you are closing the ticket/connecting back to the bot, a divider is displayed along with the message "`{agent name} has left the conversation`". Click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/inbox_setup/inboxdemo#tab-2-live-chat-request-and-resolution-on-the-inbox-chat-screen) for more information on how to close the ticket. --- ## Chat widget components The platform allows you to add components to the chat widget so that the user experience is not limited to plain text. There are two types of components - **Interactive** and **Non-Intercative**. Click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/character-limits-sdk) to know more about the limitations of the components. Let's take an example, where you want to register for an online class through a website. With the help of date and time picker components in the chatbot, you can register quickly by providing the appropriate date and time instead of manually typing the text messages. :::note Each of these components supports both light and drak back ground theme. ::: ![](https://i.imgur.com/6UMCbqn.png) ## 1. Interactive messages This type of message allows you to make a quicker selection from a menu when interacting with a bot. It allows the user to actively interact with the chatbot by clicking buttons, menus, or custom actions. Following are the types of interactive message components: ### 1.1 Quick replies | | | |---------|-------| | This component allows you to reply to the bot with the pre-defined buttons. When your user clicks on any of the quick reply buttons, a message is sent into the conversation. Click here to implement Quick replies using a node. | ### 1.2 Multi select | | | |---------|-------| | This is similar to quick replies. It consists of multiple quick reply buttons where the user can select multiple options at once to send the response to the chatbot. Click here to implement Multi-select using a node. • **Limitation**: You can configure upto 100 options. | ### 1.3 Date picker | | | |---------|-------| | Allows you to select a preferred date from the calendar view. The date is displayed in the predefined format. If the user's input contains a date or a time, it will pass the validator. Otherwise, the specified validation fail message will be sent. Click here to implement Date picker using a node. | The following are the different date pickers supported: | options | Description | |--------|-----------| | **Single date picker** | Allows a user to select a single date from a calendar. | | **Range date picker** | Allows a user to select a start and end date from a calendar. | **Month date picker** | Allows a user to select a month from the date picker. | **Simple date and time picker** | Allows a user to select a date and time, which is in the pre-defined format. | **Time picker** | Allows a user to add time to the conversation. | ### 1.4 Cards This component uses UI annotations to display concise information related to a specific context in a limited-space container using images, buttons, and links to download attachments. Click here to implement cards using a code-based approach. The following are some key features of cards: * Provide a richer experience in chatbot conversations when compared to text based messages. * Display information in the widget so your users get direct insights into their queries without switching screens. Following are the different types of interactive cards: Cards | Description ------|------- **List card** (Generic card) | Displays lists of records that are related to the specific queries. **Product card** | Provides all the detailed information about your product, such as the product name, image, variants, and description. **Slider card** | Allows you to choose the minimum and maximum value within the defined range by sliding the pointer. **Multi select transaction card** | Allows you to view multiple transaction details at a time. Each of the transactions contains details such as title, amount, account number, time, and status. With this card, you can perform the following actions: • **Select:** Enable the checkbox to select one or more transactions from the list. • **Load more:** Displays up to 5 transactions at a time. To view the next set of transactions from the current list, click on **Load more** button. • **Submit:** You can submit the selected transactions to the bot by clicking the **Submit** button. Note that, **Submit** and **Load more** buttons are disabled once the transactions are submitted. **Limitations:**• A maximum of 50 characters is supported for the title.• This card is compatible with all widget modes, including PWA, SDK, and Web widget. • It supports an icon or a fallback avatar for each transaction. • You cannot customize the card title, and there is no restriction on the number of options you can add. **Single select transaction card** | You can use this card when you want your users to select a single transaction from the list. For example, to see transaction details. When you enable Single select transaction card, bot users can select one transaction from the list and click on **Submit**. By default, it shows up to five transactions. To view the next set of transactions, users can use **Load more**. Note that, **Submit** and **Load more** buttons will be disabled once the user clicks on **Submit**. Limitations: • A maximum of 50 characters is supported for title. ### 1.5 Media This component allows you to add images, videos, and files to the bot conversation. | Video | Image | File| --------|-------|-----| | | :::note You can download video, image, and file sent by the bot or agent. ::: ### 1.6 Feedback | | | |---------|-------| | This feature allows you to collect user feedback. Feedback is collected based on the user's interaction with the chatbot or live agent at the end of the conversation. The feedback component has two options (:thumbsup: or :thumbsdown:) and star rating. Additionally, there is an optional text field to capture detailed feedback through text input. Users have the flexibility to skip any step of the feedback process. You can collect feedback through the following options: 1. **(:thumbsup: or :thumbsdown:)**The thumbs up or down options enable users to provide positive or negative feedback. Additionally, they can include comments based on their feedback selection. • Use this option to capture whether the user has liked or disliked the overall conversation. • You can configure the positive and negative feedback options according to your business needs. 2. **Star rating** This option allows users to rate their experience on a scale of 1 to 5. Depending on the rating, the following actions will be displayed: • Ratings 1 to 3 redirect users to a page with up to 5 predefined negative feedback options. • Ratings 4 to 5 redirect users to a page with up to 5 predefined positive feedback options. Click here to implement Feedback using a node. | | ### 1.7 Location | | |------| | This component enables your bot users to search, select, or share location access using Google Maps. With this component, you can perform the following actions: • **Share location**: This enables you to share your current location. • **Map**: Expand the map view to pinpoint and select the desired location. Note that this function is not available on iOS devices. • **Search for location**: Search for a specific location you wish to share. The component will start displaying suggestions as users type. • **Confirm:** You can confirm the selected location by clicking the **Confirm** button. • **Cancel**: To close the map view, click the **Cancel** button. • **Go back**: Click this button to go back to the Share location option. Click here to implement Location using a node. | ![](https://i.imgur.com/OpiPYhl.png") ### 1.8 Attachment | | | |---------|-------| | This component allows you to upload documents, images, and other files from their device or from a cloud storage provider. | ### 1.9 Home button | | | |---------|-------| | This component allows you to refresh a chatbot or to trigger a conversational flow. | ### 1.10 Upload file | | | |---------|-------| | This component allows you to upload files in supported formats such as jpeg, jpg, png, gif, pdf, txt, doc, ppt, docx, pptx, xlsx, mp4, mp3, and mov. You can either attach a file or skip it. Click here to implement Location using a node. | ### 1.11 Callout banner | | | |---------|-------| | A callout banner allows you to add a banner to the chatbot's conversation. It can be used to alert users about new products, services, special offers, and promotions. When multiple banners are configured for a chatbot, the banners are automatically scrolled every five seconds. You can also add the images to the callout banner. For more information on how to add the images to the callout banner, click here. Note that, the banner with an image cannot have buttons in it. Brands can select the close, or minimise button for banners. Upon minimising, users can later access the banner by clicking on the expand button. The user’s last selection is retained on page reload. You can trigger a flow or redirect users to a page or URL in the banner. Also, you can add a title to the banner when it is minimised (this is optional). **Limitations:**• You can add up to 4 banners with text or image.• Each callout banner supports two buttons with up to 24 characters each.• The callout banner supports 200 characters in the title.• You can add up to 2 buttons to the text banner.• Supported image size is 10MB. In the case of images, the width may vary, but the height remains fixed at 113 pixels. **Note:** You cannot add videos or GIFs to the callout banner.| ## 2. Non-interactive messages This type of message does not require a response from your bot user by clicking the buttons, menus, or custom actions. A Chabot uses this type of message to generate automated response with all the details related to your queries. Following are the types of non-interactive message components: Components | Description ------|------- **Contact card** | This component displays the information of the user and allows you to communicate with the user through email, phone, or WhatsApp. **Order status** | This component is used to track the status of your order with details such as order Id, delivery date, and total amount. **Transaction status** | This component is used to track the status of your transactions. **Receipt card** | This component is used to display transaction or purchase-related details such as fixed deposit amount, interest rate, title, and reference ID. With this card, you can perform the following action:• **Submit**: Sends title header text and title header value data to the bot. --- ## Chat widget alerts and error messages When a user interacts with the chat widget, they may encounter different types of error messages based on the type of error. The table provides all the possible errors with descriptions: Errors | Description -------|------------ File upload limit | You can upload files with a maximum size of 20 MB. This error occurs when you try to upload files that exceed this limit. Network disconnected | When the AI-agent users are disconnected from the internet, the AI-agent notifies them and provides an option to reload the page.**Note:** If network connection is re-established, the AI-agent will again connect to the internet without having to reload. Network error | This error occurs when the chat widget is disconnected from the internet while sending a message, uploading a file, or selecting quick replies. Input bar typing limit | Displays a message when users reach the maximum limit of 500 or 1024 characters. If the user exceeds this limit or attempts to paste more than the maximum allowed characters, the system will prevent them from typing or pasting additional characters. **Note:**• If the user reaches the maximum limit of 1024 characters for multi-line input, then **You have reached maximum character limit of 1024** error message is displayed, and this is enabled via AI-agent mapping.• If the user reaches the maximum limit of 500 characters for single-line input, then **You have reached maximum character limit of 500** error message is displayed, and this is enabled via AI-agent mapping. Platform down time error | Displays a message when platform is experiencing a downtime due to maintenance activities, server downtime, or unexpected technical failures. File type error | Displays an error when you try to upload unsupported file type formats such as documents, images, and other files. The supported file type formats are JPG, PNG, GIF, MPV4, PDF, MOV, HEVC, DOCX, PPTX, XLSX, MP3, OGA, and AMR. File upload limit | Displays an error when you try to upload more than five files at a time. --- ## Chat widget FAQs ## Setup page related FAQs
Chatbot is auto-scrolling upwards after navigating to a different tab by clicking the URL from the chatbot. How to resolve this issue? You need to enable the "Scroll the chat window to the bottom" option in the Chat widget's Settings tab. Navigate to the Channels > Chat widget > Settings.
How to enable chat history conversation? For cloud.yellow.ai platform, ensure that Show history of the conversation is enabled. For `app.yellowmessenger.com` or `app.yellow.ai` platform, ensure that Reset Context for every load checkbox is unchecked in the dashboard settings. Note: If you want to maintain a history across devices or browsers, you can create an authentication token, which is a unique token, and pass it in the given format, as shown below: ```javascript if (userIsAuthenticated) { // replace this with your own auth logic and reload the bot with new info. window.YellowMessengerPlugin.init({ ymAuthenticationToken: 'Your_Unique_token' }); window.YellowMessengerPlugin.show(); // display the bot icon } ```
Is it possible to change the chat widget background colour for bot and agent messages? No, the background colour can be changed only for user messages. This can be done by updating the complimentary color in the chat widget settings.
How to change the font size in the widget? To change the font size in the widget, follow these steps: 1. Navigate to Channels > Chat widget > Widget panel. 2. Expand Font drop-down and select your preferred font size and click Save changes.
Can we change the color scheme of the chat header gradient from top to bottom? The gradient is intentionally applied from left to right for readability reasons. Applying the gradient from top to bottom might make it challenging to read the text - title & description due to multiple colors. This design decision ensures optimal visibility and a better user experience.
Is it possible to block the users from uploading specific attachment formats? Yes, you can control which file formats users are allowed to upload for documents, images, and other files. To manage this, navigate to Chat Widget > Settings > Validate attachments
-------- ## Chat widget related FAQs
How to resolve a website performance issue after installing the bot? Ensure that the chatbot script is placed within the <body> tag of the host website rather than the <head>. This will ensure that the bot loads only when the website is fully loaded without affecting its performance.
Why is the bot not displaying or loading any of the configured messages? Make sure you have configured Welcome message in the Automation. Login to cloud.yellow.ai platform. Navigate to Studio > Welcome Message > Add welcome message. To know more, click here. Also, check the bot status. If the bot is in an unpaused state, it will not load or respond.
Is it possible to deploy two bots on a single website? No, you cannot deploy 2 bots on a single website.
How to set the position of the bot dynamically? The bot's position is set to right by default. On the Chat widget settings page, you can change it to left. To dynamically set the position of the bot on a website, set the position to right on the Settings page and pass `alignLeft:true` inside ymConfig of the chatbot script on the respective webpage.
Does the Chat widget or PWA contain a pop-up component? No, the pop-up component appears only when an error message such as "device not connected to network" or "file upload limit exceeded" is displayed.
Is drop-down option supported in the Chat widget? Currently, drop-down is not supported for the Chat widget bot.
Is it possible to integrate the Yellow AI chatbot with a NextJS website? Yes, you can add the script to any NextJS page. To do so: * Create a file called `static/yellowai.js` and paste our script. Note: You need to remove the ` ) ```
Is the React SDK supported for the web widget? React SDK is not supported for web widget. However, you can include our script at the end of the body tag in your index.html file.
Is it possible to change the language of the weekdays displayed on the Chat Widget Yes, the platform supports 10+ languages for placeholder texts such as timestamps, and text fields. The bot user can choose their preferred language to see text in that language.
How to disable the like and dislike buttons shown under the chats in the chat widget (PWA)? By disabling message feedback in the chat widget, the "like" and "dislike" buttons are disabled.
Is it possible to remove the user's button selection from the list or quick replies in chatbot? No. Every message exchanged between a bot, users, and agents needs to be tracked/recorded so that the users are aware of the message sent/selection made. Following are the reasons: • Providing feedback: When a user selects an option/sends a message, they expect feedback in response. By displaying the messages, users will know that their message has been received. • Transparency: When a user message is displayed, it builds trust between the user and the chatbot. • Clarification: At times, the bot may not understand the context of the user's message. Displaying the message in such instances will be essential.
Why does a blank space appear when scrolling in the widget? This happens only for bots migrated from V1 ("app.yellowmessenger.com" or "app.yellow.ai" platform) to V2 (cloud.yellow.ai platform). On the "app.yellowmessenger.com" or "app.yellow.ai" platform, you need to disable "Voice First" for the V2 widget as it is not supported. To disable "Voice First" option, click Configuration > Channels > Chat Widget > General > Voice First.
Is it possible to hide the chat widget icon on the website? Yes, use "window.YellowMessengerPlugin.hide()" function to hide the icon of the chat widget on the website.
Can we pass data to the widget for every page of the website? Yes, you can pass the data to the widget on its respective page of the website. For more information, see payload.
Is it possible to configure the position of the bot to be on right when the user selects Arabic and to the left when the user selects English? Yes, in ymConfig, you must set "alignLeft:true".
How can we change the font color in the bot name and description? The bot name and description text color is set automatically based on the background color to ensure readability, with a contrast ratio of 4.5+. For example, white text on bright red background is hard to read, so text color is set to black. Slightly darker red shades can be tested to find a readable color combination.
Does the chat widget support HTML tags? No, the chat widget does not support HTML tags. In order to maintain security and prevent web attacks, HTML tags are blocked within the widget. Any content containing HTML tags will be converted into plain text for display.
Does the chat widget automatically aligns the text based on the selected language? Yes, the widget automatically aligns the text based on the selected language. For example, English, Hindi, Spanish, and so on are aligned from left to right. Languages like Arabic and Dhivehi are aligned from right to left. Note: If a text message contains both languages, the text will be aligned based on the language set in the bot at the respective step.
Does the chat widget support auto-complete feature? Yes, the chat widget supports auto-complete. To set up auto-complete, follow these steps:• You need to enable auto complete in [Yellow.ai Platform](https://cloud.yellow.ai) > Channels > Chat widget > Settings > enable Auto complete > click Save changes. For more information, click here• Navigate to Automation > select a flow > click on the respective node > click Make prompt smarter. For more information, click here.
How to disable Message feedback? By default, message feedback is enabled for all bots. This helps to gather feedback on how helpful bot responses have been to the end user. It is recommended not to disable Message feedback. However, you can disable message feedback from Channels > Chat widget > disable Message feedback > click Save changes.
How to restrict users from clicking on carousel card buttons repeatedly? Go to Automation > Select the flow > Click on Carousel node > Click Settings icon > Enable Disable action after click
How to deploy a website bot on sites.google.com? To deploy a website bot on sites.google.com, follow these steps:Navigate to the admin portal of your Google site > Add an Embed block > Select Embed code > Paste the bot script > Click Next. The bot will be deployed on sites.google.com.
Is it possible to deploy a bot in multiple locations on a website or Mobile SDK? For web bots, it is not possible to have two bots on the same window simultaneously. However, you can load a default bot initially, and then when a user selects a specific order in which the bot needs to be deployed, you can trigger a new bot using the following code. `window.YellowMessengerPlugin.init({bot: ''})` Note that, this will replace the previously loaded bot. On Mobile SDK, if you want to maintain a separate session and history for each order, you need to pass the ymAuthToken parameter. Ensure that these approaches allow you to manage different instances of the bot, but only one bot can be active at a time.
How long will the session be active in the chat widget? The session in the chat widget will remain active for 24 hours by default. However, if needed, you have the flexibility to customize the session duration from the backend. The session duration can be adjusted within a range of 1 minute to 1440 minutes, which is equivalent to 24 hours. By configuring the session duration according to your specific requirements, you can ensure that users have an adequate amount of time to interact with the chat widget before the session expires. If you have any additional questions or need further assistance, contact our support team
When you receive new messages from a bot or agent, how do you enable scroll behaviour for the chat widget? Follow the below steps to enable the scroll behaviour. Navigate Channels > Chat widget > Settings > expand General settings > Scroll behaviour.Under Scroll behavior, choose your preferred option:• Bottom: Select this option to scroll the widget automatically to the bottom of the new message.• Top: Select this option to scroll the widget automatically to the top of the new message.• Off: Select this option to disable scrolling, the widget will remain at the same message when a new message is received.
Is it possible to drag the chatbot icon and place it anywhere on the website? Yes, you need to add floatingIcon: true in the following chat bot script to drag the chatbot icon. ``` ```
Is it possible to minimise the callout banner? Yes, you can minimize it using the icon highlighted in the following:
How to load the callout banner dynamically in the middle of a chat? A callout banner allows you to add a banner to the chatbot's conversation. Before starting a chat with the user, the callout banner is shown at the top of the chat window with a description of the chatbot’s purpose. To know more, click here. Banners can be used to alert users about new products, services, special offers, and promotions.
How to load the callout banner dynamically in the middle of a chat? A callout banner allows you to add a banner to the chatbot's conversation. Before starting a chat with the user, the callout banner is shown at the top of the chat window with a description of the chatbot’s purpose. To know more, click here. Banners can be used to alert users about new products, services, special offers, and promotions. If the V1 bot consists of a banner and you want to move to V2 dynamically in the middle of the chat conversation, then you need to add a function to display the same banner in V2. While migrating from V1 to V2, use the following function code to copy the banner from V1 to V2: ``` return new Promise(async (resolve, reject) => { try { app.log(app.profile, "in profile"); if ( app.profile && app.profile.payload && app.profile.payload.widgetVersion === "v2" ) { await app.sendEvent({ code: "ui-event-update-promotion", data: [ { title: app.renderMessage('indiatour', {}, ''), options: [ { title: app.renderMessage('activate_now', {}, 'Activate Now'), text: "activate channel" } ] }, { title: app.renderMessage('promotion_2', {}, ''), options: [ { title: app.renderMessage('download_now', {}, 'Download Now'), url: "https://watcho.onelink.me/eyNf/4plou2wu" } ] }, { title: app.renderMessage('promotion_3', {}, ''), options: [ { title: app.renderMessage('subscribe', {}, 'Subscribe'), text: 'Subscribe' } ] } ] }); } else { await app.sendEvent({ code: "ui-event-update-promotion", data: { quickReplies: [ { title: app.renderMessage('indiatour', {}, ''), options: [ { title: app.renderMessage('activate_now', {}, 'Activate Now'), text: "activate channel" } ] }, { title: app.renderMessage('promotion_2', {}, ''), options: [ { title: app.renderMessage('download_now', {}, 'Download Now'), url: "https://watcho.onelink.me/eyNf/4plou2wu" } ] }, { title: app.renderMessage('promotion_3', {}, ''), options: [ { title: app.renderMessage('subscribe', {}, 'Subscribe'), text: 'Subscribe' } ] } ], autoPlay: true, autoPlaySpeed: "4000", hide: true, showPromotionMessage: 'Hi! I am Dia, your d2h Intelligent Assistant.', displayShowPromotionBar: true } }); } return resolve(); } catch (e) { app.log(e, 'error in showPromotion'); return resolve(); } }); ```
How to hide the home and input buttons when the user opens the chatbot for first time? To hide the home and input buttons when the user opens the chatbot, add the setDisableActionsTimeout property inside the window.ymConfig object.
Is it possible to prevent the bot icon from overlapping with CTAs on mobile screens? The following are the two options to prevent the bot icon from overlapping: Write a custom script to override the position. Hide the default icon and create a custom entry point or button on the site. Use the `window.YellowMessengerPlugin.openBot()` function to open the bot when a user clicks on the custom button. For more information, click here. Note that the chat bubble and notification icon will not be displayed if a custom icon is deployed.
Can the Bot title, description and logo be changed dynamically based on website? Yes, you can configure different themes for different websites. Set a default theme in `Channels > Chat Widget > Widget Panel/Bot icon`. Then, based on the user, you can override it on the web and mobile SDK. For the web, you need to pass the following values inside `window.ymConfig` in the bot script: ```js window.ymConfig = { theme: { botName: "", // Text up to 50 characters botDesc: "", // Text up to 50 characters primaryColor: "", // RGB or HEX value secondaryColor: "", // RGB or HEX value botIcon: "", // CDN link botClickIcon: "" // CDN link } }; ```
Is it possible to replace the close (X) button in the chat widget with a drop-down arrow button? Yes, it is possible by using a custom script to modify the chat widget’s UI. To implement this change,contact the support team. They can guide you and provide the necessary custom script to help replace the close button with a drop-down arrow.
----------- ## PWA related FAQs
Is it possible to change the short cut icon for PWA bot? Yes, you can change the PWA bot's shortcut icon via bot mapping. Note that the icons are supported with the following resolutions: * Mobile: 192*192 * Desktop: 512*512.
Is it possible to customise the URL of the PWA bot? No, you cannot customise the URL of the PWA bot.
Is it possible to pass the data from the URL to a widget? Yes, using payload, you can pass the data.
Is it possible to integrate the Yellow AI chatbot with a NextJS website? Yes, you can add the script to any NextJS page, to do so: * Create a file called static/yellowai.js and paste our script. Note: You need to remove the tags. * You can now load this file on page (page name). (jsx|tsx) file ``` export default () => ( ) ```
It is possible to automatically open PWA chatbot using chat widget functions? No, by default PWA bot will be opened automatically.
Why is the date picker not working in the PWA bot, even though it works on the web bot? The date picker should work in both the PWA and web bots. If it's not working in the PWA bot, check the following: * Channel support: Make sure you are testing on a supported channel. Some channels like WhatsApp do not support the date picker. PWA and Web do support it. * Variable type: Ensure the date is being saved in a variable of type Object. If it is not, the date picker may not function as expected.
---------- ## Chat history related FAQs
Is it possible to auto-delete conversations between the user and the bot after 48 hours? There is no option to delete/hide conversation history after 48 hours. It will be accessible only for 30 days.
How do we add ymAuthenticationToken to the PWA script so that we can see the same chat history in the PWA and mobile SDK? You need to pass the ymAuthenticationToken in the URL as a query parameter. `https://cloud.yellow.ai/pwa/v2/live/?ymAuthenticationToken=`
-------- ## General FAQs
How to trigger the closeBot() function when a specific flow ends or when you reach a specific node? You must initiate an event at the end of the specific flow and will receive a callback in onEventFromBot(_ response: YMBotEventResponse) function of YMChatDelegate, where you can add the closeBot.
Is it possible to change the bot title and description when the bot switches from parent bot to child bot? In orchestrator setup, you cannot interact with the child bot directly, and the UI loaded will be that of the parent bot. Therefore, there cannot be a separate Title, Description, or Icon for the child bot.
What to do if buttons are not loading on the parent website? This happens when a website blocks CDNs (Content Delivery Network). You need to whitelist these by updating content security policy: * cdn.jsdelivr.net (to load the font) * https://cdn.yellowmessenger.com (to load buttons)
Is speech-to-text (STT) feature supported in the chat widget? Yes, STT feature is supported for the chat widget.
Is it possible to implement the callout banner for child bots and view them when the parent bot switches to child bots in the app? Yes, to view the callout banner for child bots, send an event with "ui-event-close-promotion" to close the banner. In this way, you can control when to show or turn off the banner, in this case only for child bots.
Is it possible to remove the user's button selection from the list or quick replies in chatbot? No. Every message exchanged between a bot, users, and agents needs to be tracked/recorded so that the users are aware of the message sent/selection made. Following are the reasons: • Providing feedback: When a user selects an option/sends a message, they expect feedback in response. By displaying the messages, users will know that their message has been received. • Transparency: When a user message is displayed, it builds trust between the user and the chatbot. • Clarification: At times, the bot may not understand the context of the user's message. Displaying the message in such instances will be essential.
Can we have custom fonts for V2 web bots? Currently, v2 web bots do not support custom fonts as we need to validate legibility on the chat interface, ensure the availability of appropriate font weights, and then support respective languages. If you need to add a new font, reach out to the support.
Is it possible to display image and text in a single node? Yes, you can make use of a Generic card and not include any options in it. You need to include an image and a description. Store the function response in a variable of type array and connect it to a message carousel node.
Is it possible to configure customized icons for carousel (card) buttons? Icons are supported only in quick replies. whereas for buttons inside cards, you can use emojis.
Is it possible to update the token without refreshing the webpage? No, the token and payload are only fetched during page load. Hence, you cannot update the token automatically.
Even though the agent is not connected to the bot, the app.yellowmessenger.com chatbot displays a green round circle, indicating that the agent is online. Is it possible to change the settings of the bot on the app platform? Yes, on "app.yellowmessenger.com" or "app.yellow.ai" platform you can disable it in Configuration > Channels > Chat Widget > General > Show Dot Status in Title.
Is it possible to change the language of the bot whenever the user switches from one language to another on the website? Yes, the language of the bot is changed when a user switches from one language to another on the website. You have to update the bot's language and reinitialize the bot. Note that the language of the chat history cannot be updated, as those messages were already delivered, stored, and fetched from the backend in the respective language.
What are the minimum compatible versions of the browsers supported by the web widget? • Chrome 89 and later • Edge 89 and later • Firefox 70 and later • Safari 10.1 and later
How to add the image in Quick Replies node? In the quick reply node, add the image link under the Prefix image. Click here for more information.
When an agent is connected to the bot, is it possible to close the conversation and trigger a journey? When an agent is connected to the bot, the bot will not trigger any flow. To trigger a particular flow and close the conversation, you need to add the "talk to bot" button in the Callout banner. You can add the button either from the UI or using the function. **Add talk to bot button using the function** The following is the sample function: ```json var array = [{ "title": "Wish to end your chat with our Live Agent", "options": [ { "title": "End Chat", "text": "talk to bot" } ] }] ``` event: ui-event-update-promotion **Add Talk to bot button using Automation's Conversation settings** To add the banner text for the **talk to bot** button, follow these steps: 1. Navigate to **Studio \> Conversation settings \> Callout banner**. \ 2. Enter the title and button name. Click **Update**. \\ The callout banner will be updated accordingly.
Is it possible to block users from copying bot them and pasting messages in the text field? Yes, it is possible to block users from copying bot messages. To implement this, you need to pass `disableCopyPaste: true` inside the the `window.ymConfig` chatbot script. ```js window.ymConfig = {"bot":"x1657623696077","host":"[https://cloud.yellow.ai](https://cloud.yellow.ai)", "disableCopyPaste": true}; ```
How to disable users from clicking on images in the carousel node? To disable users from clicking on images in the carousel node, include `disableCardImageClick: true` inside the `window.ymConfig` chatbot script. ```js window.ymConfig = {"bot":"x1657623696077","host":"[https://cloud.yellow.ai](https://cloud.yellow.ai)", "disableCardImageClick": true}; ```
Can I hide the chat separator when an agent is connected to the bot? To hide the chat separator when an agent is connected to the bot, include `hideTransferEvent: true` inside the `window.ymConfig` chatbot script. ```js window.ymConfig = {"bot":"x1657623696077","host":"[https://cloud.yellow.ai](https://cloud.yellow.ai)", "hideTransferEvent": true }; ```
How to retrieve the sender ID on a website if Yellow Messenger authentication is not passed? To retrieve the sender ID, go to live bot page, right click and select Inspect > Network > Payload search for update API, you can find the userId within the payload.
How can I start a new conversation when my chat has stopped, and the intent is not working? If your chat has stopped and the intent is not working, try the following steps to start a new conversation:• Click the Home icon – This will reset the conversation and allow you to start fresh.Clear cache – Clearing your browser or app cache can help resolve issues caused by stored session data.
--- ## Chat widget supported languages and placeholder texts The chat widget automatically changes the text based on the user's language preference. It supports multiple languages for placeholder texts, tooltips, and time stamps. For more information on how to set the language, click [here](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/set-language) :::note * The chat widget currently supports English, Arabic, Tamil, Kannada, Hindi, Urdu, Slovak, Japanese, Czech, Croatian, Romanian, Polish, Chinese Simplified, Spanish, Portuguese, Telugu, Marathi, Gujarati, Punjabi, Oriya, Malayalam, Bengali, and Assamese. * Multilingual support is not available for the following:: * Bot name * Bot description * Agent name * When an agent is connected to the bot, the chat separator description is not changed. * The chat widget automatically detects the script of each message and aligns the text accordingly — no configuration required. Messages written in Arabic are displayed right-to-left (RTL); messages in English, Hindi, Spanish, and other LTR scripts are displayed left-to-right. This applies independently to every message bubble, so a conversation that switches between Arabic and English will align each message correctly. * If a single message contains both LTR and RTL scripts, the browser's built-in bidirectional text algorithm handles the mixed content automatically. * Localization is supported only for the placeholder texts whereas for date it is not supported. ::: ## Change your bot language The chatbot users can change the language of the widget based on thier requirements. To change the language of your bot, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. Go to **Settings**, expand **Configure settings** to enable **Language switcher**, then click **Save changes**. 4. Navigate to **Deploy** > **Web** > **Experience on a Website**. 5. Click on the higlighted icon and select **Change language**. 6. Select your preferred language and click **Done**. * The chat widget language will change based on the selected language. ## Automatic RTL text alignment for Arabic The chat widget automatically renders Arabic message bubbles in right-to-left (RTL) layout. This works for both bot/agent messages and user messages, and requires no configuration on your part. **How it works:** - When a message is received or sent, the widget inspects the text for Arabic script characters. - If Arabic script is detected, the message bubble switches to RTL layout: text is right-aligned and reads from right to left. - All inline formatting (bold, italic, links) within the bubble respects the RTL direction. - Messages in other languages continue to display in the default LTR layout. - Each message is evaluated independently, so mixed-language conversations align correctly without any extra setup. :::note RTL detection is based on the **content** of each individual message, not the bot's configured language. A bot configured in English will still render an Arabic reply in RTL. ::: **Example:** | Message | Direction applied | |---------|-------------------| | `Hello, how can I help?` | Left-to-right (LTR) | | `شكرًا لاختيارك اللغة. كيف يمكنني مساعدتك؟` | Right-to-left (RTL) | | User types in Arabic | Right-to-left (RTL) | --- ## Chat widget notifications The chat widget can notify users when they receive a new message. The following are the chat widget notifications: 1. **Notification badge** - The widget displays a notification badge on top of the bot icon when a bot is in a minimized state. 2. **Favicon and title text** - When a user is on a different page or screen, the widget displays a favicon with a text message. 3. **Message sounds** - The chat widget notifies its users with a message sound when there are new messages from the bot or agents. Chat widget notifications are supported for desktop icon styles such as circle, square, and bar. It is also supported for custom icons uploaded on the yellow platform. It is also supported for custom icons uploaded on the yellow platform. :::note * If there are more than nine new messages, a plus sign is displayed on the notification badge. When you click on the bot icon, you can view further messages. ::: #### Limitations of chat widget notifications The following are the limitations of chat widget notifications: * Notification badges are not supported for custom icons set up on the host site, as the size details are not passed on to Yellow. * Notification badges are not supported for mobile SDKs and PWAs as they do not have a bot icon. * The colour of the notification badge cannot be changed at the bot level. It will remain red as per the industry standard. ## Enable chat widget notifications To enable chat widget notifications, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. Navigate to the **Settings** tab and expand **Notifications** drop-down. 4. Enable the **Unread message(s) badge**, **Unread notification in browser tab**, and **Message sound**, then click **Save changes**. 5. Navigate to **Deploy** > **Web** > **Experience on a Website**. 6. If there are new messages, you will see the notification in the Favicon when you are on a different tab, as shown below. ![](https://i.imgur.com/IOBbgzn.png) * When a bot is in a minimized state, a notification badge is displayed on top of the bot icon. * The notification button is displayed on the header of the chat widget when Message sound option is enabled. It is turned off by default. :::note If there are multiple messages in a single step, you will hear the notification sound only once. ::: --- ## Chat widget Chat widget or Web widget is an AI-agent that you can embed on a website to interact with your website users in real-time. It appears as a small chat box or window that pops up on a website or application. ![](https://imgur.com/BiR4vUm.png) Chat widget can be used to answer product queries, troubleshoot customer issues related to product features, and get quick feedback on website usability and customer service. The **Chat widget** can be used in the following ways:  * **Automated customer service**: Used to provide 24/7 automatic customer service by offering instant assistance for customer queries, booking appointments directly from a website, and so on. * **Promotion and marketing:** It can be used to promote and advertise your products and services to the website's visitors. It also provides product recommendations based on a user’s browsing history. * **Shopping assistance**: It helps website users find their products and services quickly. * **Collecting feedback**: It can be used to collect reviews and ratings for your products and services from website visitors that can be used to improve customer satisfaction. In our platform, the Chat widget allows users to customize design of the widget, preview, and deploy it as per their custom requirements. Click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/web-widget) to know more. To match any use case, the Chat widget can be customised in various ways using [Functions](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/function-widgets) and [Events](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/event-widget). You can retrieve the data of the user who is using the Chat widget by using the [Payload](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/chat-widget-payload). --- ## Chat widget payload A payload is used to pass the information to the bot. Consider that you have a requirement to pass the data of the user who is using the chat widget. In such cases, you can use payload to pass data from your website to the bot. For example, payload passes the data such as account IDs, customer identifiers like names, email addresses, and phone numbers, or other metadata associated with a user from your website to the bot. In the payload, you need to create a string that is a key-value pair consisting of data and its value (in lower case). The data must have string-to-string key-value pairs. Payload is passed in JSON format. An error is displayed when data other than key-value is passed in the JSON code. :::note **payload security** Payload is securely passed in HTTPS post request to secure the information passed in it. ::: In this article, you will learn: * [How to pass the payload data](#1-pass-values-from-the-web-client-to-the-bot) ## 1. Pass values from the web client to the bot To pass values from your parent interface to the bot, you can make use of **payload data**, which needs to be configured in the bot script and init function. ### 1.1 Pass payload data via bot script To pass the payload data via script, paste the bot script at the end of the `` tag **Following is a sample bot script:** ```c ``` Add the payload data in the following bot script: ```c ``` The bot is initilized when the page loads. Once the bot loads, you can assign these values to variables using [Variables node](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes#variables). Variable format is ```{{{profile.payload.Your_Field_Name}}``` ![](https://i.imgur.com/3Np2ozp.png) ### 1.2 Pass payload data via init function You can also pass the payload data via the init function. If you want to reinitialize the bot with a new payload, you can use the below script: ```c window.YellowMessengerPlugin.init({ payload: { email: 'ted.lasso@yellow.ai', member_id: '1231basd' // you can pass any info you want to be associated with the user based on your use case here. Note that this can be read by the bot using the {{profile.payload.member_id}} variable. } }); ``` --- ## Chat widget Text formatter You can style the text on the Chat Widget as per your needs using the Markdown syntax to enhance the user experience. With the Markdown syntax, you can emphasize important information and capture the reader's attention within specific parts of the conversation. **Watch the video on how to format the text in the bot conversation:** Use the following syntax for styling the text in the bot conversation: * **Bold**: Use asterisks to enclose text when you want to emphasize or highlight its importance. (`*text*`). * **Strikethrough**: Achieve a strikethrough effect by enclosing the text with tildes. (`~text~`) * **Italic**: Italicize specific words or phrases by using underscores. (`_text_`) * **Bulleted Lis**t: Organize information in a structured manner by starting a statement with a hyphen and a space. (`- text`) * **Highlight text**: To highlight specific text, enclose it with colons. (`:text:`) Input | ouput -----|------- `*Welocme to web widget world*` | **Welcome to web widget world** `1.(press space) This is a normal list` | 1. This is a normal list. `-(press space) This is a bullet list` | • This is a bullet list `-Why is this text cut?:p~`| ~~Why is this text cut?:p~~ `_This is italic_` | *This is italic* `Oh i'm in the <>` | Oh i'm in the highlight ## Enable text formatting To enable text formatting, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. Navigate to the **Settings** tab > **Configure settings** and enable **Text formatting**. 4. Click **Save changes**. 5. Navigate to **Automation**, select the required flow, and in the respective node format the text. ![](https://i.imgur.com/irymScC.png) 6. Navigate to **Channels** > **Chat widget** > **Deploy** > **Web** > **Experience on a Website**. * You can view the formatted text in the widget. --- ## Install chrome extension The Chrome extension allows you to paste the script of your bot on any webpage to test your development bot's payload and authentication locally on your device without having to publish changes to Live. After customising your chatbot, you can preview it and add it to your website. ## 1. Add chatbot to website Follow these steps to add a Chrome extension and to preview your customised chatbot on a website: 1. Install the Chrome extension using this [link](https://chrome.google.com/webstore/detail/yellowai-web-widget-launc/hlajdopahpkoakfedombhdpomlpmafbb). 2. Copy the chat widget code as explained [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/web-widget#deploy-chat-widget). 3. Open the extension in your Chrome browser. ![](https://i.imgur.com/aI0mRhb.png) 4. In the first input box, enter the entire website URL. The chat widget will appear on the website based on the URL that you have entered here. ![](https://i.imgur.com/xHROMyD.png) 5. In the second input field, paste the chat widget script you copied in step 2 and click **Launch Widget**. ![](https://i.imgur.com/7C7ubWH.png) 6. Open the website URL that you have entered in the first input box to view your chatbot. ![](https://i.imgur.com/CUUbTev.png) --- ## Content Security Policy Content Security Policy (CSP) is a security standard implemented by web browsers to provide an additional layer of security for your website. It functions as a gatekeeper, determining who or what is permitted to access your website and significantly reduces the risk of cross-site scripting (XSS) attacks, data breaches, and other malicious activities. CSP allows website administrators to specify the allowable resources, such as scripts, stylesheets, and images, that can be loaded by web pages. By defining these rules, you can prevent unauthorized individuals or malicious content. Consider a scenario where you have a website that allows user-generated content, like a forum or a comment section. In the absence of CSP, an attacker could inject malicious code into user comments or forum posts, posing a serious threat to user data and potentially spreading malware. However, by implementing CSP, you can specify that only scripts from trusted sources are allowed to run on your website, effectively blocking any unauthorized code from executing. ## Add CSP to your website To implement Content Security Policy (CSP) on your website, configure the Content-Security-Policy header in your server's response. This header allows you to define the rules for your website's content security policy. You can specify directives such as `default-src`, `script-src`, `style-src`, `img-src`, `media-src`, and so on, to control the sources from which different types of content can be loaded. For instance: * To allow only the resources to be loaded from the same origin, or specify specific domains or trusted sources for different types of content, set `default-src 'self'`. * To specify a URL where violation reports should be sent, use the `report-uri` directive. ## Add rules to your website You can implement these rules on your website using the following methods: 1. **Using Meta tag in Static HTML Webpage** This meta tag all resources from the current domain along with all subdomains of yellow.ai. ```javascript ; ``` 2. **Using Headers in Server Configuration** ```javascript add_header Content-Security-Policy-Report-Only "default-src 'none'; form-action 'none'; frame-ancestors 'none';" ``` If you find server configurations challenging, reach out to your infrastructure team for assistance. Alternatively, you can refer to this [link](https://mattferderer.com/how-to-add-a-header) for better understanding. ## Types of resources You can also specify what type of resources you would like to load from certain origins. For example, let’s say you want to allow loading videos only from YouTube, images from Cloudinary, and fonts from Google fonts, and the rest of the other content only from your website. You can create a rule like this. ```javascript add_header Content-Security-Policy-Report-Only "default-src 'self'; media-src https://youtube.com; img-src: https://*.cloudinary.com; font-src https://*.google.com;" ``` or ```javascript ; ``` In the above example: * `default-src 'self'`: Allows resources (images, scripts, styles) to be loaded only from the same origin. * `media-src 'self' https://www.youtube.com`: Allows media resources, such as videos, from the same origin and YouTube. * `img-src 'self' https://res.cloudinary.com`: Allows images from the same origin and Cloudinary. * `font-src 'self' https://fonts.gstatic.com`: Allows fonts to be loaded from both the same origin and the specified Google Fonts origin. Now that you have got a basic idea of what CSP is and how to configure on your website. Let’s see how to add a CSP to ensure Yellow.ai chat widget performs as expected. ## Configure CSP for Yellow.ai Chat widget Yellow.ai's chat widget: - Makes a socket connection with wss://cloud.yellow.ai/websocket, - Fetches assets from https://cdn.yellowmessenger.com, - Tracks how the widget is used from `blob://`. (a web-worker that is created on the parent website’s domain). - Makes API requests to `https://*.yellow.ai`. So you need to create the rules as follows: 1. You can add all the resources to the `default-src`. ```javascript add_header Content-Security-Policy-Report-Only "default-src 'self' https://*.yellow.ai https://*.yellowmessenger.com wss://*.yellow.ai blob://*.your_website.com;" ``` or ```html ; ``` 2. Or, you can specify exactly what type of resources that you would like to allow from our domains. ```javascript add_header Content-Security-Policy-Report-Only "default-src 'self' 'unsafe-inline'; connect-src wss://*.yellow.ai https://*.yellow.ai; script-src https://*.yellowmessenger.com; style-src https://*.yellowmessenger.com; worker-src blob://*.your_website.com;" ``` --------- or --------- ```html ; ``` :::note If you explicitly specify a rule to allow a type of resource only from these websites and Yellow’s resource is not from one of those sources, the resource will be rejected. For instance, specifying `font-src 'self';` restricts font loading from Yellow's CDN. However, omitting this rule would prompt the browser to check the parent rule instead (default-src). ::: --- ## Set up custom bot icon A custom bot icon is displayed in the corner of the website. You have the flexibility to customize this icon according to your branding and visual style. You can have a custom icon for your chat widget. There are two ways to set the custom bot icon: 1. [Set a custom icon through the Yellow.ai platform](#set-custom-bot-icon-via-platform) 2. [Host custom icon on your website](#host-custom-icon-on-your-website) ## Set custom bot icon via platform To set the custom bot icon, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. Navigate to **Bot icon**, under *Icon shape*, select the **Upload custom icon** option. 4. Click **Add icon** to upload the custom icon. ![](https://i.imgur.com/GyUP1ia.png) 5. Choose the icon from your local system and click **Open** to upload the icon. You can view the custom icon on the *Preview* screen. ![](https://imgur.com/EvtYHlS.png) :::note You can choose any animation for the icon if needed. ::: ## Host custom icon on your website To display a custom bot icon on your website, you should hide the default bot icon and use the bot function to load the bot when users click on the icon. For more information on the process, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/function-widgets#hide-the-bot-by-default). ![](https://i.imgur.com/wTZM4oP.jpg) --- ## Embed chat widget on SharePoint This guide outlines the process of embedding the Yellow.ai chat widget into your Microsoft SharePoint site using [SharePoint Framework](https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-script-editor) (SPFX) extensions. To proceed, ensure you have admin access to SharePoint. For more detailed information on SharePoint, click [here](https://support.microsoft.com/en-us/sharepoint). ## Add your chat widget to SharePoint site To add your chat widget to SharePoint site, you need to perform the following steps: 1. [Add the Extension](#activate-the-extension-on-your-sharepoint-site) 2. Upload the extension to SharePoint admin center 3. Activate the extension on your SharePoint site 4. Embed the chat widget ### Step 1: Choose your extension and package it Before proceeding, determine whether to utilize an existing extension or develop a new one, and ensure proper packaging. 1. **Select your extension**: Decide whether to use an existing extension or create a new one. You can explore various extensions in the Microsoft community-maintained GitHub repository. In this scenario, a `script editor web part for modern pages` extension is used. :::note If you want to develop your own extension, refer to the available tutorials and guides. ::: 2. **Packaging instructions**: Follow the packaging instructions provided on the web part's GitHub page. For additional help, refer to the [Deploy your client-side web part to a SharePoint page](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page). 3. You can also use our existing [package](https://drive.google.com/file/d/1-VZdG7pinHCeBv2xJkHWWMmsXf5i8_Df/view?usp=sharing). Once the packaging process is finished, you will receive a file with the `.sppkg` extension. This file contains your packaged extension, ready for deployment. ### Step 2: Upload the extension to the SharePoint admin center Once you have packaged the extension, follow these instructions to upload it to your SharePoint site, as explained here: 1. Access your SharePoint admin center by appending `/admin` to your SharePoint site URL. 2. Navigate to the **Manage apps** page, where you can upload packages with the `.sppkg` extension. Ensure that the state of the package is set to **Enabled**. ![](https://i.imgur.com/5Akayfb.png) * This will upload your extension to your SharePoint site. For assistance on uploading the package, refer to [Deploy your client-side web part to a SharePoint page](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/serve-your-web-part-in-a-sharepoint-page). ### Activate the extension on your SharePoint site To enable the extension at the site level, follow these steps: 1. Navigate to the **Settings** on your SharePoint site. ![](https://imgur.com/0P7DCk8.png) 2. Click **Settings** icon, then select **Add an app**. 3. Choose your app from the list, and click **Add**. 4. Go to **My apps** page to view the package that you have previously added under *Added apps*. ![](https://imgur.com/zNu2Nxi.png) ### Embed the Web Widget Once your extension is activated, you can embed the chat widget on your page. Follow these steps: 1. Open the SharePoint page where you want to embed the chat Widget. 2. Click **Edit** to enter edit mode. 3. Navigate to the web section at the top of the page, then select the extension you added. 4. Click **Edit markup**, and then select **Edit HTML Code**. 5. In the script editor, add your widget script. Here is the sample widget script: ```javascript ``` The chat widget is integrated into your SharePoint page: ![](https://imgur.com/H4fuL7C.png) --- ## Deploy WhatsApp bot on website and Mobile application Let's say that you have built a bot for the WhatsApp channel and now want to deploy it on your website or mobile application using a chat widget. This document will provide you with step-by-step instructions on how to port your WhatsApp bot to your website or mobile application using a chat widget. :::note * You can use the V2 widget using the bot script from the cloud.yellow.ai platform even if the bot code is in the app platform. * You can use Mobile SDKs for deploying WhatsApp bot on [iOS](https://docs.yellow.ai/docs/platform_concepts/mobile/chatbot/ios) and [Android](https://docs.yellow.ai/docs/platform_concepts/mobile/chatbot/android) apps. ::: To deploy an existing WhatsApp bot on a website or mobile application, follow these steps: 1. To create a separate flow using the WhatsApp specific components such as WhatsApp quick reply and list card. 2. Use the provided code snippet in the [function](https://docs.yellow.ai/docs/platform_concepts/studio/build/code) while creating the flows based on your use case: ```js if (app.source == "whatsapp") { // actions or message list which you want to display } if(app.source == "yellowmessenger"){ // actions or the quick replies which you want to display. } ``` 3. On the overview page, select your bot and enter your respective bot ID in the browser URL. 4. Navigate to **Channels** > **Chat widget** > **Deploy** > Copy the bot script provided. 5. Paste the bot script on your website where you want the bot to appear. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/web-widget#24-deploy-chat-widget). * You can also configure the appearance of your bot on the cloud platform. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/web-widget). --- ## Domain whitelisting for Chat widget Domain whitelisting allows you to secure your chatbot and ensures chatbot acces only in authorized domains. It prevents unauthorized users from copying the script and embedding the bot on their websites and Mobile SDK apps (Android and iOS apps). Yellow.ai allows businesses to whitelist domain(s) where you want to deploy the chatbot. :::note * When a domain (example: yellow.ai) is whitelisted, all its subdomains (example: cloud.yellow.ai, live.yellow.ai) will also be whitelisted by default. * Yellow.ai and yellowmessenger.com are whitelisted by default to allow you to preview your chatbot seamlessly. ::: ## Whitelist domain(s) to deploy chat widget To whitelist a domain to deploy chat widget, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. Navigate to the **Secure bot** tab and expand the drop-down corresponding to **Web**. 4. Enter the domain that you want to whitelist, then click **+ Add**. You can also add multiple domains based on your requirements. :::note - If none of the domains are whitelisted, the chatbot will load on all domains where the script is deployed - If one or more domains are whitelisted, the chatbot will load only on whitelisted domains. ::: * The domain will be successfully whitelisted. 5. If your domain is not whitelisted, a red tick mark next to your domain will be displayed. Click **Whitelist Domain** to load your bot. 6. A pop-up is displayed with a confirmation message, click **+ Whitelist domain** to whitelist your domain. * This will whitelist your domain. 7. To test your chatbot locally, you need to enable **Allow localhost**. Note that, you need to disable it after deployment. ### Remove whitelisted domains To remove whitelisted domains, follow these steps: 1. To remove the added domain, click **Remove domain** icon. 2. A pop-up is displayed with a confirmation message, click **Remove**. ## Whitelist Mobile apps The platform supports whitelisting for bots deployed using all SDK frameworks, including Android, iOS, React Native, Cordova, and Flutter. By default, the bot will load on any app where the SDK is integrated. If you choose to whitelist one or more apps, the bot will exclusively load in the whitelisted app. To whitelist specific apps, follow these steps: 1. Navigate to the **Secure bot** tab and expand the drop-down corresponding to **App**. 3. Enter the **App ID** of your app and click **+ Add**. You can also add multiple app IDs based on your requirements. * This will whitelist your app. ![](https://imgur.com/v8LLx4k.png) ### Remove whitelisted Mobile apps To remove whitelisted apps, follow these steps: 1. To remove the added app, click **Remove domain** icon. 2. A pop-up is displayed with a confirmation message, click **Confirm**. * This will remove the whitelisted app. --- ## Download chat transcript You can allow your bot users to download chat transcripts in a plain text (.txt) format directly from the chat widget. This facilitates bot users to access their complete conversation history with the bot. The downloaded chat transcripts include information such as the bot's name, user's name, timestamp (displaying the full date and time), and the messages exchanged between the bot, agent, and user. Following are the important points for downloading chat transcripts: * This is supported for web bots, PWA, and SDK. * It supports multiple languages. * Available only for the ongoing session (within 24 hours of chat initiation). ## Enable download transcript To enable download transcript, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/VFuwPIE.png) 2. Click on **Chat widget**. ![](https://imgur.com/c3JFOYN.png) 3. Navigate to the **Settings** tab, expand **Chat history** drop-down to enable **Download transcript**, then click **Save changes**. 4. Navigate to **Deploy** > **Web** > **Experience on a Website**. 5. Click the below-highlighted option, then select **Download transcript**. --- ## Email channel configuration Email is a communication channel through which the organization can interact with users and vice versa. It allows the organization to send campaigns, receive tickets, address support requests, gather feedback, respond to inquiries, or engage in general communication. When users send an email to the designated email address, the support agents from the organisation will respond to the email accordingly. You can use email for two-way communication to chat with your users. For example, support@organization.com or sales@organization.com. The following are the different protocols for sending emails: 1. SMTP 2. HTTP-based Email API 3. Connect with Microsoft (OAuth) ### Email SMTP Simple Mail Transfer Protocol (SMTP) is a simple mechanism to send or receive emails from or to your mail server. Traditionally, the one-off emails that we send from our mailbox to another are generated by SMTP. :::note Use SMTP configuration when the purpose is to send 1:1 transactional/update email notifications through our [Notifications API](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/notification-engine) or [Workflow](https://docs.yellow.ai/docs/platform_concepts/engagement/flows_campaign) campaign, and not usually recommended for bulk promotional ones. ::: ### Web-based Email API A web-based Email API is a mechanism to exchange emails via HTTP (Hypertext Transfer Protocol). It allows you to access the functionality of the email services such as sending and receiving emails, managing contacts and mailboxes, and performing other email-related tasks, within the applications or systems. ### Difference between SMTP and Email API |SMTP | Email API | |--|--| | SMTP is a protocol used to transfer emails between servers. The brand’s own SMTP can be used for sending transactional, support, workflow-driven, or one-off emails. | Email API is a set of tools and functions provided by an email service provider to allow you to programmatically interact with their email services. | |This mechanism is not recommended for sending bulk or promotional email campaigns.| This mechanism can be chosen when the use case is to send bulk emails for promotional goals. | ## Add sender email account You can add sender email acount either by configuring the SMTP of the brand’s professional sender email ID or by adding the web-based email API key to the platform. Upon successful configuration, the platform can send emails from the associated Email ID. ### Set up SMTP-based email account (Basic) This setup allows our platform to send emails on behalf of the email domain. To set up SMTP server on the yellow.ai platform, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Messaging** > **Email**. ![](https://imgur.com/LTrbjIP.png) 3. Click **Add email** ![](https://imgur.com/Mqd2sQI.png) 4. In the *Add Email* section, select **Basic** to add the details of the Email sender. Enter the following details: * **Configuration objective**: Select the purpose of the current email account - Campaigns or Support ticketing. You can select both if needed. * **Campaigns** - You can choose this option to send the campaigns such as promotions, newsletters and updates, event invitations, and so on. You need to create a [email template](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/templates/email-template) to exceute a campaign. After creating a template, you need create a email campaign. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/engagement/outbound/outbound-campaigns/run-campaign#32-email-campaign). * **Support ticketing** - You can choose this option to raise your queries so that agent can track inquiries effectively. Each email received from a user is considered as a ticket. This helps support teams manage and prioritize incoming requests. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/inbox/tickets/tickets_intro). * **Email**: Enter the email address (sender ID) that you want to associate with the account. For example, support@organization.com. * **Server**: Enter the host URL. The value will be unique for each mail server. For example, it will be `smtp.gmail.com` for the Gmail server and `smtp.office365.com` for the Outlook server. In some cases, like a private server, the value will be the IP address of the SMTP connector service. * **Username**: Enter the same email address that you entered in the Email field. For shared accounts such as Microsoft, these could be different. * **Password**: Enter the app password of the specified email address. To know how to generate and use an app password for each server, see [Google](https://support.google.com/accounts/answer/185833?hl=en) and [Microsoft](https://support.microsoft.com/en-us/account-billing/using-app-passwords-with-apps-that-don-t-support-two-step-verification-5896ed9b-4263-e681-128a-a6f2979a7944). :::note * You should enter the same input for the email ID and username. * Some email servers like Gmail offers [safer alternatives](https://support.google.com/mail/answer/185833?hl=en) to expose the password. You can generate it and provide it while configuring SMTP. * For more details on SMTP, reach out to your IT team. ::: * **Port**: Select port **465** for Gmail and port **587** for Outlook when setting up the SMTP connection. * **Security type**: Choose **SSL** for Outlook or **TLS** for Gmail when selecting the appropriate security type for the SMTP connection. * Click **Save**. * Once the email account details are saved, forwarding address will be displayed. ![](https://imgur.com/igensXY.png) Similarly, you can add multiple email accounts and choose your preferred sender ID when configuring an outbound campaign. #### **Set forwarding address** The forwarding address generated within the platform must be added to your email server's setup, be it Gmail, Outlook, or another email server. ###### Prerequisite * Copy the forwarding address from the Email channel page To configure a forwarding address, follow these steps: 1. Go to the [Gmail](https://mail.google.com/) account. :::note You can only forward messages to a single Gmail address, not an email group or alias. ::: 2. Click on **Settings** (top right) > **See all settings**. 3. Click **Forwarding and POP/IMAP** tab. ![](https://i.imgur.com/qgJ6QnT.png) 4. In the "Forwarding" section, click **Add a forwarding address**. ![](https://i.imgur.com/04jG8R9.png) 5. Paste the forwarding address that you have copied from the Email channel page and click **Next**. ![](https://i.imgur.com/Z0kI6r4.png) 6. Click **Proceed** > **Ok**. ![](https://i.imgur.com/UYTQq9Q.png) 7. A confirmation link will be sent to the **Bot Messages** section of the Inbox module. Click the below highlighted link. ![](https://imgur.com/lz32RPo.png) 8. Click **Confirm**. ![](https://i.imgur.com/wYydn38.png) * Once confirmed, the email ID you have added will forward emails to your designated forwarding address. ![](https://i.imgur.com/I8dkzfz.png) #### Add email alias account You can add email alias account, if already main account configured in chatbot for alias. To add an email alias account, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Messaging** > **Email**. ![](https://imgur.com/LTrbjIP.png) 3. Click **Add email** ![](https://imgur.com/Mqd2sQI.png) 4. Choose the account type as **Configure account**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/configureaccount.png) 5. In the *Add Email* section, enter the following details: * In the email field, enter the email address of the alias account. * In the username field, enter the email address of the main account. In the password field, enter the app password associated with the main account and click **Save**. ### Set up SMTP-based email account (JSON) You can also configure SMTP using the JSON code. To configure an SMTP using JSON, follow these steps: 1. Click **Channels** > **Messaging** > **Email**. ![](https://imgur.com/LTrbjIP.png) 2. Click **Add email** ![](https://imgur.com/Mqd2sQI.png) 3. Select **Configure account**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/configureaccount.png) 4. In the *Add email* section, select **Advanced** to add the SMTP details of the email address in the JSON code for which you want to send emails. 5. Copy the below JSON code, paste it in the *Advanced configuration* section, and click **Save**. ```js { "serviceType": [ "supportTicketing" ], "address": "customerservice@shopping.id", "outboundConfig": { "server": "outlook.office365.com", "port": 587, "username": "customerservice@shopping.id", "name": "Customer Service Shopping", "password": "abc", "securityType": "SSL", "useAdvanceConfiguration": true, "advanceConfiguration": { "service": "Outlook365", "auth": { "user": "customerservice@shopping.id", "pass": "abc" } } } } ``` :::note * To send mail on behalf of the client, the client should enable SMTP authentication. * In cases where clients have disabled SMTP auth for security reasons, they can whitelist Yellow.ai’s IP and allow emails from that IP. * For Yellow.ai to receive emails from the customers of the client, the client needs to configure a unique forwarding address provided by Yellow.ai after configuring an email on the Channels page. ::: ### Get your Outlook SMTP To get Outlook SMTP, follow these steps in Outlook: 1. Navigate to the **File** menu. 2. Click Info. Go to the **Account Settings** page. 3. On the Yellow.ai platform, look for the email address that you want to configure. 4. Search for the **Outgoing server field**. * You will see the SMTP that you want. ### Get your Gmail SMTP For emails to be sent from smtp.gmail.com, make sure you have followed these 2 steps: 1. Enable 2-Step Verification in your Google account. 2. Go to https://security.google.com/settings/security/apppasswords. a. Click **Select app** and choose Other (custom name) from the dropdown. b. Click **Generate**. c. You will receive a 16-digit code, this code should be used as a password in email configuration, and the user remains as your email. ### Web-based email account (API) Reach out to the [yellow.ai team](mailto:vishnu@yellow.ai) for setting up an email account. The process will cover domain/subdomain authentication and dedicated IP address procurement, among others. ### Setup Email channel with OAuth You can configure your email account with Microsoft OAuth to establish a secure and seamless connection between your email service and the AI agent. This allows the agent to send and receive emails without storing passwords. :::tip If you use **Microsoft 365** with **your own Azure app**, **OAuth client credentials**, and optionally **inbound mail without forwarding** (Microsoft Graph webhooks), follow the dedicated guide: [Microsoft 365 direct email connector](#microsoft-365-direct-email-connector) (start from [Overview](#overview-m365-direct-connector) or jump to [How to configure on Yellow.ai](#how-to-configure-on-yellowai-m365-email)). ::: #### Generate credentials on azure portal 1. Log in to the [Microsoft Azure](https://portal.azure.com/) portal. 2. Go to **App registrations**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/app-registrations.png) 3. Select your registered application. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/mask-client-id.png) 4. In your registered application, copy **Client ID** and **Tenant ID**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/maskids.png) 5. Go to **Certificates & secrets** > **Client secrets** > copy the **Client secret value**. ![](https://cdn.yellowmessenger.com/assets/yellow-docs/screte-value1.png) #### **Configure Email channel with OAuth** To connect an email account with OAuth, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Messaging** > **Email**. ![](https://imgur.com/LTrbjIP.png) 3. Click **Add email** ![](https://imgur.com/Mqd2sQI.png) 4. Select **Connect with Microsoft** as the account type. 5. In the *Add Email* section, enter the following details: * **Configuration objective**: Select the purpose of the current email account - Campaigns or Support ticketing. You can select both if needed. * **Email ID**: Enter the email address of the alias account. * **Client ID**: Paste the Client ID copied from [step 5 of Generate credentials on azure portal](#generate-credentials-on-azure-portal) * **Client secret**: Enter the copied secret value generated in Azure to authenticate your application. * **Tenant ID**: Paste the Tenant ID copied from [step 5 of Generate credentials on azure portal](#generate-credentials-on-azure-portal) where your application is registered. 6. Click **Connect**. ### Microsoft 365 direct email connector #### Overview {#overview-m365-direct-connector} ##### What is this feature? This feature lets your Yellow.ai bot connect **directly** to your organization’s **Microsoft 365 / Exchange Online** mail through **Microsoft Graph**. The bot can **send** mail and, when you turn on the right option, **receive** support mail in near real time **without** relying on classic mailbox forwarding into Yellow.ai. Yellow.ai authenticates using the **OAuth 2.0 client credentials** flow (also called **app-only** or **server-to-server**). That means **we do not store user passwords** for this connection — only the Azure **client ID**, **tenant ID**, and **client secret** you provide, which your IT team controls and rotates in Azure. ##### Why use this instead of traditional email forwarding? | Benefit | What it means for you | | --- | --- | | **Simpler mail routing** | You connect at the **source** (Microsoft 365). With webhooks enabled, you **do not** maintain a separate rule that forwards every inbound mail to a Yellow.ai-generated address. | | **Fast, reliable inbound** | New mail is signaled with **secure Graph webhooks** (change notifications). Yellow.ai then **pulls the full message** from Microsoft. This is **not** “slow polling” of the mailbox on a long timer. | | **Enterprise-friendly auth** | **Client credentials** are standard for integrations owned by the organization. Access is governed in **Azure** and **Microsoft 365**, alongside your other app registrations. | ##### How you receive mail: When you add the channel in Yellow.ai, **Enable webhook** decides **how inbound mail reaches the bot**: | **Enable webhook** | What happens for **incoming** mail | When to choose it | | --- | --- | --- | | **Enable** | Microsoft notifies Yellow.ai when a **new message is created in that mailbox’s Inbox**. Yellow.ai **downloads** the message from Graph. **No forwarding rule** to Yellow.ai is required for ingestion. | Default recommendation for “direct connector” behaviour: cleaner routing. | | **Disable** | OAuth still backs the connection for sending as configured, but **incoming** mail follows the **Yellow.ai forwarding address** model, same idea as [Set forwarding address](#set-forwarding-address). | If Graph subscription creation fails, your security team prefers forwarding, or you are rolling out in phases. | :::note **Scope:** This connector is for **Microsoft 365 / Exchange Online**. It does **not** apply to **Gmail / Google Workspace** or arbitrary IMAP hosts — use **SMTP** or another supported method for those. ::: --- #### Prerequisites {#prerequisites-m365-direct-connector} Before anyone opens Yellow.ai, confirm the following: | Requirement | Details | | --- | --- | | **Microsoft 365 / Exchange Online** | The mailbox you connect must live in **Microsoft 365** (Exchange Online). This path is **not** for Gmail/Google Workspace. | | **IT / admin access in Azure** | Someone who can work in **Microsoft Entra ID** (Azure AD) — typically a **Global Administrator** or an admin who can **register applications** and grant **admin consent** for **Microsoft Graph application permissions**. | | **Mailbox to automate** | Often a **shared or dedicated** address such as `support@company.com` so support traffic and credentials are isolated from individual users’ mailboxes. | --- #### Setup guide for Microsoft 365 {#setup-guide-for-microsoft-365} Complete these steps in the **[Microsoft Azure Portal](https://portal.azure.com/)**. When you finish, you will have **Application (client) ID**, **Directory (tenant) ID**, and a **Client secret value** to paste into Yellow.ai in [Configuration in Yellow.ai](#how-to-configure-on-yellowai-m365-email). ##### Step 1: Register the application 1. Sign in to the **Microsoft Azure Portal**. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-1/ms-1.png) 2. Search for and open **App registrations** (under **Microsoft Entra ID** / **Azure Active Directory**). ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-2/test.png) 3. Click **+ New registration**. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-3/test.png) 4. Fill in the form: * **Name** — for example `YellowAI-Email-Connector` (any clear name your IT team recognizes). * **Supported account types** — choose **Accounts in this organizational directory only (Single tenant)**. For an internal support mailbox, **single tenant** is usually the strictest and clearest option. * **Redirect URI** — leave **blank** for this flow (client credentials do not use a browser redirect the way some sign-in flows do). ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-4/test.png) 5. Click **Register**. ##### Step 2: Copy IDs and generate a client secret 1. Stay on the app’s **Overview** page. Copy **Application (client) ID** and **Directory (tenant) ID** — you will enter them in Yellow.ai as **Client ID** and **Tenant ID**. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-5/test.png) 2. In the left menu, open **Certificates & secrets**. 3. Under **Client secrets**, click **+ New client secret**. 4. Set **Description** (for example `YellowAI-Secret`) and **Expires** (for example **12 months**, or whatever your security policy requires). Click **Add**. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-7/test.png) :::danger **Copy the secret *Value* immediately.** After you leave the page, you **cannot** read that value again. If you lose it, create a **new** secret in Azure and update Yellow.ai. ::: ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-8/test.png) ##### Step 3: Grant Microsoft Graph *application* permissions Yellow.ai uses **application** permissions (app acts on its own), **not** delegated permissions (sign in as a user). 1. In the left menu, click **API permissions** → **+ Add a permission**. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-9/test.png) 2. Click **Microsoft Graph**. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-10/test.png) 3. Choose **Application permissions** (**not** Delegated). ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-11/test.png) 4. Add these three permissions (use the search box in the portal): * **Mail.Read** — read mail so the bot can **ingest** inbound messages. * **Mail.ReadWrite** — update mail (for example **read state**, moves, or other operations your product uses for support workflows). * **Mail.Send** — **send** replies and outbound mail as the configured mailbox. ![](https://cdn.yellowmessenger.com/assets/doc/ms-graph-12/test.png) 5. Click **Add permissions** to save the list. ![](https://cdn.yellowmessenger.com/assets/doc/ms-g-13/test.png) :::warning **Admin consent is mandatory.** You will see a consent warning until an admin approves. Click **Grant admin consent for [Your organization]** and confirm. **Success check:** Every permission row should show **Granted for [Your organization]** with a **green** status (checkmark). If any row is **Not granted**, inbound or outbound Graph calls can fail until consent is fixed. ::: --- #### Configuration in Yellow.ai {#how-to-configure-on-yellowai-m365-email} Do this **after** Azure steps are complete and you have copied **Application (client) ID**, **Directory (tenant) ID**, and **Client secret value**. ##### Open the Email channel (Microsoft path) 1. Log in to **Yellow.ai** and open the **bot** that should own this mailbox. 2. Go to **Extensions** → **Channels** → search for **Email** channel. ![](https://cdn.yellowmessenger.com/assets/doc/msgraph-1/test.png) 3. Click **Add email**. 4. Under **Choose how you want to connect account**, select **Connect with Microsoft**. ![](https://cdn.yellowmessenger.com/assets/doc/msgraph-2/test.png) 5. On **Add email** → **Account details**, enter: | In Azure (source) | In Yellow.ai (field name on the form) | | --- | --- | | **Application (client) ID** on the app **Overview** | **Client ID** | | **Directory (tenant) ID** on the app **Overview** | **Tenant ID** | | **Value** of the client secret from Step 2 | **Client Secret** | | The mailbox the bot should use (for example `support@company.com`) | **Email Id** (this is your **target mailbox** on Graph) | Also set: * **Configuration objective** — same meaning as elsewhere in this doc ([SMTP basic setup](#set-up-smtp-based-email-account-basic)): **Campaigns**, **Support ticketing**, or both, depending on how this mailbox is used. * **Enable webhook** — **Enable** for **direct** inbound via Graph (no forwarding rule required). **Disable** if you intentionally want to use the **Yellow.ai forwarding address** for inbound instead ([Set forwarding address](#set-forwarding-address)). ![](https://cdn.yellowmessenger.com/assets/doc/msgraph-4/test.png) 6. Click **Connect**. ![](https://cdn.yellowmessenger.com/assets/doc/msgraph-6/test.png) --- #### Security & FAQ {#security-and-admin-faq-direct-connector} **Q: Does granting “Application permissions” mean the app can read every mailbox in the tenant?** **A:** In many tenants, **application** mail permissions are **broad by default** unless you add extra controls. That is why admin consent and change management matter. If you must **limit** the app to **specific mailboxes** (for example only `support@company.com`), your Exchange Online team can use **application access policies**. See Microsoft’s guide: [Limiting application permissions to specific Exchange Online mailboxes](https://learn.microsoft.com/en-us/graph/auth-limit-mailbox-access). **Example (Exchange Online PowerShell)** — replace placeholders with values **your administrator** obtains from Entra ID / Exchange (the `-PolicyScopeGroupId` parameter expects a **mail-enabled security group** or other **allowed scope object ID**, not a raw SMTP string): ```powershell New-ApplicationAccessPolicy ` -AppId "YOUR_APPLICATION_CLIENT_ID" ` -PolicyScopeGroupId "YOUR_SCOPE_GROUP_OR_MAILBOX_OBJECT_ID" ` -AccessRight RestrictAccess ` -Description "Restrict Yellow.ai email connector to approved mailboxes" ``` --- ## Test your bot on Email After connecting your bot to an email account, you can test your bot using the following process. To test your bot on Email, follow these steps: 1. Go to your email account and send a mail to the customer support team. Enter the same mail address that you have configured in the STMP basic email section. 3. The ticket will be raised in the Inbox. Navigate to **Inbox** > **Tickets**. ![](https://i.imgur.com/GX2OMiZ.png) 4. The agent(customer support team) will send an email to your email address regarding your query. ![](https://i.imgur.com/6Y5FCkG.png) ## Email troubleshooting ### Troubleshooting email configuration When configuring email, you might encounter the following issues: * If you have entered a different email ID and username, the email channel will not be configured. * If you have entered an invalid password, the email channel will not be configured. To troubleshoot, follow these steps: 1. On the Email channel page, **right-click > Inspect > Network**. ![](https://i.imgur.com/8WF5Mvd.png) 2. Select the "add_config" API and click **Preview** to view the error message. Similarly, if you have entered an invalid password, you can follow the above steps to troubleshoot. ## Generate app password for Email Tickets Sometimes, emails from agents might not reach the end users. To solve this problem, we can use an app password. This helps make sure agents and users can communicate better. **Prerequisites** You'll need access to the same email account and password that's linked to the bot. **Steps** 1. Log in to the email account linked to the bot. 2. Use the link below to make the app password: [App Password Creation Guide](https://support.google.com/accounts/answer/185833?hl=en) 3. Make the app name, then you'll get a 16-character app password. 4. Remove any spaces from the password and copy it. 5. Paste this password into the email settings. --- ## Chat widget events Bot events are the actions that occur within a chatbot when specific actions are performed during the conversation. Events are triggered when a user clicks on button links, opens, or closes the chatbot. You can use these events to trigger specific bot flows, run campaigns, or perform any other actions based on your requirements. ## Send event to bot ```js // find the yellow.ai widget iframe const ymIframe = document.getElementById('ymIframe'); // event_name should be a valid name supported by the widget. const message = JSON.stringify({code: 'event_name', data: {...}}); // send a cross-site message using // window.postMessage(message, targetOrigin, transfer) API. ymIframe.contentWindow?.postMessage(message, window.location.origin); ``` ## Listen to a bot event ```js ``` ## Supported events The following are some of the events supported by our chat widget: | Event | Description | |--------|---------------| | bot-opened | This event occurs when a user clicks on the chat bubble to open the bot on a website. For Progressive Web App (PWA), it triggers when the bot loads. | | bot-closed | This event is triggered when the user closes the bot on the website.| | bot-loaded-on-page-reload | This event is triggered when the user reloads the current bot page or when the page reloads automatically. | | ym_home | This event occurs when the user clicks the home icon in the bot. | | ym_closed_promotion | This event occurs when the user closes any promotional content displayed within the chat widget. | | page-url-based-trigger | This event occurs based on a specific URL or webpage. When the URL matches the loading page URL, a specific journey is triggered.| ### How to trigger bot-opened and bot-closed events When a user clicks on the chat bubble to open the bot, the `bot-opened` event is triggered, and when the user closes the bot interface, the `bot-closed` event is triggered. These events can then be used to initiate specific flows or perform other actions based on the user's interaction with the bot. #### Prerequisites to trigger bot-opened and bot-closed events You need to follow the below prerequisites to trigger bot-opened and bot-closed events. 1. Navigate to **Deploy** > **Web** > **Experience on a Website**. 2. On the live chatbot page, **right-click** > **Inspect** > **Network tab**. ![](https://imgur.com/TWyhnPO.png) 3. To view the API call details, **Refresh** your page and select **bot-load-details**. ![](https://imgur.com/Br4Hp7q.png) 4. Expand the skin of the widget to see that `sendEventOnOpen` and `sendEventOnClose` options are set to true. ![](https://imgur.com/soC1CBK.png) #### Trigger bot-opened and bot-closed events To trigger bot-opened and bot-closed events, follow these steps: 1. Select the respective environment and go to **Automation** > **Event** > **Widget**. ![](https://imgur.com/klf1W9f.png) :::note In the Live environment, you cannot enable the events. ::: 2. Navigate to the **bot-opened** and **bot-closed** events, click on the **More options** icon > **Activate**. ![](https://imgur.com/QeTrWwP.png) 3. Go **Build** > select the flow for which you want to trigger the event > select the start trigger as **Event** and include either bot-opened or bot-closed event in the start node based on your preferred choice. ![](https://imgur.com/NeCOJPE.png) 4. Refresh the Live bot page and open the bot to view the triggered flow based on the selected event. ![](https://imgur.com/NFNrOfs.png) --- ## Facebook Comments Integrating Facebook comments with the Yellow.ai Cloud platform helps automate responses to comments on your Facebook posts seamlessly. This saves you from the tedious task of individually responding to each comment. Additionally, it improves user engagement and ensures prompt replies to inquiries and feedback. With FB comments integration, you can engage in seamless two-way conversations. :::note [Facebook Messenger](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/facebook-messenger) and Facebook comments function as separate communication channels. ::: The FB comments integration offers these features: * **Automated replies to user comments:** It automatically responds to user comments and effectively manages conversations within each comment using bot flows. * **Multi-user conversations:** When multiple users respond to a single comment, their responses are consolidated within the same conversation thread. * **New conversations stand out:** When a new user comments separately, it starts a new conversation thread within the same comment. * **Works with different message types:** It supports various message types like text, images, file sharing, and quick replies (which get converted into text messages). ## Setting up Facebook Comments bot To set up Facebook comments bot, you need to perform the following: * [Connect Facebook Comments to Yellow.ai](#connect-your-facebook-page-to-yellowai) * [Setup a bot](https://docs.yellow.ai/docs/platform_concepts/get_started/account-setup#create-your-first-bot) on Yellow.ai platform based on your use case. ## Connect your Facebook page to Yellow.ai To connect your Facebook page to Yellow.ai, you need to have a Facebook Business account with at least one Facebook page created. :::note To establish a connection, you must be an admin of the Facebook account and the respective Facebook page. ::: ### Link your Facebook page To link your Facebook page, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Messaging** > **Facebook messenger**. ![](https://imgur.com/SB7Ec9I.png) 3. Click **Connect**.
4. Login to your Facebook account that is connected to your Facebook Business Page.
5. After successfully logging in, click **Continue** to navigate to your page.
6. Select the business you want to grant Yellow Messenger access to, and click **Continue**.
7. Choose the specific business page you want Yellow Messenger to access, and click **Continue**.
8. Review the permissions that Yellow Messenger requires and click **Save**.
* Your Facebook page will be successfully connected to our platform.
10. Select your business page. If you have multiple business pages, select the one for which you want to set up a chatbot and then click **Continue**.
:::note You can connect to an unlimited number of FB pages within a single FB business account. ::: 11. Toggle the button to connect the selected page to your bot. Then, choose either the **Comment to comment** option to reply to comments directly, or the **Comment to inbox** option to view and respond to comments in your inbox. ![](https://i.imgur.com/oO5zj4w.png) :::note If you disable the toggle button, the option to select a **Comment response** will not be available. ::: 12. Click **+ Add Facebook page** to add multiple pages to your bot. ![](https://i.imgur.com/ibTWlWR.png) ## Setup your bot Before you start testing your bot, setup your bot with intents to automatically respond to user comments on your Facebook posts, as explained below. * **Define bot's purpose and scope**: First, understand the scope and purpose of your bot (use case). Clearly outline what types of questions or requests the bot should handle based on your intended use case. * **[Create Intents](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)**: Include the intents for common questions or requests. Add the utterances to each intent and train them to trigger the respective flow. * **[Create flows](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys)**: Design customized conversation flows to manage responses to your FB posts. You can incorporate text, images, and file prompts within the flow. While quick replies are supported, they will be displayed as plain text in the bot's responses. Once you set up the bot, verify whether the bot effectively handles and responds to user comments according to the defined expectations. ## Test your bot on Facebook page Once you have linked your bot to your Facebook page through the Yellow.ai platform, you need to test the bot to verify whether the bot is able to respond to user comments on your Facebook page automatically. To test your bot on Facebook page, follow these steps: 1. Open your Facebook account and navigate to your business page. 2. Add a comment to the Facebook page post to test the chatbot. Ensure that you have created the bot with intents and configured the flows with the same intent. * When a user adds a comment to the post, if the intent matches, the bot should be able to understand the utterance and respond automatically. * If the intent does not match, the bot should be able to respond with a fallback message. 3. If a flow is configured for agent reply using the [raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) node to start a conversation with an agent, it initiates a conversation with the agent. Once a conversation is initiated, the user can talk to the agent. 4. To view the entire conversation between the live agent and user, navigate to the **Inbox** module in the platform and select **Bot messages** in the **My Chats** section. ![](https://i.imgur.com/Ncsbe2k.png) * When the conversation between the agent and user ends, the bot takes the conversation forward with the user. ### Test Facebook comments chatbot with FAQs You can also add FAQs to the bot to simplify bot responses. For example, for a product-related post, you can add all the details related to the product as questions and answers. The bot can respond to customer questions based on the FAQs that you have added. Similarly, you can test your Facebook comments chatbot by adding different options such as order updates, shipping information, and so on. First, [add few FAQs](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs#-1-add-faqs) and train them. Then, test them to ensure that they work as expected. ![](https://i.imgur.com/hj3FKv1.jpg) --- ## Facebook Messenger Facebook Messenger (FBM) is a social media platform that allows you to interact with your users directly through Facebook business pages. FBM integration enables two-way conversations. Businesses can use FBM chatbots to automate customer support, provide order updates, shipping information, and send promotional messages to their users. This integration enables the following key features: * **Automated Replies**: Provides the ability to automatically respond to user messages received in the FBM chat inbox. * **Supported message types**: You can use various message types including text, image, videos, file, carousel, and quick replies, enhancing the communication experience. :::note Facebook Messenger and [Facebook Comments](https://docs.yellow.ai/docs/platform_concepts/channelConfiguration/facebook-comments) function as separate communication channels. ::: **Watch the video on how to setup Facebook Messenger:** ## Limitations of Facebook Business Messenger (FBM) Chat Option | Character limit --------------------|---------------------- Character limit in each quick reply | 22 Maximum number of quick replies | 13 Character limit for the Carousel title | 22 Character limit for Text message | 2000 ## Setting up FBM chatbot To set up FBM bot, you need to perform the following: * [Connect Facebook page to Yellow.ai](#connect-your-facebook-page-to-yellowai) * [Setup a bot](https://docs.yellow.ai/docs/platform_concepts/get_started/account-setup#create-your-first-bot) on Yellow.ai platform based on your use case. * [Test your FBM chatbot](#test-fbm-chatbot) ## Connect your Facebook page to Yellow.ai To connect your Facebook page to Yellow.ai, you need to have a Facebook Business account with at least one Facebook page created. :::note To establish a connection, you must be an admin of the Facebook account and the respective Facebook page. ::: To connect your Facebook page to Yellow.ai, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Messaging** > **Facebook messenger**. ![](https://imgur.com/SB7Ec9I.png) 3. Click **Connect**.
4. Login to your Facebook account that is connected to your Facebook Business Page.
5. After successfully logging in, click **Continue** to navigate to your page.
6. Select the business you want to grant Yellow Messenger access to, and click **Continue**.
7. Choose the specific business page you want Yellow Messenger to access, and click **Continue**.
8. Review the permissions that Yellow Messenger requires and click **Save**.
* Your Facebook page will be successfully connected to our platform.
10. Select your business page. If you have multiple business pages, select the one for which you want to set up a chatbot and then click **Continue**.
:::note You can connect to an unlimited number of FB pages within a single FB business account. ::: 11. Enable the toggle button to connect the selected page to your bot. ![](https://i.imgur.com/xXQOIOy.png) 12. Click **+ Add Facebook page** to add multiple pages to your bot. ![](https://i.imgur.com/ibTWlWR.png) ## Setup your bot Before you start testing your bot, set up your bot with intents to automatically respond to user messages on their Facebook pages. * **Define bot's purpose and scope**: First, understand the scope and purpose of your bot (use case). Clearly outline what types of questions or requests the bot should handle based on your intended use case. * **[Create Intents](https://docs.yellow.ai/docs/platform_concepts/studio/train/intents)**: Add the intents that correspond to common questions or requests from users. Within each intent, add the relevant utterances and ensure they are trained to trigger the appropriate flow. :::note To trigger the respective flow in the FBM chatbot, you must add the utterances `get started` and `Get Started` and train them accordingly. ::: * **[Create flows](https://docs.yellow.ai/docs/platform_concepts/studio/build/Flows/journeys)**: Design customized conversation flows to manage responses to your FBM. You can use the nodes such as name, email, phone number, quick reply, image, video, text, file within the flow. Once you set up the bot, verify whether the bot responds to user according to the defined use case. ## Test Facebook Business Messenger ### Test FBM Chatbot Once you have linked your bot to your Facebook page through the Yellow.ai platform, you need to test the bot to verify whether the bot is able to respond to user messages on their Facebook page. To test your bot on Facebook page, follow these steps: 1. Open your Facebook account and go to your business page. 2. Click **Message**. ![](https://i.imgur.com/8x7cUTb.png) 3. Click **Get Started** to start the conversation with the bot. Make sure you have already created an intent and added the utterances `get started` and `Get Started` to trigger the corresponding flow in your FBM chatbot. ![](https://i.imgur.com/3dOQry2.png) * The FBM chatbot will trigger the relevant flow, and you can start interacting with the bot. :::note If you have not added the `get started` or `Get Started` utterances to your flow, the FBM chatbot will not trigger the intended flow. Instead, a fallback message will be displayed. ::: 4. If a flow is configured for agent reply using the [raise ticket](https://docs.yellow.ai/docs/platform_concepts/studio/build/nodes/action-nodes-overview/raise-ticket) node to start a conversation with an agent, it initiates a conversation with the agent. Once a conversation is initiated, the user can talk to the agent. 5. To view the entire conversation between the live agent and user, navigate to the **Inbox** module in the platform and select **Bot messages** in the **My Chats** section. ![](https://i.imgur.com/o21FqgC.png) * When the conversation between the agent and user ends, the bot takes the conversation forward with the user. :::note To know about Facebook Messaging Policy, refer to the [Facebook doc](https://developers.facebook.com/docs/messenger-platform/policy/). ::: ### Test FBM chatbot with FAQs You can also add FAQs to the bot to simplify bot responses. For example, for a product-related post, you can add all the details related to the product as questions and answers. The bot can respond to customer questions based on the FAQs that you have added. Similarly, you can test your FBM chatbot by adding different options such as order updates, shipping information, and so on. First, [add few FAQs](https://docs.yellow.ai/docs/platform_concepts/studio/train/add-faqs#-1-add-faqs) and train them. Then, test them to ensure that they work as expected.
## Facebook Business best practices ### Facebook Business verification process As the verification process can take more than two weeks, we recommend starting the verification at the beginning phase of the project. #### 1. Access Business Manager Security Center To start the verification process, go to *Security Center* and click **Start Verification** in the Business verification section. ![](https://i.imgur.com/SvbZvVN.png) The **Start Verification** button will be greyed out unless your business needs access to certain features. See the below section on how to enable the button. ![](https://cdn.yellowmessenger.com/4lUE9WFC5jTX1620219352063.png) #### 2. Select your Business If your business is already listed: 1. **Confirm your business details** - Select a phone number that you have access to from the drop-down menu and click **Next**. - Double check for any typos or other errors: you will not be able to edit this information upon submission. 2. **Get a verification code** - Choose to receive the verification code on your business phone number via a text message or a phone call, or via email. Note that the phone number option may not be available in all countries. - Please make sure that the email registered has the same domain as the website. **Accepted Values**: Email: name@business.comSite: www.business.com :::note The following examples are not accepted: - Email: name@gmail.com or name@otherbusiness.com - Site: www.business.com ::: 3. **Get a verification code** - Choose to receive the verification code on your business phone number via a text message or a phone call, or via email. Note that the phone number option may not be available in all countries. - Please make sure that the email registered has the same domain as the website. 4. **Verify your domain** - If your domain is already verified, click **Use Domain Verification**. If not, complete the domain verification process, then return to the Security Centre and select **Continue**. - Enter verification code (not applicable if you use domain verification) - Enter your verification code. Click **Submit**. - You can skip the remaining steps 3 & 4 below. :::note - If you cannot see your business in the list, please select **None of these matches**. Then proceed with [Steps 3](#3-verify-the-legal-business-name) and [Step 4](#4-verify-the-business-address-or-phone-number) below. ::: #### 3. Verify the Legal Business name You may be asked in step 3 to provide official documentation of your business's legal name. Upload an official document that matches the business's legal name you entered in step 1, such as a business license, articles of incorporation, or business tax registration. - Please check [here](#documents-checklist) for the list of the documents accepted and not accepted before submitting them. #### 4. Verify the Business Address or Phone Number - Upload a document that shows both the legal name of your business and the mailing address or phone number shown on the screen. - Please check [here](#documents-checklist) for the list of the documents accepted and not accepted before submitting them. When your business is verified, you will be notified, and you will also see the verified status in your account. ### Checklist for Facebook Business Verification To increase the company's chances of being verified by Facebook, it is important to have the following items checked internally by the respective Business Analysts (BAs) of the projects: - The company's website is active and complete, containing the company's name and address. - The account email is from the same domain as the company's website provided in the documentation. (www.mywebsite.com > xyz@mywebsite.com). - If the verification will be made through the phone number, make sure the number is able to receive the call. If the phone has IVR, ask the client to disable it temporarily. - The company's trade name in the documentation is the same as used on the website and on the Facebook page. If different, the names need to be related in some way on the website. For example, at the footer, enter "Company ABC powered by company D." #### Documents checklist - Document quality / resolution should be good - no pixelation. - Documents should always be signed, especially GST and other accepted documents. - Documents should not be modified or show signs of tampering (e.g., handwritten notes, strikethroughs, white ink, etc.). - The legal business documents should have a matching address. If not, please provide additional documents that prove the address. - English documentation seems to be processed more quickly; currently, the following languages are supported for business verification: #### Website checklist - Website should be accessible, with no geo filters that may prevent FB teams from viewing the website. - The website should be secure (https://). - The website must contain the legal business name, preferably on the home page (e.g., in the footer of the website). - The website domain and email domain (for OTP verification) must be the same. If not, upload DNS records to prove that the legal business entity owns both domains. Another option is domain verification. It is helpful to have ownership of the provided domain. - Upload the website to FB Business Manager. #### Duration As the verification process can take more than two weeks, we recommend starting the verification at the beginning phase of the project. #### Check out Facebbok's official documentation * [Verify your business](https://www.facebook.com/business/help/2058515294227817?id=180505742745347) * [Documents to upload](https://www.facebook.com/business/help/159334372093366) * [Troubleshooting when the business is not verified](https://www.facebook.com/business/help/2342133782492969?id=180505742745347) --- ## Facebook Lead Ads Configuration ## Facebook Lead ads On Facebook, the brands can roll out forms for generating interest and leads among the Facebook users (or potential customers). ### Pre-filled forms The major problem with respect to filling forms in general is the poor form completion rate. The users abandon the form perhaps due to more no.of questions. The FB’s pre-filled forms solve this problem by pre-populating the KYC questions such as name, contact number, email ID. This way the interested usee is expected only to answer the primary requirement they have/the problem they face. This potentially increases the form completion rate. ## The integration with FB’s lead ads ### The process has two parts 1. Requirements and form creation 2. Lead data storage in the Yellow.ai’s backend ### Requirements and form creation 1. A valid [business page](https://www.facebook.com/business) on Facebook for the brand 2. A link to [privacy policy](https://en-gb.facebook.com/business/help/1247534515288168?id=735435806665862) on what all info you will collect, how do you intend to use the data etc ![](https://cdn.yellowmessenger.com/3Tek7aSPVPE21617813693423.png) 3. A valid website URL of the brand ![](https://cdn.yellowmessenger.com/zsXyiXsQ2tM31617811266955.png) 4. A relevant name of the form based on the set of questions (e.g, Yellow Beauty free expert consultation) 5. Add the actual questions the brand intends to ask 6. A relevant description of the form ![](https://cdn.yellowmessenger.com/hSO2YxYbOn8w1617813819307.png) ## Lead data storage in the Yellow.ai’s backend 1. Inside the Yellow.ai platform, navigate to Configuration → Channels 2. Under Channels, select the ‘Facebook Lead Ads’ option ![](https://cdn.yellowmessenger.com/otHQcaj1K7Qe1617814320929.png) 3. Now, tap on ‘Connect with Facebook’ and login with the brand’s account login credentials ![](https://cdn.yellowmessenger.com/Lmdi7Kryb5CF1617814542734.png) 4. After successfully logging in, our platform gets connected with the FB account. 5. Now, select the Facebook page associated with your brand that you want to integrate with the Yellow.ai platform. 6. The page ID and access token gets auto-filled 7. Select the Unique ID (UID) based on the form you created and click on ‘Connect’. ![](https://cdn.yellowmessenger.com/IscS4jemLXJB1617814556215.png) 8. Once successfully connected, test the flow from form submission to lead storage in YM’s backend. Go to ‘Lead Ads Testing Tool’. ![](https://cdn.yellowmessenger.com/Ot6b7ANaPg1p1617814575258.png) 9. Test the form submission flow by choosing the brand’s associated page and the form created already. ![](https://cdn.yellowmessenger.com/g3qhlH0LZOGb1617814588764.png) 10. The leads captured live get stored onto the Yellow.ai’s backend which can be used by the brand for customer engagement. Congrats! With this, you have understood how to configure 'Facebook Lead Ads' to the Yellow.ai platform. --- ## Facebook Workplace Facebook Workplace is an online collaborative tool that helps businesses and organizations to communicate and collaborate with internal team members. Using this tool, you can create various channels that help you to manage work-related activities such as group discussions, project management; file, image, or video sharing, and updates related to specific projects. You can have both public and private channels. On Facebook Workplace, bots are represented as pages. A page is automatically created for a custom integration app. Only system administrators of a workplace community can create apps and generate access tokens in that community. ## Character limitations of Facebook workplace channel In this section, you can view the character limitations of Facebook workplace channel. ### Message types Message types options | Character limit ----------------------|------------------ Text | The maximum number of characters supported is 2000. Image | The maximum size of an image is 8 MB. Video, audio, and other file types | The maximum size is 25 MB. ### Quick Reply Quick Reply options | Character limit --------------------|--------------- Quick reply title | The maximum number of characters supported is 2000. Quick Reply buttons | A maximum of 13 quick reply buttons are supported. Quick Reply button title | The maximum number of characters supported is 20. ### Carousel Carousel options | Character limit --------------------|--------------- Cards | A maximum of 10 cards per message is supported. Title | The maximum number of characters supported is 80. Subtitle | The maximum number of characters supported is 80. Buttons | A maximum of 3 buttons per card are supported. ## Setup Facebook workplace channel using developer portal You need to register for a new system admin account in the [Facebook Workplace](https://yellowtest150.workplace.com/) Developers Portal (`https://.workplace.com/work/admin`) to create a Facebook Workplace channel. To setup Facebook workplace channel to your bot, configure the following: * [Create Custom Integration](#step-1-create-a-custom-integration) * [Get App ID, App Secret, and Access token](#step-2-get-app-id-app-secret-and-access-token) * [Provide Permissions to interact with your bot](#step-3-provide-permissions-to-interact-with-your-bot) ### Step 1: Create a Custom Integration To create a Custom Integration, follow these steps: 1. Log in to your Facebook Workplace admin account and click **Integrations**. ![](https://i.imgur.com/9PZIuk2.png) 2. On the *Home* page, click **Admin Panel**. ![](https://i.imgur.com/lRfafEf.png) 3. Click **Create Custom Integration** to provide authorization to create a channel between Facebook Workplace and Yellow bot. ![](https://i.imgur.com/KYTghT9.png) 4. Under *Create Custom Integration*, enter the following details: i. Enter the **Name** of your integration. ii. Enter a short **Description** of your integration. iii. Click **Create**. * You will see the integration details. You can update the integration details if required. ![](https://i.imgur.com/kFgr8O6.png) ### Step 2: Get App ID, App Secret, and Access token To get the App ID, App Secret, and Access token from Facebook Workplace developer portal, follow these steps: 1. On the Integration details page, click on the below highlighted icon and copy the **App ID** and **App Secret**. 2. Click **Create access token**. 3. Select the **I Understand** box to agree to access token guidelines and click **Copy** to copy the access token, then click **Done**. :::note * Access tokens cannot be retrieved but new token can be generated. ::: ### Step 3: Provide permissions to interact with your bot You need to select your preferred permissions for your users to interact with the bot in the workplace. To grant permissions, follow these steps: 1. On the Integration details page, click **Permissions**. ![](https://i.imgur.com/gonyJfv.png) 2. Select the following permissions: * **Message any member** - Send a message to any member in the workplace. * **Read user email** - See any group member's email address. * **Read work profile** - See any group member's complete profile, including phone number, department, and location. * Click **Save**. ![](https://i.imgur.com/gQpDGVn.png) ## Connect Facebook workplace to your bot #### Prerequisite * Copy the App ID, App Secret, and Access token from the developer portal to connect the Facebook workplace channel to your bot on the platform. To connect Facebook workplace channel to your bot on the platform, follow these steps: 1. On the left navigation bar, click **Extensions**. ![](https://imgur.com/PIOvT6K.png) 2. Click **Channels** > **Messaging** > **Facebook workplace**. ![](https://imgur.com/B6G17vC.png) 2. Enter the **App ID**, **App secret**, **Access token** that you have copied from the workplace developer portal admin account and click **Save**. ![](https://imgur.com/82KAzw7.png) * Your Facebook workplace channel will be successfully connected. 3. Navigate to the **Overview** page, under the **Active channels** section, to verify that the Facebook workplace channel is successfully connected to your bot. ## Configure Webhook for custom integration After connecting your bot to the Facebook workplace channel, you need to subscribe to events under **Page** section of the *Configure Webhooks*. To setup a Webhook on the workplace, follow these steps: 1. On the Integration details page, click **Webhooks**. ![](https://i.imgur.com/2YYIUru.png) 2. Click **Edit** icon corresponding to the Page. ![](https://i.imgur.com/k3Xkui6.png) 3. By default, a callback URL is displayed after successfully connecting your bot to the Facebook workplace channel. Select **messages** and **messaging_postbacks** and click **Save**. ![](https://i.imgur.com/CJ8Kl76.png) ## Test your bot on Facebook workplace After connecting your bot to the Facebook workplace, you can test your bot. #### Prerequisites * Ensure that you have created the bot with intents and configured the flows with the same intent. For more information, click [here](https://docs.yellow.ai/docs/platform_concepts/get_started/createfirstbot). To test your bot on Facebook workplace, follow these steps: 1. Go to your Facebook workplace developer account. 2. On the Home page, select your bot. ![](https://i.imgur.com/WXAHifW.png) 3. Start the conversation to test your bot based on the configured flow. ![](https://i.imgur.com/uKFbqE1.png) --- ## Customize chat bot using functions Yellow.ai offers a wide range of options to customize features for its web widget. However, sometimes our clients might need even more flexibility in crafting the widget’s design, and functionality unique to their use cases. There are certain tricks that you can use to customize your web widget to suit your business needs. If you have integrated Yellow AI’s chat widget on Android/iOS app, see [Android chatbot SDK](https://docs.yellow.ai/docs/platform_concepts/mobile/chatbot/android) and [iOS chatbot SDK](https://docs.yellow.ai/docs/platform_concepts/mobile/chatbot/ios). This section guides you with different ways to customize your chat widget’s visibility and functionality. In this article, you will learn: * [How to customize the visiblity of bot icon on the website?](#customise-the-appearance-of-your-chat-widget) * [How to trigger a flow using functions?](#trigger-specific-flow-using-function-in-the-payload) ## Customise the appearance of your chat widget If the bot’s default customization settings do not match your brand guidelines, or if you do not want to display the bot right after the page load, you can use the following steps to set up the bot in a way so that it is displayed only when you want it to. First you will have to insert the default script given to you by yellow.ai at the `