Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  How to get the dynamic area code in the Genesys cloud architect?

    Posted 02-07-2024 00:33
    No replies, thread closed.

    Hi There,

    We noticed each country have different area code length. Do we have any built in variable to get the area code from the ANI in the Genesys cloud architect? 


    #ArchitectureandDesign

    ------------------------------
    Devi Juluru
    TTEC Digital.
    ------------------------------


  • 2.  RE: How to get the dynamic area code in the Genesys cloud architect?
    Best Answer

    Posted 02-07-2024 06:14
    No replies, thread closed.

    Hey, 

    This is a little complex one, but doable. You'll want to call an external service to pass the phone number to, apply logic and then send back the result. One point here, you may run into compliance issues depending on your privacy policy and regulations. 

    IF I were to do this I would use Google libphonenumber - You'll have to set up a web service to send the number to. 

    1. Caller Calls In: The ANI is captured by the Genesys Cloud platform.
    2. HTTP Request Action: The ANI is sent to the external service via an HTTP Request action.
    3. External Service Processes ANI: The service uses libphonenumber
    4. Service Returns Area Code: The area code is sent back to the Architect flow in a JSON response.
    5. Extract Area Code from Response: The Architect flow parses the JSON response to extract the area code and assigns it to a variable.
    6. Continue Flow Using Area Code: You can now use this variable in your flow to route calls, perform lookups, or make decisions based on the area code.


    ------------------------------
    Lawrence Drayton
    Prvidr Pty Ltd
    ------------------------------