Ask AI
HomeInstructionsUnderstanding Custom Actions in Bot9

Understanding Custom Actions in Bot9

In the landscape of conversational AI, Custom Actions in Bot9 are analogous to API requests in tools like Postman. They expand the chatbot’s capabilities by enabling it to interact with external APIs to send or retrieve data, providing a personalized and dynamic user experience.

What are Custom Actions?

Custom Actions are predefined operations within Bot9 that can be executed during a conversation with a user. These actions can range from sending data to external services to requesting information necessary to assist the user effectively.

How Custom Actions Work

Imagine you’re using Postman to test API endpoints. You define a request, specify the HTTP method, add headers for authorization, and send data or parameters. Similarly, in Bot9:

  1. Define the Action: Start by naming your Custom Action and providing a clear description of its function.

  2. Configure the Request:

    • Method Type: Choose your HTTP method based on the operation you want to perform (e.g., GET to retrieve data, POST to create or update data).

    • Request URL: This is the endpoint to which Bot9 will send the request.

    • Headers: Add any necessary HTTP headers (like Content-TypeAuthorization, etc.).

    • Body/Params: For POST or PUT requests, configure the payload. For GET requests, set up any required query parameters.

  3. Activate the Action: After setting up the action, you must activate it to enable its use within the chatbot’s workflow.

Utilizing Variables

Bot9 Custom Actions can dynamically utilize variables such as conversationIdexternalIdcustomerNamecustomerEmail, and customerPhoneNumber. These can be used to personalize the request, similar to how environment variables are used in Postman for different server environments.

Setting Up Instructions to Trigger Actions

Once a Custom Action is created and Activated, you must link it to a triggering event:

  1. Instruction Creation: Formulate an instruction that dictates when the Custom Action should fire. The conditions should align with the specific use case you are addressing.

  2. Function Tagging: It is essential to tag the function name accurately within the instruction to ensure the correct Custom Action is called.

Testing and Security

Testing is critical. Like sending test requests in Postman, ensure your Custom Actions work as expected before going live. Security is equally important—always use secure connections and handle data in compliance with privacy standards.

Conclusion

Custom Actions are the heart of Bot9’s ability to provide tailored solutions. They offer a means to communicate with external systems and services, bringing the power of API interactivity directly into the conversational flow of your chatbot, much like Postman does for API development and testing.

With these capabilities, Bot9 goes beyond static responses, offering real-time, personalized interactions based on live data. Whether you’re providing order updates, processing transactions, or fetching user-specific data, Custom Actions are essential tools for creating an intelligent, responsive chatbot.

Here are useful read for you:

  1. Create Your First Custom Action: Sending Emails with Your Own SMTP on Bot9

Copyright © 2024 Bot9. All rights reserved.