Chapter 6
IN THIS CHAPTER
Choosing your data storage approach
Setting up your account to hold your data
Preparing your data for import and importing it
In Chapter 5, you searched far and wide for data you could consider using in your online marketing campaigns before mercilessly culling the data that didn't help you meet your marketing objectives. Now that you have a healthy, well-thought-out pool of data, you need to get it into a place where Salesforce Marketing Cloud can use it.
For a long time, Marketing Cloud had only one simple and effective approach to storing data. But new functionality demanded a more sophisticated — and more complex — model to store different kinds of data that you use in multimedia online marketing campaigns.
In this chapter, we discuss your data storage options and help you decide which one to use. Then we talk about how to set up your data model and how to import the data you already have into it.
The two data models in Marketing Cloud are as follows:
The traditional way to store subscriber data in Marketing Cloud has been to use the subscriber-and-list model. This approach is simple, straightforward, and has some nice built-in conveniences.
In this model, Marketing Cloud considers each subscriber to be a complete entity. The email address identifies the subscriber entity, and profile and preference attributes contain the following kinds of data about the subscriber:
One of the little conveniences built into the subscriber-and-list model is Profile Center. For each subscriber, Marketing Cloud automatically generates a web page that you can link to in the footer of your email. When subscribers click the link, they go to a form where they can update their attribute values and change the lists to which they are subscribed.
Figure 6-2 shows an example of a profile center. It's an easy way to get to some of the subscriber data you've been after while making subscribers feel listened to and in control.
Your Marketing Cloud account comes with basic profile and preference attributes already created. You can choose to create a few additional profile and preference attributes to store data that isn't part of the basic starter set.
It wouldn't make sense to use a powerful piece of online marketing software to communicate to only one subscriber at a time, so you use lists to group many subscribers so you can send to them all at once. Marketing Cloud automatically includes all your subscribers on the big All Subscribers list, and then you create other lists, each one of which containing a subset of your All Subscribers list. Often, a list corresponds to a message type. For example, you might have one list for your monthly newsletter and another for your weekly flier. A subscriber can exist in any number of lists.
The subscriber-and-list model is simple to understand and adequate as long as each subscriber has no more than one piece of relatively static data for each attribute. For example, if all you have is the subscriber's email address, first name, and last name, the fields on the subscriber entity are fine. However, when you begin capturing things such as purchase history, where each subscriber could have a different number of past purchases and the information could be changing every day, using just the subscriber attributes becomes unwieldy and inefficient.
As the Marketing Cloud software continued to evolve, the subscriber-and-list model started falling short of the growing needs of increasingly customized and automated online marketing campaigns. Marketers needed the power of a tool that was being widely used in other high-tech fields: the relational database.
To understand a relational database, think of your wallet. The wallet as a whole is yours, but the data within that wallet resides in separate locations:
Each of these items serves a different purpose, so it makes sense to store the data associated with them separately, but they are also all tied together by a piece of data that is unique to you — your name. Using this name, you can figure out that the different cards go together and belong in the same person's wallet.
In relational database parlance, the different data storage locations (the cards in the preceding example) are called tables. In Marketing Cloud terminology, though, a table is called a data extension. In both cases, the unique identifier that ties the data together (your name in the example) is called a primary key.
To put this concept in practical terms, here is an example of data an online retailer wants to store about a customer. The retailer creates a Customers table with the following fields:
After a customer makes a purchase, the retailer will have information that doesn't fit in the Customers table. So she creates a Shipping table with the following fields:
Now you might be thinking to yourself, “Wait a second. Customer ID was supposed to be the primary key.” But the value of a primary key has to be unique within the table so it can definitively identify a single row in that table. Because a single customer could make more than one purchase, the same Customer ID could appear on many rows.
So you need a different value, the Order ID, to be the primary key of this particular table and to uniquely identify each row. The Customer ID is still available on each row, though, to connect the Shipping table with the Customers table. Using the Customer ID, you can get to the name and email address of the customer who placed the order.
Because an order may contain several items all being shipped to the same address, next the retailer needs an Orders table to identify the item or items to be shipped:
Note that this table has no single primary key field of its own but it associates the primary keys of other tables together. You might use a table like this to send a “Thank you for your order!” email at the end of each day. You could write a database query to collect all the information related to today's orders by starting from this table, using the Order ID to hop to the Shipping table, and then finding the Customer ID to hop to the Customers table.
As you can see in Figure 6-3, several files can be linked to build a useful relational data model.
If your company has rules about how long you must keep data or how quickly you should delete it, you can set a data retention policy on a data extension to delete the content in the data extension automatically. You can choose among the following options for removing data:
You also have options when it comes to setting up the date to delete the data extension content. You can choose a specific date or enter a number of days. When you create the data extension, the system starts counting the days, and after that date or the number of days you chose elapses, it deletes the content according to your selection. You can tell the system to restart the count of days each time you import into the data extension, if you prefer.
Using data extensions to contain your subscriber data is both more difficult and more powerful than using the subscriber-and-list approach. Whereas the purpose of subscriber attributes and lists is clearly defined before you even open your Marketing Cloud account, a data extension is a blank slate that can be configured to any purpose. Some data extensions contain the data that would otherwise be held in attributes; others serve the same purpose as lists, defining which subscribers receive a message.
Adopting a relational data model has several benefits:
Now that you have an understanding of the differences between the data structures you can employ, it's up to you to decide which best fits your needs. Consider the following questions when choosing whether to use the subscriber-and-list model or the relational data model:
Even if you start with subscriber attributes, you can move to a relational data model later, and you probably will. The relational model makes it possible to use the coolest functionality in Marketing Cloud.
If you decide to start by using the subscriber-and-list model to store your subscriber data, you have a short to-do list to get up and running. Start in the Email app by choosing Email from the Email Studio category on the app switcher.
If you need additional profile attributes, use the following steps to create them. You might not need to perform this procedure if the profile attributes provided by default serve your needs:
In the Email app, pause your mouse pointer over the Subscribers menu in the toolbar, and choose Profile Management from the menu that appears.
A list of the profile attributes defined in your account appears.
Complete the information on the Data tab.
The fields on this tab define what kind on information and how much information the attribute can contain. You can also set a default value.
Complete the information on the Values tab.
On this tab, you can create a list of values for this attribute.
Use the following steps if you want to set up additional preference attributes. You might be able to skip these steps if you're happy with the preference attribute delivered by default with your Marketing Cloud account.
In the Email app, pause your mouse pointer over the Subscribers menu in the toolbar, and choose Preference Management from the menu that appears.
A list of the preference attributes defined in your account appears.
Use the following steps to create a list of subscribers to whom you can send email messages:
Click the Create button on the right side of the screen.
The Create List window appears with two tabs.
Complete the fields in the Define Name & Location tab, and then click Next.
Most of these fields are self-explanatory, but the Public List check box merits some discussion. If you select this check box, this list appears in Profile Center for subscribers to choose to opt in or opt out. You should select this check box for any list used for ongoing communication, such as weekly deals or newsletters.
Because the name of public lists appears in Profile Center for subscribers to see, choose your list name with care. The name should clearly describe the kind of email subscribers can expect to receive if they opt in. Using proper capitalization and avoiding abbreviations gives your Profile Center a more professional, polished look.
Complete the fields in the Select Welcome Email tab, and then click Save.
If you choose to send a welcome email, Marketing Cloud sends the email you choose to each new subscriber who joins the list. For example, if a subscriber opts into the list via Profile Center, the system sends the subscriber the welcome email you choose here.
If you choose to dive right into a relational data model, you have more work to get things started. Much of what you need to do — before you begin any of the following procedures — involves planning the design of the database. When you're ready to implement your design, start in the Email app by choosing Email from the Email Studio category on the app switcher.
Use the following steps to create a data extension to contain data in your relational data model. These steps set up the data extension but do not populate it with data. See the procedure later in this chapter for information on how to import content into your data extension.
Complete the fields in the Data Retention Policy tab, and then click Next.
Using these settings, you can cause Marketing Cloud to automatically delete content from your data extensions after a period of time. This feature can keep you from using all your storage space and incurring fees.
When you use the relational data model, you create sendable data extensions instead of lists of subscribers. The procedure for creating a sendable data extension is the same as the one for creating any other kind of data extension. Just make sure to select the Is Sendable? check box on the Properties tab of the Create New Data Extension window, shown in Figure 6-4, when you get to Step 4.
You've chosen the data you need for your online marketing campaigns and your Marketing Cloud data model is ready to accept that data. It's finally time to import the data!
The simplest way to import data into Marketing Cloud is to use flat files — text files that have one record per row and that use a character, usually a comma, pipe, or tab, as a delimiter that signifies where one field ends and another begins. Figure 6-5 shows a flat file. If you think of a flat file like a spreadsheet, a field is like a column and a record is like a row.
Later in this section, after the discussion of importing flat files, we touch briefly on integrating your Marketing Cloud account with your customer relationship management (CRM) system to systematically update your Marketing Cloud data.
This section is relevant if you've decided to start by using the subscriber-and-list model. If you'll be using a relational data model instead, you can skip this section and proceed to the next one, “Importing to data extensions.”
Because the subscriber attribute model contains all necessary data in one big All Subscribers list, preparing the file to populate this table is straightforward.
You put the data you want to import into a single file, where each subscriber's data is a separate line in the file and each piece of data is delimited by a character, usually a comma or a tab. The file is actually a text file, but you might be able to open it in a spreadsheet program to help you review the content more easily. If you're exporting data from a different business system, that system might be able to generate a properly delimited file for you.
Use these steps to import your data:
In the list, find the list you want to import to, and click the import icon in the Actions section, on the right side of the row.
The import icon is shown in the margin.
Complete the steps in the Import Wizard that appears.
People have been importing to Marketing Cloud lists for a long time, so this wizard is a useful and time-tested aid to get your content into the system.
This section is relevant if you've decided to use a relational data model. If you'll be using the subscriber-and-list model, see the preceding section, “Importing to subscriber attributes.”
If you're using a relational data model, you must import more than one file of data; you import one file for each data extension. Other than that, the import process for data extensions is similar to the import process for subscriber attributes.
Use these steps to import your data:
If your company uses a customer relationship management (CRM) system, it may be the single richest source of customer data that your Marketing Cloud campaigns can use. Obviously, if you use the Salesforce CRM, you have a prime opportunity to connect the two systems so that customer data can flow directly from one into the other.
Integrating your Marketing Cloud account with your CRM system has several benefits, such as the following:
The process to integrate your account may require additional configuration, but, if the company does a good job of keeping your customer information complete and current in your CRM system, you'll be glad to have access to it through Marketing Cloud.
If you've elected to use a relational data model, you can use Contact Builder to manage the data you've imported. Contact Builder creates a single view of each contact in your database and allows you to easily tie other data points to that contact. Figure 6-7 shows Contact Builder.
Contact Builder is required for any implementation of Journey Builder. Contact Builder allows you to visually build relationships between different data extensions, and these relationships support business rules and decisions in Journey Builder. Any data point used to make a decision or to support content in Journey Builder must be included in Contact Builder.
See Chapters 10, 16, and 17 for full details about Journey Builder.