I a have a file drop automation which is importing data into specific data extension - there is no subscriber info in the data and I do not want to set one to email address. What would be the best way to auto generate Subscriber Key?

  • Are you connected to Salesforce CRM? Jun 4, 2019 at 7:56
  • Yes but we do not want to use Contact or Lead IDs in this case. Specific BU works as isolated email/sms unit based on external data.
    – jc_mc
    Jun 4, 2019 at 7:57

1 Answer 1


I personally don't recommend SFMC providing Subscriber Key to your contacts. The only way you can identify/deduplicate your subscribers on import will still be on email address - which will change over time and generate duplicate records, and leading to inconsistent tracking history.

There is a number of methods to generate a unique identifier in SFMC, if you really insist on building this solution. I would use NewID() in a Query Activity you trigger in the context of your import, in following way:

  1. Import the file to a staging DE
  2. Lookup the email addresses that are not in your master contacts DE
  3. For these addresses, generate the NewID
  4. Add these records to your master contacts DE, with the newsy generated IDs being your Subscriber Key
  • 1
    Had to build such a solution lately. One thing very important to consider: when you have to implement an automated contact delete process the data in the import data extension will not be deleted as this one won't have a contact key to tie it to the data model. So, unless you can be sure that you have at least daily imports you need to custom build a solution to cover this issue. The easiest way would be to finish your contact delete automation with an overwrite query that returns no rows as this will empty the data extension. Dirty, but it works Jun 4, 2019 at 18:58
  • 1
    That's a good point. I would suggest the import should be set to overwrite the staging DE each time. Jun 4, 2019 at 19:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .