Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  What is the purpose of two consecutive Update Data in a call flow?

    Posted 08-14-2024 00:26
    No replies, thread closed.

    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
    ------------------------------


  • 2.  RE: What is the purpose of two consecutive Update Data in a call flow?
    Best Answer

    Posted 08-14-2024 00:48
    No replies, thread closed.

    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-/
    ------------------------------



  • 3.  RE: What is the purpose of two consecutive Update Data in a call flow?

    Posted 08-14-2024 13:58
    No replies, thread closed.

    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
    ------------------------------



  • 4.  RE: What is the purpose of two consecutive Update Data in a call flow?

    Posted 08-15-2024 18:22
    No replies, thread closed.

    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.
    ------------------------------



  • 5.  RE: What is the purpose of two consecutive Update Data in a call flow?

    Posted 08-19-2024 13:59
    No replies, thread closed.

    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?

    here's another example to block using expression: Left(right(call.Ani,10),10)
    Not sure how to interpret this expression


    ------------------------------
    Jean L
    Vibrant Emotional Health
    ------------------------------



  • 6.  RE: What is the purpose of two consecutive Update Data in a call flow?

    Posted 08-20-2024 16:13
    No replies, thread closed.

    Jean,

    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!

    HTH



    ------------------------------
    Paul Simpson
    Views expressed are my own and do not necessarily reflect those of my employer.
    ------------------------------



  • 7.  RE: What is the purpose of two consecutive Update Data in a call flow?

    Posted 08-22-2024 09:42
    No replies, thread closed.

    Hello,

    Personally I prefer using ToPhoneNumber instead of cutting the Call.ani string, as this would work with international calls as well which can vary in length.

    So to get the national number you would use ToPhoneNumber(Call.Ani).subscriberNumber and for the decision you can get the country code with ToPhoneNumber(Call.Ani).dialingCode

    https://help.mypurecloud.com/articles/about-the-phone-number-data-type/



    ------------------------------
    Jan Heinonen
    Contact Center Specialist
    GlobalConnect AB
    ------------------------------