Vitalii,
The "code" that you are looking at is an Expression, not a subroutine. It's like a formula in Excel. It simply generates a value of the required type - it can be quite complex, but at the end of the day, it has a value. In Architect, there isn't a way to write code using something that looks similar to a programming language like JavaScript, Python or C.
HTH
------------------------------
Paul Simpson
Views expressed are my own and do not necessarily reflect those of my employer.
------------------------------
Original Message:
Sent: 08-07-2024 10:57
From: Vitalii Hetman
Subject: Expression builder in Architect
Hi Melissa,
thank you! I see that it is possible to do using existing blocks, but no way to build long custom code - I guess that was done to control user input and functions that are used to reduce number of errors developer might do.
------------------------------
Vitalii Hetman
Miratech, Inc
Original Message:
Sent: 08-07-2024 10:50
From: Melissa Bailey
Subject: Expression builder in Architect
------------------------------
Melissa Bailey
Genesys - Employees
Original Message:
Sent: 08-07-2024 03:36
From: Vitalii Hetman
Subject: Expression builder in Architect
Hi Christoph,
thanks for your response! Yes, I aware about all those features available, I'm more curious about the features in expression editor.
For example if I want to split caller utterance by word (length is unknown at this point) and then iterate through all splitted groups to do specific operations with each word.
something like
varUtterance = Split(varUtterance, " ")
varLength = Count(varUtterance);
for (var i = 0; i<varLength; i++){
if(Length(varUtterance[i]) != 10){
varFlag = false;
}
}
------------------------------
Vitalii Hetman
Miratech, Inc
Original Message:
Sent: 08-07-2024 02:24
From: Christoph Domaschke
Subject: Expression builder in Architect
Hi Vitalii,
architect supports loops (Loop action - Genesys Cloud Resource Center (mypurecloud.com)) and switches (Switch action - Genesys Cloud Resource Center (mypurecloud.com)). They are pretty easy to understand. I never used RegEx in Architect and do not think, that there is a native function for that. But you could check the "expression help" aviable in architect for string manipulation. (Click the "f(x)"-Button. Its aviable everywhere you can create an expression).
Best
Christoph
------------------------------
Christoph Domaschke
CRONBANK AG
Original Message:
Sent: 08-06-2024 14:05
From: Vitalii Hetman
Subject: Expression builder in Architect
Hi all,
is there any way to build complex expressions just like we did in Designer using ECMA script?
I'm talking about loops, string regexp replace, switch constructions, etc.
Thanks
#ArchitectureandDesign
------------------------------
Vitalii Hetman
Miratech, Inc
------------------------------