Flow to route calls to Queue depending on calling number

Hello,

I am trying to create a flow where the destination is determined by an Address Book. For Example I have create a Book Collection and multiple address books, I want to route the call depending on whether the Calling number is in the Address Book, if the call is in Address Book 1 I want to route the call to Queue 1, if the calling number is in Address Book 2 I want to route it to Queue 2 and if the number is Address Book 3 I want to route it to an Agent. Is this feasible? If yes how can I achieve this? What are the steps that I need to follow?
I can see that we can check the Variable ANI which is the customer calling number but we can not look it up in the Address Book, so is there a way to do that? can we create a script that does this?

Hi Rabih,

One solution is to query the Zoom API using a script widget and calling this API Contact Center APIs - Zoom Developers with the ANI as the phone_numbers query parameter.

It is possible for more than one Address Book contact to have the same phone number, so you would need to handle that scenario according to your requirements.

A solution that does not require the Zoom API is being considered for a future enhancement.

Hello Justin,

Thank you for the advise but how could I use it?
Do you mean I could use the API to list the contacts in all the Address Books and than try to match the ANI with the numbers?
If yes could you please provide an example of how this is done?

Querying the same phone number in 3 different address books would require making 3 different API requests. One for each Address Book.

Do you need 3 address books for other reasons ? If not, another approach might be to use one address book, and then use a address book variable to define where the call should be routed. Then you would only need to make one API request and parse the response.

The Idea I want to do is to remove the IVR (press 1 and 2)
What I want to do is to route the callers directly to the correct queue based on the phone number.
So what I am trying to achieve is if a customer calls and their number is in Address Book 1 they will automatically routed to queue1 if it is in Address Book 2 they will automatically be routed to queue2 etc…