Avaya Client Services API Reference (iOS)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

Instance Methods | Properties | List of all members
CSAgentService Class Reference

The AgentService object is accessible from the User object, providing access to a set of APIs that allow application developers to implement SIP contact center agent features. More...

`#import <CSAgentService.h>`

Inherits NSObject.

## Instance Methods
(BOOL) | - isAgentFeatureAvailable:
| Returns whether the agent feature indicated by featureType is available for the application. More...
(void) | - setLabel:forAgentFeature:completionHandler:
| Updates agent feature with a personalized label given by user. More...
(void) | - loginWithCompletionHandler:
| Starts agent login process with the communications servers. More...
(void) | - logoutWithReasonCode:completionHandler:
| Stops agent services including logout with reason code from the signalling servers. More...
(BOOL) | - isAgentWorkModeAllowed:
| Returns an indication as to whether the agent work mode indicated by workModeType is allowed for use. More...
(void) | - setAgentWorkMode:withReasonCode:completionHandler:
| Sets agent work mode. More...
(CSCapability *) | - queueStatisticsMonitoringCapabilityForSkillId:
| Returns an indication whether queue statistics monitor feature is available for particular skill or not. More...
(void) | - startMonitoringForQueueStatistics:completionHandler:
| Starts queue statistics monitoring. More...
(void) | - stopMonitoringForForQueueStatistics:completionHandler:
| Stops queue statistics monitoring operation. More...
(void) | - setQueueStatisticsRefreshInterval:ccompletionHandler:
| Sets refresh interval for queue statistics. More...
(void) | - sendCallWorkCode:completionHandler:
| Sends the specified call work code. More...
(void) | - callSupervisor:completionHandler:
| Requests for supervisor assistance based on skill. More...
(CSCapability *) | - callSupervisorCapability:
| Returns an indication as to whether the supervisor assistance is available based on skill. More...
(void) | - consultSupervisor:
| Requests for supervisor assistance for active call. More...
(CSCapability *) | - consultSupervisorCapability
| Returns an indication as to whether the supervisor assistance is available for active call. More...
(CSCapability *) | - changeSkillCapability
| Returns an indication as to whether the change skill is available. More...
(void) | - addSkill:forAgentId:completionHandler:
| Request to add a skill to the skills assigned to an agent. More...
(void) | - removeSkill:forAgentId:completionHandler:
| Request to remove (unassign) a skill that is assigned to an agent. More...
(void) | - setOverrideForcedLogoutWithCompletionHandler:
| Enables or disables agent's forced logout override operation. More...
(void) | - viewStatistics:withResourceId:completionHandler:
| Request display of the statistics for agents, splits or skills, VDNs and trunk groups in accordance to the VuStats button configuration. More...
(void) | - exitViewStatistics:completionHandler:
| Clear the viewStatistics display preference. More...
(void) | - setViewStatisticsRefreshInterval:completionHandler:
| Set the refresh interval for viewStatistics. More...
(void) | - refreshAllViewStatistics:
| Refresh all active viewStatistics entities. More...

## Properties
id< CSAgentStateDelegate > | stateDelegate
| The delegate responsible for agent service state events. More...
id< CSAgentServiceStatusDelegate > | statusDelegate
| The delegate responsible for agent service status events. More...
NSArray * | availableAgentFeatures
| Returns list of available agent features or feature buttons administered on signalling server for the registered SIP user. More...
CSAgentInformation * | agentInformation
| Returns current agent information. More...
CSAgentState | agentState
| Returns current agent state. More...
NSArray * | allowedAuxiliaryWorkModeReasonCode
| Returns list of administered auxiliary work mode reason codes available for an agent to change in to auxiliary work mode. More...
CSAgentWorkMode | agentWorkMode
| Gets an agent current work mode. More...
BOOL | agentServiceAvailable
| Indicates whether agent service is available or not. More...
NSInteger | autoLogoutReasonCode
| Current logout reason code for automatic agent logout. More...
NSArray * | queueStatisticsList
| Returns a queue statistics collection that is available to an agent, this information can be used by an agent to monitor skill based queue statistics using method -[CSAgentService startMonitoringForQueueStatistics:] Note: Application developers can also use AgentService::getAvailableAgentFeatures() method to get full list of features available for an application. More...
CSCapability * | sendCallWorkCodeCapability
| Returns an indication as to whether the work code can be sent over the existing call. More...
CSCapability * | forcedLogoutOverrideCapability
| Returns an indication as to whether the forced logout override is available. More...
CSCapability * | viewStatisticsCapability
| Returns an indication whether the agent can view statistics. More...

## Detailed Description

