In the first example, yes, you are looking up based on the last 10 characters of the ANI, so if the ANI was, for example, tel:+13175551234, you would be searching the Data Table for the value 3175551234.
In the second example, it's a little unclear what you are attempting to achieve here. The inner expression, right(call.Ani,10),will result in a string of maximum 10 characters (it will only be less than 10 if the original call.Ani is less than 10). This means that the outer expression, Left(...), will always be provided with a maximum of 10 characters and so will return whatever it is given. As a result, it is not actually doing anything!
Views expressed are my own and do not necessarily reflect those of my employer.
Original Message:
Sent: 08-19-2024 13:59
From: Jean L
Subject: What is the purpose of two consecutive Update Data in a call flow?
Hi Paul,
For example, I created a data table to block spam calls using expression Right(Call.Ani,10)
This expression is looking at the right 10 digits?
Not sure how to interpret this expression
------------------------------
Jean L
Vibrant Emotional Health
Original Message:
Sent: 08-15-2024 18:22
From: Paul Simpson
Subject: What is the purpose of two consecutive Update Data in a call flow?
Jean,
How familiar with Excel are you?
Expressions basically work the same way as Formulae in Excel, so they mash up a bunch of stuff to result in a value. The "bunch of stuff" is a combination of literal values, functions, and variable references - these, in turn, can be thought of as being like cell references in Excel.
So, say you want to add two numbers together. In Excel, you might put something like
=2+3
In Architect, you would enter the same thing into the expression, just without the initial equals sign.
Looking at the particular expressions in your sample and which @Tatjana Knezevic quoted, these are taking the value in the built in variable Call.ANI, which will look something like
tel:+13175551234
and cutting off the stuff at the beginning. The first one is taking everything from the 4th to the 13th character. the second version is relying on the actual number being at the end, and always being the same length (which, with the US NANP numbering system, it will be) and simply saying "give me the right-hand ten characters."
These are returning similar, but not identical things, since the first one (which you have currently) will result in the country code being at the beginning, whereas the second, revised, version will not. I only draw your attention to this because I see the decision at step 29 is looking to see if the country code is "+1" which is North America, and that will fail if you use the second version, as written.
The big difference between an Architect Expression and an Excel Formula is that with the former, it expects a particular data type for the end value. The actual type depends on context. In Step 29, for example, the Decision Action required the expression (Formula) to evaluate to a Boolean (True / False). Excel takes whatever value it has, of whatever data type, and figures out how to display it for you.
I hope this helps.
------------------------------
Paul Simpson
Views expressed are my own and do not necessarily reflect those of my employer.
Original Message:
Sent: 08-14-2024 13:57
From: Jean L
Subject: What is the purpose of two consecutive Update Data in a call flow?
Thank you Tatjana. Can you recommend a way to get better at writing/ understanding expressions?
I have read
- https://help.mypurecloud.com/articles/access-function-operator-help-demonstration/
- https://help.mypurecloud.com/articles/work-expressions/
- Starting to learn basic Python
It's not really clicking for me atm. Maybe my approach isn't correct.
------------------------------
Jean L
Vibrant Emotional Health
Original Message:
Sent: 08-14-2024 00:48
From: Tatjana Knezevic
Subject: What is the purpose of two consecutive Update Data in a call flow?
Hi,
It would be best to ask the author about this Architect flow. Based on the action numbers, the second Update Data (Action 40) was added later in the flow. You can merge them into one by copy/paste of data from Action 40 to Action 13, and then you can delete Action 40 or simply leave it ASIS.
However, here are the things to be done:
Action 40 to be updated to have only one data Flow.sANI as Flow.sANI = Substring(Call.Ani, 4,13).
NOTE: If you are in North America, you can also use Flow.sANI = Right(Call.Ani,10)
------------------------------
Tatjana Knezevic
www.startelecom.cloud
https://www.linkedin.com/company/star-telecom-www-startelecom-ca-/
Original Message:
Sent: 08-14-2024 00:26
From: Jean L
Subject: What is the purpose of two consecutive Update Data in a call flow?
Hi,
I'm working to understand the beginning of this call flow and I do not understand why there are two consecutive Update data actions. What is the purpose of these actions?
#Routing(ACD/IVR)
#Unsure/Other
------------------------------
Jean L
Vibrant Emotional Health
------------------------------