You can set up a ring tree target (RTT) to send a call only if the target has agents available to accept the call. This article describes how to ping the buyer's API endpoint and use the response to decide whether to send the call.
This article contains the following sections:
- Solution Requirements
- How to Create an Agent-Availability Ring Tree Target
- Agent Availability RTT FAQ
Solution Requirements
To implement this solution, you need the following information:
- Buyer's API endpoint
- Target's DID number
- Conversion criteria (revenue amount and convert event)
Tip: Many users prefer to get help setting up RTTs. See How do I get help with Ringba? for instructions on how to engage Support help with your RTTs.
How to Create an Agent-Availability Ring Tree Target
Begin by creating an RTT. See the Ring Tree Target Setup Guide for step-by-step instructions. Then make additional changes to the following sections to make the RTT consider agent availability.
Revenue Settings
Update the Revenue Settings section as described below to configure the RTT for agent availability.
For the Conversion Settings, you can use either option:
- If you choose Override, you input the conversion information on this screen.
- If you choose Use Ring Tree Settings, you and set up the Revenue Setting under on the ring tree.
If you choose to Override, complete the fields using the target's conversion criteria:
- Revenue Type: Choose Static.
- Static Revenue Amount: Enter the amount provided by the target.
- Failure Revenue Amount: Enter the revenue amount if the call does not convert. You usually enter 0 in this field.
- Convert On: Select the event that determines that the call converted. If you select Call Length, controls appear to configure your call length options.
-
Call Length options: If you choose Call Length, the following options appear:
- Start Call Length On: Choose Incoming, Dial or Connect.
- Conversion call length value: Select Static.
- Length: Enter how long the call must be, in seconds, to convert.
Request Settings
You also set some fields in the Request Settings section for this solution.
Complete these fields:
- URL: Enter the buyer's API endpoint URL.
- HTTP Method: Choose GET if no body is required.
- Headers: If you want to send data with the ping, click the Token button to add parameters.
Call Acceptance Parsing
You create a parsing step in the Call Acceptance Parsing section to check the ping response for available agents.
To create the parsing step, check the response returned on the ping. For example, the response might look like the following:
{
"response": {
"available": "0",
"active": "41"
}
}Create a parsing step that forwards the call if the number of available agents is greater than 0.
input = JSON.parse(input);
return input.response.available > 0;In this example:
- JSON.parse(input) pulls the ping response and stores it in the input variable
- input.response.available checks the available entry inside of the response section of the input variable to see if it is over 0, indicating agents are available
You should customize your parsing step code for the specific information in your ping response.
Add the RTT to a Ring Tree
Once you have created your agent-availability RTT, you must add it to a ring tree. See Ring Tree Setup Guide for step-by-step instructions.
Agent Availability RTT FAQ
What should I do if I need help with Ring Tree Targets?
Many users ask Ringba to create or review their ring tree targets. See the Open a Request to Create or Review a Ring Tree section of the How do I get help with Ringba? article for specific instructions on how to contact support and what information to provide in your request.