Skip to main content
A customer asks, “Where is order A-1003?” Your agent can use a custom tool to look up the order in your system and explain its current status in the conversation. You configure when to use the tool and what information to collect. Your endpoint looks up the order and returns the facts. Visito turns those facts into a reply.

Choose what to connect

Use Knowledge for information such as policies and FAQs. Use a custom tool when the answer depends on a fresh lookup: an order status, stock level, appointment slot, or account balance. For this walkthrough, use one read-only operation: get the status of one order. Keep cancellations, refunds, and order updates as separate tools.

Before you start

You need administrator access to the correct Visito workspace, an endpoint reachable from Visito’s backend, and a test order in that system. Use a workspace without live customer channels for your first experiment. Ask your developer for:
  • The endpoint URL, HTTP method, and authentication secret.
  • The input field names, such as order_number.
  • One known order and one unknown order to test.
  • A small JSON response with status information that is safe to show to the customer.
Don’t have an endpoint yet? Follow the runnable order-status example, then return here. The URLs and order data below are examples; replace the endpoint with your own working URL.
Playground sends real requests to your configured endpoint. It does not simulate your order system. The Active setting also makes the tool available for live execution; it is not a Playground-only release switch.

1. Add the tool definition

Open Tools → Build → Tool calls → Definitions, then select New definition. Tool definitions in Build Fill in these fields: Use this description to explain when the tool helps and when to ask a follow-up question:
The schema describes the information the agent should collect. Paste the schema, not an example order or the whole HTTP request:
Save the definition. You can edit it later; leave Secret blank to keep the saved value.

Understand the three switches

  • Active makes the definition available to the agent. Inactive tools are not available for normal conversations, including Playground.
  • Read only declares that the endpoint does not change data. It does not enforce that behavior on your server.
  • Playground allows a tool that changes data to run in Playground. Active read-only tools are already eligible even when this switch is off. Turning it off is not a way to disable testing of a read-only tool.

Use the right credential

The secret here authenticates Visito → your system. A Visito API key authenticates your application → Visito and is only needed if you manage or test tools through the API. For API key authentication, enter the exact Header name your endpoint expects, such as X-API-Key, and its secret. For Bearer authentication, Visito adds Authorization: Bearer ... automatically. Keep credentials out of the description, schema, and chat messages.

2. Check the endpoint before the conversation

Have your developer send this request to your endpoint with the configured authentication:
For a POST tool, the order number is inside arguments, not at the top level. A suitable response is HTTP 200 with:
A normal “order not found” result can also use HTTP 200:
This means the lookup worked but found no matching order. Reserve HTTP errors for failed requests, such as invalid input, authentication failure, or an unavailable order service. Your developer can also use the Visito test endpoint while the definition is inactive. This checks the saved URL and credentials and creates an activity log. It does not test whether the agent chooses the tool or writes a good answer. There is no separate endpoint-test form in the current Tool calls editor.

3. Try the customer experience in Playground

In your test workspace, turn Active on and save. Open Agent → Playground and select New chat. The following are illustrative conversations using the sample response above. Wording can vary; compare the facts, the tool input, and the outcome.

A customer supplies the order number

The running activity may be brief for a fast endpoint. Spaces replace underscores in the displayed tool name.

A customer doesn’t know what to provide

Check that the agent asks for the missing number before calling your system. If it guesses a number, improve the description and agent instructions, then start a new chat and retest.

An order isn’t found

Action completed means the HTTP call succeeded. It does not mean the order exists, has shipped, or has been delivered. The returned data determines the business result.

The order system is unavailable

The agent should acknowledge the failed lookup without inventing a status. If you want a human follow-up, configure and test a handoff rule.
These activity receipts are for operators. Customers receive the assistant’s answer, not the receipt or raw JSON. In live Conversations, the success receipt is the compact Action completed.

4. Inspect what actually happened

Open Tools → Build → Tool calls → Activity logs, filter by get_order_status, and open the relevant row. Match its time to your test. Verify the input order number, endpoint and method, HTTP status, response body, duration, and any error. Configured authentication headers are redacted; request and response bodies should contain only necessary data. Each tool-call attempt consumes one credit, separately from a completed AI response. See credit usage.

5. Use it with customers

Before activating the definition in your customer workspace, repeat the known-order, missing-number, unknown-order, and unavailable-system tests. Verify that your backend checks which orders the requester may see; knowing an order number alone is not proof of ownership. Switch from sample data to your real lookup, keep the response limited to customer-safe facts, and review the first activity logs and replies. To stop future agent calls, edit the definition and turn Active off. This does not undo an in-flight request.

Adapt the same pattern to availability

For a simple stock lookup, name the tool check_stock and require a sku. Your endpoint might return:
Test “Is the blue mug in stock?” and “Do you have SKU MUG-BLUE?” The agent should obtain the required SKU or use a separate catalog lookup before checking stock. An availability lookup does not reserve inventory or create a booking.

Build the sample endpoint

Run a small order-status backend and connect it to your tool definition.