Original Message:
Sent: 10-11-2024 08:45
From: Jan Heinonen
Subject: Agent Script dynamic variables function
Hello Reginald,
If you just want to check if it starts with + and if it's 12 digits you should be able to use
match({{XferTo}}, "^[+][1-9][0-9]{10}$")
This would be true if the string length is 12, contains a + and the second digit isn't 0 which it wouldn't be for a country code.
You could adjust it if you want to check for a specific country code or different lengths etc.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 10-11-2024 06:01
From: Reginald Sheraton
Subject: Agent Script dynamic variables function
Good day,
hope someone can assist with the below.
I have a requirement to implement and agent script that needs to check the length of digits entered and if it consist of the country code.
i am looking at a dynamic variables (Boolean), if true a button will be displayed, if false, button will not be visible.
the below is what i have
- equal(length({{XferTo}}), 12) - Returns the length of entered digits
- substr({{XferTo}}, 0, 3) - returns the country could
the problem i have is to implement the above onto 1 x dynamic variables (Boolean) and an and statement, i have tried the below but not working, any assistance will be appreciated.
equal(length({{XferTo}}), 12) & equal(substr({{XferTo}}, 0, 3)), "+**")
#Implementation
------------------------------
Reginald
------------------------------