Merge Customer

Overview

Use this API to merge a customer (source) into another customer (target).

For this API to execute successfully:

  • The source and target customers must exist.
  • The source customer must be individual customer.
  • If the target customer is a group or corporate customer, and the customer is merged into an existing customer contact, the target customer contact must not be a system created contact.
  • If "Customer departmentalization" setting is enabled, the source and target customers must belong to the same department.
  • If actor is user, all activities and all cases of source customer must belong to either the user's home department, or to a department in which the user is a foreign user.
  • All open activities of source customer must be in status "in queue waiting to be assigned" or "assigned to a user".
  • None of the activities of source customer must be locked by another user.

As part of completing this API:

  • The contact points of the source customer is added to the target customer.
  • All the activities of the source customer is moved to the target customer. This includes completed activities.
  • All the cases of the source customer is moved to the target customer. This includes closed cases.
  • If any value of the customer or contact person has to be retained, it must be sent by the client.
    • If any attribute is not sent in the request, the attribute is reset to the default value. For example: Lets say that salutation is set as "Mr." in both source and target customer. If salutation is not sent in the request, its value is blank (default value).
  • Notes of the source customer are moved to the target customer.
  • The source customer is deleted.

Permissions

Actor Permission
User All of the following are required:
  • The user must have "Change Customer" action on "Customer" resource.
  • If "Customer departmentalization" setting is enabled, the source and target customer must belong to either the user's home department, or to the department where the user is a foreign user.
Client Application No additional permission is required.
SecurityoAuthUser or oAuthClient
Request
header Parameters
Accept
required
string
Default: application/json

Content type accepted by client.

Enum: "application/json" "application/xml"
Content-Type
required
string
Default: application/json

Media type sent by the client.

Enum: "application/json" "application/xml" "application/x-www-form-urlencoded" "multipart/form-data" "text/plain"
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

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

Elements required in request body

Name Description
merge.sourceCustomer.id ID of the source customer.
merge.targetCustomer.id ID of the target customer.
merge.targetCustomer.lastModified Last modified date ID of the target customer.
merge.targetCustomer.contacts.contact Contact details of the target customer. For required and optional elements of contact, refer Merge Contact.

Optional elements allowed in request body

Name Description
merge.targetCustomer.level Level of the target customer. Must be one of the values configured in application.
merge.targetCustomer.role Role of the target customer.
merge.targetCustomer.pin Target customer pin information.
merge.targetCustomer.howReferred Specifies how the target customer was referred.
merge.targetCustomer.industry Industry that target customer belongs to. Must match the value configured in application.
merge.targetCustomer.marketSegment Market segment of the target customer.
merge.targetCustomer.entitlements Entitlements of the target customer.
merge.targetCustomer.customAttributes Name must match one of the custom attributes configured in application. If the custom attribute is configured as an enumeration, the value must be one of the predefined values.For string type of custom attribute that is not configured as an enumeration, refer list of Allowed Characters For Custom Attributes.
merge.targetCustomer.contacts.contact.id ID of the contact of the target group or corporate customer. This is applicable only if the target customer is a group or a corporate customer. This must not be provided if the target customer is an individual customer.
If the target customer is a group or a corporate customer:
  • If this is provided, the source customer is merged with the contact identified by this ID.
  • If this is not provided, a new contact is created for the group or corporate customer.
required
object (sourceCustomer)
required
object (targetCustomer)
Responses
204

No content

400

Bad Request

401

Unauthorized

403

Forbidden

406

Not Acceptable

500

Internal server error

put/customer/merge
Request samples
application/json
  • PUT /core/customermgr/v3/customer/merge
  • This example demonstrates the following:
    • Merging two customers by providing only the mandatory attributes.
{
  • "sourceCustomer": {
    },
  • "targetCustomer": {
    }
}
Response samples
application/json
{
  • "code": "400-101",
  • "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}