Create complex segments with segment builder
Define complex filters around the unified customer and its related tables. Each segment, after processing, creates a set of customer records that you can export and take action on.
Create a new segment with segment builder
For an illustration of the key aspects of segment builder, see Aspects of segment builder. For tips, see Segment builder tips.
Go to Segments.
Select New > Build your own. On the segment builder page, you define or compose rules. A rule consists of one or more conditions that define a set of customers.
Select Edit details next to Untitled segment. Provide a name for your segment and update the suggested Output table name for the segment. Optionally, add a description and tags to the segment.
In the Rule1 section, choose an attribute of a table you want to filter customers by. There are two ways to choose attributes:
- Review the list of available tables and attributes in the Add to Rule pane and select the + icon next to the attribute to add. Choose if you want to add the attribute to an existing rule or use it to create a new rule.
- Type the name of the attribute in the rule section to see matching suggestions.
Choose the operators to specify the matching values of the condition. Attributes can have one of four data types as a value: numerical, string, date, or Boolean. Depending on the data type of the attribute, different operators are available to specify the condition.
Select Add condition to add more conditions to a rule. To create a rule under the current rule, select Add sub-rule.
If a rule uses other tables than the Customer table, select Set relationship path to map the selected table to the unified customer table. If there's only one possible relationship path, the system selects it automatically. Different relationship paths can yield different results. Every rule can have its own relationship path.
If you have multiple conditions in a rule, choose which logical operator connects them.
- AND operator: All conditions must be met to include a record in the segment. Use this option when you define conditions across different tables.
- OR operator: Either one of the conditions must be met to include a record in the segment. Use this option when you define multiple conditions for the same table.
When using the OR operator, all conditions must be based on tables included in the relationship path.
To create different sets of customer records, create multiple rules. To include the customers required for your business case, combine groups. Specifically, if you can't include a table in a rule because of the specified relationship path, create a new rule to choose attributes from it.
Select Add rule.
Select one of the set operators: Union, Intersect, or Except.
- Union unites the two groups.
- Intersect overlaps the two groups. Only data that is common to both groups remains in the unified group.
- Except combines the two groups. Only data in group A that is not common to data in group B is kept.
By default, the output table will automatically contain all attributes of customer profiles that match the defined filters. If a segment is based on other tables than the Customer table, select Project attributes to add more attributes from these tables to the output table.
For example: A segment is based on a table that contains purchase data, which is related to the Customer table. The segment looks for all customers from Spain that purchased goods in the current year. You can choose to append attributes like the price of goods, or the purchase date to all matching customer records in the output table. This information might be useful to analyze seasonal correlations to the total spending.
Note
- Project attributes only work for tables that have a one-to-many relationship with the Customer table. For example, one customer can have multiple subscriptions.
- If the attribute you want to project is more than one hop away from the Customer table, as defined by the relationship, that attribute should be used in every rule of the segment query you are building.
- If the attribute you want to project is just one hop away from the Customer table, that attribute doesn't need to be present in every rule of the segment query you are building.
- Projected attributes are factored in when using set operators.
To save the configuration, select Save and then Close. The segment is in draft mode or inactive so you can make changes to the configuration before actually creating the segment.
To create the segment, select Run.
Next steps
- Schedule a segment.
- Export a segment and explore the Customer Card integration to use segments in other applications.