Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Create Filtered Segments

Learning Objectives

After completing this unit, you’ll be able to:

  • Identify filtering options.
  • Evaluate container path scenarios.

Containers, Operators, and Logic

As you get comfortable with your data, you also need to get comfortable with containers, operators, and filtering logic. These are the building blocks of segments within Data Cloud. We mentioned these in the first unit, but let’s break them down even further. Remember our yellow scarf example from before?  Let’s take a closer look at the components that make up the filter. 

  1. Aggregation
  2. Operators
  3. Value
  4. Logic

Container example with callouts for aggregation, operators, value, and logic.

Aggregation

Let’s start with aggregation. For a new container attribute, you must select aggregation for an object based on count, sum, average, or maximum and minimum, along with an operator and value. This creates the base of your filter and sets the standard of the results you’re looking for, whether they are a specific count or based on a calculation.

Type

Description

Example

Count

Segmented based on how many times the criteria must be met. 

  • At least 5 purchases
  • No more than 2 complaints

Sum

Segmented based on a chosen attribute to be summed across all data values.

  • Lifetime purchase value of $1500

Average

Segmented based on a chosen attribute to be averaged across all data values.

  • Individual average lifetime value of $500
  • Customer satisfaction average of 3.5

Max

Segmented based on the chosen maximum of a specific attribute. 

  • Maximum purchase amount < $1000

Min

Segmented based on the chosen minimum of a specific attribute. 

  • Minimum purchase amount > $5
Note

Count is available for any data type, while the remaining aggregation types can only use numeric data.

Operators

Next, you must select an operator. The operator in a filter is like a verb in a sentence. Operators specify how filter criteria relates to the value entered. For Data Cloud, operators apply to filters in four forms: date, numeric, text, and Boolean. Let’s review the operator options. 

Type

Options

Use Case

Date

  • Is Anniversary Of
  • Is Not Anniversary Of
  • Is On
  • Is Before
  • Is After
  • Is Between
  • Last Year
  • This Year
  • Next Year
  • Last Number Of Days
  • Next Number Of Days
  • Last Number Of Months
  • Next Number Of Months
  • Day Of Week
  • Day Of Month
  • Not Day Of Month
  • Before Day Of Month
  • After Day Of Month

To set up a batch email that sends to profiles on their birthday, you might use:

Attribute: Birthdate

Operator: Is Anniversary Of

Value: Today’s Date

Numeric

  • No Value
  • Is Equal To
  • Is Not Equal To
  • Is Less Than
  • Is Less Than Or Equal To
  • Is Greater Than
  • Is Greater Than Or Equal To
  • Is Between
  • Is Not Between

You want to use an attribute like total purchase amount to create a segment. The segment can be used to send a special email offer to customers who spend more than $100.

Attribute: Grand Total Amount

Operator: Is Greater Than 

Value: 100

Text

  • Is Equal To
  • Is Not Equal To
  • Contains
  • Does Not Contain
  • Begins With
  • Exists As A Whole Word
  • Is In
  • Is Not In

You want to send an email to customers who live in a certain state.

Attribute: State

Operator: Is In (which allows for comma separated values)

Value: IN, Indiana  

Boolean

  • Has Value
  • Has No Value
  • Is True
  • Is False

You want to create a targeted campaign for your high-engagement customers who have made in-app purchases

Attribute: In-app purchases

Operator: Is True

Values

Values are pretty straightforward. They are the thing you want your filter to find. And there’s good news! Values are not case sensitive. So if you type the subject line text as TENT SALES, tent SALES, or even TeNt SaLes, your results are still the same. 

Logic

Finally it’s good to refresh yourself on the filtering logic of AND versus OR. To determine which to use, ask yourself: Am I looking for any or all?

Any of these can be true = OR

I like peanut butter or jelly, or both, on a sandwich.

All these things need to be true = AND

I like peanut butter and jelly on a sandwich. 

Container Paths

Now that you have the basics, let’s discuss what happens when you have multiple options for data sources. For example, an email address attribute could link to many different data sets. A container path needs to be selected when a container has multiple access paths back to the segmentation target object (remember this is called Segment On). Selecting one container path helps Data Cloud understand how to build your segment. 

