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
------------------------------
Original Message:
Sent: 10-04-2022 12:24
From: Artaud Basseth
Subject: Parse text using Architect
And yes, I'm trying to pull out 'Basseth' and 'Art' from 'Basseth, Art'.
------------------------------
Artaud Basseth
Genesys - Employees
Original Message:
Sent: 10-04-2022 12:23
From: Artaud Basseth
Subject: Parse text using Architect
ToAudioTTS((Call.Contact."Customer Name").Split(",",1)) was what I was attempting.
------------------------------
Artaud Basseth
Genesys - Employees
Original Message:
Sent: 10-04-2022 12:19
From: Melissa Bailey
Subject: Parse text using Architect
What's your exact expression? My guess is you are splitting the name itself into individual characters
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 10-04-2022 12:17
From: Artaud Basseth
Subject: Parse text using Architect
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
------------------------------