Skip to main content

Add an API tool

Adding a pre-call API tool and a call transfer tool

1

Open the phase

On the Tools page, pick Pre-call, On-call or Post-call, then click API in the side panel.
2

Name the request

Enter a tool name, the method (GET, POST, PUT, PATCH or DELETE) and your endpoint’s URL. The name is saved as lowercase letters, digits and underscores, so CRM Lookup becomes crm_lookup.
3

Add parameters

Fill the Headers, Path, Query and Body tabs. Each row has a key, a value and a source; a Static row also has a String, Number or Boolean type toggle. + Test value on a Variable, Dynamic or JQ row gives Test API a sample value.The body can be application/json, multipart/form-data or x-www-form-urlencoded. A JSON body has a Pretty form view and an Editor view: “Use @ to insert variables, # to create dynamic values, and `...` for jq expressions inside the JSON editor.” Copy cURL copies the request as a cURL command.
4

Test and shape the response

Click Test API. The Response tab then shows the result and response time (it is not offered for DELETE). Keep only what the agent needs: tick keys in the response, or write a jq transform. On-call outputs are read by the model, and long payloads slow it down.
New pre-call API tool crm_lookup with GET and a CRM URL, the Response tab showing customer and loan objects with loan ticked, and a response time of 182ms

The Response tab after Test API

5

Set behaviour and save

On the Settings tab, set the timeout and retries (Request settings). Click Add to assistant (Save tool when editing). For an on-call tool, mention it in the prompt.
The tool appears in the phase’s list on the Tools page.
An API tool’s menu has Enable or Disable, Share to workspace (Workspace tools) and Delete.

Parameter sources

The call context has these groups:
object
The agent’s custom variables, such as callee_name and mobile_number.
object
The call record: id, status, sub_status, call_type, call_category, to_number, from_number, call_duration, transcript, recording_url, retry_count, hangup_source, user_message_count and more. A pre-call tool gets the fields known when the call is set up, such as id, to_number, from_number, agent_id and retry_count, with call_duration at 0. An on-call tool also gets the transcript so far, call_duration and the message counts. call_cost, recording_url, hangup_source and call_category are filled only after the call.
object
Fields another tool returned, as tool_name.field.
object
Post-call only. Ringg’s analysis: summary, classification, key_points, action_items, callback_requested, callback_requested_time and more (Analysis fields).
object
Post-call only. Your Advanced Analysis variables.
In jq, the same groups are .custom_args, .call_data, .api_responses.<tool> (or .tool_outputs), .platform_analysis and .client_analysis.

Request settings

Example: look up the customer before the call

A payment reminder agent for Acme Finance should know the amount due before it says hello.
1

Create the pre-call tool

On Pre-call, click API. Name it crm_lookup, method GET, URL https://crm.example.com/api/customers.
2

Pass the phone number

On Query, add a Variable row with key phone and value custom_args.mobile_number. On Headers, add a Static row Authorization with your CRM token.
3

Keep the useful fields

Click Test API. In Response, tick amount_due, due_date and rm_phone. Add 404 under Block call on status codes so no call goes out for an unknown customer.
4

Use the fields in the prompt

Save, then use the fields in the first message and script:
A test call opens with the customer’s real amount and due date.
Set the call transfer Target to @((crm_lookup.rm_phone)) and each caller reaches their own manager.