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.
- Caller Calls In: The ANI is captured by the Genesys Cloud platform.
- HTTP Request Action: The ANI is sent to the external service via an HTTP Request action.
- External Service Processes ANI: The service uses libphonenumber
- Service Returns Area Code: The area code is sent back to the Architect flow in a JSON response.
- Extract Area Code from Response: The Architect flow parses the JSON response to extract the area code and assigns it to a variable.
- 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
------------------------------