Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Parse text using Architect

    Posted 10-04-2022 12:18
    No replies, thread closed.
    Hello,

    I'm working on an Architect outbound flow where it needs to TTS the called parties' first name' and 'last name'. In testing, the function 'ToAudioTTS' will TTS the individual letters if the 'customer name' field in the contact list is formatted as 'last name, first name' (i.e., Basseth, Art). I would like to parse this contact field into individual components so that TTS doesn't spell out the individual letters. I'm attempting to use a combination of the following functions to do the parsing; ToAudioTTS, Call.Contact."Customer Name", and Split(). Does anyone know if this is achievable? So far I've not been successful.
    #ArchitectureandDesign
    #Outbound

    ------------------------------
    Artaud Basseth
    Genesys - Employees
    ------------------------------


  • 2.  RE: Parse text using Architect

    Posted 10-04-2022 12:20
    No replies, thread closed.
    What's your exact expression?  My guess is you are splitting the name itself into individual characters

    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Parse text using Architect

    Posted 10-04-2022 12:23
    No replies, thread closed.
    ToAudioTTS((Call.Contact."Customer Name").Split(",",1)) was what I was attempting.

    ------------------------------
    Artaud Basseth
    Genesys - Employees
    ------------------------------



  • 4.  RE: Parse text using Architect

    Posted 10-04-2022 12:25
    No replies, thread closed.
    And yes, I'm trying to pull out 'Basseth' and 'Art' from 'Basseth, Art'.

    ------------------------------
    Artaud Basseth
    Genesys - Employees
    ------------------------------



  • 5.  RE: Parse text using Architect

    Posted 10-04-2022 13:02
    No replies, thread closed.

    Hi Art,
    I'm not sure if it helps for you : try  GetAt(Split((Call.Contact."Customer Name"),","),1) to pull out 'Art' and GetAt(Split((Call.Contact."Customer Name"),","),0 ) for 'Basseth'



    ------------------------------
    Gerardo Rodríguez
    Evolutio Cloud Enabler, S.A.
    ------------------------------



  • 6.  RE: Parse text using Architect

    Posted 10-04-2022 13:34
    No replies, thread closed.
    To get the first name, which is the last piece:
    ToAudioTTS(Split(Call.Contact."Customer Name", ",")[Count(Split(Call.Contact."Customer Name", ","))-1])​

    To get the last name, which is the first piece:

    Substring(Call.Contact."Customer Name", 0, Find(Split(Call.Contact."Customer Name", ""), ",")[Count(Find(Split(Call.Contact."Customer Name", ""), ","))-1])

    This piece is complicated because some people might have commas in their name like 'Basseth, Jr., Art'.  If you don't care about that, a simpler version is 

    ToAudioTTS(Split(Call.Contact."Customer Name", ",")[0])


    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 7.  RE: Parse text using Architect
    Best Answer

    Posted 10-04-2022 15:47
    Edited by Artaud Basseth 10-04-2022 17:25
    No replies, thread closed.
    Thank you Gerardo and Melissa for the input. Here is what worked after my testing.

    ToAudioTTS(Append(Split(Call.Contact."Customer Name", ",")[1]," ",Split(Call.Contact."Customer Name", ",")[0]))

    In addition to using Split, I also used Append to add a space between the first name and the last name. Without the space, the TTS engine spells out the individual letters. So "Basseth, Art" became "Art Basseth".

    #Outbounddialing, #Architect
    ------------------------------
    Artaud Basseth
    Genesys - Employees
    ------------------------------