Adding an Agent to a User Group
Scenario
The interface is invoked to add an agent to a user group on the CMS.
Interface Method
The request method must be set to POST. This interface supports only the POST method.
Request URL
https://ip:port/rest/cmsapp/v1/openapi/qcrelationconf/joinusergroup
In a public cloud environment, ip indicates the IP address of the CC-CMS server, and port indicates the HTTPS port number of the CC-CMS server. Contact the administrator to obtain the values.In a non–public cloud environment where the NSLB service is configured, ip indicates the IP address of the NSLB server, and port indicates the HTTPS port number of the CC-CMS service mapped on the NSLB server.
Request Description
No. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|---|
1 |
Content-Type |
String |
Yes |
The value is fixed at application/json; charset=UTF-8. |
2 |
Authorization |
String |
Yes |
For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
ccId |
Integer |
No |
Call center ID. The value ranges from 1 to 65535.
|
vdnId |
Integer |
Yes |
ID of a virtual call center. The value ranges from 1 to 5000. |
agentId |
Integer |
Yes |
ID of an agent who joins a user group. The value ranges from 0 to 99999. |
groupId |
String |
No |
ID of the user group that the user joins. If the group ID is not carried, a group is created using the name specified by groupName, and then the agent is added to the new group. If the agent already exists in another group, the agent is automatically removed from it. If the group ID is carried, groupName is ignored, and the agent is added to the group corresponding to groupId. If the agent already exists in another group, the agent is automatically removed from it. |
groupName |
String |
No |
Name of the group. (The value cannot contain invalid characters and can contain a maximum of 100 characters.) |
groupType |
Integer |
No |
User group type. The default value is 2. The options are 2 (agent group) and 3 (inspector group). Other values are invalid. |
Response Message
Parameter |
Type |
Description |
---|---|---|
message |
String |
Description. |
retcode |
String |
Error code. The options are as follows: 0: success Other values: failure For details about error code parameters, see Table 5. |
result |
object |
Object in the returned result after an agent is successfully added to a user group. For details about the parameters of this object, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
groupId |
String |
ID of the user group to which an agent is added. |
groupName |
String |
Name of the user group to which an agent is added. (The value cannot contain invalid characters and can contain a maximum of 20 characters.) |
Error End Code |
Description |
Comments |
---|---|---|
300-010 |
ccid and vdnid of the VDN user do not match. |
Check whether the input parameters are correct. |
300-016 |
The agent does not exist in the VDN. |
Check whether the agent exists in the VDN. If yes, try again 1 minute later. |
300-017 |
The inspector group name already exists. |
Change the name of the inspector group. |
300-018 |
The name of the inspector group is empty. |
Check whether the groupName parameter is carried or left empty. |
300-019 |
The inspector group does not exist. |
Check whether the inspector group corresponding to groupId exists. |
1 |
The parameter is invalid or the system reports an error. |
Check whether the input parameters are correct. |
Message Example
- Request header
Content-Type: application/json;charset=UTF-8 Authorization: ******************
- Request parameters
{ "ccId":1, "vdnId":4, "agentId":667, "groupId":"159282396714302232563636876268", "groupName":"Agent group", "groupType":"" }
- Response parameters
{ "result": { "groupName": "Agent group A", "groupId": "161960203515344228641565404173" }, "message": "success", "retcode": "0" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot