All Classes Pages
ChangeCustomerForCasePage Class Reference

More...

Detailed Description

Change Customer for Case

Overview

This API can be used to change the customer of a single case.

For this API to execute successfully:

  • The Case ID must exist in the application.
  • The status of the case must be 'open'.
  • Source and target customer of the case must be different.
  • If "Customer departmentalization" setting is enabled in the application, source and target customer of the case must belong to the same department.
Since
11.6

APIs

Method URL Description
PUT /ws/v12/interaction/case/{ID}/changecustomer Change customer of a case with specified {ID} to the target customer specified in the request body.

Authentication

Authentication is required. The client must be logged in to call this API. Each API request must contain X-egain-session request header returned by Login API.

Permissions

  • User must have "Change Customer" action on "Customer" resource.
  • The case must either belong to the user's home department, or to a department in which the user is a foreign user.

Licenses

The logged in user must have the following licenses:

Request

Request headers

Name Description Allowed values Default value
X-egain-session Session ID obtained from Login API response header N/A N/A
Accept Content type accepted by client. application/xml or application/json N/A
Content-Type Media type sent by the client application/xml or application/json N/A
Accept-Language Language locale accepted by client (used for locale specific fields in resource representation and in error responses) Supported 'Accept-Language' header codes default system language

Request Body

The request body is mandatory and can be in either XML or JSON format.

Elements required in the request body

Name Description
case.customer.id ID of the target customer

Optional elements allowed in the request body

   None

Request body XML schemas:

  • schema-interaction-Case

Supported API specific query parameters

   None

Supported common query parameters

   None

Response

Response headers

Name Description Possible values
X-egain-session ID of the current user session N/A
Content-Type Media type of response body application/xml or application/json

Response body

The response body will be sent only in case of error. It can be in either XML or JSON format.

Response body XML schemas:

  • schema-kb-WSError - used in case of error

HTTP status codes

Success Status codes

204 - No Content

  • Successfully changed the customer of the case.

Failure Status codes

400 - Bad Request

  • Any query parameter is sent in the request.
  • Any criteria for successful execution mentioned in Overview or Request Body sections are violated.

401 - Unauthorized

  • X-egain-session request header is missing.
  • Session is invalid or expired.

403 - Forbidden

  • The user does not have appropriate permissions for this operation. Refer the Permissions section.

404 - Not Found

  • Case ID provided in the URI does not exist.

406 - Not Acceptable

  • Invalid 'Accept-Language' header value.

500 - Internal server error

Examples:

Example 1 - Change customer of a case