Configure smart-routing to contact owner on a shared phone number to ensure callers are efficiently connected to their point of contact
In this guide you will learn
- How does using the Ring-to (via API) widget to configure smart routing enhance efficiency and customer experience?
- How to set up your smart routing to the HubSpot Contact Owner
- Step One: Creating Custom Fields in HubSpot & Generating a Bearer Token
- 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 efficiency and customer experience?
Smart routing on a shared phone number offers a multitude of benefits, mainly enhancing efficiency, accuracy and customer experience. By intelligently directing incoming calls based on criteria from your CRM, smart routing ensures that each caller is swiftly connected to the most appropriate agent, reducing wait times and improving first-call resolution rates.
Using Aircall’s Ring-to (via API) widget in Smartflows, a popular implementation is the routing of inbound callers to the HubSpot Contact Owner. This eliminates the whole team being interrupted by inbound calls from customers that are not theirs, and removes the possibility of the caller having to be placed on hold while being transferred to their dedicated point of contact.
How to Set Up Your Smart Routing to the HubSpot Contact Owner
Step One: Creating Custom Properties in HubSpot and Generating a Bearer Token
⚠️ This section requires familiarity with HubSpot Custom Fields and HubSpot Private Apps
Our first step begins in HubSpot, where we will have to create a custom property to store the Contact Owner’s email address on. Navigate to Contact Properties in the settings and select Create Property.
Object type = Contact
Label = Aircall Contact Owner Email
Internal/API Name = aircall_contact_owner_email
Field Type = Single-line text
For the Rules settings, these are at your discretion. But be sure to not restrict any special characters, as these are used in email addresses
You can create a HubSpot workflow to populate this field, which all new contacts when created will be enrolled in. For existing contacts, you can select ‘Yes, enroll existing contacts who meet the trigger criteria as of now’ in the ‘Review & Publish’ step of your workflow creation.
Once your custom property has been created, be sure to populate it with an email address as you will need this later to test the path validity on the Ring-to (via API) widget.
You will now have to create a Bearer Token in your HubSpot Developer portal, which we will be using in the next step to configure the request in the Ring-to (via API) widget. For more information on Bearer Tokens, please see HubSpot’s guide to Private Apps
Step Two: Setting up the Ring-to (via API) Widget within Aircall Smartflows
⚠️ This section requires familiarity with HubSpot REST API, JSON and Smartflows
Now in the Aircall Dashboard, we have to configure the Smartflows number.
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 Bearer Token
and then click on Set Credentials. This will open the credentials pop up form, where you will paste the Bearer Token
created in the previous step.
Return to the widget editor. To finish the request configuration, the remaining fields must be populated as follows:
-
URL =
https://api.hubapi.com/crm/v3/objects/contacts/search
-
Method =
POST
- Body:
{
"properties": [
"firstname",
"lastname",
"company",
"email",
"hubspot_owner_id",
"aircall_contact_owner_email",
"hs_calculated_phone_number",
"hs_calculated_mobile_number",
"hs_searchable_calculated_phone_number",
"hs_searchable_calculated_mobile_number",
"last_used_aircall_phone_number"
],
"filterGroups": [
{
"filters": [
{
"propertyName": "hs_calculated_mobile_number",
"operator": "EQ",
"value": "{{callerNumber}}"
}
]
},
{
"filters": [
{
"propertyName": "hs_calculated_phone_number",
"operator": "EQ",
"value": "{{callerNumber}}"
}
]
}
],
"sorts": [
{
"propertyName": "lastmodifieddate",
"direction": "DESCENDING"
}
],
"limit": 10
}
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 =
results[0].properties.aircall_contact_owner_email
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 the HubSpot Contact Owner 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 Contact Owner is not available, to ensure no calls are missed.
- You can set this configuration up with other HubSpot Objects such as the Company owner or the Deal owner
- Remember Aircall can only route inbound calls using the Ring-to (via API) Widget with simple logic (i.e. no branching based on conditions, no looping, etc.) – in other words, there must exist either…
- Under the profile of the HubSpot Object (i.e. Contact, Company, etc.)
- Under an indirectly-accessible related HubSpot Object (e.g. User) to the main HubSpot Object (i.e. Contact, Company, etc.)
- 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.