The AgentService object is accessible from the User object, providing access to a set of APIs that allow application developers to implement SIP contact center agent features.

The client application is notified about status updates on agent features reported by the agent service through handlers that the application has registered on the AgentService object. These updates may be the result of local operations on the AgentService object as well as remote changes initiated by either the service/server or other end users.

## Method Documentation

- (void) addSkill: |  | (CSAgentSkill *) | skill
forAgentId: |  | (NSString *) | agentId
completionHandler: |  | (void(^)(CSButtonLampState lampState, NSError *error)) | handler

Request to add a skill to the skills assigned to an agent.

Parameters

  skill | The skill to be added.
  agentId | The extension of the agent the change applies to.
  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (void) callSupervisor: |  | (NSInteger) | skillId
completionHandler: |  | (void(^)(CSCall *supervisorCall, NSError *error)) | handler

Requests for supervisor assistance based on skill.

If supervisor assistance is requested based on skill id then new call will be placed for supervisor.

Parameters

  skillId | The skill id for which supervisor assistance is required.
  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (CSCapability *) callSupervisorCapability: |  | (NSInteger) | skillId |

Returns an indication as to whether the supervisor assistance is available based on skill.

Parameters

  skillId | The skill id for which supervisor assistance is required.

Returns
  Capability object describing whether the supervisor assistance is available.

- (CSCapability *) changeSkillCapability |  |  |

Returns an indication as to whether the change skill is available.

Returns
  Capability object describing whether the change skill is available.

- (void) consultSupervisor: |  | (void(^)(CSCall *supervisorCall, NSError *error)) | handler |

Requests for supervisor assistance for active call.

If active call is in progress then existing call will go in hold state and the agent connects to the skill supervisor. The caller hears nothing or music on hold but the agent and the supervisor can talk with each other. After speaking with the supervisor, the agent can drop the call with supervisor and return to the ACD call, set up a conference call with the supervisor and the calling party, or transfer the call to the supervisor.
Result is notified via completion handler. This completion handler is invoked as soon as call with supervisor has been successfully initiated, not when the call is established with the supervisor.

Parameters

  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (CSCapability *) consultSupervisorCapability |  |  |

Returns an indication as to whether the supervisor assistance is available for active call.

Returns
  Capability object describing whether the supervisor assistance is available.

- (void) exitViewStatistics: |  | (NSInteger) | buttonNumber
completionHandler: |  | (void(^)(NSError *error)) | handler

Clear the viewStatistics display preference.

The requested statistics entity is not considered active anymore.

Parameters

  buttonNumber | Configured button number of the requested statistics type.
  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (BOOL) isAgentFeatureAvailable: |  | (CSAgentFeatureType) | featureType |

Returns whether the agent feature indicated by featureType is available for the application.

Parameters

  featureType | Type of agent feature.

Returns
  A boolean value indicating whether the agent feature indicated by featureType is available for the application.

- (BOOL) isAgentWorkModeAllowed: |  | (CSAgentWorkMode) | workMode |

Returns an indication as to whether the agent work mode indicated by workModeType is allowed for use.

See also
  CSAgentWorkMode

Parameters

  workMode | Type of agent work mode.

Returns
  A boolean value indication whether the agent work mode is allowed for use.

- (void) loginWithCompletionHandler: |  | (void(^)(NSError *error)) | handler |

Starts agent login process with the communications servers.

Feedback is provided via the AgentServiceCompletionHandler object.

Parameters

  handler | An object that wants to learn about result of login operation i.e., whether it was successful.

- (void) logoutWithReasonCode: |  | (NSInteger) | reasonCode
completionHandler: |  | (void(^)(NSError *error)) | handler

Stops agent services including logout with reason code from the signalling servers.

Use '0' as default reason code if reason code is not available. Feedback is provided via the AgentServiceCompletionHandler object.
With reason codes, staffed agents can enter a numeric 1-digit or 2-digit code that describes the reason for logging out of the system. Reason codes give call center managers information about how agents spend time.

Parameters

  reasonCode | Reason code for agent logout. Minimum value - 0, Maximum value - 9, Default value - 0. Reason code policy is administered on signalling server. The provisioning of these reason codes are not passed down to the clients. The agents are told by their supervisor what these codes are, and the agents are used to enter these integer numbers.
  handler | An object that wants to learn about result of logout operation i.e., whether it was successful.

- (CSCapability *) queueStatisticsMonitoringCapabilityForSkillId: |  | (NSInteger) | skillId |

Returns an indication whether queue statistics monitor feature is available for particular skill or not.

Parameters

  skillId | The hunt group/skill number associated with the button.

Returns
  Capability object describing whether the queue status statistics feature is available.

- (void) refreshAllViewStatistics: |  | (void(^)(NSError *error)) | handler |

Refresh all active viewStatistics entities.

View statistics entity counts as active if it was requested via viewStatistics() and no exitViewStatistics() was called on it afterwards.

Parameters

  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (void) removeSkill: |  | (CSAgentSkill *) | skill
forAgentId: |  | (NSString *) | agentId
completionHandler: |  | (void(^)(CSButtonLampState lampState, NSError *error)) | handler

Request to remove (unassign) a skill that is assigned to an agent.

Parameters

  skill | The skill to be removed.
  agentId | The extension of the agent the change applies to.
  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (void) sendCallWorkCode: |  | (NSString *) | callWorkCode
completionHandler: |  | (void(^)(NSError *error)) | handler

Sends the specified call work code.

Result is notified via callbacks defined in AgentServiceCompletionHandler object.
When the agent is on an ACD call, at any time he or she can invoke the work code feature and enter the digits (max 16 digits) for the code.
To use call work code feature, an agent must be on an ACD call or in the After Call Work (ACW) mode. Example: The agent is on a call and half way through he or she realize that the call is a sales call. Agent would invoke work-code feature and enter 250 (if this is the number for the code). This will register in the Call Management System (CMS) and record the data.

Parameters

  callWorkCode | The work code to send.
  handler | An Object that wants to learn about the result of work code send operation i.e., whether it was successful.

- (void) setAgentWorkMode: |  | (CSAgentWorkMode) | newAgentWorkMode
withReasonCode: |  | (NSInteger) | reasonCode
completionHandler: |  | (void(^)(NSError *error)) | handler

Sets agent work mode.

Result is notified by callbacks defined in AgentServiceCompletionHandler object. The updated work mode is notified by AgentServiceListener::onAgentWorkModeChanged(AgentService, User, AgentWorkMode) callback.

See also
  CSAgentWorkMode

Parameters

  newAgentWorkMode | New work mode for agent
  reasonCode | The reason code in case of changing to auxiliary work mode, for other modes use '0' as default code.
  handler | An Object that wants to learn about result of setting work mode operation i.e., whether it was successful.

- (void) setLabel: |  | (NSString *) | label
forAgentFeature: |  | (CSAgentFeature *) | agentFeature
completionHandler: |  | (void(^)(NSError *error)) | handler

Updates agent feature with a personalized label given by user.

Parameters

  label | The personalized label to be set.
  agentFeature | The agent feature.
  handler | An object that wants to learn about result of logout operation i.e., whether it was successful.

- (void) setOverrideForcedLogoutWithCompletionHandler: |  | (void(^)(NSError *error)) | handler |

Enables or disables agent's forced logout override operation.

Parameters

  handler | Completion handler instance that receives the result of the operation.

- (void) setQueueStatisticsRefreshInterval: |  | (NSInteger) | refreshInterval
ccompletionHandler: |  | (void(^)(NSError *error)) | handler

Sets refresh interval for queue statistics.

Parameters

  refreshInterval | The refresh interval in seconds. Minimum value: 0 (i.e. no refresh), maximum value: 3600 (i.e. 1 hour).
  handler | A block to be called when the operation is completed. `error` If the operation was successful this parameter is nill. If an error occurred it contains an object describing the error.

- (void) setViewStatisticsRefreshInterval: |  | (NSInteger) | refreshInterval
completionHandler: |  | (void(^)(NSError *error)) | handler

Set the refresh interval for viewStatistics.

Active statistics entities will be requested periodically once in the given amount of seconds.

Parameters

  refreshInterval | Refresh interval in seconds. Minimum value: 0 (i.e. no refresh), maximum value: 3600 (i.e. 1 hour).
  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

- (void) startMonitoringForQueueStatistics: |  | (CSQueueStatistics *) | queueStatistics
completionHandler: |  | (void(^)(NSError *error)) | handler

Starts queue statistics monitoring.

It provides information about particular skill or queue for the agent as administered on signalling server.

For example: Queue statistics provides various queue statistics parameters like the number of calls in a queue, the time the oldest call has been in queue as well as alerts when particular thresholds are met or exceeded. Note: Though agent login is not required to invoke monitor operation but sip user login is required.

Parameters

  queueStatistics | The QueueStatistics information object for which to start monitor operation.
  handler | A block to be called when the operation is completed. `error` If the operation was successful this parameter is nill. If an error occurred it contains an object describing the error.

- (void) stopMonitoringForForQueueStatistics: |  | (CSQueueStatistics *) | queueStatistics
completionHandler: |  | (void(^)(NSError *error)) | handler

Stops queue statistics monitoring operation.

Parameters

  queueStatistics | The QueueStatistics information object for which to start monitor operation.
  handler | A block to be called when the operation is completed. `error` If the operation was successful this parameter is nill. If an error occurred it contains an object describing the error.

- (void) viewStatistics: |  | (NSInteger) | buttonNumber
withResourceId: |  | (NSString *) | resourceId
completionHandler: |  | (void(^)(NSError *error)) | handler

Request display of the statistics for agents, splits or skills, VDNs and trunk groups in accordance to the VuStats button configuration.

The statistics reflects information collected during the configured interval, since the agent logged in, since the day began, or historical data accumulated over an administered number of intervals. The information is limited to 40 characters displayed at a time. Statistics request can provide information to display on demand or update it periodically depending on the server settings for the given statistics type.

The requested statistics entity is considered active.

Parameters

  buttonNumber | Configured button number of the requested statistics type.
  resourceId | Optional resource id representing a skill (1 - 8000), a trunk (1 - 2000), a VDN or an agent id (extension). If null or empty value is provided, then statistics will be requested for the resource id from the button configuration (if any).
  handler | Completion handler instance that receives the result of the operation. If not provided, failure feedback cannot be provided.

## Property Documentation

- (CSAgentInformation*) agentInformation
| read nonatomic assign

Returns current agent information.

Whenever agent work mode or configuration is changed new AgentInformation object is available through AgentServiceListener::onAgentInformationUpdated(AgentService, User, AgentInformation) method.

Returns
  An AgentInformation object which provides current agent state, work mode and configuration information.

See also
  CSAgentState
  CSAgentWorkMode

Exceptions

  IllegalStateException | if this method is called before the agent logged in.

- (BOOL) agentServiceAvailable
| read nonatomic assign

Indicates whether agent service is available or not.

Returns
  True if agent service available. False otherwise.

- (CSAgentState) agentState
| read nonatomic assign

Returns current agent state.

The agent state change is reported via AgentServiceListener::onAgentStateChanged(AgentService, User, AgentState) method.

Returns
  An AgentState enumeration which represents agent availability.

Exceptions

  IllegalStateException | if this method is called before the agent logged in.

- (CSAgentWorkMode) agentWorkMode
| read nonatomic assign

Gets an agent current work mode.

Returns
  An AgentWorkMode enumeration which represents agent current work mode.

- (NSArray*) allowedAuxiliaryWorkModeReasonCode
| read nonatomic assign

Returns list of administered auxiliary work mode reason codes available for an agent to change in to auxiliary work mode.

Note: Application developers can also use availableAgentFeatures property to get full list of features available for an application.

See also
  CSAgentService::availableAgentFeatures

Returns
  An array of auxiliary work mode reason codes as an Integers or null otherwise.

- (NSInteger) autoLogoutReasonCode
| read write nonatomic assign

Current logout reason code for automatic agent logout.

The property is initialized with the value from AgentConfiguration and can be used for updating logout reason code after startup.

- (NSArray*) availableAgentFeatures
| read nonatomic assign

Returns list of available agent features or feature buttons administered on signalling server for the registered SIP user.

Returns
  An array of AgentFeatures or null otherwise.

- (CSCapability*) forcedLogoutOverrideCapability
| read nonatomic assign

Returns an indication as to whether the forced logout override is available.

Returns
  Capability object describing whether the forced logout override is available.

- (NSArray*) queueStatisticsList
| read nonatomic assign

Returns a queue statistics collection that is available to an agent, this information can be used by an agent to monitor skill based queue statistics using method -[CSAgentService startMonitoringForQueueStatistics:] Note: Application developers can also use AgentService::getAvailableAgentFeatures() method to get full list of features available for an application.

Returns
  An array of CSQueueStatistics objects or null otherwise.

- (CSCapability*) sendCallWorkCodeCapability
| read nonatomic assign

Returns an indication as to whether the work code can be sent over the existing call.

Returns
  CSCapability object describing whether the work code can be sent over the existing call.

- (id<CSAgentStateDelegate>) stateDelegate
| read write nonatomic weak

The delegate responsible for agent service state events.

- (id<CSAgentServiceStatusDelegate>) statusDelegate
| read write nonatomic weak

The delegate responsible for agent service status events.

- (CSCapability*) viewStatisticsCapability
| read nonatomic assign

Returns an indication whether the agent can view statistics.

Returns
  Capability object describing whether the agent can view statistics.

The documentation for this class was generated from the following file:

- CSAgentService.h