Set-up Custom Chatbot Tools

WonderChat Tools allows you to create custom Tools that enable your AI chatbot to interact with external APIs, making it more dynamic and versatile.

How to create a Wonderchat Tool

The main benefit of adding a custom tool to your chatbot is to provide easier access to information from various apps. Instead of developers creating complex interfaces, they can describe an API to Wonderchat, which then acts as a bridge between users and the service.

  1. To create a Wonderchat tool, select the 'Tool' option from the dashboard, or click on Edit Chatbot

    Select "edit chatbot" from the dropdown menu

  1. Within the edit chatbot menu, click on the “Tools” tab

  1. You will be redirected to the tools page, where you can click on "add custom tools"

    Add a custom tool to your page

  1. Afterwards, you can create a custom tool from the menu

Add a new Wonderchat Tool

Creating a New Tool

Once you click on “Create tool”, you will be redirected to the new action menu.

You will then be asked to fill in relevant information to perform the API call.

Step 1: Basic Info

  1. Tool Name:

    • Provide a unique name for the action. This name will be used to identify the action within your chatbot's configurations.

    • Example: Get Weather API

  2. Tool Description:

    • Write a brief description of what the action does. This description helps you remember the purpose of the action when managing multiple actions.

    • Example: A simple API for getting the weather information of a location.

  3. Tool API URL:

    • Enter the URL of the API endpoint that this action will interact with. Ensure the URL is accurate and points to the correct resource.

    • Example: https://myapi.com/getweather

  4. HTTP Method:

    • Select the HTTP method that the action should use when making requests to the API. The available options typically include GET, POST, PUT, DELETE, etc.

    • Example: GET

  5. Authorization Method:

    • Choose the authorization method required to access the API. Options include "No Authorization Required", "API Key", "Bearer Token", etc.

    • Example: No Authorization Required

    • If the API requires authorization, additional fields will appear for you to enter the necessary credentials, such as API keys or tokens.

Step 2: Input Parameters

After setting up the basic information, you'll need to define the input parameters for the action.

Add input perimenters
  1. Parameter Name:

    • Define the name of the parameter that the user must provide. For example, if you’re retrieving weather data, a parameter could be location.

  2. Parameter Type:

    • Specify the type of input expected, such as string, integer, float, etc.

  3. Required:

    • Indicate whether this parameter is mandatory for the API request to be successful.

  4. Default Value (Optional):

    • You can specify a default value for this parameter, which will be used if the user does not provide one.

Step 3: Display Options

In this step, you can customize how the Tool's output will be displayed to the user.

  1. Inform user if action is called:

    • Toggle this button on and off if you want a user to be informed when a Wonderchat Action is called.

  2. Action called Display Message:

    • Choose a name for how this action’s result should be labeled in the user interface.

Step 4: Debug & Verify

Finally, you can debug and verify that the action works correctly:

  1. “Run” and Test Tool:

    • “Run” your inputs to ensure that the Tool interacts with the API as expected and returns the correct data.

  2. Review Response:

    • Check the API response for any errors or issues, and adjust the action settings if necessary.

  3. Create Tool:

    • Once you’ve verified everything is working correctly, save the action. It will then be available for use within your chatbot workflows.


Deploy your Tool in a Chatbot Workflow

Once your tool is created, it can be integrated into your chatbot's workflow. You can set triggers for this action based on specific user inputs or events within the chat.

  • Triggering the Action: You can configure your chatbot to trigger the action based on user questions or commands.

  • Handling the Response: Customize the chatbot’s response to the user based on the data returned by the action.

Sample use case of how to fetch live weather information from the weather API

When a user asks, "What's the weather like in Singapore?", the chatbot can trigger the Get Weather API action, pass the Singapore location as a parameter, and return the current weather information using the API response.

Last updated

Was this helpful?