Skip to main content
Actions

Know the caller before the call starts

Look up the caller in your own system before the agent says hello.

A Pre fetch asks your system about the caller while the call is being set up and gives the answer to the agent before its first word — so it can greet a returning customer by name, see an open order or know the caller's tier.

Set it up​

  1. Add a Pre fetch

    Open the agent → Actions → Add Tool and pick Pre fetch at the top of the menu.

  2. Point it at your endpoint
    FieldWhat to enter
    NameA short name, e.g. crm_lookup. It is also the name of the block the agent reads
    API URLYour endpoint, e.g. https://crm.example.com/lookup?phone={phone}
    HTTP MethodGET fits best; POST, PUT, PATCH and DELETE work too
    HeadersOptional, e.g. your API key
    Query ParametersOptional; a new pre fetch starts with phone={phone}
  3. Use the placeholders

    These are filled in for each call, in the URL, headers and parameters:

    PlaceholderValue
    {phone}The caller's number; on an outbound call, the number dialled
    {direction}inbound or outbound
    {agent_id}The agent's ID
    {user_id}The account owner's ID
    {call_id}The call's ID — match it with the data you get after the call

What the agent gets​

Your answer is added to the agent's instructions as a named block. If your endpoint returns { "name": "Sarah Johnson", "tier": "Gold", "open_orders": 1 }, the agent reads it before the greeting. You can say in the prompt what to do with it, e.g. if the call context has the customer's name, greet them by name.

Limits​

  • Phone calls only — a web call has no number to look up.
  • Each request has 1.5 seconds, all of them together 2 seconds. A slow or failing endpoint never delays the greeting: the agent starts without that block.
  • Answers longer than 8 KB are cut. Return a few fields, not the whole customer record.
  • A pre fetch always runs; it has no condition.

Use cases​

  • Greet returning customers by name.
  • Know the open order before the caller explains it.
  • Treat VIP numbers differently from the first sentence.