Kollie Logo
Microsoft for Startups
HubSpot solutions technology partner
Browse all articles

Look up live data during a call

Let your agent call an API in the middle of a conversation, based on what the caller says, and use the result in its next reply.

Last updated:

On this page

The Call API skill lets your agent send or retrieve information from an external system at one of three moments in the call lifecycle: before, during, or after the call.

This article covers the During Call mode, in which the agent triggers an API request in the middle of an active conversation, based on what the caller has said, waits for the response, and uses the result naturally in its next reply.

For API calls that run before the call starts (for example a caller lookup) or after the call ends (for example CRM logging), see Send or fetch data before or after a call.

When to use it

Use During Call when your agent needs to:

  • Look up live data based on something the caller just said (order status, account balance, product availability)
  • Verify information mid-conversation (membership validity, booking reference, ID lookup)
  • Calculate or fetch a value the agent has to read back to the caller (quote, price estimate, ETA)
  • Trigger an automation in a tool like Make.com, n8n, Zapier or a custom endpoint while the caller is still on the line

If the data is available before the call (or only needs to be sent after the call), use Pre Call or Post Call instead.

How it works

When the agent decides the moment is right, based on instructions you write in the Main Objective and the skill's description, it sends an HTTP request to a URL you specify, waits for the response, and then uses the result in its reply.

You control:

  • The endpoint: URL and HTTP method (GET or POST)
  • Parameters: what gets sent in the request
  • Headers: authentication tokens or custom headers, if needed
  • Results: which fields from the response the agent is allowed to see and use (unique to During Call mode)

Setup steps

  1. Go to Agent → Skills → Add Skills.
  2. Click Call API.
  3. Configure the fields:
    • Execution order: set to During the call
    • Action name: a clear snake_case name like check_order_status. You'll reference this in the Main Objective as {{action_name}}.
    • Description: a short sentence explaining what the action does. The agent reads this to decide when to use it.
    • API endpoint: the full URL of your endpoint
    • Method: GET or POST
    • Parameters (optional): values to send with the request; see "Parameters" below
    • Results (optional): which response fields to expose to the agent; see "Results and Path" below
    • Headers (optional): authorization tokens or custom headers. Webhook endpoints from Make.com, n8n or Zapier typically don't need auth; leave this empty in those cases.
  4. Toggle Activate skill to enable it.
  5. Click Create.

Parameters: static vs dynamic

Each parameter has a Name and a Description. The same interface handles two distinct use cases.

Static parameters

The agent always sends the same value. Write the value itself in the Description field.

NameDescription
sourcevoice_agent

The payload sent to your endpoint will always include "source": "voice_agent".

Dynamic parameters

You want the agent to capture a value from the conversation and send it. The Description tells the agent what to look for; the Main Objective tells it when to use the action.

NameDescription
order_numberThe order number the caller provides

Main Objective excerpt:

If the caller wants to check their delivery status, ask for their order number and call {{check_order_status}}. Then tell them the status and estimated delivery date.

Results and Path

The Results section is optional and controls how the agent reads your API response.

  • Leave it empty: the agent gets the full response and can reference any field by name in the Main Objective, including nested fields. Easy setup, less control.
  • Add Result entries: only the fields you map are visible to the agent. Anything unmapped is hidden, which is useful for keeping debug info, internal flags or sensitive data out of the conversation.

Each Result has three fields:

  • Name: the variable name you'll reference in the Main Objective, like {{customer_name}}
  • Path: the location of the value in the JSON response, using dot notation for nested fields
  • Description: what the field represents; helps the agent use it correctly in conversation

Example

If your endpoint returns:

{
  "customer": {
    "name": "Ferguson",
    "member_tier": "Gold"
  },
  "internal": {
    "secret_code": "XYZ-9921"
  },
  "debug_info": "ignore me"
}

And you configure:

NamePathDescription
customer_namecustomer.nameThe caller's name
member_tiercustomer.member_tierThe caller's member tier
secret_codeinternal.secret_codeVerification code

Then the agent can use {{customer_name}}, {{member_tier}} and {{secret_code}} in the prompt. The debug_info field is completely hidden from the agent, since it was not mapped.

Path notation

  • For top-level fields, use the field name directly: status
  • For nested fields, use dot notation: customer.membership.tier
  • Each Result entry maps exactly one value

Writing the Main Objective

Because the action runs during the call, you must give the agent a clear instruction telling it when to trigger the action and how to use the response. A good instruction includes:

  1. The trigger: what the caller has to say or ask for
  2. The action name: which action to call
  3. What to do with the result: which fields to read back, and what to say

Example:

If the caller asks about their delivery, ask for their order number, then call {{check_order_status}}. Tell them the package status using {{status}} and the expected arrival using {{estimated_delivery_date}}.

Worked example: shipment tracking

Scenario: the caller asks "where is my package?"

Action configuration:

  • Execution order: During the call
  • Action name: check_order_status
  • Description: Fetch shipment tracking information for a given order
  • API endpoint: https://api.shippingcompany.com/tracking
  • Method: GET
  • Parameter: order_number (Description: "the order number the caller provides")
  • Results:
NamePathDescription
statusstatusCurrent shipment status
estimated_delivery_dateestimated_delivery_dateExpected arrival date

Main Objective excerpt:

If the caller asks about their package or delivery, ask for their order number and call check_order_status. Use {{status}} and {{estimated_delivery_date}} to answer the caller clearly.

Resulting conversation:

Caller: "Where is my parcel?"

Agent: "Sure, could you give me your order number?"

Caller: "It's 4471."

(Agent calls the API in real time.)

Agent: "Your package is in transit and should arrive on October 24th."

Other example use cases

Membership verification:

If the caller mentions their membership ID, call check_membership_status to confirm whether their account is active. Use {{membership_status}} to tell them.

Price lookup:

When the caller asks for a quote, ask which product and quantity they need, then call get_price_estimate. Read back {{estimated_price}} to them.

Live availability:

If the caller asks whether a product is in stock, ask for the product name and call check_stock. Tell them {{stock_status}} and, if available, {{quantity_available}}.

Things to know

Empty Results means the agent sees everything

If you don't add any Result entries, the agent reads the whole response. To hide certain fields, you have to opt in by configuring Results and only mapping what you want exposed.

No native error handling

If your endpoint times out, returns an error, or sends back empty fields, the skill has no built-in fallback. The agent will simply have no data and may go quiet, ask the caller to repeat, or in some cases hallucinate.

Always include explicit fallback instructions in your Main Objective:

Tell the caller their order status using {{status}}. If you don't have this information, apologize and offer to follow up by email.

Fallbacks should be specific. Vague fallbacks lead to vague hallucinations.

Latency affects the conversation

The agent has to wait for your endpoint to respond before continuing. Slow endpoints create awkward silences on the call. Aim for sub-second responses where possible, and consider using Pre Call mode if the data is needed at the start of the conversation.

Authentication

If your endpoint needs authentication, add the credentials in the Headers field (for example Authorization: Bearer your-token-here). Many webhook services don't require headers; leave that section empty in those cases.

The Call API skill in During Call mode gives your agent live access to your systems, letting it fetch information, verify details or perform real-time actions while keeping the conversation natural. The key to using it well is being precise about which fields the agent can see (Path) and giving it clear instructions for both success and failure cases (Main Objective).

Related articles

Still need help?

Can't find the answer you're looking for? Send us a ticket and our support team will help you set up and improve your agents.

Submit a support ticket