Revision as of 19:10, September 2, 2016 by KrisMcG (talk | contribs) (Update with the copy of version: 8.5.2DRAFT)
Jump to: navigation, search

StartContactCenterSession

This operation is part of the Voice API section of the Web Services API.

Overview

Initializes a session for the user with the provided parameters. Almost all client applications all client applications that provide a full set of voice features should send this operation at login and call EndContactCenterSession when the application exits.

Request URL /api/v2/me/
HTTP method POST
Required features api-voice

Parameters

Parameter Value
operationName StartContactCenterSession
channels An array of channels the agent uses in the session. Valid channel names are voice and any valid multimedia channel (for example, email, chat, workitem, IM session).

If an error occurs on a given channel, Web Services returns a response with the error statusCode and information about what went wrong. For example, if you StartContactCenterSession with voice and chat and your Interaction Server is out of service, Web Services returns a partial success statusCode of 7. The successful part of the operation (voice) returns statusCode:0 while the failed part of the operation (chat) returns a statusCode and statusMessage that provide information about why it failed.

If all channel operations fail, Web Services only returns a statusCode and statusMessage for one of the channels.

place This optional parameter specifies the place that should be used for the session.

If not specified, then Web Services uses the default place for the agent.

If specified and the place contains one device, then Web Services logs in the user on that device for the duration of the session. If the place contains more than one device, then Web Services logs in the user on the ACDPosition. In this scenario, if the place doesn't contain an ACDPosition or if it has multiple ACDPositions, then the StartContactCenterSession operation fails. Note: If there are multiple ACDPositions, you should specify the devicePath.

When the client ends the session, Web Services restores the default device assignment.

loginCode This optional parameter specifies the switch login code that should be used for login. If it's not specified, Web Services looks for an appropriate switch login that is assigned to the user for the T-Server.
queue This optional parameter specifies a queue to be included in the login request.
devicePath A path to a device assigned to an agent. This attribute is mandatory when an agent is assigned multiple devices in the same location where the device to be used for login can't be resolved — for example, the place has multiple extensions or multiple ACDPositions. The devicePath specifies which device the agent uses to login. Note: This overrides the logic of the place login.

Sample 1

Request

POST api/v2/me
{
  "operationName": "StartContactCenterSession",
  "channels": [
    "voice"
  ]
}

HTTP Response

{
  "statusCode": 0
}

CometD notification

This operation may not result in a notification. If the agent is logged in to a device as a result of starting the session, Web Services delivers a DeviceStateChangeMessage via CometD. If the agent is already logged in, Web Services skips the login request and doesn't return a notification.

Sample 2

Request

POST api/v2/me
{
  "operationName": "StartContactCenterSession",
  "place": "SIP_5000",
  "loginCode": "8000",
  "queue": "9000",
  "channels": [
    "voice"
  ]
}

HTTP response

{
  "statusCode": 0
}

Sample 3

The following example shows the partial success behavior:

Request

POST /api/v2/me
{  
   "channels":[  
      "voice",
      "chat"
   ],
   "operationName":"StartContactCenterSession"
}

HTTP response

{  
   "failed":[  
      {  
         "channel":"multimedia",
         "statusCode":3,
         "statusMessage":"Unsupported feature"
      }
   ],
   "statusCode":7,
   "succeeded":[  
      {  
         "channel":"voice",
         "statusCode":0
      }
   ]
}
Comments or questions about this documentation? Contact us for support!