function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Natalia Roberts 2Natalia Roberts 2 

Unique ID in Marketing Cloud

Is there a way to generate a unique contact ID in Marketing Cloud upon import of new contacts?
Best Answer chosen by Natalia Roberts 2
David HalesDavid Hales
Hi Natalia,

A Contact Record has two identifiers:
Contact Key: a user defined identifier
Contact ID: a system defined identifier
When creating a Contact Record, you assign a Contact Key and Marketing Cloud will create a unique numeric Contact ID.
As a rule of thumb, you should always create a relationship to the Contact Record using Contact Key (this advice came from a lead Engineer on the Journey Builder product team).
Contact ID relationships are intended for system use and you probably would not know the Contact ID anyway (unless you created the Contact Record using the REST API or opened each Contact Record to see the Contact ID value).
Also note that in your Data Extension, the field that you are using to store your Contact Key will need to be a text field (not number). You can of course use a number in the field, but the field type has to be 'text' in order to create a cardinal relationship to the Contact Record.
Regarding your remark 'e.g. mobile behavior', I'm unclear what mobile behavior you are referring to. If you can expand on this, I'd be happy to elaborate further.


If your issue is resolved then please mark this answer as best answer so it helps others too.

Thanks 
Kspl 1058
Kloudrac
 

All Answers

David HalesDavid Hales
Hi Natalia,

A Contact Record has two identifiers:
Contact Key: a user defined identifier
Contact ID: a system defined identifier
When creating a Contact Record, you assign a Contact Key and Marketing Cloud will create a unique numeric Contact ID.
As a rule of thumb, you should always create a relationship to the Contact Record using Contact Key (this advice came from a lead Engineer on the Journey Builder product team).
Contact ID relationships are intended for system use and you probably would not know the Contact ID anyway (unless you created the Contact Record using the REST API or opened each Contact Record to see the Contact ID value).
Also note that in your Data Extension, the field that you are using to store your Contact Key will need to be a text field (not number). You can of course use a number in the field, but the field type has to be 'text' in order to create a cardinal relationship to the Contact Record.
Regarding your remark 'e.g. mobile behavior', I'm unclear what mobile behavior you are referring to. If you can expand on this, I'd be happy to elaborate further.


If your issue is resolved then please mark this answer as best answer so it helps others too.

Thanks 
Kspl 1058
Kloudrac
 
This was selected as the best answer
Natalia Roberts 2Natalia Roberts 2
If we have contacts coming from different sources (web forms hosted by different providers), is there a way to generate a Contact Key within SFMC upon inport of those contact records?

Thanks