0

I did not understand yet what the difference between the 'Name' - argument in the data extension properties and its attribute 'CustomerKey' is:

props = {'Name': 'Test-Name', 'Description': 'Sends added HCPs..'}
data_ext.props = props

vs.

data_ext.CustomerKey = 'Test-Key'

It would also be nice to understand how to refer unambiguously to a certain data extension and load exactly that specific extension (to do sth. else with it, e.g. updating rows etc.).

1 Answer 1

3

The Data Extension Name is user defined name provided to Identify the DE among all other several DEs.

  • DE name must be Unique accross BU [MID]
  • User has to provide the Name of the DE
  • Mostly used in AMPscript

However Data Extension Customer Key the platform will auto generate the Customer Key for you [However you can override!] when you create any Data extension.

  • Mostly used in SSJS and WSProxy

Example: enter image description here

More details: https://help.salesforce.com/s/articleView?id=sf.mc_cab_data_extensions.htm&type=5

Adding comments here for better visibility: thanks to Jonas and Gregory :)

  • The customerKey has a different validation than the name; e.g. Names with only numbers are forbidden, Names cannot start with "_"; customerKeys don't have these limits; In addition I believe there are different maxlenghts, customerKey is shorter than name but I am not sure on the exact specs. SSJS Core library uses Key, Platform Functions & AMPscript use name.

  • The CustomerKey/ExternalKey is designed to be a unique identifier for use from outside systems to interact with the SFMC Object. This is included as an option because it allows you to change the 'friendly' display name without affecting your external integrations every time. It also is due to in some places, objects can have the same name, but different identifiers (e.g. Content Builder assets) and this allows you to identify specific objects without further context as each object must have a unique key.

3
  • Thanks a lot! What means 'BU [MID]'?
    – Andreas L.
    Nov 25, 2021 at 16:20
  • 1
    BU= Business Unit. Some more subtle difference are that the customerKey has a different validation than the name; e.g. Names with only numbers are forbidden, Names cannot start with "_"; customerKeys don't have these limits; In addition I believe there are different maxlenghts, customerKey is shorter than name but I am not sure on the exact specs. SSJS Core library uses Key, Platform Functions & AMPscript use name - since nobody really can keep track of all this, I personally try to keep both the same wherever possible, in order for all methods to work in my code. Nov 25, 2021 at 18:10
  • 1
    As a note, the CustomerKey/ExternalKey is designed to be a unique identifier for use from outside systems to interact with the SFMC Object. This is included as an option because it allows you to change the 'friendly' display name without affecting your external integrations every time. It also is due to in some places, objects can have the same name, but different identifiers (e.g. Content Builder assets) and this allows you to identify specific objects without further context as each object must have a unique key. Nov 28, 2021 at 16:55

You must log in to answer this question.

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