How to Create a Data Extension in Marketing Cloud
Welcome in Salesforce Marketing Cloud Worlds. Here i'm starting the Salesforce Marketing Cloud Technical Blog series for beginners, this may helps beginners and intermediate level learners to possess an honest knowledge of Salesforce Marketing Cloud.
Hey Guys, In this post, you will learn how to create a Data Extension in Marketing Cloud.
Creating Data Extensions in Marketing Cloud is one of the most important aspects to learn. Data Extensions can be a tricky topic to learn, and the fact that there are more than one way you can create a Data Extension and add contacts to it can cause confusion.
I share two ways you can set up a Data Extension, through Email Studio, or by using Contact Builder.
Data Extension in Marketing Cloud
A Data Extension is a table within the application database that contains your data. You could use a data extension to store sendable subscriber data like Lists or just to house relational data.
The data you keep in a data extension relates to a subscribers but does not fit in the subscriber profile and preference attributes.
MIND IT !
The DE as be a table, you can create the structure that you need with required fields, uniques, defaults,etc. Also you can create sendable and tested DE. The data extension can be link in the attributes groups in the Contact Builder, very usefull when you work with Journeys that needs to read extra information.
How to Create Data Extension
1. Email Studio
Step #1: Go to Email Studio > Subscribers > Data Extension > Click on Data Extension
Here is how to create a Data Extension using Email Studio. Once you’re inside Email Studio, you can navigate to ‘ Subscribers’ > Data Extensions in the drop down.
Step #2: Click on Create
Find the ‘Create’ button on the top right.
Step #3: Select Type Based on Requirement
I will just go for the ‘Standard Data Extension’ for this post, but there is also the option to create a filtered data extension.
Step #4: Under Create New Data Extension > Properties
Now I’m on the ‘Create Data Extension’.
Creation Method : Select Creation method
I can choose to create a new data extension, a data extension from a template, or from an existing data extension. I’ll simply call it ‘LearnFrenzy Subscribers’.
External Key: I can also choose to give it an external key. This can be useful if you’re using the API, but usually you don’t have to worry about it (it will be auto-filled).
-> Select option based on requirement
• Is Sendable?
• Is Testable?
Is Sendable? Is Testable?: Two very important options! If you ever want to use email addresses in this data extension and send an email to it, you’ll definitely want to make sure it’s sendable.
Campaign Association (optional): you can also link it to a campaign, to be honest, I have not used this feature too much myself, so I will skip that.
Name & Description: Associate email with for new customers
Step #5: Under Create New Data Extension > Properties > Data Retention Policy
Next, we can choose a Data Retention Policy. This allows you to wipe records in this data extension, or even wipe the data extension itself after a given time. This may be for compliance reasons, maybe because you simply want to keep a tidy database.
-> Change retention policy
Step #6: Fields
Now we get to the most important section, which is where we define the fields for our data extension. A data extension is essentially a table, so think of these fields pretty much as the columns that we’ll have later on.
-> Create Fields
-> Select Relationship
-> Click on Create
For this example, I have created a 'LearnFrenzy Subscribers' under data extension. we’re talking about subscribers, so let’s start with the email field. Notice that now I can define the data type – let me quickly cover the options:
Data Extensions>LearnFrenzy Subscribers
• Text: a text string, which can also contain numbers.
• Number: can only be a numerical character.
• Date: date fields in Marketing Cloud are quite special, because it’s actually date time (see side note)
• Boolean: true or false.
• EmailAddress
• Phone
• Decimal
• Locale
MIND IT !
Note on date fields in Marketing Cloud: because date fields are actually date/time, you can also have the hour and the minutes included. Dates are saved in a specific time zones, which is something that you will want to consider, especially if you’re a global organization and not all based in the set time zone in Marketing Cloud.
Primary key: you can see that there’s the checkbox called primary key. A primary key ensures that the values that we’re going to provide for the email address are unique.
Nullable: if we have to provide a value or not. By checking this for ‘first name’, Marketing Cloud will accept a null value (or no value) for the first name, which could be empty in cases where we don’t know that about our subscribers.
Default value: I set a default value for ‘Gender’ radio button field, making it ‘true’.
At the bottom, you will also see ‘Send Relationship’. This defines which fields you’re going to relate to your subscribers based on the subscriber key (eg. the email field). ‘Subscribers’ (highlighted in the image below) is essentially the master list of all your contacts inside of Email Studio.
We already mentioned earlier, that in this table, email address will always be unique because it has primary key flag. In addition, we’re also going to say that this is actually the unique identifier linked to the subscriber key for our master table of all contacts, which is a very key notion in Salesforce Marketing Cloud.
After creating the data extension, it will return us to the overview screen. Let’s have a quick look to see if it looks like we expected. On the left-hand side, you can see that an external key has been automatically populated. You can also see that it’s used for sending, the subscriber relationship, and lastly, on the right-hand side, we can see the different fields that we added, including their settings.
2. Contact Builder
Step #1: Go to Audience Builder > Contact Builder > Click on Contact Builder
Here is how to create a Data Extension using Contact Builder. From the overview screen, navigate to ‘Audience Builder’ > ‘Contact Builder’ in the drop down.
You will see this screen:
Step #2: Go straight to ‘Create’ > Click on Create
This overview that you now see of your existing data extensions is similar to the one that you have available in Email Studio:
Step #3: Under Create New Data Extension > Properties
Give your data extension a name (Here DE name is 'Subscribers Data Extension'), make sure that this DE is sendable and testable.
Step #4: Under Create New Data Extension > Properties > Data Retention Policy
Next, we can choose a Data Retention Policy. This allows you to wipe records in this data extension, or even wipe the data extension itself after a given time. This may be for compliance reasons, maybe because you simply want to keep a tidy database.
Step #5: Under Create New Data Extension > Properties > Data Retention Policy > Attributes
We’ll be giving it some attributes. Note that there are little differences between the way data extensions are managed in Email Studio vs. Contact Builder, eg. primary key was an option on the right hand side in Email Studio.
The attributes I’m going to add are: email address, first name, last name, dob and why not add ‘Active’ (a boolean true/false option).
I made email address the primary key, which is the unique identifier of subscribers, so that automatically becomes required.
You can make other fields required too. This is one of the subtle differences between Email Studio and Contact Builder when creating a data extension. If you want fields that are not required in Email Studio, you actually have to flag something they call ‘nullable’. Here in Contact Builder, it’s a bit clearer because it’s called ‘required’ and it’s unchecked by default.
Once again, I need to define a ‘Send Relationship’; in this case it’s already defined. Also note here, I can only take ‘subscriber key’ as the relation, which is fine, because it’s usually what you want.
Step #6: Let’s click complete
There you go, it’s been created! Now let’s check out this new DE that we created.
On the left hand side, pretty much the same settings as we had in Email Studio, with a few key differences. Here, we have some control settings that allow us to set permissions on this date extension. This is useful to protect the data extension and only up permissions to those who need it, that is, the team that prepares the data in Marketing Cloud, an admin or a technical marketer, perhaps.
On the right hand side, there are nuances to how the information is displayed, eg. then the field is type ‘email’, it will have an @, whereas if it’s text, it will have this ABC icon.
(1) Comments
I sincerely appreciate the time and effort you've put into this blog. Such blogs need extensive study and effort. Beautiful use of words and information. Appreciated.