cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1083
Views
2
Helpful
6
Replies

Watch agent state change - need Bosh/Xmpp?

NeilClancy
Level 1
Level 1

Hi all,

I had a gadget set up to based on one of the sample gadgets - when the call ends, the function handleEndDialog calls some arbitrary js code to run. The issue is that handleEndDialog does not trigger until wrap up is over and agent transitions to Ready or Not Ready. At this point it updated the dialog and handleEndDialog runs.

This is too late, I need to trigger the code when the agent transitions from Talking to Work/Wrapup state.

We decided to investigate the possibility of using the Notification Service and a js eventlistener to watch for the state change and trigger with that.

Can someone recommend a lightweight library to use for this purpose, OR if there is a way to achieve what I am trying to do without BOSH? Also, we are hoping to use finesse with HTTP and not HTTPS - the developer guide says that BOSH must be done over HTTPS, will this be a problem?

Any help much appreciated, thanks

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

Hi,

If you need to trigger code when the agent transitions from Talking to work/wrapup, you should be able to put the code in the user object's onChange callback. In a lot of the sample gadgets, this function would be the handleUserChange method.

In that method, you can add code to check for the transition from talking to work/wrapup and put your code in there.

If your gadget already handles calls, your BOSH connection should already be established.

Which sample gadget is your gadget based off of?

Thanx,

Denise

View solution in original post

6 Replies 6

stephan.steiner
Spotlight
Spotlight

As I read the Dev guide, you need BOSH (or XMPP) to get those status updates (or you poll - not sure how the system would like frequent requests though). As I'm doing XMPP I can't say anything about HTTP vs HTTPS.

dekwan
Cisco Employee
Cisco Employee

Hi,

If you need to trigger code when the agent transitions from Talking to work/wrapup, you should be able to put the code in the user object's onChange callback. In a lot of the sample gadgets, this function would be the handleUserChange method.

In that method, you can add code to check for the transition from talking to work/wrapup and put your code in there.

If your gadget already handles calls, your BOSH connection should already be established.

Which sample gadget is your gadget based off of?

Thanx,

Denise

Many thanks, I didn't actual know that's what the user change did, we ended up calling a dummy workflow event that triggers some code, but that might be a cleaner way to do it, thanks again Denise

You're welcome. Give it a shot. I tried it out by adding some code in that method and it was definitely triggered.

Hi, Today is my first day in Cisco working as new learner. I am trying to change user state and get its notification using xmpp. Could you please help me library and may be some code.

Hi Sushma,

Welcome to Cisco! If you haven't already visited the DevNet Finesse page (Cisco DevNet: Finesse), you should take a look at that. There are learning labs, sample gadgets, and sandboxes for your to play around with.

Finesse's APIs are just REST APIs and as you pointed out, the notifications use xmpp. Since I don't know what coding language you are using, I can't give you specific libraries. But, since the APIs are just REST APIs, you just need to find any HTTP Request library for your language. A list of XMPP libraries and the language can be found here: https://xmpp.org/software/libraries.html

I hope that helps!

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: