Exporting Deltas From Audience Segments to Enrich Our Clients’ Marketing Campaigns

Jaemi Bremner
Feb 13 · 7 min read

This post describes how we approached the challenge of obtaining deltas from audience segments so that Adobe Experience Platform clients can export the users they need when they need them.

This blog details a single implementation or customization on Adobe Experience Platform. Not all aspects are guaranteed as general availability. If you need professional guidance on how to proceed, then please reach out to Adobe Consulting Services on this topic.

Adobe Experience Platform allows clients to easily segment user profiles into specific, attribute-based audiences using their Real-Time Customer Profile data. Through segmentation, clients can distinguish marketable customers and effectively tailor their marketing strategies, such as email campaigns.

Recently, an Adobe Experience Platform client requested the ability to create a single segment that could be reused for both the initial population as well as changes to that population over time. For example, to pull users who qualified for the segment on day one, the users who qualified yesterday, or the users who no longer qualify and were removed from the segment today.

This post details our approach to delta segmentation to provide this and all future clients with a more granular view into their segments to refine their marketable audiences and fully leverage Adobe Experience Platform services.

The challenge

On day one, the delta is every user who was added to the segment. On day two, the delta becomes every one who was added and removed from the same segment. Consequently, we needed to achieve the following:

  • Refine the data from Real-time Customer Profile to determine which users were added or removed from the segment.
  • Identify the exact time and date when a user-entered or exited a segment for effective filtering.
  • Enable Adobe Experience Platform clients to export the deltas from any timeframe, and at their own convenience.

These new filtering capabilities would not only give Adobe Experience Platform clients better control over their audiences but also enable them to reuse a single segment. For example, if they were to run a segment again, they could simply exclude the results from yesterday’s run, removing the need to create an entirely new segment with the same business rules.

Our approach to delta segmentation

  • Segment qualification: This is a segment job that scans the users streaming into Real-Time Customer Profile and adds qualified users to the segment, or removes those that no longer qualify.
  • Segment export: The segment export job outputs the data collected in the segment to the corresponding channels. See Figure 1 below.
Figure 1: Diagram of the steps required when checking a segment.

Next, we enlisted two parameters that could serve as filters during the segment’s export job. These parameters are: segment status and segmentQualificationTime.

Segment status: As the name implies, this is the status of segment participation in the current request. The segment status must be equal to one of the following three rules:

  • Realized: The entity has just qualified to be part of the segment.
  • Existing: The entity continues to be in the segment.
  • Exited: The entity is leaving the segment.

SegmentQualificationTime: This is the timestamp given to the assertion, or segmentMembership, that enables us to know exactly when a user-entered or exited the segment.

As a side note, the status and qualification time are stored in Real-Time Customer Profile itself, allowing each one to manage its own state and time. This simplifies profile lookups since no external application is needed to retrieve this information.

Exploring how the parameters affect a segment

Scenario one: adding a profile to the segment

Then, we performed a profile lookup (see Figure 2) and were able to pinpoint the exact time that profile qualified for the segment (October 3rd at 15:05:33), and the status (“realized”).

Figure 2: Results of the profile lookup after adding a new profile to the segment.

The snapshot above also shows how segmentMembership captures the parameters we need to find the profiles that fall into a segment.

Scenario two: removing a profile from the segment

Figure 3: Comparison of profile lookups after removing a profile from the segment.

This status change means clients can filter their segment by status to find the users who exited the segment within a specific timeframe.

Scenario three: running the same segment job again

Figure 4: Comparison of profile lookups after running a segment job again.

Knowing that the segment status changes while the timestamp remains constant if no profiles are changed enables clients to retrieve deltas from the “last checked” timestamp.

Filtering segments into deltas

To get profiles who have just entered a segment:

  • segmentQualificationTime AND status <> exiting

To get profiles who have exited a segment:

  • segmentQualificationTime AND status = exiting

For a better understanding of how this works, consider the following examples for entry deltas and exit deltas.

Entry deltas

As shown in Figure 5, we haven’t specified the status in the filter, leaving the export job to run with status “realized” or “existing”.

Figure 5: Sample payload of a segment export job for entry deltas.

The payload shows that we only need to filter segmentQualificationTime to obtain entry deltas. This parameter will then scan for timestamps and collect the profiles that fit within the specified timeframe.

Exit deltas

Figure 6: Sample payload of a segment export job for exit deltas.

Similarly to entry deltas, the two parameters scan for the defined conditions and export only the profiles that qualify.

Challenges of delta segmentation

We also experimented with capturing user profiles with other methods, such as based on specific event criteria. This method, however, required us to modify our existing data model, which we were reluctant to do solely to provide deltas to our clients.

Instead, we requested the addition of segmentQualificationTime and status to Real-Time Customer Profile. This approach ultimately enabled a much more streamlined way of filtering segments and profiles from Adobe Experience Platform and is reusable across any type of segment or data model.

Empowering clients with delta segmentation

Now with the knowledge gained during the development of this solution, we are better prepared to progress this particular feature and continue providing new and improved segmentation capabilities for our clients.

For a detailed guide on parameters and filters for segment jobs, check our tutorial on segmentation.

Follow Adobe Developers on Twitter for the latest news and developer products. For exclusive posts on Adobe Experience Platform, follow Jaemi Bremner.

Adobe Tech Blog

News, updates, and thoughts related to Adobe, developers, and technology.

Jaemi Bremner

Written by

Experience Technologist. Developer Advocate for Adobe Experience Platform. Passionate about technology, architecture, fashion, and design. Twitter: @jaeness

Adobe Tech Blog

News, updates, and thoughts related to Adobe, developers, and technology.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade