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

Our team has made progress authenticating with Avaya Identity services and have followed the sample tutorials to create a clientSession. From that clientSession we have created an agent and work. From that work we have pulled the Interactions collection. At this point we have hit a bit of a wall. We believe that the Interactions collection is populated by ringing calls and that the agent has the ability to answer those calls but we have not seen any samples of this. Is there a resource we can go to that shows how a user would utilize Javascript to answer a call at a station? Furthermore, is our understanding of how the interactions collection is populated correct?

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

Your assumption is correct - the Interactions collection will be populated based on server events.

To understand how best to get working with interactions, have a look at the sample applications, or here:

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

To be notified when an interaction has been added to the collection:


//these events are attached to the Work object
work.addOnInteractionCreatedCallback(callback);
work.addOnInteractionDeletedCallback(callback);


and to add specific callbacks to an interaction object, example:


//this event is attached to the interaction object itself
interaction.addOnInteractionUpdatedCallback(callback)


Or, you could use a data-binding approach - as shown in one of the sample applications.
Both sample application show how to work with interactions, and carry out actions on an individual interaction - such as 'accept', 'end' etc.

It's also worth gaining an understanding of 'capabilities' at this point:

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

as these are also set by the server - they will give an indication on whether a requested action will be successful (i.e. on an interaction object there are a list of 'capabilities', if the 'canAccept' capability is false, then 'interaction.accept()' will likely fail)

thanks

CIS Package Support

Go to:   
Mobile view