Refer to segmentations in expressions

Published November 18, 2021
Modules
Difficulty

In an expression, you can include segmentations that consist of several subgroups and conditions to receive the subsegmentation a customer belongs to. You can later use this expression in the dynamic content to display the specific content depending on the expression result.

Prerequisites


Process


In this use case, you will go through the following steps:

  1. Create an aggregate that calculates the number of all transactions each customer has made.
  2. Create a segmentation that will divide the customers into three groups.
  3. Create an expression that includes in its formula only the segmentation you created in the previous part of the process.

Create an aggregate


As the first part of the process, create an aggregate that calculates the number of all transactions each customer has made.

  1. Go to Analytics icon Analytics > Aggregates > New aggregate.

  2. Enter the title of the aggregate.

  3. Set the Aggregate option to Count.

  4. From the Choose event dropdown list, select transaction.charge.

  5. In the date range, select Lifetime.

  6. Save the aggregate.

    Configuration of the aggregate
    Configuration of the aggregate

Create a segmentation


In this part of the process, create a segmentation that will divide the customers into three groups:

  1. Customers who have made more than 5 transactions.
  2. Customers who have made between 3 and 5 transactions.
  3. Customers who have made less than 3 transactions.

The subsegments (groups) are built on the basis of the aggregate you created in the first part of the procedure.

Create the first subsegmentation

Create a subsegmentation that includes only customers who have made more than 5 transactions.

  1. Go to Analytics icon Analytics > Segmentations > New segmentation.
  2. Enter the name of the segmentation.
  3. Optionally, switch the Show in profile card toggle on.
  4. Enter the name of the subsegmentation.
  5. From the Choose filter dropdown list, select the aggregate you created.
  6. As the logical operator, select More than.
  7. Next to the logical operator, in the text field enter 5.
    Configuration of the aggregate
    Configuration of the aggregate

Create the second subsegmentation

Create a subsegmentation that includes only customers who have made between 3 and 5 transactions.

  1. Under the main title of the segmentation, click the Add variant icon icon.
  2. Enter the name of the subsegmentation.
  3. From the Choose filter dropdown list, select the aggregate you created.
  4. As the logical operator, select Less or equal to.
  5. Next to the logical operator, in the text field, enter 5.
  6. Click Choose filter.
  7. From the dropdown list, select the aggregate you created.
  8. As the logical operator, select More or equal to.
  9. Next to the logical operator, in the text field, enter 3.
  10. Join the two conditions by selecting AND.
    Configuration of the aggregate
    Configuration of the aggregate

Create the third subsegmentation

Create a subsegmentation that includes only customers who have made less than 3 transactions.

  1. Under the main title of the segmentation, click the Add variant icon icon.

  2. Enter the name of the subsegmentation.

  3. From the Choose filter dropdown list, select the aggregate you created.

  4. As the logical operator, select Less than.

  5. Next to the logical operator, in the text field enter 3.

    Configuration of the aggregate
    Configuration of the aggregate
  6. Save the segmentation.

Create an expression


In this part of the process, create an expression that includes in its formula only the segmentation you created in the previous part of the process.

  1. Go to Analytics icon Analytics > Expressions > New expression.

  2. Enter the name of the expression.

  3. Leave the Expression option at default (Attribute).

  4. Optionally, switch the Show in profile card toggle on.

  5. Click the Select button.

  6. From the dropdown list, select Customer.

  7. Click the button that appeared on the dashboard.

  8. On the Choose attribute dropdown list, use the search box to find the segmentation you created.

  9. Save the expression.

    Configuration of the expression
    Configuration of the expression

What’s next


You can preview the results in several ways:

  • Expression preview
    The first way to check the results of the expression is the preview of the expression. In the search box, type the ID of the customer (for example, an email address), and you will get the results of the expression for the individual customer.

    Expression preview
    Expression preview
  • Customer’s profile
    If you enabled Show in profile card option for the segmentation and expression, you can see them listed on a customer’s profile.

    Preview of customer's profile
    Preview of customer's profile
  1. If the customer belongs to the segmentation, its name is listed on the segmentation list.
  2. The expression shows the subsegmentation to which the customer belongs.
  • Analytical dashboard
    You can create an analytical dashboard and add the expression to the dashboard. In the Dynamic key field, enter the ID of the customer for which you want to see the result.
    Expression used in the dashboard
    Expression used in the dashboard

Check the use case set up on the Synerise Demo workspace


Check the aggregate that returns the number of transactions, segmentation that groups customers according to the number of transactions and the expression that returns the segment to which a customer belongs in our Synerise Demo workspace.

If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.

Read more


😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker