Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Inbound Message Language Detection

    Posted 08-12-2025 13:20

    Currently, I'm running a few different SMS digital campaigns in Spanish and English and I created a flow to handle responses when someone replies with anything besides the unsubscribe terms (STOP, STOPALL, UNSUBSCRIBE, etc.)  but I need to detect which language the inbound message is in to send the correct language response.

    How can I detect the language of the inbound message?

    I've attempted to use (DetectLanguage("Message.Message.Body.", "es-us")) for spanish detection and (DetectLanguage("Message.Message.Body.", "en-us")) for english but my automated responses do not send. 

    Any suggestions?


    #Architect

    ------------------------------
    Michael Harris
    Operations Business Analyst
    ------------------------------


  • 2.  RE: Inbound Message Language Detection

    Posted 08-13-2025 09:05

    Hello,

    You don't need to specify what language you want to identify, instead it will return the language it identifies.

    The last input is what you want it to return if it doesn't find a language.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------



  • 3.  RE: Inbound Message Language Detection

    Posted 08-13-2025 10:00

    I'm using a switch with have two cases:

    Case 1 (English): DetectLanguage("Message.Message.Body.","auto") == "en"

    Case 2 (Spanish): DetectLanguage("Message.Message.Body.","auto") == "es"

    Does this look right? I'm not getting any response when responding with english or spanish.



    ------------------------------
    Michael Harris
    Operations Business Analyst
    ------------------------------



  • 4.  RE: Inbound Message Language Detection

    Posted 08-13-2025 10:52

    It should be DetectLanguage("Message.Message.body.","auto") == "es" with a small "b", dunno if that matters.

    Otherwise you might wanna enable Execution history on the flow so you can see the variable values and what happens in each step.



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------