Use contact event content

Overview

Personalizing messaging to your customers is one effective way to market directly to your consumer, via a custom message. Use contact event content to get a good view of your consumer and then apply your findings to a template. This document will help you find the tools within Simon to design these messages.

In this guide, we're going to discuss datasets covering items that have a many to one relationship to a contact, like orders or purchases. For example, you may want to store both data about the items purchased and the amount spent on a purchase. You can use these fields for Event-Based Segmentation and thread them into content too.

This guide also assumes you have some understanding of Custom Context. If you need a refresher, see Custom Context Basics and Custom context expressions to learn more. Once you’re familiar with the basics of working with Custom Context, you're ready to tackle contact event data below.

Before you get started

To use contact event content for personalization, the segment you reference in a flow must have been created with at least one event-based condition. For example, if you'd like to use purchase data to personalize an email to contacts, you must be targeting contacts using a segment created with that purchase data. This applies to content QA (quality assurance) in the content editor too; the contacts you are looking to sample must be found in the event-based segment.

Event properties won't appear at all if you're not looking at an event-based segment or if your event-based segment has zero contacts.

If you're loading contact event content for use in personalization for the first time, when creating a template on a segment that references event-based conditions you will see something like the below screenshot. Click the arrow next to Missing Event Properties.

2250

Next, click on the dataset name highlighted in pink to load the properties for use in personalization. It will then take between 1 and 6 minutes to load the full event properties, depending on how large the dataset being referenced is.

2220

Review personalized data to customize your content

To give you a detailed picture of what your customers are interested in, refer to:

Contact data

Contact data is part of using contact event content to customize your message; you need to know more about your customer themself. Use the Unified Contact View to get a detailed customer view.

Event properties

Event properties give you insight into how your customer is interacting with your product. To view and understand these values so you can use them to design your content, review Event properties.

Segments

Also, consider the segment your contact is flowing into.

Jinja syntax

If the dynamic content you're working with uses Jinja (often a template), event data uses the following format:

892

Jinja syntax for accessing the value of an event property from within the Content builder

  1. table_name: name of the event table used in the segment related to the event
  2. index: value of the event index that qualified the user to fall into the segment
  3. column_name: name of the event property as it appears in the event table

Event Indices

In an event-based segment, any number of events may qualify a user to fall into a segment. In order to access these events, change the index of the event property within your template syntax:

  • {{ contact.event_tables.table_name[0] }} references the most recent event that occurred
  • {{ contact.event_tables.table_name[1] }} references the next event, and so on.

If you want to reference the total number of events that qualified a contact for a segment in a template (like how many times a customer made a purchase) use the following syntax:
{{ contact.event_tables.table_name | length }}.

Advanced Use Cases

Condition Groups

If a segment selected is a union of multiple event conditions, you may find the need to identify the exact type of event that caused a contact to enter a segment. For this, you can access condition groups.

If you want to reference a specific condition group used in segment building, you can use the following syntax: {{ contact.event_tables.table_name[0].conditions[0] }}