Web-based Screen Pop

From VESupport

(Difference between revisions)
Jump to: navigation, search
(Other Notes)
 
(5 intermediate revisions not shown)
Line 1: Line 1:
 +
<seo title="Web-based Screen Pop" metakeywords="Voice Elements software, screen pop, web-based screen pop" metadescription="Many of our clients want to be able to use Voice Elements, but need a way to notify people that they have calls. So we thought, we'd just build something out and give them the code." />
 +
====Background====
====Background====
Many of our clients want to be able to use Voice Elements, but need a way to notify people that they have calls. So we thought, we'd just build something out and give them the code.
Many of our clients want to be able to use Voice Elements, but need a way to notify people that they have calls. So we thought, we'd just build something out and give them the code.
Line 27: Line 29:
=====IVR=====
=====IVR=====
When you have a screen to pop to a particular agent, then the IVR can send the following URL.  For testing purposes you can open up a separate browser and key in the URL.
When you have a screen to pop to a particular agent, then the IVR can send the following URL.  For testing purposes you can open up a separate browser and key in the URL.
 +
 +
<pre>
http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="http://www.yahoo.com"
http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="http://www.yahoo.com"
 +
</pre>
Please make sure you put the correct AgentId in the query string above.  Optional Parameters are Height and Width (which specify how big you want the new browser window).  
Please make sure you put the correct AgentId in the query string above.  Optional Parameters are Height and Width (which specify how big you want the new browser window).  
You can even pass parameters that will get passed on to the browser when opening the new window.  Below is an example:
You can even pass parameters that will get passed on to the browser when opening the new window.  Below is an example:
 +
 +
<pre>
http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="ParameterTest.aspx?Name=Ron Tanner?Product=HmpElements"&Height=600&Width=600
http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="ParameterTest.aspx?Name=Ron Tanner?Product=HmpElements"&Height=600&Width=600
 +
</pre>
Notice how the URL is all enclosed in quotes "ParameterTest.aspx?Name=Ron Tanner&Product=HmpElements". This makes it possible to pass on any custom parameters to the web page that getes loaded.
Notice how the URL is all enclosed in quotes "ParameterTest.aspx?Name=Ron Tanner&Product=HmpElements". This makes it possible to pass on any custom parameters to the web page that getes loaded.
Line 38: Line 46:
Keep in mind that most browsers block popup windows, so you'll have to allow from the website, and then try again. In the case of the Chrome browser after you have allowed pop-up always from this site, you will have to close that browser and re-open it to work.
Keep in mind that most browsers block popup windows, so you'll have to allow from the website, and then try again. In the case of the Chrome browser after you have allowed pop-up always from this site, you will have to close that browser and re-open it to work.
-
=====Other Notes=====
+
====Other Notes====
-
Calling a URL from any .NET application is very, very easy.  This should make it very simple to add screenpop capabilities to your application.
+
Calling a URL from any .NET application is very, very easy.  This should make it very simple to add screenpop capabilities to your web app.
 +
 
 +
Even better is the fact that you won't nee to deal with any tricky AJAX controls or frameworks on your application pages. You will just need to add some simple javascript code (which we can provide) to the "Dashboard" page where the user will wait until they get screen pops.
-
To use this, you will need the compiled dll (which you can compile yourself!, or use a binary that we give to you) and add a configuration setting to the web.config to handle .nfy requests.  You will also need to add some simple javascript code to the "Dashboard" page where the user will wait until they get screen pops.
+
To deploy it to your web server, you will need the compiled dll (which you can compile yourself!, or use a binary that we give to you) and add a configuration setting to the web.config to handle .nfy requests.

Latest revision as of 03:37, 23 April 2013

Contents

Background

Many of our clients want to be able to use Voice Elements, but need a way to notify people that they have calls. So we thought, we'd just build something out and give them the code.

Generally with AJAX, you have the client poll constantly -- the issue with that is that there can be a delay in getting the screenpop, and that can cause a lot of load on the server.

To solve this we wrote a Comet application so that the client is notified whenever a call comes in.

How it Works

We have the client make an asynchronous request using Javascript (it calls Check.nfy -- passing it's Agent ID) to the web server asking if there is anything assigned to it for that particular agent. It times out after 60 seconds (client side). We built it out so that if for some reason the request gets cancelled and returns early, it will immediately open up a new request.

We set up the web server so that it handles any requests to *.nfy asynchronously. This is essential because, IIS can only handle a couple hundred synchronous requests at a time.

When the server gets a request from a client, it checks shared memory to see if there is anything pending and then creates a new instance of a manual reset event and waits up to 60 seconds before it is either triggered or times out.

When the IVR wants to notify a client that there is a call waiting for it, it just makes an HttpRequest to notify.nfy and passes a few different parameters (more on that below). When the web server gets the request it stores it into shared memory.

We have a separate thread that checks the shared memory every few milliseconds (set to 10 -- but adjustable by you) to see if there are any messages for any of the agents that are connected. If there are any messages available for any waiting agents, it triggers the reset event, and the messages goes off to the agent.

Although a few hundred milliseconds may not seem like a big difference, in practice it seems much, much faster. More importantly, the streses on both your webserver (and potentially database server) will be greatly reduced because your AJAX will be making far fewer requests per minute.

How To Test It Out

Here is how to test it out:

Agent

You can bring up as many agents as you wish. Just make sure they each have a unique AgentId. In your browser go to this link: http://screenpop.voiceelements.com/Default.aspx?AgentId=12345 This will open web page. In the future, you could put your own dashboard on this page and show some statistics. You can just minimize this web page - you won't need to interact with it.

IVR

When you have a screen to pop to a particular agent, then the IVR can send the following URL. For testing purposes you can open up a separate browser and key in the URL.

http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="http://www.yahoo.com"

Please make sure you put the correct AgentId in the query string above. Optional Parameters are Height and Width (which specify how big you want the new browser window).

You can even pass parameters that will get passed on to the browser when opening the new window. Below is an example:

http://screenpop.voiceelements.com/notify.nfy?AgentId=12345&Url="ParameterTest.aspx?Name=Ron Tanner?Product=HmpElements"&Height=600&Width=600

Notice how the URL is all enclosed in quotes "ParameterTest.aspx?Name=Ron Tanner&Product=HmpElements". This makes it possible to pass on any custom parameters to the web page that getes loaded.

Keep in mind that most browsers block popup windows, so you'll have to allow from the website, and then try again. In the case of the Chrome browser after you have allowed pop-up always from this site, you will have to close that browser and re-open it to work.

Other Notes

Calling a URL from any .NET application is very, very easy. This should make it very simple to add screenpop capabilities to your web app.

Even better is the fact that you won't nee to deal with any tricky AJAX controls or frameworks on your application pages. You will just need to add some simple javascript code (which we can provide) to the "Dashboard" page where the user will wait until they get screen pops.

To deploy it to your web server, you will need the compiled dll (which you can compile yourself!, or use a binary that we give to you) and add a configuration setting to the web.config to handle .nfy requests.

Personal tools