How do I implement agent script which would pop new browser tab with given URL, but only once the interaction has been answered by the agent? I have managed to add screenpops as page load actions, but those do get fired right after the interaction s offered to an agent.
I assume you are defining an agent script in Admin->Script and in that script you've set a Custom Action to open a URL and selected the "Open in New Window" toggle, is that correct? If so, that will immediately execute that custom action once the script is displayed, which is when the call starts ringing on the agent's console.
Note, if you weren't using Custom Actions, then you can find them on the "cube" tab on the right side of the Scripter UI.
To start you'll have to remove the "Open URL" step that you currently have and start with a clean slate for the Custom Action.
You can click "Add Action" and choose "If/Else". That will insert an If/Else statement into your script. Setup the following in the fields:
Left Hand Side = "Scripter.Interaction State"
Operator = "Equals (Ignoring Case)"
Right Hand Side = "connected"
Then, in the "If" section click the "Add Step" button and add your "Open URL" action there.
You can leave the "Else" section empty because you don't want to perform any actions for any other states.
Save and Publish your script and see if that works for you.
Yes, your assumption is correct and what you describe is what I've tried to do. Noticed that it's not actually the if/else logic that is not working, but the Open Url action itself.
What I have in place now is very simple screenpop to fixed URL, but the URL is not opened when the script loads. Please check the following, what is it that I'm missing here:
That action should work. Did you put it in the Page Load Action to check if it works on load? Or try putting it in a button and pressing to test.
If Open URL does not work, it's possible you may have a pop up blocker (though I believe PureCloud should detect it) or maybe using an unsupported browser (like Safari.)
EDIT:
If you're calling this action from another action with an If/Else then that might be the reason it's not working. The If/Else step when called in "Page Load Action" would still be evaluated when an agent is being alerted. Thus, it will immediately know that it's not connected and go to your Else block.
A way to offset this evaluation is to use a Delay step before the If/Else step. The amount of delay would be up to you and what your expected 'altering' time for agents are.
Related Post:
Also, if you would to request this as an official feature request please post it to:
Yes, this seems to be the issue. Added delay and it started working. Thanks.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.