Lookups

A lookup is a Call your endpoint action that your agent uses to read one answer from your own system: where an order is, which plan a customer is on, whether a booking is confirmed. You choose the address, the key, and the few fields your agent may see. Nothing else from the reply reaches it.

Lookups are on Growth. On Free and Starter, Call your endpoint is locked, with a link to your plans.

Add one

Open the agent’s Tools page, press Add an action in Your actions, and choose Call your endpoint. The editor opens beside the page, or as a sheet on a phone, and takes you through six steps. To change a lookup you have, press Edit on its card.

  1. Start. Paste a cURL command, import an OpenAPI file, start from a template, or start from scratch.
  2. Request. The address, whether it only reads or changes data, and the key it signs in with.
  3. Try. Run it once against your real endpoint with a real value, and tick the fields your agent may read.
  4. Match. Shows what the visitor gives. Use two values, like an order number and an email, so one alone never opens a record.
  5. Use. Name it, and say in one sentence when your agent should use it.
  6. Turn on. Switch it on for this agent and press Save.

A lookup is saved switched off unless you turn it on in the last step, and your agent has never heard of it until then.

Look up an entry in a private list

A Support Agent can also open one entry of a private list, such as an order, when a person gives two details that both match it: the entry’s reference and a second detail you choose from its required text fields, like a surname. One detail alone never opens it, and a miss never says which detail was wrong.

When your workspace has a private list, the agent’s Tools page shows Lookups. Press Look up a … for a list, or Edit on one you set up, and go through five steps: Where to look, Match, Try it (a test that never counts as live), Use (what your agent may say, and what it never shows: the second detail and contact details) and Turn on. Its switch, beside Lookups, is the Existing customers skill, so Skills and Lookups always agree, and it stays off until you switch it on. Only owners and admins can change it.

Guesses are limited. Each hour a conversation can miss 5 times and one network address 20 times, and the workspace allows 120 tries in all. Only misses count against a conversation or an address, so a visitor who matches is never cut off. Past a limit the agent says it can’t check right now and offers to pass the details to your team.

Start from a cURL command or an OpenAPI file

Both are read in your browser. They use no AI, and the file or command never reaches hiy until you save what it produced.

  • Paste a cURL command. The address, the method and the key come across. Each value in the query string becomes an input your agent fills from the conversation, up to four, and the value you pasted is kept to try it with. A key in the command, whether a bearer token, a username and password, or an API-key header, is saved to the credential store when you press Save key, and never goes into the lookup itself.
  • Import an OpenAPI file. JSON or YAML, OpenAPI 3, up to 1 MB. You see its operations with a Read or Write chip, pick one, and get its address, its inputs and the kind of key it takes. The reply fields the file describes are listed as suggestions to tick in Try.

Whatever the import could not keep is listed by name, for example Header X-Tenant, so you can see what was left out. A key written into the address (?api_key=…) cannot be kept there: put it in a header.

Only GET and POST can be a lookup. PUT, PATCH and DELETE are not supported.

Inputs from the conversation

Write {order_id} in the address and it becomes an input: your agent fills it only from what the visitor actually said, and never invents it. An address can take up to four. A fact your own site vouches for, such as the signed-in customer’s id, can fill the same slot, and your agent never asks the visitor for it. Where your site doesn’t vouch for it, for example by email or WhatsApp, that lookup doesn’t run.

A lookup that changes data has no slots in its address: it sends the visitor’s summary in its body instead.

Verified visitors

Set Who can see this to A verified visitor (it is in the Use step) and your agent confirms the visitor’s email before the lookup runs. The visitor sees a short form in the chat, gives their email and types the 6-digit code we send to it. The code works for 10 minutes, once, and has 5 tries. After that the lookup runs on that email for 2 hours in that chat and browser, so a long chat does not ask twice.

Write {verified_email} in the address where the email goes, for example https://api.acme.com/orders?email={verified_email}. We fill it in. Your agent never types or sees the email, so a visitor cannot ask about someone else’s. The email stays out of the chat, the prompt and the logs, and the Inbox shows it masked, as Email verified · j•••@acme.com. The code comes from your own business name and sender.

