Author Message
DonMonheim
Joined: Aug 19, 2016
Messages: 36
Offline
Hello,

Our team is having issues activating the AvayaCustomerServices agent. What order should we call agent.activate and agent.login?
SDK_CIS_Package
Joined: Dec 15, 2016
Messages: 22
Offline
Hi,

Activation is the creation of a Client Session instance on the server, with a specified (or default) Agent profile.
Once an Agent's Client Session has been activated, then the Agent may login to the Contact Center - to start work.

The Agent doesn't have to be logged in to the contact center to start & receive Interactions - only routed Contact Center work.

So, an Agent logs in (i.e. agent.login()) to go ready / not ready etc.

rgds

CIS Package Support
SDK_CIS_Package
Joined: Dec 15, 2016
Messages: 22
Offline
Hi,

you should also note the agent 'capabilities' at any point in time - it will give an indication of what is possible.

for example: when the agent object is created - 'canLogin' is false, but after activation 'canLogin' should be true (and also 'canDeactivate').

rgds

CIS Package Support
DonMonheim
Joined: Aug 19, 2016
Messages: 36
Offline
We are receiving a 404 Not Found Response. Our activation code is as follows:
agent.activate(username,'AllAccounts','2101').then(function(data){

console.log(agent.isActivated());
agent.login({user profile}).then(function(data){
agent.goReady().then(function(){
console.log(agent.state);
console.log(agent.getHandle());
});
});
});


Request URL: https://{IP}/services/UAC/UACAPI/users//sessions/b7241d48-ade5-4a4d-9b39-ea106bf34825?operation=login&state=ready&profile={user profile}

Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:en-US,en;q=0.8
Authorization:Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0ODkxMDM1ODgsInVzZXJuYW1lIjoiMjIwMUBwaWUubWE5MTEubG9jYWwiLCJzdWIiOiJPY2VhbmEgVG9rZW4iLCJyb2xlIjoiQUdFTlQiLCJyb2xlSWQiOiJBR0VOVCIsInVzZXJIYW5kbGUiOiIyMjAxQHBpZS5tYTkxMS5sb2NhbCJ9.aPjbCqnCfnHG3dZL9mHm10CbmbQUY7NkBOjRPLTB5h9jyvzXYO0Eu_gl-ApOiH-W0nKykCX-bbA4JCUZiOBt7exdSMOKfznsaWmlAiTqgZWTx5j0VOqIZdr0AhLe6rrTDpxNo7NuALWGlgEdMetTe34MPYWgp_D5DEQrIBvkCu8rxBMyaXXi-WFYbPaRacA2YxLZdPCOvWZtYb45wDXWqWPPoHSPpw0s7wOMW0dJXXmlJAVzVu0cxK7IplHVHTkN79PKs83aAPRUdpTQRbXDJFAAAi4XuwSHgz0cAL2VvCLmNOxsR2Kl_UpzGRQnI8s9txaWGYW8Xdj-xeIs7BoLnA
Connection:keep-alive
Content-Length:0
Content-type:application/x-www-form-urlencoded
Host:{IP}
Origin:http://{IP}
Referer:http://{IP}/{buildpath}/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

SDK_CIS_Package
Joined: Dec 15, 2016
Messages: 22
Offline
Hi,

looks like the username isn't being passed.

your URL should be : http(s)://{ip}/UAC/UACAPI/users/{username}/sessions/....


thanks

CIS Package Support
DonMonheim
Joined: Aug 19, 2016
Messages: 36
Offline
Is there a reason why
agent.activate(username,'AllAccounts','2101')
wouldn't pass the username?

Above this code we have
username = 'user string';
SDK_CIS_Package
Joined: Dec 15, 2016
Messages: 22
Offline
Hi,

There are many reasons why this mightn't happen.

The URL you pasted was for the agent login request, not agent activate request.

What does the console log show for agent.isActivated()?, what are the agent capabilities at this point? specifically is 'canLogin' true?

The promise that you are firing after the active.activate() call will fire when the activate request has completed - the agent will not be activated at this point. You need to add a callback on the agent object to be notified when the agent has been activated.

see:

http://www.devconnectprogram.com/site/global/products_resources/avaya_client_sdk/programming_docs/current/javascript/customer_interactive/guide/tutorial_eventlistener.gsp


agent.addOnActivatedCallback(function (agent) {
console.log('Agent Client Session has been successfully activated');
});


rgds

CIS Package Support



DonMonheim
Joined: Aug 19, 2016
Messages: 36
Offline
We are now receiving the following from the UAC Message Parser:

Object
clientSessionId
:
"31c3e38a-b406-4900-a1ec-6543fc9ad91d"
epoch
:
1489075502328
id
:
"d5c07763-481e-4b24-a4aa-b4236aba43c0"
newValue
:
Object
code
:
2000010
detail
:
""
errorType
:
"SERVER"
id
:
"acb297c2-97ea-481c-80c6-54c0e4d69a41"
message
:
"Could not get monitor details"
originatingId
:
"aeb625b0-9972-4164-9996-491c47b8b3c7"
scope
:
"USER_SESSION"
severity
:
"WARNING"
source
:
"USER_SESSION"
__proto__
:
Object
notificationChangeType
:
"NEW"
notificationType
:
"ERROR"
parentId
:
null
updatedProperty
:
"ERROR"
__proto__
:
Object
SDK_CIS_Package
Joined: Dec 15, 2016
Messages: 22
Offline
Hi,

This looks like a configuration issue - what error are you getting back when you do the same in Workspaces?

To see if an error is being raised (instead of poking around in the low-level parsers) you can attach a callback as such:


clientSession.addOnErrorCallback(function (data) {
console.log(data);
});


thanks

CIS Package Support
DonMonheim
Joined: Aug 19, 2016
Messages: 36
Offline
We are seeing the same error in Workspaces. We will add the callback as well.
SDK_CIS_Package
Joined: Dec 15, 2016
Messages: 22
Offline
Hi,

If you are seeing the same issue in Workspaces then this is not an SDK activation issue - please escalate through Avaya Oceana support as necessary.

thanks

CIS Package Support
Go to:   
Mobile view