kustomer-client
    Preparing search index...

    Function createCustomerMerge

    • Create customer merge Creates a customer merge based on a set of source customer and target customer IDs.

      Any one of the following roles is required for this endpoint:

      Legacy Role Equivalent Permission Set Role
      org.user.customer.write org.permission.customer_merge.create
      org.admin.customer.merge.write

      Customer merges follow these rules:

      Merge the following fields:

      • Emails
      • Phones
      • Socials
      • Locations
      • Watchers
      • Custom (target customer ID takes precedence with same attribute names)
      • Tags
      • KlassNames
      • conversationCounts (sums all values)

      Choose based on most recent value:

      • Preview - Based on preview.previewAt
      • LastMessageIn - Based on lastMessageIn.sentAt
      • lastConversation - Based on lastMessageIn.sentAt
      • recentLocation - Based on recentLocation.updatedAt
      • signedUpAt
      • modifiedAt / modifiedBy
      • lastSeenAt
      • lastActivityAt

      Choose based on the oldest value:

      • createdAt / createdBy

      Give precedence to the target customer ID value:

      • Company
      • name
      • externalId
      • username
      • avatarUrl
      • locale
      • timeZone
      • birthdayAt
      • gender

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: { createdAt: string; status: string; updatedAt: string };
                  id: string;
                  links: { self: string };
                  relationships: {
                      createdBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      org: { data: { id: string; type: string }; links: { self: string } };
                      source: { data: { id: string; type: string }; links: { self: string } };
                      target: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              };
          },
          unknown,
          ThrowOnError,
      >