Once a chat is confirmed, the follow-up card asks for no email again. It shows the address masked and saves the lead under it.

If your site already tells us the visitor’s email with a signed token, we use that and send no code.

  • A code proves the visitor owns the inbox. It does not prove they are a customer, so your endpoint still decides whether that email has anything to show.
  • Only a Support Agent can use it, on the web chat. Anywhere else the lookup says it can’t check there and offers to pass the visitor to your team.
  • It needs the Growth plan or higher.
  • A lookup that calls Stripe, Zendesk, Intercom, HubSpot or Pipedrive must be set to A verified visitor and check whose record it reads, whatever key it uses. If not, it can’t be saved, and one saved earlier stops answering.
  • Codes are limited for each chat, address and network, and an address that opted out of email gets none. Past a limit the visitor sees Too many tries. Try again later, or ask for a person.
  • Try can’t confirm an email, so test it in your agent’s chat.

Choose what your agent sees

Enter a real value and press Try it: it really calls your endpoint, and the reply appears as a tree. Nothing is ticked. Tick a field to let your agent read it, up to six. Beside the tree, What your agent sees shows the exact values it would be given, and how many of the six you chose.

  • At most 2 KB of those fields reaches your agent. If more would, the later fields are left out, never cut short, and your agent is told not to guess them.
  • A field you did not tick is named to your agent as not read, so it cannot be mentioned.
  • The reply is read for the owner only here. It is not stored, and your agent never sees it whole.
  • Fields named as card numbers, security codes or bank details are never read, even when your system sends them.

Show it as a card. A read’s Use step has Show as. Choose Card, and the ticked fields show as a card under the answer, with a ticked https link as a button. A field your system didn’t return is left off. In Test, a rehearsed lookup’s card shows the field names and says Rehearsed.

Read or change data

A lookup is a Read (GET) by default. Choose Changes data (POST) and it asks you to confirm: This lookup can change data in your system. A write is saved only once you have said so, and the database refuses a POST saved as a read.

When a visitor’s question would run a lookup that changes data, the chat first shows a card with Confirm and Not now, and the lookup runs only when they press Confirm; in Test it is rehearsed after Confirm.

Try is careful with a write. A read is tried for real. A write first shows exactly what would be sent, and only a second press, Send for real, calls your system: This will really call your system.

Which hosts your agents may call

Your workspace keeps a list of allowed hosts under Integrations → Your own API. A lookup can only be switched on for a host on that list. An owner or admin adds one there, or with Allow it in the editor’s Request step; anyone else sees “Ask an owner or admin to allow” the host. A host cannot be removed while a switched-on lookup still uses it. If a host is taken off the list, a lookup to it stops at once and your agent says it is not set up.

Up to 20 hosts. The list is for the workspace, so every agent in it shares one.

Your key

Choose No key, a key you saved earlier, or Add a key, which stores it when you press Save key and shows only its last four characters. A key that goes in a header asks for the header name, and a username-and-password key asks for the username; both belong to the lookup, not to the key. A webhook signing secret is not offered, because it is never sent as a header. Every time a key is read, hiy records which lookup asked, and Try reads as Try: followed by the lookup’s name. No screen shows a key back.

Recent calls

Each lookup lists its Recent calls: when, whether it was a test, a rehearsal in Test or a live answer, how it ended, the status and how long it took, and the fields it kept. Calls are kept 30 days. Only names are kept, never what a visitor typed, a key, or what your endpoint replied, so there is nothing to replay: use Try to see a reply again.

Limits

See Actions: two actions in one answer, 30 live calls a minute for each lookup, 10 seconds to answer, 32 KB read and 2 KB handed over. Try is limited to 10 a minute for the whole workspace.

Note

A lookup that returns more than an order’s status needs a signed-in visitor. Two typed fields, an email and an order number, are on every packing slip, so they are enough for order status and for nothing more sensitive. For account data, vouch for the visitor from your own site with site facts.

Was this page helpful?