Change customer of activities

Overview

Use this API 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.
    • A social activity can be associated only with a social contact point. The below rules apply:
      • A Social activity of "Twitter" subtype can be associated with only a social contact point of type "Twitter".
      • A Social activity of "Facebook" subtype can be associated with only a social contact point of type "Facebook".
      • A Social activity of "Instagram" subtype can be associated with only a social contact point of type "Instagram".
      • Social activities of other subtypes can be associated with social contact points of any type.
    • 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 and contact point of the activities provided in the request body is changed.
  • If any of the activities have responses which are in a "Completed" status, the customer, contact and contact point for those response activities are 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 changes 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.

Permissions

Actor Permission
User All of the following are required:
  • 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.
Client Application No additional permission required.

Licenses

Actor License
User The logged in user must have the following licenses:
  • eGain Advisor Desktop or eGain MailPlus: To change the customer of email or social activities.
  • eGain Advisor Desktop or eGain CallTrackPlus: To change the customer of calltrack activities.
  • Any User License: To change the customer of other activity types. Refer Licenses section for more information.
Client Application No additional licenses required.
SecurityoAuthUser or oAuthClient
Request
header Parameters
Accept
required
string
Default: application/json

Content type accepted by client.

Enum: "application/json" "application/xml"
Accept-Language
required
string
Default: en-US

Language locale accepted by client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
Request Body schema: application/json

Elements required in request body

At least one "activity" element must be provided. Each "activity" element must contain the following elements:

Name Description
id ID of the activity.
customer.contacts.contact.email.id or
customer.contacts.contact.phone.id or
customer.contacts.contact.postal.id or
customer.contacts.contact.social.id or
customer.contacts.contact.website.id
ID of the contact.
Array of objects (Activity) >= 0 items
Responses
204

No Content

  • Successfully changed customer of all activities.
400

Bad Request message

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

Unauthorized

403

Forbidden

  • The user does not have sufficient permissions.
  • One or more activities sent in the request are locked by another user.
406

Not Acceptable

500

Internal server error

patch/activity/changecustomer
Request samples
application/json
  • PATCH /core/casemgr/v3/activity/changecustomer
  • This example demonstrates the following:
    • Changing the customer of a single activity.
{
  • "activity": [
    ]
}
Response samples
application/json
{
  • "code": "400-101",
  • "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}