Table of Contents

Custom Id

A unique identifier that is set in an external system, such as an external CRM or website. Uniquely identifies the client, therefore it must always be unique.

Each contact in a service must have at least one identifier. The simplest example is email addresses. Custom Id is one of such identifiers, and it cannot change over time, like, for example, email or phone number. If in some system you store a database of contacts, each of which is assigned a unique id, then it is by this id that you can hard link your source to enKod.

The functionality is currently under development, but you can already perform most of the available actions on contacts via Custom Id.

By default, the display of custom id in the interface is disabled. It's made for your convenience and does not affect the ability to work with custom id: they can still be transferred. Displaying custom id in the interface can be enabled via Settings → Account → General Settings. Make sure to click the “Save” button for the changes to be applied.

When you activate the custom id display in the interface, it will appear:

  • in the contact card
  • in the contact list
  • in the list in segments

Processing Id

Currently, it is possible to transfer Id to enKod by API using the following methods:

or via manual import of contacts in the enKod interface: Data → Imports → Create import → Manual → Import contacts

You can change id by another id or id by id using the method:

And you can get the id of a contact using the method:

Id logic

The following rules apply when passing id in contact creation/update requests:

  • create a contact if it does not exist
  • update if it exists
  • assign custom field values if they are passed in
  • assign tags if they are passed in
  • if we find a contact with this id in deleted contacts: restore with history and custom field values, overwrite transferred custom fields with those transferred in the request, do not change non-transmitted ones, but restore their values.
  • if mailing groups with id of a new contact are sent (email/phone is not sent) - do not subscribe to mailing groups.
  • if mailing groups with the id of an existing contact (who has email/phone) are transferred - subscribe to those mailing groups whose channels are filled in, do not subscribe to the others
  • if a contact with id AND email/phone is sent and such id is in the database - update the contact's email/phone to the new one from the request, save the history
  • if there is a contact with id AND email/phone and such id is not in the database but there is an email/phone - add id to the existing contact with email/phone.
  • if a contact with id, email and phone number is passed, the mainChannel parameter is ignored, because id is always the main identifier.
  • if a contact with id, email, phone is passed and all three identifiers exist in three different contacts - we take email/phone from existing contacts and write them to the passed contact with id.
  • if we have taken all of its identifiers from a contact, the contact is deleted
  • if we have taken away identifiers from a contact, by which he/she was subscribed to mailing groups, he/she will be unsubscribed

The following rules apply when passing an id in requests to change a contact's id:

  • you can change email by id, phone by id, id by id
  • when changing for a deleted contact - we do not restore the contact, but change what was passed in the request.
  • it is allowed to change to empty if at least one identifier remains.
  • when changing the ID of an existing contact to the ID of a remote contact, the email/telephone/id of the remote contact will be cleared.
  • it is unacceptable to change the phone/email/id to one that is already assigned to an existing contact.

In all cases when a contact's ID will be cleared or overwritten, you will be able to find the corresponding event in the card.

Last modified: 2024.08.26 09:37 by Elizaveta Ivannikova