Genesys Cloud - Main

 View Only

Discussion Thread View
Expand all | Collapse all

Invoke URL when dialing contact in preview campaign

  • 1.  Invoke URL when dialing contact in preview campaign

    Posted 04-15-2024 10:24

    Hello everyone,

    Is there a way to open a URL at the moment the agent clicks on the "begin call" during a preview interaction?

    Using an if/else scenario with the scripter.interaction state at the page load action did not work. Any ideas?

    Regards,


    #ArchitectureandDesign

    ------------------------------
    Charis Sideridis
    INTRACOM SINGLE MEMBER S.A. TELECOM SOLUTIONS.
    ------------------------------


  • 2.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-15-2024 11:13

    There may be something you can do with Data Actions to make this work properly, but that's out of my wheelhouse.  Strictly working within Scripts, nothing comes to mind that's clean... you could always try something like:

    1) Set boolean Variable, default: False

    2) Custom Script - Name it "URL". 

    • Try 
      • If boolean = False
        • If {{Scripter.Interaction State}} Equals (Ignoring Case) Connecting
          • {{Scripter.Set Variable}} boolean = True
          • {{Script.Open URL}}
    • On Error
      • Delay 3000
      • Custom > URL

    3) Set Start Page > Page Load Action = "URL"

    Naturally, this is not something I tested, and it's not very clean using a millisecond timer.  Without Data Actions I'm not sure it really can be clean.  Though I'd be intrigued if it could. 



    ------------------------------
    Steven Busse
    Vice President, Lead Business Analyst
    M&T Bank
    ------------------------------



  • 3.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-15-2024 11:30

    Hi Steven,

    Thanks for your reply. Your approach is based on the fact that the agent would actually press the begin call button. That would be OK, but there are scenarios where an agent would not call the customer (e.g. skip). Furthermore, there is no time limit. An agent could spend between a second and 10 minutes before doing any action.

    I was wondering if there is a way to use boolean variables as "trigger" points.

    Regards,



    ------------------------------
    Charis Sideridis
    INTRACOM SINGLE MEMBER S.A. TELECOM SOLUTIONS.
    ------------------------------



  • 4.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-15-2024 11:38

    My pleasure!  

    So, with my solution in mind, I'd like to point out two things:

    1. If the user never hits begin call, the URL will not be invoked.  If that's not the behavior you want - we can try to work around that but I will need more details.
    2. The way the Try On Error in my situation works is, it says "Check if the boolean is still false, if not, wait 3 seconds and try again".  This would happen endlessly until the interaction is terminated.  So whether it takes 1 second, or it takes 10 minutes, the result would occur with a potential delay of up to 3 seconds.  This can naturally be modified to suit your needs; shorter/longer/etc.

    So, that being said, are there other situations where the URL would still need to be invoked?



    ------------------------------
    Steven Busse
    Vice President, Lead Business Analyst
    M&T Bank
    ------------------------------



  • 5.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-15-2024 11:53

    Hi Steven,

    "This would happen endlessly until the interaction is terminated"

    Now this is something new to me. I thought it would only check once. I will give it a try tommorrow and see what happens. Thanks again!

    Cheers,



    ------------------------------
    Charis Sideridis
    INTRACOM SINGLE MEMBER S.A. TELECOM SOLUTIONS.
    ------------------------------



  • 6.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-15-2024 12:07

    No problem!  Curious how it turns out, so let me know.  The set / check for boolean is a good trick in situations where you cannot do a proper do while/until loop; which beyond having something that natively binds to clicking the "Begin Call" button, sounds like you need. 

    You're basically just saying "if this isn't ready yet, wait and go back to the top of the script". 



    ------------------------------
    Steven Busse
    Vice President, Lead Business Analyst
    M&T Bank
    ------------------------------



  • 7.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-16-2024 05:01

    Hi Steven,

    Tried your suggestion but unfortunately it didn't work. I did numerous tests, worked with delays, removed boolean variable, etc and I can only assume that the script cannot handle the interaction state variable. I added the boolean variable as text in order to monitor if it changes values, in order to have some kind of "logging" during my tests. No changes whatsoever.

    I am now more confused. Your suggestion should work, it is pretty straightforward, yet the behavior of the script states that it cannot handle the interaction state at all.



    ------------------------------
    Charis Sideridis
    INTRACOM SINGLE MEMBER S.A. TELECOM SOLUTIONS.
    ------------------------------



  • 8.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-16-2024 08:19

    Good Morning Charis - 

    Disappointing!  Let's try a few more things.  First, in addition to logging the boolean (which should theoretically stay False), add some text values to follow along with {{Scripter.Interaction State}} and {{Scripter.Interaction Type}}.

    The following Interaction States will be labeled with their respective strings:

    1. While "Previewing" a call, the {{Interaction State}} will be "Connected".  The {{Interaction Type}} will be "Callback".
    2. Once you click "Begin Dial", the {{Interaction State}} changes to "Connecting" and the {{Interaction Type}} changes to "Call".
    3. If the customer/person accepting the call answers the call, the {{Interaction State}} changes to "Connected", and the {{Interaction Type}} remains "Call".

    Knowing these three facts, it's important to account for them in our script.  Add those attributes as text fields, and see if they change in the same manner that I am reporting.  If not, you may have to account for the specific names you see.  You may also have to add an extra layer that says something to the effect of:

    • Try If {{Scripter.Interaction Status}} Equals (Ignoring Case) Connecting
      • Do the stuff we talked about above
    • On Error
      • Try If {{Scripter.Interaction Status}} Equals (Ignoring Case) Connected
        • If {{Scripter.Interaction Type}} Equals (Ignoring Case) Call
          • Do stuff
      • On Error 
        • Custom > URL

    This way you account for not only the "Connecting" Status, which should happen upon dialing (maybe yours is called Dialing?), but also account for what happens if the customer answers before it loops back (Status: Connected / Type: Call). 

    Sorry this is such a mess!  Hopefully you're able to come up with a solution.  Let me know if I can help in any other way. 



    ------------------------------
    Steven Busse
    Vice President, Lead Business Analyst
    M&T Bank
    ------------------------------



  • 9.  RE: Invoke URL when dialing contact in preview campaign

    Posted 04-16-2024 10:27

    Hi Steven,

    I actually found a way but I will surely try your second approach too. I will come back with details.

    Regards,



    ------------------------------
    Charis Sideridis
    INTRACOM SINGLE MEMBER S.A. TELECOM SOLUTIONS.
    ------------------------------



  • 10.  RE: Invoke URL when dialing contact in preview campaign

    0