Genesys Cloud - Developer Community!

 View Only

Sign Up

Expand all | Collapse all

Phonetical comparison of data string

  • 1.  Phonetical comparison of data string

    Posted 08-27-2025 08:19

    I need to compare personal data (name, address) captured via voice bot with the data provided from an external system. I want to implement that with OOTB possibilities of Genesys, but apparently there is not the possibility to compare both data based on phonetical similarity.

    The problem is that I can use AreEqual() for the check, but this fails in case of different spelling of a name (Maier, Mayer, Meier, Meyer, etc.).

    Of course I have the possibility to let the caller spell his/her name, but than I have the problem with spaces in case of several forenames, hyphens in case of double names and any kind of special characters.

    Do you have an idea how I can solve that?


    #Architect

    -------------------------------------------


  • 2.  RE: Phonetical comparison of data string

    Posted 08-28-2025 07:24

    Hey Sophie -
    I don't think there's anything on platform to do that. Depending on the PII/GDPR/etc. needs you could always stand up a very cheap simple web service to do something like this for you. For example in Python3 you could write a Flask app to use metaphone and rapidfuzz to get two different comparisons and see if it's over your desired threshold. It's a neat problem. Out of curiosity is there not a better identifier you could use to verify the caller like account number, etc.? It sounds like you don't for your use case but I'm just curious.

    .Jason



    ------------------------------
    Jason Totten
    Senior Contact Center Engineer
    ------------------------------



  • 3.  RE: Phonetical comparison of data string

    Posted 08-28-2025 08:06

    Hey Jason,

    thanks for your response.

    I know there is something like fuzzy matching I should use. However, right at the moment I just need to implement a PoC and I was hoping for some kind of creative idea, how I could do it with OOTB elements within Genesys. It is totally fine if this solution doesn´t cover each edge case and doesn´t reach the quality of a proper solution.

    Regarding your question: There is also an authorization step based on account number. However, as the authorization has several steps incl. name and address, this shall be also part of the bot flow in order to take this effort from the agents.



    ------------------------------
    Sophie Loh
    ------------------------------



  • 4.  RE: Phonetical comparison of data string

    Posted 08-28-2025 08:30

    Hmm - you could always cheat and use a set group of test users names and pre-prepare the synonyms. That seems like a lot of extra work to me too - I write a lot of web services so in my head that's easier, but your mileage may vary.

    Ok - I figured it was part of a larger authentication sequence but I wanted to make sure (and didn't want to sound pedantic).

    Depending on your flow setup you could use a silent bot (or if you're already in a bot) you could add synonyms for the slots, etc. Are you using a bot already?



    ------------------------------
    Jason Totten
    Senior Contact Center Engineer
    ------------------------------



  • 5.  RE: Phonetical comparison of data string

    Posted 08-28-2025 10:49

    Hi Sophie -
    I needed a warm-up this morning so I made a little test AWS lambda function that does this. 

    If you promise not to use it for prod (laughing) I can give you the URL and config to make it work as well as a temporary token.

    Here's the results:
    {
    "name1": "Maier",
    "name2": "Mayer",
    "fuzzy_score": 80,
    "phonetic_score": 100,
    "combined_score": 88,
    "metaphone_match": true,
    "match": true,
    "thresholds": {
    "fuzzy_threshold": 75,
    "metaphone_required": true
    }
    }



    ------------------------------
    Jason Totten
    Senior Contact Center Engineer
    ------------------------------



  • 6.  RE: Phonetical comparison of data string

    Posted 08-29-2025 02:28

    Hi Jason,

    this is what you´re doing as a warm up;)

    Thanks a lot for your support, but in a first step I´ll stick to Genesys internal functionality. Even with test system on customer side for the provision of the data I want to be careful. One never knows how test data is created...



    ------------------------------
    Sophie Loh
    ------------------------------



  • 7.  RE: Phonetical comparison of data string

    Posted 09-04-2025 10:55

    If you wanted to go really old school, you could convert the values using Soundex rules (Soundex - Wikipedia).  You should be able to do all of the logic within Architect by looping through the letters of each string.  It is a little archaic, but I have used the logic in other (non-Genesys) applications in my past and it worked pretty well.



    ------------------------------
    Patrick Jones
    NA
    ------------------------------



  • 8.  RE: Phonetical comparison of data string

    Posted 09-04-2025 14:08

    Very interesting.  So, you have a bot or Virtual Agent listen for name, then do the conversion of characters and compare that with the value in the account.  I'll have to try this.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 9.  RE: Phonetical comparison of data string

    Posted 09-04-2025 14:23

    Yeah, you'll have to convert the output from the bot into a Soundex value and also convert the string from your external system into a Soundex value and then do your comparison of the two to see if you get a match.



    ------------------------------
    Patrick Jones
    NA
    ------------------------------



  • 10.  RE: Phonetical comparison of data string

    Posted 09-04-2025 14:37

    I would assume like confidence, there could be a percentage of difference that is acceptable to match the account name.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 11.  RE: Phonetical comparison of data string

    Posted 09-04-2025 14:59

    Soundex isn't that fancy.  If you read the article at Wikipedia, you can get the gist of what it is capable of.  You can always customize the Soundex value if you want to allow more flexibility, but by its nature, it is pretty basic.



    ------------------------------
    Patrick Jones
    NA
    ------------------------------



  • 12.  RE: Phonetical comparison of data string

    Posted 08-28-2025 10:40

    What I like to do is take the name and address from the outside system and use it as a Dynamic List and have the bot check against that.  If it matches in its "fuzzy" logic, then you just use the original information.  If not, you go with a Virtual Agent and have them spell it out.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 13.  RE: Phonetical comparison of data string

    Posted 08-29-2025 02:35

    Hi Robert,

    do you have any experience with dynamical lists in a comparable context? I started with a test set, but I came to the conclution that it is more strictly than a regular expression. It is also limited to 100 values, which is not really sufficient for name varieties, etc.

    With the regular expression I can recognize names quite well, but still have the challenge with the check against salesforce.



    ------------------------------
    Sophie Loh
    ------------------------------



  • 14.  RE: Phonetical comparison of data string

    Posted 08-29-2025 17:15

    Here is a link to dynamic slots:  Use custom dynamic list slot types in a bot flow - Genesys Cloud Resource Center

    Yes, 100 is a limit, but that is the reason to use it.  Just get identification information and use that to create the collection for the lookup.  Then use Ask for Slot.  Then see if there is a match.  You can look at the confidence of the match and decide how close you want to the original for acceptance or not.  Make sense?



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 15.  RE: Phonetical comparison of data string

    Posted 09-01-2025 02:20

    Hi Robert,

    sorry, I am a bit confused so I try to explain in my own words what I understood:

    You propose to take a list of e.g. 100 surnames from the external system into a dynamic list for a surname slot. Then I shall use this in Ask for slot to get the surname from the caller. Then I should check confidence level in order to check if it is a match instead of simply comparing both values using AreEqual(). Is this correct?

    1. How can I reach the value of the confidence level from ask for slot?
    2. I would compare the answer of the caller with all possible entries in the external system. However, I need to check whether "meier" fits to "Mayer" that is related to customer number 1234, and not that "meier" is a possible entry in the list of surnames in the external system. Do you also see a possibility for this with dynamic lists?


    ------------------------------
    Sophie Loh
    ------------------------------



  • 16.  RE: Phonetical comparison of data string

    Posted 09-01-2025 14:18

    No, I am suggesting you use the dynamic slot as an on-the-fly dictionary of possible matches.  Look at the account and pull the name you want to match against into a collection and then use that for the dynamic slot.  When the caller says their name, it will check against the collection and provide a match or not.  You can take the confidence level of that match and decide if you feel it matches the original or not depending on that percentage.  

    Spelling is better in a Virtual Agent as well as recognizing the name.  Takes $0.50 per call, but well worth it for recognizing names, emails, and alphanumeric input.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.comRobert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 17.  RE: Phonetical comparison of data string

    Posted 09-02-2025 05:56

    Thank you for clarification, now I understand your approach. 

    I tried to implement it and although I reduced confidence level from 10 (low) to 30 (high) the bot still struggles with recognition in case of hyphens. I replaced them, but still I see problems e.g. in case of different spelling. E.g. I tried as a street name "Alte Beroltzheimer Straße" and bot understands "alte beroldsheimer straße", which is quite similar, but still matching is failing. I guess upper cases make no difference? I also just tried out Beroltzheimer, but as bot understands "ds" instead of "tz", there is still no match.

    Do you have an idea?



    ------------------------------
    Sophie Loh
    ------------------------------



  • 18.  RE: Phonetical comparison of data string

    Posted 09-02-2025 12:11

    Do you have the language for the initial flow set for de-DE?  Yes, the pz, pf, tz, ds is going to be problematic.  Did you test Virtual Agent with the recognition?  As for the failure route, you can still check the confidence of the last utterance and decide to keep it or not.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 19.  RE: Phonetical comparison of data string

    Posted 09-02-2025 12:59
    This is where/why I lean more towards web services. Data Actions are a part of the platform and while there are things that Genesys does amazingly well, there are things that can be done easier and lightweight off platform. Even if you were paying someone to host a name comparison single word string and it was hosted for $0.002 per call, you're still looking at something quick and cheap and effective. If you host it yourself on AWS it's going to be even cheaper.

    There's nothing wrong with using smart data actions to help the platform excel. I can imagine $0.50 per call for an AI agent to figure this out could get to be cost prohibitive when folks don't even like _payment processor_ API calls costing $0.15 (average-ish) per call. 

    I'm definitely not fighting to do this my way but I think in the Genesys developer/partner community we should learn to embrace things that are Genesys adjacent and do the job securely and effectively.

    --

    jason r. totten [he/him]

    Senior Contact Center Engineer Genesys Cloud CX  / The Trevor Project

    Our Values:  Heart  |  Integrity  |  Community  |  Belonging  |  Progress
    The Trevor Project is the leading suicide prevention and crisis intervention organization for LGBTQ young people.





  • 20.  RE: Phonetical comparison of data string

    Posted 09-03-2025 11:15

    I agree that verification services are valuable, but it is the old garbage in, garbage out rule.  If Genesys is doing the ASR and you send that to a verification service, you are dependent on what Genesys is transcribing.  That is why VA is so valuable in that it can use LLM AI technology to better transcribe what is said without the need for an external service.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------