Set up last agent routing to ensure returning callers are automatically connected to the original agent
In this guide you will learn:
- How does using the Ring-to (via API) widget to configure smart routing enhance your outbound calling efforts and returning caller experience?
- How to set up your Last Agent Smart Routing
- Step One: Creating your Aircall API Key
- Step Two: Setting up the Ring-to (via API) Widget within Aircall Smartflows
⚠️ The Ring-to (via API) widget needs to be enabled via a feature flag. Please reach out to your Aircall point of contact for this to be enabled before getting started.
How does using the Ring-to (via API) widget to configure smart-routing enhance your outbound efforts and returning caller experience?
Last Agent Routing offers numerous benefits, enhancing both customer experience for returning callers and operational efficiency. It reduces call abandonment rates by promptly connecting prospects with agents who already have the background on their business, thereby mitigating frustration and potential loss of business. It also eliminates the whole team being interrupted by inbound calls from prospects that are not theirs, allowing them to spend more time calling their own leads.
Using Aircall’s Ring-to (via API) widget in Smartflows, you can configure this widget to automatically route returning callers to the Aircall agent who launched the most recent outbound call to them.
How to set up your last agent smart-routing
Step One: Creating your Aircall API Key
⚠️ This section requires familiarity with API Keys
Before we get into building our call flow, we must first generate an Aircall API key. The details from the API key will be used to set the credentials in our Ring-to (via API) widget to gain access to the Aircall API we need for our request and response.
On the Aircall Dashboard, navigate to Integrations & API → API Keys and select Generate an API Key.
Name your key, and then copy the API ID
and the API token
and paste it somewhere close by. As mentioned earlier, we will be using this for the authentication method in the next step. Please note, this is the only chance you will have to see your API token. If you lose it, then you will have to generate a new one.
Click on Confirm.
Step Two: Setting up the Ring-to (via API) Widget within Aircall Smartflows
⚠️ This section requires familiarity with Aircall REST API, JSON and Smartflows
Now, staying on the Aircall Dashboard, we have to configure the Smartflows number.
Before getting started, it is important to note, that the Aircall users who will have calls routed to them via the API do not need to be assigned to the Smartflows Call Distribution. If they are assigned, the user will receive any missed call notifications in their To-Do list if they miss the transferred call. However, they will not receive these notifications if they are not assigned to the number.
With that in mind, navigate to the phone number you wish to configure the Ring-to (via API) widget on. Add your Ring-to (via API) widget to your desired spot in your Smartflows distribution which will open up the widget editor.
To begin, set the Authentication Method as Basic Auth (User
& Password)
and then click on Set Credentials. This will open the credentials pop up form, which is to be completed as follows:
-
Username = your
API ID
-
Password = your
API token
To finish the request configuration, we must populate the two remaining fields with the below information:
-
Method =
GET
-
URL =
api.aircall.io/v1/calls/search?direction=outbound&order=desc&phone_number={{callerNumber}}
Using this API endpoint URL will effectively search for the Inbound caller’s number (in International E164 format) in all your outbound Aircall phone calls in descending order. If it finds at least one, it will return the most recent outbound phone call and include the Aircall User ID of the agent who conducted the call in the returned JSON payload.
Now that we have finished the request configuration, we complete our setup by setting the response configuration as follows:
-
Response type =
User (ID or email)
-
Path =
calls[0].user.id
To conclude, you must run a test on the response in the dedicated test field. Enter a valid phone number in the international E.164 format, and make sure there is a returned JSON payload and the Path (to find the value that will be used to transfer/route the inbound call) is valid.
💡 Adjust the ringing settings directly beneath the test to suit your business operations
You should now be ready to start testing some inbound calls for smart routing to last outbound Aircall agent using the Ring-to (via API) Widget!
Food for Thought
- Adding a team beneath the Ring-to (via API) widget can be a helpful addition to your flow. This works purely as a catchment for situations when the original outbound agent is not available, to ensure no calls are missed.
- You can set this configuration up with other Aircall values such as routing to Aircall teams or to other Aircall phone numbers
- The values you are routing to must exist before configuring the Ring-to API widget
Professional Services
If you need an extra hand with implementing this smart routing configuration, or would like to learn about similar automations to enhance your operations, check out our Professional Services page to book time with our Technical Consultants.