Let’s review a scenario where Northern Trail Outfitters (NTO) needs to select a container path. NTO has data about product purchases in two different data streams. One is a data stream that has retail purchases. The other is case data from Service Cloud. So when adding a product-based attribute to a segment, it’s important for the marketer to choose which data source to use for their segment based on their marketing campaign’s goal. 

If NTO wants to email a customer because they complained about a product and created a case, the marketer would want to use the path that originated from Service Cloud data. If the marketer wants to simply send an email to individuals who bought a specific product, they would choose the attribute connected to retail purchases. 

Object relationships in a container path are case-sensitive. Data Cloud supports one, case-sensitive method of joining data tables that’s not configurable. The values of linked records must match exactly. For example, if the value of SalesOrder.SoldToCustomer is c12d3, and the value of Individual.IndividualId is C12D3, the records fail to link up. The two values, c12d3 and C12D3, don't match in case.

Best Practices to Ensure Segment Performance

  • Choose the right Segment On target object based on your business case: With further refinement, distinct members of this target object form your target audience. If your data comes from different sources, use the Unified Individual DMO, which ensures higher performance and gives you more accurate results.
  • Use the correct DMO type: Profile, Engagement, or Other based on your target dataset.
  • Choose the shortest paths and avoid cyclic paths: When possible, select the shortest path between two DMOs. The longer the path, the longer the join path, which creates more work for the segmentation engine. In a cyclic path, you start from a DMO and along the join relationships, you end up reaching the same DMO. Basically, a→b→c→a , or a → b → c → b. Cyclic paths lead to increased processing time and can result in query failures.
  • Limit the amount of data to process: As you decrease the amount of data that the segmentation engine has to process, the overall performance of the segment improves. Use data spaces and define explicit filters in the segment.
  • Merge containers when possible: When two containers with the same container path are joined by “Or” logic, merge them. Also, merge your containers while working with related attributes.
  • Use nested operators: Address complex segmentation requirements in one container to improve segment performance.
  • Use nested segments: When you nest a segment in segment membership mode, the segmentation engine doesn’t need to re-run filter criteria of the nested segment, thus improving the segment performance.
  • Use calculated insights or data transforms for complex operations: Calculated insights and data transforms are strong tools that help you lessen the segmentation computation burden.
  • Avoid using skewed engagement data: When the data is skewed, it’s possible that one partition contains a lot of data, which leads to increased operation time.

Filter Examples

There’s a lot you can do with filtering logic, but sometimes it takes trial and error to get the exact results you’re looking for. Reviewing examples can help you get started. Let’s see how Northern Trail Outfitters (NTO) creates three segments in Data Cloud. 

Filter Example 1: NTO wants to send an offer to customers who have opened more than five of their emails with the subject line “Tent Sales.”  

  • Container: Email Engagement | Count | At Least | 6
    • Engagement Channel Action | Is Equal To | Open
    • AND
    • Subject Line Text | Contains | Tent Sales 

Filter example 1.

Filter Example 2: NTO wants to email its August big spenders (with at least one purchase over $1,000) based in San Francisco or New York City.

  • Container: Device Application Engagement | Count | At Least | 1
    • City Name | Is In | New York, NYC, San Francisco, San Fran
    • AND
  • Container: Sales Order | Count | At Least | 1
    • Purchase Order Date | Is Between | AUGUST 1, 2020 to AUGUST 31, 2020
    • AND
    • Grand Total Amount | Is Greater Than | 1000

Filter example 2 in two containers.

Filter Example 3: NTO wants to see which SMS subscribers opted into its recent SMS campaign for its hiking contest.

  • Container: SMS Engagement | Count | At Least | 1
    • Engagement Channel Action | Is Equal To | Opt In
    • AND
    • Engagement Date Time | Last Number Of Days | 30
    • AND
    • Keyword Text | Is Equal To | HikingContest

Filter example 3.

Note

Want more example filters? Check out the help document, Segmentation Filter Examples.

Now that you have a good idea of how to create, publish, and activate segments in Data Cloud, you’re ready to embark on your marketing campaign. Remember: Start with the beginning in mind, and set up your activation targets first. Then, following container and filtering best practices, create segments that break down your data to understand, target, and analyze your customers. Finally, publish and activate your segments to your activation targets, and you’re all set! Want to keep the momentum going? Complete the Quick Start: Create a Data Cloud Segment.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기