All Classes Pages
PutChangeCustomerPage Class Reference

More...

Detailed Description

Change Customer of Activities

Overview

This API can be used to change the customer of one or more activities.

For this API to execute successfully:

  • At least one activity must be present in the request body.
  • The target customer of any of the activities must not be same as the current customer.
  • All activities provided in the request body must exist in the application.
  • All activities must be in status "in queue waiting to be assigned" or "assigned to a user".
  • If a response exists in application for any of the activities provided in the request body, the response must be in "Completed" status.
  • None of the activities must be locked by another user.
  • For each activity, a contact point must be provided. The following rules apply:
    • An email activity can be associated only with an email contact point.
    • A Calltrack activity can be associated only with a phone contact point.

    • All other types of activities can be associated with any contact point.
  • All contact points provided in the request body must exist in the application and belong to the same customer.
  • If "Customer departmentalization" setting is enabled in the application, the customer of the target contact point and the customer of the activity must belong to the same department.
  • No more than 75 activities must be sent in the request body.

As part of completing this API request:

  • Customer, contact person and contact point of the activities provided in the request body will be changed.
  • If any of the activities have responses which are in "Completed" status, the customer, contact person and contact point for those response activities will also be changed.
  • The value of the field "contactPointData" of the activity is not changed. This is retained with the original value. Only the customer association of the activity is changed.
  • After changing the customer of the activities, the customer of the case will be changed only if all of the below are true:
    • All the activities provided in the request belong to the same case.
    • All the activities of the case belong to the same customer.
Since
11.6

APIs

Method URL Description
PUT /ws/v12/interaction/activity/changecustomer Change customer of activities provided 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

All of the following are required:

  • User must have "Change Customer" action on "Customer" resource.
  • All the activities must belong to either 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:

  • ECE MailPlus: To change the customer of email activities.
  • ECE CallTrackPlus: To change the customer of calltrack activities.
  • Any User License: To change the customer of other activity types.

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

"activities" element must be present in the request body. At least one "activity" element must be present in the "activities" element. Each "activity" element must contain the following elements:

Name Description
id ID of the activity
customer.contactpersons.contactperson.contactpoints.contactpoint.id ID of the contact point

Optional elements allowed in the request body

   None

Request body XML schemas:

  • schema-interaction-activity-Activity

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 customer of all activities.

Failure Status codes

400 - Bad Request

  • Any query parameter is sent in the request.
  • Any criteria for successful execution mentioned in the Overview and Request Body sections are violated (except when activity is locked, which will result in 403-Forbidden).

401 - Unauthorized

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

403 - Forbidden

  • The user does not have sufficient permissions. Refer the Permissions section for details.
  • One or more activities sent in the request are locked by another user.

406 - Not Acceptable

  • Invalid 'Accept-Language' header value.

500 - Internal server error

Examples:

Example 1 - Change customer of an activity
Example 2 - Change customer of multiple activities using different contact points
Example 3 - Change customer of multiple activities