Show Menu
TOPICS×

Build segments

In this lesson, we will build some segments based on the profile data we ingested in the previous lessons.
Once you have Real-time Customer Profiles, you can create segments of individuals who share similar traits and might respond similarly to marketing strategies. The building blocks of these segments are the XDM fields which you created earlier.
Data Architects will need to create segments outside of this tutorial and support their colleagues with this task.
Before you begin the exercises, watch this short video to learn more about creating segments:

Permissions required

In the Configure Permissions lesson, you set up all the access controls you need to complete this lesson, specifically:
  • Permission items Profiles > View Profiles and Manage Profiles and Export Audience Segment
  • Permission item Sandboxes > Luma Tutorial
  • User-role access to the Luma Tutorial Platform product profile
  • Developer-role access to the Luma Tutorial Platform product profile (for API)

Build a basic segment

Let's create a simple segment for loyalty program customers with a Gold or Platinum Status
  1. In the Platform UI, click Segments in the left navigation
  2. Click the Create segment button
  3. On the left of the schema builder are three tabs for Attributes (Record data), Events (Time-series data), and Audiences
  4. If you click the gear icon, you will note that the segment builder defaults to only showing you fields with data and that you can also choose different merge policies for your segments
  5. In Attributes tab, navigate to the XDM Individual Profile > YOUR_TENANT_ID > Loyalty folder (you could also search for "loyalty")
  6. Drag and drop , Level from the attribute fields menu to the segment builder canvas
  7. Select Level equals Gold or Platinum
  8. As the Name , enter Luma customers with level Gold or Above
  9. Click the Save
  10. In a few minutes, you should see an estimate of existing customers qualifying for this segment

Build a dynamic segment

In this exercise, we will create a segment for customers who have bought the same product twice within 30 days. Dynamic segments allow you to scale your segmentation by using fields as variables.
  1. Click Segments in the left navigation
  2. Click the Create segment button
  3. Click on the Events tab
  4. Filter the list to purchases
  5. Drag the Purchases event type onto the canvas two separate times
  6. Click the clock icon in between the two Purchases events and choose "within 30 days"
  7. Confirm that your segment definition at this point reads "Include audience who have at least 1 Purchases event then within 30 days have at least 1 Purchases event"
  8. Now change the event filter to sku
  9. Drag the SKU field to the second purchase event
  10. Now clear the event filter
  11. You should see in the Browse Variables section, there are folders for the two purchase events. Click to explore Purchases 1
  12. Drill down into the Product list items folder, select the SKU field and drag it to the right of the equals operand. When you are hovering over the area, drop it in the "Add to compare operands" section
  13. Name your segment Bought same product within 30 days
  14. Confirm your audience definition is "Include audience who have at least 1 Purchases event then within 30 days have at least 1 Purchases event where ((SKU equals Purchases1 SKU))"
  15. Click the Save button

Build a multi-entity segment

Remember how we created the relationship between the Luma Offline Purchase Events Schema and the Luma Product Catalog Schema in earlier lessons? We did that so we could leverage the relationship in our schema using multi-entity segmentation.
With the advanced multi-entity segmentation feature, you can create segments using multiple XDM classes thereby extending your schemas. As a result, the segment builder can access additional fields as if they were native to the profile data store
You will create the next segment by leveraging the relationship you built between your Luma Product Catalog Schema and your Luma Offline Purchase Event Schema .
  1. Click Segments in the left navigation
  2. Click the Create segment button
  3. Click on the Events tab
  4. Filter the list to purchases
  5. Drag the Purchases event type onto the canvas
  6. Click the clock dropdown above the event and choose in last 30 days
  7. Filter the Events list to category and then drag the Product Category field onto Purchases
  8. Change the operator to starts with and enter men into the text box
  9. As the Name , enter Purchased a Men's product in the last 30 days
  10. Confirm the audience definition (Include audience who have at least 1 Purchases event where ((Product Category starts with men)) ) and occurs in last 30 day(s)
  11. Click the Save button

Batch and Streaming segmentation

Click on Segments in the left navigation and let's take a moment to review our three segments:
  • Note that two of our segments are batch segments and one is a streaming segment.
  • Platform will default to streaming segmentation, whenever possible, qualifying the customer for a segment as soon as they meet the criteria. When segment definitions are too complex for streaming, they will automatically convert to batch. In this case, the two segments defaulted to batch because the look-back window of the purchase events was greater than seven days. For a complete and current list of streaming limitations, see the documentation .
  • The batch jobs run on a daily schedule, which can be toggled off.

Additional Resources

There is more to segmentation, especially with activating segments. Those topics will be addressed in another tutorial.
You've made it through all of the exercises! Please proceed to the conclusion .