Genesys Cloud - Main

 View Only

Discussion Thread View
Expand all | Collapse all

ToPhoneNumber(Call.Ani)

  Thread closed by the administrator, not accepting new replies.
  • 1.  ToPhoneNumber(Call.Ani)

    Posted 11-06-2024 14:13
    No replies, thread closed.

    I am trying to use this as an expression under data table and I am getting an error

    The variable reference 'Call.Ani' at position 15 is not valid.


    #ArchitectureandDesign
    #SystemAdministration

    ------------------------------
    John Francis
    NA
    ------------------------------


  • 2.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-06-2024 14:17
    No replies, thread closed.

    What's the full expression you're trying to use?



    ------------------------------
    Melissa Bailey
    Software Engineer
    ------------------------------



  • 3.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-06-2024 14:23
    No replies, thread closed.

    ToPhoneNumber(Call.Ani)

    flow


    ------------------------------
    John Francis
    NA
    ------------------------------



  • 4.  RE: ToPhoneNumber(Call.Ani)
    Best Answer

    Posted 11-06-2024 14:28
    No replies, thread closed.

    Call.Ani doesn't in common module flows, only call flows.  You need to pass the value of it into your common module.

    https://help.mypurecloud.com/articles/architect-default-variables/



    ------------------------------
    Melissa Bailey
    Software Engineer
    ------------------------------



  • 5.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 03:52
    No replies, thread closed.

    We have a simple common module for blacklisted numbers. We converted call.ani to a string and removed the Tel: for the DT lookup using Substring(ToString(Common.CallerID),4,20)



    ------------------------------
    Jasper Donovan
    na
    ------------------------------



  • 6.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 08:42
    No replies, thread closed.

    Thanks, Jasper, for sharing the common module. What I am trying to do is to block a number coming directly to an agent as that customer is no more in our system. If it was a queue, I already have it in place. But this one specifically for a user I am trying to do. I am not sure whether it is correct how I am approaching this. Also, I will look into yours and see whether I could follow something similar.



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 7.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 08:50
    No replies, thread closed.

    Take a look at the Direct routing that has just been released

     

    https://help.mypurecloud.com/articles/direct-routing-overview/

     

    You could tweak the flows to do a DT lookup for blacklisted numbers

     

    Best regards,

    Jasper Donovan

    Senior UC Architect
    Global Network & Telecoms
    Global IT Operations
    M: +4549111671

    Coloplast A/S
    Holtedam 1, 3050 Humlebæk
    Denmark
    www.coloplast.com
    +45 49111111

    This Coloplast email may contain confidential information and is intended only for the addressee. You may not disclose such confidential information. If you have received this email by mistake, please notify the sender and delete this email. See our global privacy notice for how we process personal data.

     






  • 8.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 10:08
    No replies, thread closed.

    Check out Direct Group Routing to allow the same for user DIDs

    https://search.app?link=https%3A%2F%2Fhelp.mypurecloud.com%2Farticles%2Fdirect-routing-overview%2F&utm_campaign=aga&utm_source=agsadl2%2Csh%2Fx%2Fgs%2Fm2%2F4



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 9.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 10:21
    No replies, thread closed.

    Thank you I will check it out



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 10.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 17:50
    No replies, thread closed.

    Hi Jasper,

    I have 2 questions.

    1.When I publish this, do I have to assign it to any queue or flow or how does it understand that all incoming calls need to go through this common module? 

    2. Under the Data Table Look up, I already created a data table called blocked numbers and that number has been added and that is what I am using here in the data table. But should I enter a value here under the phone number if so what would it be since I already have the number in the data table?



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 11.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-07-2024 18:04
    No replies, thread closed.

    1) Use the Call Common Module action in any flows you want to use it.  https://help.mypurecloud.com/articles/call-common-module-action/
    2) You need pass in the value you want checked, that is the value of whatever variable you are using to pass in the value of Call.Ani from the calling flow.  From your screenshot, it looks like Common.CallerID.  Don't forget to switch that Phone Numbers field from literal to expression.



    ------------------------------
    Melissa Bailey
    Software Engineer
    ------------------------------



  • 12.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-08-2024 03:13
    No replies, thread closed.

    As melissa already mentioned. You can call a common module from any call flow using the action "call common module" Just add the call.ani to the common.Callerid. field.  

    You can use this common module for all your flows that will look in the DT to see if a number has been blacked listed 



    ------------------------------
    Jasper Donovan
    na
    ------------------------------



  • 13.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 14:50
    No replies, thread closed.

    Jasper I set it up as  you have done. I have a call routing coming into to Inbound Call Flow where I am calling the Common Module. But, as soon as it comes in it says there is an error and kicks me out. So, I am not sure what is wrong with what I have done. I opened a ticket with Genesys support and their response is as following:

    I checked the logs and I see that the Common Module went to error handling as soon as it went to Action 12. The ToString(Common.CallerID) on the below expression does not have a value.
     
    Substring(ToString(Common.CallerID),4,20)
     
    Can you confirm were this should be assigned with a value? Architect does cannot handle variables will null or empty values. Once these variables are called, and error will be thrown and will take the Error Handling setting of the flow. The Error I see is focused on Block 12 of the Blacklisted number Common Module. The Variable Common.CallerID is being assigned to the same variable which I believe does not have a value yet. Is there is reason why that is designed that way? We need to make sure that Common.CallerID already have a value before we can assign it to avoid the flow error.

    I am not following where I am doing wrong?



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 14.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 15:06
    No replies, thread closed.

    1) Use the IsSet or IsNotSetOrEmpty functions to check if a variable has a value.
    2) Flow execution history would be a way for you to debug this yourself.  See https://help.mypurecloud.com/articles/historical-execution-data-overview/  If it's not already enabled, make sure you do all the steps.  Enable everything necessary, republish the flow, send a call through it, then you can debug the execution.
    3) Show us your call common module action



    ------------------------------
    Melissa Bailey
    Software Engineer
    ------------------------------



  • 15.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 17:50
    No replies, thread closed.

    Hi Melissa

    Here is the call common module action

    Shown below



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 16.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 18:00
    No replies, thread closed.

    As soon as the greeting is played it says "SORRY AN ERROR OCCURED"



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 17.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-18-2024 14:24
    No replies, thread closed.

    As soon as the Greeting plays it says "Sorry an error occurred" what could be wrong since it is not flowing to the next step?



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 18.  RE: ToPhoneNumber(Call.Ani)

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

    The first step is going to be identifying what is causing the error, exactly.  Nothing in that screenshot looks like it would cause an error (although your call common module shows as version 1, remember to republish your flow to get it to use updated common modules).

    Although it sounds like it is disconnecting right after the welcome is played a lot can have happened in those micro seconds.

    If your participant data logging doesn't show you were the issue is, or what the last action was before it errored out. I highly recommend you enable historical execution data and use the replay mode to troubleshoot further, this will really help identify the exact action that is causing the error

    https://help.mypurecloud.com/articles/historical-execution-data-overview/

    https://help.mypurecloud.com/articles/flow-execution-history/

    https://help.mypurecloud.com/articles/use-replay-mode-to-troubleshoot-an-architect-flow/

    The amount of data it will use even when set to maximum data capture (All) will be pretty small if you only apply it to this one flow. 



    ------------------------------
    Anton Vroon
    ------------------------------



  • 19.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-18-2024 16:30
    No replies, thread closed.

    I looked at the flow execution history there is nothing



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 20.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-21-2024 14:37
    No replies, thread closed.

    You first have to enable it, it is not on by default.

    Take a look at the links I sent, especially this one https://help.mypurecloud.com/articles/historical-execution-data-overview/ which will guide you through the permissions required and the steps required to enable it.



    ------------------------------
    Anton Vroon
    ------------------------------



  • 21.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 15:29
    No replies, thread closed.

    Hi John

    In the calling flow, instead of putting call.ani as the input, can you try, setting another variable to call.ani eg Task.CallingNumber = Call.Ani, and then set Task.CallingNumber to the input. I've had some issues in the past with using system variables as inputs to common modules so almost always pass it to another variable first. 

    Would also recommend you write participant data for call.ani or Task.CallingNumber before going to common module so you can see the value as it is before the common module. And the write participant data once in the common module to see that input is carried across.

    If not check your variable assignment in the Common module, you should have something like Common.CallerID = Common.CallerID



    ------------------------------
    Anton Vroon
    ------------------------------



  • 22.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 15:49
    No replies, thread closed.


    ------------------------------
    John Francis
    NA
    ------------------------------



  • 23.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 16:20
    No replies, thread closed.

    I was told that in the Inbound Call Flow that there was no Input, So I add this section which is marked in red.  Does that make any sense?



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 24.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 16:34
    Edited by Anton Vroon 11-14-2024 16:39
    No replies, thread closed.

    Sorry, I probably explained it poorly. 

    For the Call Common Module action, don't use call.ani as the Input, use another variable, even if that variable is set to Call.Ani. Call.Ani is a system variable, and in the past i've had issues with those working as common module inputs. - Adding some participant data like I have here just lets you confirm what the value was before the common module, you can do the same with flow execution data instead. 

    Inbound Flow:

    Then in the common module, before applying any functions like substring, again write it to participant data, so you can compare the value you are sending to the common module with the value the common module receives.

    Common Module:

    Edit: This is just to help you figure out what is happening, from there, as others have mentioned you can use IsSet or IsNotSetOrEmpty functions to then decide what to do, but for calls you should always have a call.ani right, so to me it sounds more like that value is either not set before hand or not passing across, and i've had that issue with system variables, so this is just a good way to confirm if that is happening or not.

    Edit2: And I would create a phone variable, with call.ani as the expression in the inbound flow, and just pass the phone number variable as input to the common module, rather than the string, then doing the ToPhoneNumber function in the common module. But that is just a minor thing.



    ------------------------------
    Anton Vroon
    ------------------------------



  • 25.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 17:35
    No replies, thread closed.

    I was wondering whether I should have the decision here? Since I still get the error message and it kicked me out as it came in the flow.



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 26.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-14-2024 17:56
    No replies, thread closed.

    What did the participant data show on the test call? Did the variable have valid input? Or were they set there?

    If Call.Ani is blank it won't matter where you put it, it isn't going to work well.

    We have a similar flow and it works fine as a common module. So certainly not going to be the issue.

    What we do though is in the Inbound flow, we assign Call.Ani as input for a Phone Number Data

    Inbound Flow:

    Common Module:

    Then in a Decision block we check that Call.Ani is set, valid, and not anonymous:

    That full expression:

    We do some further checks for some edge cases, but the main thing then do the lookup to the table is:

    And this works without issue



    ------------------------------
    Anton Vroon
    ------------------------------



  • 27.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-19-2024 03:41
    No replies, thread closed.

    Hi Francis

    Here is our setup which is not advanced as Antons

    In the in-que flow we do a standard common flow

    Here is the common flow 



    ------------------------------
    Jasper Donovan
    na
    ------------------------------



  • 28.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-19-2024 08:57
    No replies, thread closed.

    Hi Jasper,

    Thanks for this but I do not see the option for Input "Call.ANI" for the same in my side. 

    My Flow



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 29.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-19-2024 10:22
    No replies, thread closed.

    It looks like you have nor defined your variable correct in your common flow

    You need to define input and output. 

    Click on the variable name in the update and this pop-up window should open where you check and correct the varible.

    Remember to save and publish the common module. You should then see it in your inbound flow when you edit  



    ------------------------------
    Jasper Donovan
    na
    ------------------------------



  • 30.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-19-2024 11:02
    No replies, thread closed.

    I remember seeing this under validate and it was having an error. I deleted that. How would I add it back? Should I add it in common module?



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 31.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-19-2024 11:54
    No replies, thread closed.

    Yes, I did get that location and added Call.Ani, still I get sorry an error occurred.



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 32.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-19-2024 12:42
    No replies, thread closed.

    Looks to me like you've created this variable as a Boolean type instead of string.



    ------------------------------
    Vaun McCarthy
    ------------------------------



  • 33.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-22-2024 10:02
    No replies, thread closed.

    Hi Vaun,

    Thanks for your response. 

    Yes, I did verify and Genesys verified also and it was the Boolean that caused the issue. I think that was changed and the call comes in unfortunately, it is going to the Active queue even though my cell number is in the blocked list. That is what we are checking now. I am not sure where the issue lies.

    Thanks

    John



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 34.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-26-2024 14:21
    No replies, thread closed.

    I think everything looks good now with the Variable. Unfortunately, the call is not getting blocked and goes to Active Queue.



    ------------------------------
    John Francis
    NA
    ------------------------------



  • 35.  RE: ToPhoneNumber(Call.Ani)

    Posted 11-27-2024 09:25
    No replies, thread closed.

    What does the flow Execution Data show for the values being compared in the common module?



    ------------------------------
    George Ganahl GCP, GCSME, ICCE, ICHD, etc.
    Senior Principal PS Consultant
    Genesys
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources