Uncategorized

Segmentation methods within Salesforce Marketing Cloud

The segmentation features of a marketing automation software are crucial for marketers sending email, text, push messaging, or targeted adverts. Likewise, how easy it will be for platform users to construct their own parts.

Today I’ll discuss Salesforce Marketing Cloud’s filtering possibilities and their advantages and downsides for contacts targeting.

Queries and Data Filters are Marketing Cloud’s key filtering techniques. Each method has strengths and flaws and is powerful.

Data Filters

Marketing Cloud data filters let you create segments using a simple drag-and-drop interface.

No alt text provided for this image

In the image above, I’ve dragged a field from my Data Extension on the left of the screen. In this example, I’m telling to Marketing Cloud I want to create an audience of those who have donated an Amount of greater than or equal to 100. I could stop here and create this Data Filter and be done, or I could create more criteria and use the interface to AND items together (or OR criteria together, depending on my needs for the segment).

No alt text provided for this image

In the above image, I’ve added some more advanced filtering criteria. In this example, I’ve asked for the filter to return records with an Amount greater than or equal to 100 that were also created after January 1st, 2021 OR any records that have first name of Chad and Last Name of Martin. Perhaps not a very realistic criteria to create, but it does illustrate the advanced capabilities of Data Filters and highlights the abilities of grouping filter criteria together.

Once you’ve created your Data Filter, you can then use this filter in a few different ways. First off, you can use the data filter as your sendable audience. This means that when your email is sent, whoever fits that data filter criteria at the time of the actual deployment will end up receiving your message. This is very convenient for a birthday automation where you might be using Automation Studio to send out a birthday email every day. Your data filter criteria could be set to find records where the Birthday field equals Today.

So you may be thinking “Data filters are awesome and I don’t need any other method of filtering, right”? Well, not so fast. There are some limitations to using data filters.

Only One Data Filter Can Be Selected as an Audience per Send

If you were hoping to create numerous data filter audiences and then use all of your shiny new dynamically generated data filters as your sendable audiences, you will soon be disappointed. Marketing Cloud only allows one data filter to be selected as a sendable audience. So sending to a Data Filter containing segment A and a separate data filter for Segment B will require you to create two separate sends (or, to create two corresponding filtered data extensions, one for each segment). Keep reading below to learn more about creating filtered data extensions.

Who is in the Segment?

Data Filters do not provide any insight into the ‘who’ or total counts for the data filter criteria. The primary way to gather this information is to create a Data Extension from the criteria of the data filter, also known as a Filtered Data Extension.

No alt text provided for this image

Creating a filtered data extension will provide you with the totals and the corresponding data, however, this data extension is a snapshot in time (i.e. who met the criteria at the time you pushed the ‘Create Data Extension’ button) and will not update / refresh on its own. If you do want this audience updated, you will need to click the “Refresh” icon within the filtered data extension (the little ‘circle of arrows’ icon highlighted below).

No alt text provided for this image

Clicking this Refresh icon will regenerate your audience based on the records meeting the criteria at this new point in time. Refreshing this data hence forth requires you to return to the interface and re-click the “refresh” button. For the more advanced Marketing Cloud users…refreshing a filtered data extension can also be completed via an API call to the Marketing Cloud. This could still be considered a “manual” run, except that you could likely automate the generation of the api call so that the refresh occurs at specific intervals. For the very advanced Marketing Cloud users…you might create an SSJS Activity to be run within Automation Studio that makes this api call to refresh your filtered data extension(s). But that is a conversation for another day. 😉

If your data is not changing too frequently, filtered data extensions can also be utilized as a method for quality assurance of a simple query result. If you write a simple query that selects data from one data extension, you can create a filtered data extension with this same criteria to validate your query results.

Filtering Data Across Multiple Data Extensions

One area where data filters usually create challenges relates to their ability to filter across multiple data extensions. In the above examples, only one data extension was selected and the corresponding filter worked directly from the fields available in this selected data extension. Data filters shine when they are used to create filters from just one data extension. When a Marketing Cloud users would like to create a data filter across multiple data extensions a feature called Data Relationships would need to be utilized. Data Relationships should be used with caution as the technology is fairly old and typically not put in place for client solutions. See image below for a data relationship connecting the Contact synchronized data extension with another data extension that utilizes Contact Key as the primary key (in this instance, SubscriberKey is the field containing Contact Key).

No alt text provided for this image

The interface for creating a data relationship is not the most intuitive, and you will only be able to create the relationship for a data filter if the primary key of your first data extension is the field you need to match on against your second data extension (which will only sometimes be the case). The end result of this specific primary key requirement of data relationships is that you likely will not be able to create a proper link between your two data extensions, making Data Relationships not all that useful. And thus limiting the power of filtering with data filters to one Data Extension.

Automating Data Filter Segmentation with Filter Activities

Marketing Cloud does include a method to automate the creation of a data extension based on the criteria of a data filter, which can eliminate the need to manually create and refresh a filtered data extension. The former ExactTarget naming department gets less credit for the naming of what is known as a Filter Activity. A filter activity is an interaction within Marketing Cloud that you create to run (or execute) a data filter within Automation Studio. The filter activity provides essentially the same result as pushing the Refresh button on your filtered data extension, except you can add a filter activity into an automation.

Would it have been easier for end users to drag and drop a data filter onto the Automation Studio canvas and then answer a question about where the corresponding results of data should go? Probably, yes. Instead, we have filter activities, which have a 1:1 relationship with a specific data filter.

No alt text provided for this image

The Filter Activity is generated in Automation Studio and utilizes a data filter that you have previously created.

No alt text provided for this image

On the first execution of your filter activity, your data extension will be generated and populated. On subsequent filter activity runs, the data extension will be overwritten with the data that meets the criteria of your Data Filter (at the time of execution of the filter activity).

If you have been reading and thought “This is great. I’ll use data filters and filter activities to filter my Synchronized Data Extensions”! Well, you cannot. Data filters work with data extensions and Salesforce Data Extensions, but not Synchronized Data Extensions.

The image below shows a filter activity being placed in an automation. When this automation is run, the corresponding data extension will be generated based on the associated data filter target data extension (i.e. the data extension we selected when creating our data filter).

No alt text provided for this image

You can later modify the source data extension (i.e. add new fields) and the next time the filter activity is run, the new fields will then be made available in your destination data extension that is associated with your filter activity.

This is also true if you modify the source data extension of a filtered data extension…the fields will automatically be added to the filtered data extension.

Let’s summarize the pros and cons of Data Filters.

Pros:

  • Easy to use, drag and drop interface
  • Data filters can be selected as as dynamic, sendable audience

Cons:

  • Not easy to access totals or members of the data filter segment
  • Must manually refresh filtered data extension (without creating a Filter Activity)
  • Can generally only filter against one data extension (without use of antiquated, limited and clunky data relationships feature)
  • Data Filters do not interact directly with Synchronized Data Extensions

Query Activities

Let’s now dive into the Marketing Cloud data segmentation powerhouse…query activities. If you’ve ever written a SQL query, then you should be generally comfortable with query activities in Marketing Cloud. And if you’ve never written a query before or are unfamiliar with SQL queries, check out the SQL tutorial on W3Schools and you’ll be a gumshoe query writer in no time.

SQL queries provide a wide variety of segmentation and transformation capabilities. The first big advantage of queries is they are flexible and can select from a large number of data extensions, creating a segment based on specific criteria from each data extension. Queries are also able retrieve data from Synchronized Data Extensions.

Relatively Simple SQL query example selecting from a Synchronized Data Extension.

No alt text provided for this image

Queries can be used to completely transform how data is structured in 1 or more data extensions, converting the results of one or more data extension into a new data extension. Queries can be written to use functions that allow different types of conversion / transformation (CASE statements can be added in statements to allow for logic and decision making based on the data available during the selection).

