This article explains how creating or updating profiles affects existing profiles and Zendesk user data.

The results differ depending on whether a profile has standard identifiers. A standard identifier is one associated with a Zendesk user identity as specified by one of the following identifier types:

  • "email"
  • "external_id"
  • "phone_number"
  • "facebook"
  • "twitter"

See identifiers in "Anatomy of a profile".

Making PUT profile requests

The system automatically tries to match the profile in PUT profile requests with an existing profile in your Zendesk account.

  • If no matching profile is found and the request is a POST event request, a profile and an anonymous Zendesk user are created.

    • If the profile name is not present, the value of an identifier type is used according to the profile naming rules. The value of the anonymous Zendesk user name is set as the profile name. See the table in Standard identifiers for information about profile naming.
  • If a matching profile is found and the request has no additional standard identifiers, the request profile replaces the existing profile. Any existing data not in the request profile is lost.

  • If a matching profile is found and the request profile has additional standard identifiers:

    • The request profile replaces the existing profile
    • The additional identifiers are added to the Zendesk user record if missing
  • If a matching profile is found and the request profile has fewer standard identifiers than the existing profile:

    • The request profile replaces the existing profile
    • No changes are made to the Zendesk user record
  • If a matching profile is found and the request profile has a matching standard identifier type (example, "phone_number") but the identifier value is different than the existing profile:

    • The request profile replaces the existing profile
    • No changes are made to the Zendesk user record

Making PATCH profile or POST event requests

The system automatically tries to match the profile in PATCH profile requests and certain POST event requests with an existing profile in your Zendesk account.

  • If no matching profile is found, a profile and an anonymous Zendesk user are created.

  • If a matching profile is found and the request profile has additional non-standard identifiers or attributes:

    • The additional identifiers and attributes are added to the existing profile
    • No changes are made to the Zendesk user record
  • If a matching profile is found and the request profile has additional standard identifiers:

    • The additional identifiers are added to the existing profile
    • The additional identifiers are added to the Zendesk user record if missing
  • If a matching profile is found and the request profile has a matching standard identifier type (example, "phone_number") but the identifier value is different than the existing profile:

    • A second identifier of the same type is added to the existing profile
    • No changes are made to the Zendesk user record
  • If a matching profile is found and the request profile has fewer identifiers (standard or non-standard) or attributes than the existing profile:

    • No changes are made to the existing profile
    • No changes are made to the Zendesk user record

Making requests with Zendesk user ids

Certain requests may include a Zendesk user id in the path and a profile object in the body. A Zendesk user id may also be specified in a profile object. User collisions are possible with these requests. A request will return an error in the following cases:

  • The combined source, type, and identifier of the request profile matches those of an existing profile associated with a Zendesk user other than the user specified in the request

  • Any of the standard identifiers in the request profile matches an identity of a Zendesk user other than the user specified in the request