Custom Actions: Connect Your AI to Any API
Custom Actions let you extend your BotLance AI agent beyond built-in capabilities by connecting it to REST APIs, webhooks, CRMs, proprietary systems, and other external services. Configure the request, pass dynamic data, control how responses are handled, test the action, and reuse it across AI conversations and workflows.
Custom Actions: Connect Your AI to Any API
Introduction
Every business has processes that are unique to the way it operates. While BotLance provides built-in AI capabilities, you may sometimes need your AI to communicate with a system or API that isn't available as a native capability.
Custom Actions give you the flexibility to build exactly that.
A Custom Action allows your BotLance AI agent to communicate with an external system through an API, webhook, or endpoint. This could be a CRM, an internal business application, an ecommerce system, a proprietary platform, or almost any service that provides an HTTP-based interface.
Instead of waiting for a native integration to be available, you can define the request yourself and give your AI access to the capability your business actually needs.
Turn APIs Into AI Capabilities
The real power of Custom Actions comes from connecting external functionality directly to your AI agent.
Imagine a customer asks about an order. Your AI can use a Custom Action to send the customer's information to your order system and retrieve the latest status.
Or perhaps you have a custom CRM, a lead management system, a shipping calculator, or an internal application. If that system provides an API or webhook endpoint, you can create an Action that allows your AI to interact with it.
The customer doesn't need to know that an external API exists. They simply tell the AI what they need, and the AI can use the appropriate Action when it is available.
This transforms an AI agent from something that only provides information into something that can interact with the systems behind your business.
Create a Custom Action
When you create a Custom Action, BotLance provides a dedicated workspace where everything can be configured in one place.
Start by giving the Action a clear name and description. The name identifies the capability, while the description helps explain what the Action does and gives the AI useful context about when it should be used.
You can then enable the Action when you're ready to make it available to your AI agent.
The configuration is organized into dedicated areas for execution, HTTP requests, code, response handling, testing, and logs, making it possible to build and verify the entire Action without moving through separate setup systems.
HTTP Requests
The HTTP configuration is where you define how BotLance communicates with your external endpoint.
You can select the appropriate HTTP method, including methods such as GET, POST, DELETE, and other supported methods, depending on what your API requires.
You can then enter the endpoint URL and configure the request using headers, query parameters, and a request body.
This makes Custom Actions flexible enough to work with APIs that have very different requirements. Whether an API expects information in the URL, query string, headers, or request body, you can configure the request accordingly.
Dynamic Data With Variables
Custom Actions can use variables to pass dynamic information into your requests.
For example, instead of sending a fixed email address, your request can use the customer's actual email address at runtime. BotLance replaces supported variable references with their corresponding values when the Action runs.
This allows a single Custom Action to work dynamically for thousands of conversations instead of being tied to one set of static data.
You can use available system fields and supported custom variables to construct requests that contain the information your external system needs.
For example:
{{system.name}}
{{system.email}}
{{system.phone}}Request Body
For APIs that require data in the request body, you can write JSON or other supported content directly in the request configuration.
For example:
{
"name": "{{system.name}}",
"email": "{{system.email}}"
}Response Handling
One of the most powerful parts of Custom Actions is the way BotLance handles the response returned by an external system.
When an API responds, the result doesn't have to be manually converted into a rigid format before your AI can use it.
BotLance provides two approaches.
Send the Full Response to AI
With Send full response to AI, the complete response from the external system is passed directly to the AI as the Action result.
The response can contain a JSON object, an array, nested JSON, text, or other supported response data. The AI receives the complete result and can determine which information is relevant to the customer's request.
This removes a significant amount of manual mapping and makes Custom Actions especially powerful when working with APIs that return complex or changing data structures.
For example, an API could return customer information, order details, status fields, nested objects, or multiple records. Rather than requiring you to map every field individually, the AI can read the returned data and use the relevant information naturally in its response.
Map the Response
If you need more precise control, you can choose Map Response instead.
Mapping allows you to select specific values from the external response and store them in available BotLance fields or variables. This is useful when you only need particular pieces of information or when the returned data needs to be used elsewhere in your BotLance setup.
This gives you the choice between AI-driven flexibility and explicit field-level control.
Test Your Action
Custom Actions include a dedicated Testing area where you can provide a test payload and run the Action before making it available in a live conversation.
Enter the data you want to send to the Action and run the test to verify that the request reaches the configured endpoint and that the returned response is handled correctly.
As the testing experience evolves, BotLance can also provide a clearer request preview before execution, allowing you to see the final endpoint, parameters, headers, and payload that will be sent. This makes it easier to verify exactly what your Action is going to send before executing it.
Testing is especially important when working with external APIs because it allows you to identify configuration problems before customers encounter them.
Logs
The Logs section provides visibility into Action execution. This gives you a useful place to investigate what happened when an Action was executed and helps with troubleshooting when an external service doesn't respond as expected.
When you're building or maintaining an Action, logs can make it much easier to understand whether an issue is related to the request, the external endpoint, or the returned response.
Custom Actions Inside AI Conversations
Once a Custom Action is configured and enabled, your AI agent can use it as one of its available capabilities.
The AI understands the customer's request and determines when an available Action is appropriate. When the Action is triggered, BotLance executes the configured request, receives the result, and makes that information available to the AI according to your response-handling configuration.
The customer simply experiences a natural conversation while BotLance handles the communication with the external system behind the scenes.
Custom Actions in Workflows
Custom Actions aren't limited to AI agent conversations.
They can also be used inside AI Workflows through the Action node. When configuring an Action node, you can select the appropriate Action, including your Custom Actions, and use it as part of an automated workflow.
This means a Custom Action can operate as an external request inside a larger automation.
For example, a workflow could collect information from a customer, send that information to an external API through a Custom Action, receive the result, and then continue the workflow based on that result.
This makes Custom Actions a bridge between BotLance's AI and workflow systems and the external services your business already relies on.
Built for Flexible Integrations
Custom Actions are not designed around one particular platform. They provide a general-purpose way to connect BotLance with systems that support APIs, webhooks, and HTTP endpoints.
You can use them to build capabilities for CRM systems, ecommerce platforms, internal tools, business applications, databases exposed through APIs, or proprietary software.
The result is a much more flexible AI platform where your agent isn't limited to a predefined list of capabilities.
A Powerful Extension of Your AI
Custom Actions give BotLance AI agents a way to interact with the real systems behind a business.
Your AI understands the customer's intent. The Custom Action provides the connection to the external system. The API performs the operation or returns the information, and the AI can then use that result naturally in the conversation.
With support for flexible HTTP requests, dynamic variables, configurable response handling, testing, and workflow usage, Custom Actions provide a powerful foundation for extending what your AI can actually do.
And because the system is designed to grow, the capabilities available through Custom Actions can continue expanding as BotLance evolves.