Resolve Contact Conflicts

Prev Next
Post
/api/v1/omnichannel/contacts.conflicts

Use this endpoint to resolve conflicts in a contact's details.

This endpoint works only when a contact has conflicts. Conflicts can occur when a verified contact uses another channel to communicate with you. For example, a contact's details (phone number, email address, custom fields) were saved when they accessed the Livechat widget. Next time, they use WhatsApp and they provide different details. By default, the values are overwritten. If you choose to flag conflicts, the conflicting detail will be displayed and you can decide the values to keep. You can flag conflicts in custom fields using the custom fields endpoints or the Set Custom Field method from the livechat widget API.

Permission required: update-livechat-contact

Changelog

Version Description
7.7.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example 1
{
  "contactId": "68135a22e384b3ad127c7dbc",
  "name": "John Doe",
  "customFields": {
    "field1": "field1",
    "field2": "field2"
  },
  "contactManager": "test.agent",
  "wipeConflicts": false
}
Expand All
object
contactId
string Required

The contact's ID.

name
string

The contact's name.

customFields
object

You can enter custom fields if you have created any.

field1
string
field2
string
contactManager
string

The contact's assigned agent or manager.

wipeConflicts
boolean

To overwrite the old data with the new details, enter true.

Responses
200

OK

Example 1
{
  "result": {
    "_id": "68341efdd387e3d7509267fb",
    "createdAt": "2025-05-26T07:57:49.616Z",
    "name": "Jane Doe",
    "channels": [
      {
        "name": "widget",
        "visitor": {
          "visitorId": "68341ef9d387e3d7509267fa",
          "source": {
            "type": "widget"
          }
        },
        "blocked": false,
        "verified": true,
        "details": {
          "type": "widget",
          "destination": "writing-demo.dev.rocket.chat"
        },
        "lastChat": {
          "_id": "cz5uyBRyKPfoWHBat",
          "ts": "2025-05-26T07:57:49.661Z"
        },
        "field": "email",
        "value": "[email protected]",
        "verifiedAt": "2025-05-26T07:58:26.895Z"
      }
    ],
    "customFields": {
      "field1": "field1",
      "field2": "field2"
    },
    "unknown": false,
    "preRegistration": false,
    "_updatedAt": "2025-05-26T11:35:31.241Z",
    "lastChat": {
      "_id": "cz5uyBRyKPfoWHBat",
      "ts": "2025-05-26T07:57:49.661Z"
    },
    "activity": [
      "2025-05"
    ],
    "emails": [
      {
        "address": "[email protected]"
      }
    ],
    "phones": [],
    "conflictingFields": []
  },
  "success": true
}
Expand All
object
result
object
_id
string
createdAt
string
name
string
channels
Array of object
object
name
string
visitor
object
visitorId
string
source
object
type
string
blocked
boolean
verified
boolean
details
object
type
string
destination
string
lastChat
object
_id
string
ts
string
field
string
value
string
verifiedAt
string
customFields
object
field1
string
field2
string
unknown
boolean
preRegistration
boolean
_updatedAt
string
lastChat
object
_id
string
ts
string
activity
Array of string
string
emails
Array of object
object
address
string
phones
Array of object
object
conflictingFields
Array of object
object
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "must have required property 'contactId' [invalid-params]",
  "errorType": "invalid-params"
}
Example 2
{
  "success": false,
  "error": "error-contact-has-no-conflicts"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action [error-unauthorized]"
}
Unauthorized
{
  "success": false,
  "error": "unauthorized"
}
object
success
boolean
error
string