|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Agent
An agent.
To get an Agent interface, call the AilFactory.getPerson(java.lang.String) method, as shown
in the following code snippet.
public class SimpleAgentExample
{
public Agent exampleAgent;
public SimpleAgentExample(AilFactory myAilFactory)
{
// Getting the Agent instance
exampleAgent = (Agent) myAilFactory.getPerson ("my_Agent_ID");
}
}
Call the Agent methods to:
First log your agent into the place, by calling the login or loginMultimedia method, in order to associate your agent with the place, to access interactions, and to access MCR features.
Changes in the place's DN and media state, and in associated interactions, generate events. For example, these events propagate the agent status on the place (DN and media status) or interactions' status. Your application can listen for these events and update its state accordingly.
Create and add an AgentListener to this Agent interface to:
DnEvent and PlaceEvent events.
InteractionEvent events.
The following code snippet shows how to add an AgentListener to the Agent interface:
public class SimpleAgentExample implements AgentListener
{
public SimpleAgentExample (Agent exampleAgent)
{
//Adding the listener
exampleAgent.addAgentListener(this);
}
//Implementation of the listener methods
//...
}
Note: When the monitored agent is logged out of the place, this listener no longer receives events regarding this place or interactions on this place.
AgentListener| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.genesyslab.ail.IdObject |
|---|
IdObject.ObjectType |
| Method Summary | |
|---|---|
void |
addAgentListener(AgentListener listener)
Adds a listener. |
java.util.Map |
afterCallWork(java.lang.String queue,
java.util.Map reasons)
Deprecated. Use afterCallWork( String, Map, Map ). |
java.util.Map |
afterCallWork(java.lang.String queue,
java.util.Map reasons,
java.util.Map tExtensions)
Sets all the DNs of the current place to the 'after-call-work' state. |
Interaction |
createInteraction(Dn.Media media,
Interaction parent)
Deprecated. since 7.0 Dn.Media should be replaced by MediaType |
Interaction |
createInteraction(MediaType media,
Interaction parent,
java.lang.String queue)
Creates a new interaction on a place of this agent. |
Interaction |
createInteractionOpenMedia(java.lang.String mediaType,
java.lang.String interactionType,
java.lang.String interactionSubtype,
java.lang.String id,
java.lang.String queue,
java.lang.String subject,
Interaction parent,
java.util.Map userData)
Creates a new Open Media interaction without submitting it. |
java.util.Collection |
getAgentGroups()
Returns the AgentGroups to which this Agent belongs as a
Collection of AgentGroup. |
java.util.Collection |
getAvailableMedia()
Returns the available media for this agent. |
CallbackService |
getCallbackService()
Returns the callback service associated with the current place. |
Place |
getDefaultPlace()
Returns the default place as defined in the Configuration Layer. |
java.util.Collection |
getDns()
Returns all the DNs of the current place. |
java.util.Collection |
getDns(Dn.Media media)
Deprecated. use instead getDns(). |
java.util.Collection |
getInteractions()
Returns the active interactions on the current place. |
java.util.Collection |
getLoggedDns()
Returns the DNs on which this agent is currently logged in. |
java.util.Collection |
getLoggedDns(Dn.Media media)
Deprecated. use instead getLoggedDns(). |
java.lang.String |
getLoginId(Dn dn)
Returns the agent's login identifier for this DN. |
java.util.Collection |
getLoginIds()
Returns the agent's login identifiers configured in the 'Agent Info' tab of the Configuration Layer. |
java.util.Map |
getLoginIdsBySwitch()
Returns the agent's login identifiers per switch. |
OutboundService |
getOutboundService()
Returns the outbound service associated with the current place. |
Place |
getPlace()
Returns the current place. |
ResourceProperty |
getResourceProperty(java.lang.String key)
Returns a resource property. |
java.lang.String |
getSignature()
Returns the agent's signature, or the default signature (defined the application options) if this agent has no signature defined in the Configuration Layer. |
java.util.Collection |
getSkills()
Returns the skills defined in the Configuration Layer. |
java.util.Collection |
getSupportedMedia()
Returns the supported media types for this agent. |
java.util.Map |
login(Place place,
java.lang.String loginId,
java.lang.String password,
java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons)
Deprecated. Use login( Place, String, String, String, Dn.Workmode, Map, Map ). |
java.util.Map |
login(Place place,
java.lang.String loginId,
java.lang.String password,
java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons,
java.util.Map tExtensions)
Logs this agent on all the DNs of this place. |
java.util.Map |
loginMultimedia(Place place,
java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
Logs this agent in the specified media. |
java.util.Map |
logout(java.lang.String queue,
java.util.Map reasons)
Deprecated. Use logout( String, Map, Map ). |
java.util.Map |
logout(java.lang.String queue,
java.util.Map reasons,
java.util.Map tExtensions)
Logs the agent out of all the DNs of the current place. |
java.util.Map |
logoutMultimedia(java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
Logs out the specified media. |
void |
moveToWorkbin(java.lang.String interactionId,
Workbin workbin)
Pulls an interaction, then puts it in the specified workbin. |
java.util.Map |
notReady(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons)
Deprecated. Use notReady( String, Dn.Workmode, Map, Map ). |
java.util.Map |
notReady(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons,
java.util.Map tExtensions)
Sets all the DNs of the current place to not ready. |
java.util.Map |
notReadyMultimedia(java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
Sets the specified media to not ready. |
InteractionMultimedia |
openInteraction(java.lang.String interactionId)
Opens an interaction. |
java.util.Map |
ready(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons)
Deprecated. Use ready( String, Dn.Workmode, Map, Map ). |
java.util.Map |
ready(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons,
java.util.Map tExtensions)
Sets all the DNs of the current place to ready. |
java.util.Map |
readyMultimedia(java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
Sets the specified media to ready. |
void |
removeAgentListener(AgentListener listener)
Removes a listener. |
void |
setResourceProperty(java.lang.String key,
byte[] value)
Sets a binary resource property. |
void |
setResourceProperty(java.lang.String aKey,
java.lang.String aValue)
Sets a string resource property. |
void |
setSignature(java.lang.String signature)
Modifies the agent's signature. |
| Methods inherited from interface com.genesyslab.ail.Person |
|---|
changePassword, checkPassword, getAnnex, getEmployeeId, getFirstName, getLastName, getLastPasswordErrorCode, getLastPasswordReason, getTenantId, getUserName, isAgent, isEnabled, isLastPasswordErrorCodeExternal, setAnnex |
| Methods inherited from interface com.genesyslab.ail.IdObject |
|---|
getId, getObjectType |
| Methods inherited from interface com.genesyslab.ail.ConfigObject |
|---|
exists |
| Method Detail |
|---|
Place getDefaultPlace()
null if none is
configured.Place getPlace()
null if
this place is not available.java.util.Collection getLoggedDns(Dn.Media media)
getLoggedDns().
media - the desired media type or null for all.
Dn.java.util.Collection getLoggedDns()
Dn.java.util.Collection getDns(Dn.Media media)
getDns().
media - the desired media type or null for all.
Dn.java.util.Collection getDns()
Dn.java.util.Collection getAgentGroups()
AgentGroups to which this Agent belongs as a
Collection of AgentGroup.
java.util.Collection getSkills()
Skill.java.util.Collection getAvailableMedia()
String.java.util.Collection getSupportedMedia()
MediaType.java.util.Collection getLoginIds()
String.java.util.Map getLoginIdsBySwitch()
Switch and the value a
collection of LoginId.
java.lang.String getLoginId(Dn dn)
throws InvalidParameterException
dn - the DN for which the login identifier is requested.
InvalidParameterException - if this agent has no login identifier
configured on this DN's switch.java.lang.String getSignature()
void setSignature(java.lang.String signature)
throws ConfigServiceException
signature - the new signature.
ConfigServiceException - if the Configuration Layer failed in
updating the signature.
java.util.Map loginMultimedia(Place place,
java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
place - the place where the agent attempts to log in.mediaList - a collection of media names as String, or
null to log the agent in all the available media on the place.reason - the reason specified by this agent for this Login action.reasonDescription - a String describing this reason.
String
and the value an Exception for an error, or null
if the operation is successful.
java.util.Map logoutMultimedia(java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
mediaList - a collection of media names as String, or
null to logout all the available media on the place.reason - the reason for this Logout action.reasonDescription - a String describing this reason.
String
and the value an Exception for an error, or null
if the operation is successful.
java.util.Map readyMultimedia(java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
mediaList - a collection of media names as String, or
null to set ready all the available media of the place where the
agent is logged.reason - the reason for this Ready action.reasonDescription - a String describing this reason.
String
and the value an Exception for an error or null
if the operation is successful.
java.util.Map notReadyMultimedia(java.util.Collection mediaList,
java.lang.String reason,
java.lang.String reasonDescription)
mediaList - a collection of media names as String, or
null for all the available media on the place where the
agent has been logged.reason - the reason for this not-ready action.reasonDescription - a String describing this reason.
String
and the value an Exception for an error, or null
if the operation is successful.
java.util.Map login(Place place,
java.lang.String loginId,
java.lang.String password,
java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons,
java.util.Map tExtensions)
Map result = myAgent.login(myPlace, "login", "password", "queue", null, null, null);
Map.Entry entry;
Iterator it = result.entrySet().iterator();
while (it.hasNext()) {
entry = (Map.Entry) it.next();
if (entry.getValue() == null) {
System.out.println("Login succeeded for the DN " + entry.getKey());
}
else {
System.out.println("Login failed for the DN " + entry.getKey());
((RequestFailedException) entry.getValue()).printStackTrace();
}
}
place - the place where the agent attempts to log in. Can be null, in which case the method attempts to log the agent into this agent's default place.loginId - the login ID of the agent.password - the password for this login ID.queue - the queue to apply this (Login) action to. Can be null.workmode - the workmode to apply this (Login) action. If null, the value used is
Dn.Workmode.UNKNOWN.reasons - reasons specified by this agent for this Login action. Can be null.tExtensions - additional switch-specific data. Can be null. Refer to your T-Server documentation for further information.
String
and the value either null if the action on this DN was successful, or a
RequestFailedException if an error occurred.Place.login(java.lang.String, java.lang.String, java.lang.String, com.genesyslab.ail.Dn.Workmode, java.util.Map),
Dn.login(java.lang.String, java.lang.String, java.lang.String, com.genesyslab.ail.Dn.Workmode, java.util.Map)
java.util.Map login(Place place,
java.lang.String loginId,
java.lang.String password,
java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons)
login( Place, String, String, String, Dn.Workmode, Map, Map ).
login( place, loginId, password, queue, workmode, reasons, null ).
java.util.Map logout(java.lang.String queue,
java.util.Map reasons,
java.util.Map tExtensions)
queue - the queue to apply this Logout action. Can be
null.reasons - reasons specified by this agent for this Logout action. Can be
null.tExtensions - additional switch-specific data. Can be null. Refer to your T-Server documentation for further information.
String
and the value either null if the action on this DN was successful, or a
RequestFailedException if an error occurred.Place.logout(),
Dn.logout(java.lang.String, java.util.Map, java.util.Map)
java.util.Map logout(java.lang.String queue,
java.util.Map reasons)
logout( String, Map, Map ).
logout( queue, reasons, null ).
java.util.Map ready(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons,
java.util.Map tExtensions)
queue - the queue to apply this Ready action. Can be
null.workmode - the workmode. Can be null.reasons - reasons specified by this agent for this Ready action. Can be
null.tExtensions - additional switch-specific data. Can be null. Refer to your T-Server documentation for further information.
String
and the value either null if the action on this DN was successful, or a
RequestFailedException if an error occurred.Place.ready(),
Dn.ready(java.lang.String, com.genesyslab.ail.Dn.Workmode, java.util.Map, java.util.Map)
java.util.Map ready(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons)
ready( String, Dn.Workmode, Map, Map ).
ready( queue, workmode, reasons, null ).
java.util.Map notReady(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons,
java.util.Map tExtensions)
queue - the queue to apply this not-ready action. Can be
null.workmode - the workmode. Can be null.reasons - reasons specified by this agent for this not-ready action. Can
be null.tExtensions - additional switch-specific data. Can be null. Refer to your T-Server documentation for further information.
String
and the value either null if the action on this DN was successful, or a
RequestFailedException if an error occurred.Place.notReady(),
Dn.notReady(java.lang.String, com.genesyslab.ail.Dn.Workmode, java.util.Map, java.util.Map)
java.util.Map notReady(java.lang.String queue,
Dn.Workmode workmode,
java.util.Map reasons)
notReady( String, Dn.Workmode, Map, Map ).
notReady( queue, workmode, reasons, null ).
java.util.Map afterCallWork(java.lang.String queue,
java.util.Map reasons,
java.util.Map tExtensions)
Dn.Workmode.AFTER_CALL_WORK. See also this
code snippet.
queue - the queue to apply this after-call-work action.
action. Can be null.reasons - reasons specified by this agent for this after-call-work action.
work. Can be null.tExtensions - additional switch-specific data. Can be null. Refer to your T-Server documentation for further information.
String
and the value either null if the action on this DN was successful, or a
RequestFailedException if an error occurred.Place.afterCallWork(),
Dn.afterCallWork(java.lang.String, java.util.Map, java.util.Map)
java.util.Map afterCallWork(java.lang.String queue,
java.util.Map reasons)
afterCallWork( String, Map, Map ).
afterCallWork( queue, reasons, nulll ).
Interaction createInteraction(Dn.Media media,
Interaction parent)
throws RequestFailedException
Dn
will be affected when you call makeCall.
Interaction phoneCall =
myAgent.createInteraction(Dn.Media.VOICE, null);
phoneCall.getDn(); <-- returns null
phoneCall.makeCall(dest_dn, null, null, null, null);
phoneCall.getDn(); <-- does not return null
makeCall(), but remember to set the
Contact with Interaction.setContactId(String) as soon as possible.
Interaction emailOut =
myAgent.createInteraction(Dn.Media.EMAIL, null);
((InteractionMailOut) emailOut).send(null, null); <--
throws NoContactException
emailOut.setContactId(myContactId);
((InteractionMailOut)
emailOut).send(null, null); <-- succeeds
media - the type of interaction to create. Valid media are
Dn.Media.EMAIL, Dn.Media.VOICE and Dn.Media.COBROWSE.parent - the parent interaction for the new
interaction. Used when the media is Dn.Media.COBROWSE.
Interaction. Depending on the requested
media, you may want to cast it to InteractionMailOut,
InteractionVoice or InteractionCoBrowse.
InvalidParameterException - if the media does not
allow a new interaction to be created
NoAvailableDnException - if this Agent
has no available Dn for this action
RequestFailedException - if the request fails for any
other reason
Interaction createInteraction(MediaType media,
Interaction parent,
java.lang.String queue)
throws RequestFailedException
media - the type of interaction to create. Valid media are
MediaType.EMAIL, MediaType.VOICE and MediaType.COBROWSE.parent - the parent interaction for the new
interaction. Used when media is MediaType.COBROWSE.queue - the queue on which this interaction must be
created. Can be null for voice interactions.
InvalidParameterException - If the media does not
allow a new interaction to be created.
NoAvailableDnException - If no DN is available for this action.
NoPlaceException - if the agent has no current place.
RequestFailedException - If the request fails for any
other reason.
Interaction createInteractionOpenMedia(java.lang.String mediaType,
java.lang.String interactionType,
java.lang.String interactionSubtype,
java.lang.String id,
java.lang.String queue,
java.lang.String subject,
Interaction parent,
java.util.Map userData)
throws RequestFailedException
InteractionMultimedia.submit(java.lang.String) to put it into workflow. AIL tests the specified media
type. If AIL is connected to UCS (Universal Contact Server), it checks whether the
mediaType belongs to the value list of the
multimedia/open-media-saved-list option of your application's configuration
template. If this is true, AIL saves the created open media interaction in UCS.
If the ID is null, and if UCS is connected, UCS creates an interaction ID for this new interaction. Otherwise, AIL creates a random ID.
Note: You cannot use predefined
Genesys media types - that is, email or chat - to create your Open
Media interaction.
mediaType - a media type defined in the "Business Attributes/Media Type" section of
the Configuration Layer. Do not use email or chat values.interactionType - an interaction type defined in the "Business Attributes/Interaction Type"
section of the Configuration Layer.interactionSubtype - an interaction subtype defined in the "Business Attributes/Interaction Subtype" values.id - the customer interaction ID when the interaction is received from a customer server, not a Genesys server.queue - - parameter is ignored -subject - the interaction subject.parent - the parent interaction; or null if there is no parent.userData - the customer data or useful additional data. Can be null.
NoPlaceException - if the agent has no current place.
RequestFailedException
InteractionMultimedia openInteraction(java.lang.String interactionId)
throws RequestFailedException
interactionId - the ID of the interaction to pull.
null if this ID is incorrect.
NoPlaceException - if the agent has no current place.
RequestFailedException - if the request fails for other reason.java.util.Collection getInteractions()
Interaction.OutboundService getOutboundService()
null if there is no current place.CallbackService getCallbackService()
null if there is no current place.void addAgentListener(AgentListener listener)
listener - a new listener.void removeAgentListener(AgentListener listener)
listener - a previously added listener.
ResourceProperty getResourceProperty(java.lang.String key)
throws RequestFailedException
key - the resource identifier.
DatabaseServiceException - exception thrown if the request could not be performed.
InvalidParameterException - exception thrown if method parameters are invalid.
RequestFailedException
void setResourceProperty(java.lang.String key,
byte[] value)
throws RequestFailedException
key - a resource identifier.value - the value.
DatabaseServiceException - exception thrown if the request could not be performed.
InvalidParameterException - exception thrown if method's parameters are invalid.
RequestFailedException
void setResourceProperty(java.lang.String aKey,
java.lang.String aValue)
throws RequestFailedException
aKey - a resource identifier.aValue - the value.
DatabaseServiceException - exception thrown if the request could not be performed.
InvalidParameterException - exception thrown if method's parameters are invalid.
RequestFailedException
void moveToWorkbin(java.lang.String interactionId,
Workbin workbin)
throws RequestFailedException
interactionId - an interaction identifier.workbin - the destination workbin.
DatabaseServiceException - exception thrown if the request could not be performed.
InvalidParameterException - exception thrown if the method's parameters are invalid.
NoPlaceException - exception thrown if the agent has no current place.
RequestFailedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||