Create complex segments with segment builder

Define complex filters around the unified customer or unified contact and its related entities. Each segment, after processing, creates a set of customer or contact records that you can export and take action on.

Tip

Segments based on individual customers automatically include available contact information for segment members. In business accounts, if you unified both accounts and contacts, choose whether the segment is based on accounts or business contacts. To export to a destination expecting contact information, use a segment of contacts. To export to a destination expecting account information, use a segment of accounts.

Segment builder

The following image illustrates the various aspects of the segment builder. It shows a segment that results in a group of customers. The customers ordered goods in a specific time frame and gathered reward points or spent a certain amount of money.

Elements of the segment builder.

  1. Organize your segment with rules and subrules. Each rule or subrule consists of conditions. Combine the conditions with logical operators.

  2. Choose the relationship path between entities that applies to a rule. The relationship path determines which attributes can be used in a condition.

  3. Manage rules and subrules. Change the position of a rule or delete it.

  4. Add conditions and build the right level of nesting using subrules.

  5. Apply set operations to connected rules.

  6. Use the attribute pane to add available entity attributes or create conditions based on attributes. The pane shows the list of entities and attributes, based on the selected relationship path, that are available for the selected rule.

  7. Add conditions based on attributes to existing rules and subrules or add it to a new rule.

  8. Undo and redo changes while building the segment.

The example above illustrates the segmentation capability. We've defined a segment for customers who bought at least $500 of goods online and have an interest in software development.

Create a new segment with segment builder

  1. Go to Segments.

  2. 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.

    Note

    For environments based on business accounts, select New > Segment of Accounts or Segment of Contacts (preview) based on the type of segment you want to create. If an account hierarchy has been defined and you want to create rules to filter out data based on child and parent relationship, select Use hierarchy? (preview), select the hierarchy, and then Apply.

    Segment select account hierarchy pane.

  3. Select Edit details next to Untitled segment. Provide a name for your segment and update the suggested Output entity name for the segment. Optionally, add a description and tags to the segment.

    Edit details dialog box.

  4. In the Rule1 section, choose an attribute of an entity you want to filter customers by. There are two ways to choose attributes:

    • Review the list of available entities 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.
  5. Choose the operators to specify the matching values of the condition. Attribute can have one of four data types as value: numerical, string, date, or Boolean. Depending on the data type of the attribute, different operators are available to specify the condition.

  6. Select Add condition to add more conditions to a rule. To create a rule under the current rule, select Add sub-rule.

  7. If a rule uses other entities than the Customer entity (or ContactProfile entity for B-to-B), select Set relationship path to map the selected entity to the unified customer entity. 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.

    Potential relationship path when creating a rule based on an entity mapped to the unified customer entity.

  8. 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 entities.
    • 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 entity.

    Rule with two AND conditions.

    When using the OR operator, all conditions must be based on entities included in the relationship path.

  9. 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 an entity in a rule because of the specified relationship path, create a new rule to choose attributes from it.

    Add a new rule to a segment and choose the set operator.

    1. Select Add rule.

    2. 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.
  10. By default, the output entity will automatically contain all attributes of customer profiles that match the defined filters. In B-to-B when using the ContactProfile entity, the Account ID is automatically included. If a segment is based on other entities than the Customer entity or to include more attributes from the ContactProfile, select Project attributes to add more attributes from these entities to the output entity.

    For example: A segment is based on an entity that contains purchase data, which is related to the Customer entity. 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 entity. This information might be useful to analyze seasonal correlations to the total spending.

    Example of projected attributes selected in the side pane to be added to the output entity.

    A sample output for a segment based on business accounts with projected attributes of contacts could look like this:

    ID Account name Revenue Contact name Contact role
    10021 Contoso 100K [Abbie Moss, Ruth Soto] [CEO, Procurement manager]

    Note

    • Project attributes only work for entities that have a one-to-many relationship with the Customer or ContactProfile entity. For example, one customer can have multiple subscriptions.
    • If the attribute you want to project is more than one hop away from the Customer or ContactProfile entity, 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 or ContactProfile entity, 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.
  11. Select Run to create the segment. Select Save if you want to keep the current configuration and run the segment later. The Segments page displays.

Segment builder tips

When creating a segment using the segment builder, keep in mind the following tips:

  • The segment builder won't suggest valid values from entities when setting the operators for the conditions. You can go to Data > Entities and download the entity data to see which values are available.
  • Conditions based on dates let you switch between fixed dates and a floating date range.
  • If you have multiple rules for your segment, the rule you're editing has a vertical blue line next to it.
  • You can move rules and conditions to other places in the segment definition. Select the vertical ellipsis (⋮) next to a rule or condition and choose how and where to move it.
  • The Undo and Redo controls in the command bar let you roll back changes.
  • After creating a segment, some segments allow you to track the usage of the segment.

Next steps

Export a segment and explore the Customer Card integration to use segments in other applications.