Queries allow for advanced exclusions, and unlike data filters, can order the resulting data. A SQL query will generally process faster than data filters / filter activities as well. One additional benefit of queries is that you have control whether the resulting data extension will be overwritten (an Overwrite), updated (Add/Update), or whether you just want to add new records (Append). Data Filters will always completely refresh your data extension results.

For those used to writing SQL queries and seeing results in the same screen, Marketing Cloud provides an AppExchange app called Query Studio for both power users and SQL newbies to test and run queries. There are some limitations with this tool, but is still a good area to test run queries without needing to create a Data Extension first.

So there’s plenty to appreciate about Marketing Cloud’s SQL Query capabilities and any power marketer or marketing IT team member will likely love the data problems that can be solved with queries.

Pros:

  • Much more advanced capabilities for segmenting and ordering data
  • Can join multiple Data Extensions (aka tables)
  • Can be utilized to transform data using SQL query functions
  • Greater abilities to exclude or include data
  • Easier to automate
  • Ability to update resulting Data Extension data (and not just overwrite)

Cons

  • Requires at least a basic level knowledge of SQL
  • More steps required to create segments (i.e. data extension creation, query creation, query execution)
  • Potentially more difficult to maintain when there are team member changes (i.e. if someone new on-boards that does not understand SQL)
  • Potentially more testing to ensure query is producing the proper results

Other Similar Features in the Marketing Cloud

Queries and Data Filters provide the 2 primary methods for creating segments within the Marketing Cloud. Journey Builder also provides a method to filter an audience into a smaller segment with its Entry Criteria feature.

A typical best practice for generating a journey audience is to create a separate data extension that contains only the Contacts that should enter that journey. However, Marketing Cloud does allow end users to select a data extension containing a large segment, and then creating criteria so that only specific users from this segment actually enter the journey.

No alt text provided for this image

Above a data extension is selected for this journey, but can be filtered down further so that only the Contacts fitting the specific criteria actually enter the journey.

No alt text provided for this image

The difference with this filtering feature within Journey Builder is we actually get to filter based on all data in Contact Builder (and not just by the fields available in the selected Data Extension)! This is a much more powerful filtering feature than Data Filters as a result since we are not limited to one Marketing Cloud object / data extension when creating our criteria. Below are two criteria for a journey entry event filter that pull from separate data extensions (linked together in Contact Builder).

No alt text provided for this image

We can only hope that some day Salesforce will take this same filtering feature using the Contact Builder object model and make it available to us when creating Data Filters!

Journey Goals and Exit Criteria

While we’re speaking of journeys, I’d be remiss not to at least mention Exit Criteria and Goals in our filtering conversation. Within Journey Builder, you can create a Goal for your journey (i.e. I want X number of Contacts to donate) or create an Exit Criteria (when a Contact donates, exit them from the journey). Goals also have the ability to exit the person from the journey. Long story short, Goals and Exit Criteria each share the same interface as the Journey Entry Event, allow you to create a more advanced criteria than a data filter (please Salesforce, make it so data filters use this interface soon)!

When should I use each queries or data filters?

The answer to this question really comes down to specific use cases. Queries will always be able solve the problem, but may be more complicated or cumbersome than with a Data Filter. Data filters cannot solve all segmenting problems, but are generally easier to implement.

Using data filters is generally a proper solution when you are working against one Data Extension and have a not too overly complex segmenting criteria. Data Filters are also going to be easier to manage for a majority of Marketing Cloud end users (compared to SQL queries).

There will also be situations where the solution may call for both Queries and Data Filters. For example, the primary segmentation of your top level data into smaller business unit or department data extensions. Once the query data has segmented into the sub segments, additional segmentation of those business unit end users could be done by Data Filters.

At the end of the day, Marketing Cloud provides both advanced and simple segmentation tools to allow marketers to create targeted audiences.

Leave a Reply

Your email address will not be published. Required fields are marked *