Condition groups

When creating segments, you have the option of using condition groups.

To create a condition group, click the Target An image of the target button. Use it to view and selected related data objects and attributes. next to an existing condition and select a related attribute. To include additional attributes, continue clicking the Target An image of the target button. Use it to view and selected related data objects and attributes. and selecting attributes.

An image of the target icon

Using condition groups

When you create a condition group, you link the data within each data object that has conditional criteria.

For example, you create the following conditions:

  • The customer made a purchase within the past three months.

  • The customer has made an order of over $100.

The segment will target records depending on if you create a condition group.

You don't create a condition group and select the All parameter for the whole group

The segment will target records that meet both criteria but not necessarily for the same transaction record in the Order data object. The segment will target the following records.

  • The customer made a purchase last month for $200. This customer meets both criteria for the same transaction record in the Order data object.

  • The customer made a purchase two months ago for $50. The same customer made a purchase six months ago for $150. This customer meets both criteria, but for separate transaction records in the Order data object.

You create a condition group and select the All parameter for the condition group

The segment will target records that meet both criteria for the same transaction record in the Order data object. The segment will only target the following record.

  • The customer made a purchase last month for $200. This customer meets both criteria for the same transaction record in the Order data object.

If a customer met both criteria for separate transaction records (made a purchase within the past three months and a separate purchase for over $100), they would not meet the criteria for the segment.

Use cases

Review these use cases to understand how to use condition groups when configuring segment conditions.

Use case 1 (All parameter on unified customer records without a condition group)

Your customer records have the following customer ID records in the Customer data object: 

  • C1

  • C2

  • C3

  • C4

  • C5

  • C6

After the Identity resolution system job runs and deduplicates records, the customer ID records will be matched to the corresponding ID records in the MasterCustomer data object. Learn more about Master entities.

Customer ID MasterCustomer ID
C1 C1
C2 C2
C3 C2
C4 C4
C5 C5
C6 C5

You have the following order records for these customer records.

Order ID Customer ID Order total Order date
1 C1 100 03-15-21
2 C2 100 03-23-20
3 C2 20 03-15-21
4 C4 20 03-15-21
5 C5 100 03-11-20

For this use case, you want to create a campaign to target customers with the following conditions:

  • Order total amount greater than $50.

  • An order after January 15, 2021.

You create these conditions without a condition group and select the All parameter.

An image of the conditions for use case 2

  • For the first condition (Order total greater than $50), the segment will target the following MasterCustomer IDs: C1, C2, and C5.

  • For the second condition (Order date after January 15, 2021), the segment will target the following MasterCustomer IDs: C1, C2, C4.

  • Since All is selected, the segment will target records that have made an order greater than $50 and have also made an order after January 15. 2021. The segment will target C1 and C2.

    • C1 placed an order greater than $50 after January 15, 2021.

    • C2 placed a order greater than $50 in the past and made a separate order after January 15, 2021.

Use case 2 (Any parameter on unified records without a condition group)

If you use the same data and conditions as Use case 1 but use the Any parameter, you will create a bigger campaign as the records only need to meet one of the conditions.

An image of the conditions for use case 3

Based on the order total and order date data, the segment will target the following MasterCustomer IDs:

  • C1: Placed an order greater than $50 after January 15, 2021.

  • C2: Placed an order in the past for more than $50 and made a separate order after January 15, 2021.

  • C4: Placed an order after January 15, 2021.

  • C5: Placed an order in the past for more than $50.

Use case 3 (All parameter on unified records with a condition group)

If you use the same data and conditions as Use case 1 but create a condition group and select All for the condition group, the data will be linked so each Order ID record must meet both conditions.

An image of the conditions for use case 4

The only customer record that meets this criteria is C1, with an order for $100 on March 15, 2021.

Use case 4 (All parameter on unified records without a condition group)

You want to create a segment that targets females that have given permission to be contacted by mail.

You have the following customer records.

Customer ID Ok to mail Gender
C1 Y F
C2 Y M
C3 N F
C4 N F
C5 Y M
C6 Y F

After the Identity resolution system job runs and deduplicates records, the customer ID records will be matched to the corresponding ID records in the MasterCustomer data object. Learn more about Master entities.

Customer ID MasterCustomer ID
C1 C1
C2 C2
C3 C2
C4 C4
C5 C5
C6 C5

There may be records that are duplicated and have both M and F values. As long as one of the source records has an F value and has given permission to be contacted by mail, they can be added to the segment.

You create these conditions without a condition group and select the All parameter.

An image of the conditions for use case 5

  • For the first condition (Ok to mail), the segment will target the following MasterCustomer IDs: C1, C2, and C5.

  • For the second condition (Female customer), the segment will target the following MasterCustomer IDs: C1, C2, C4, and C5. Customer ID C3 is not a MasterCustomer ID since it was matched with C2 in the MasterCustomer data object.

  • Since All is selected, the segment will target records that have given permission to be contacted and are also female. The segment will target C1, C2, and C5.

Use case 5 (All parameter on unified records with a condition group)

If you use the same data and conditions as Use case 4 but create a condition group and select All for the condition group, the data will be linked so a single customer source record must meet both conditions.

An image of the conditions for use case 6

The only customer records that meet this criteria (same profile record is female and gives permission to be contacted) are C1 and C5.

Use case 6 (condition group with multiple data objects)

When you create a condition group with attributes from multiple data objects, the Any parameter will link the data within each data object.

For this use case, you create a condition group with the following conditions.

  • Customer's age greater than 35 years old.

  • Customer's gender matches female.

  • Customer's country of residence matches the U.S.

  • Customer's address type matches a business address.

An image of the Any/All example for a condition group

If you select All, the segment will target records that meet all the above conditions.

An image of the conditions for the first use case

If you select Any, the data within each data object will be linked (Customer and Address). The segment will target customers that meet the following.

  • The customer either is female or is over 35 years old. This data is from the Customer data object.
  • The customer either lives in the U.S. or has a business address. This data is from the Address data object.

An image of the condition group using Any for the first use case

The following record would be added to the segment using Any.

  • The customer is male and 40 years old.
  • The customer also lives in Canada and has a business address.

The customer is added because they meet the Any condition of either Female or over 35 years old from the Customer data object (40 years old). The customer also meets the condition of either living in the U.S. or having a business address from the Address data object (has a business address).

Learn more

Creating segments

Managing segments

Segmentation operators

Intelligent attributes

Campaign personalization

Publishing changes

segment, segmentation, create segment, how to create a segment, personalization, personalization attribute, aggregate data, aggregation, aggregation function, segment sample, sample of records, records sample, density, get count