Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Location Based Routing recomendations

    Posted 9 days ago
    Edited by Joaquin Garcia Fink 9 days ago

    One of my customers needs to configure call routing based on customer location.

    At some point there seem to be a service available through AppFoundry called Location Smart however doesnt seem to be available anymore.

    Wondering if anyone has implemented some similar solution that does not requiere the caller to enter location data (e.g. zipcode)

    Thanks!


    #Uncategorized

    ------------------------------
    Joaquin Garcia Fink
    Senior Customer Success Manager
    Genesys - Employees
    ------------------------------



  • 2.  RE: Location Based Routing recomendations
    Best Answer

    Posted 9 days ago

    Olá @Joaquin Garcia Fink, Greetings from Brazil!

    I've implemented a similar solution using the caller's ANI, leveraging the country code plus a geographic prefix extracted from the E.164 number format.

    In Brazil, this is straightforward because we can use DDI + DDD as a key to consult a data table. In Architect, the flow extracts these digits from the ANI and performs a lookup in a Data Table, where each DDI+DDD combination is mapped to a target queue.

    For a global implementation, the same pattern applies, but instead of relying on a fixed "DDD" structure, the data table is designed to work with variable-length prefixes (for example, +1 212, +44 20, +49 30, +55 11). The flow matches the ANI against these prefixes and resolves the appropriate queue dynamically.

    Once the queue name (or ID) is returned from the table, you can apply any additional routing logic required (business hours, skills, priorities, etc.).

    This approach avoids requiring the caller to manually provide location information (such as ZIP or postal codes), relies only on native Architect capabilities, and scales well from a single-country deployment to a multi-country/global routing model.



    ------------------------------
    Fernando Sotto dos Santos
    Consultor Grupo Casas Bahia
    ------------------------------



  • 3.  RE: Location Based Routing recomendations

    Posted 9 days ago

    Couldn't you access directly in Architect the country the caller is coming from? We implemented something also with Mobile/Wired customers calling in. You could also see this in the Interaction Details list.



    ------------------------------
    Christian Rosenberger
    System Architekt Customer Interaction Art
    ------------------------------



  • 4.  RE: Location Based Routing recomendations

    Posted 9 days ago

    The country information you see in Interaction Details is typically derived from the ANI and/or carrier-provided enrichment and appears as part of post-processing in Analytics. In Architect, real-time routing decisions usually rely on the ANI itself (in E.164 format), not on an explicit "country" attribute provided as a native field.

    To make this approach more robust and standardized, instead of manually parsing the number, you can convert the ANI to a Phone Number data type and extract the country code directly using:

    • ToPhoneNumber(Call.Ani).dialingCode

    Example (conceptual):

    • Flow.CountryCode = ToPhoneNumber(Call.Ani).dialingCode

    From there, rather than building multiple conditional branches (switch/if) in the flow, a cleaner and more scalable pattern is to use a Data Table to map the dialingCode (or a more specific prefix, if needed) to the target queue. This keeps the Architect flow simpler and centralizes routing logic in the data table, making it easier to maintain and extend for global routing scenarios.



    ------------------------------
    Fernando Sotto dos Santos
    Consultor Grupo Casas Bahia
    ------------------------------



  • 5.  RE: Location Based Routing recomendations

    Posted 9 days ago

    My question would be at what level does the call need to be routed.  Is it at the country level? The sate/province? Locality?  That would determine how it would work.  

    In the U.S. we have states that don't allow collections calls to be taken outside of the country.  So for example we check the ANI area code against a data table and if it is associated with a state that has this restriction we apply a skill that then only allows for U.S. based agents to be offered this call.  



    ------------------------------
    Bob Hall
    .
    ------------------------------



  • 6.  RE: Location Based Routing recomendations

    Posted 2 days ago

    Hi, business wants to do some routing based on zipcode. Have gathered from this thread that ANI seems what can be obtained without having to use external geoLocation API's. Thanks!



    ------------------------------
    Joaquin Garcia Fink
    Senior Customer Success Manager
    Genesys - Employees
    ------------------------------



  • 7.  RE: Location Based Routing recomendations

    Posted 9 days ago

    Hi,

    Location Smart is no longer available, but similar behavior can be achieved using other methods.

    A common implementation is routing based on ANI analysis (country / area code) combined with data tables or call flow logic. This avoids requiring the caller to manually enter any location information.

    Additionally, some customers integrate external geolocation services via APIs to resolve the caller's approximate location and return it to Genesys Cloud for routing decisions.

    In some cases, carrier-side geo-routing is also an effective alternative.

    Thanks.



    ------------------------------
    Diego Vazquez
    ------------------------------



  • 8.  RE: Location Based Routing recomendations

    Posted 8 days ago

    Looks like this question is resolved 😊
    When you get a chance, please mark the reply that helped most as the Best Answer. It helps others with the same question!



    ------------------------------
    Fernando Sotto dos Santos
    Consultor Grupo Casas Bahia
    ------------------------------



  • 9.  RE: Location Based Routing recomendations

    Posted 7 days ago

    Many good answers :-) Using country- and area-code of the ANI for lookup in a data-table seems the way to go without other methods (integrations, SIP header Geolocation ...).
    Depending on the use case, it might need some flexibility. Sometimes the country-code is all you need, the area-code becomes necessary for example when you need to look at the region to set the appropriate language like in Canada, Switzerland...
    And there are countries which have area codes of variable length.
    An easy way is to first do a lookup in the table with the country-code. Then a value in an additional column specifies if and how many digits of the ANI should be used for another lookup:

    +1      4
    +1678    0
    +49      4
    +4930    5
    +49211   0

    This can reduce the number of lookups when dealing with multiple countries.      



    ------------------------------
    Christian Karpp
    Principal PS Consultant
    ------------------------------