AEP - How to run an on-demand evaluation for a specific segment

Description

Say you have an Edge segment and you’d like to do random evaluation checks to see how the segment is evolving during a specific timeframe, without having to wait for the daily batch evaluation.

NB: Edge segmentation is the ability to evaluate segments in Adobe Experience Platform instantaneously on the edge

This is related to the following documentation: https://experienceleague.adobe.com/docs/experience-platform/segmentation/tutorials/evaluate-a-segment.html#on-demand-evaluation

On-demand evaluation allows you to create a segment job in order to generate an audience segment whenever you require it. Unlike scheduled evaluation, this will happen only when requested and is not recurring.



 

Resolution

This can be achieved via what we call an on-demand evaluation where you can create a new segment job by making a POST request to the /segment/jobs endpoint in the Real-time Customer Profile API.

Here is a way to do this:

  • First, you’ll need to create a segment job specifically for this segment, using:

POST https://platform.adobe.io/data/core/ups/segment/jobs with the following body:

    {
        "segmentId": "segmentID_value"
    }

I got Segment Job ID "id": "segmentJobID_value"

  • Then I checked the status of the segment job using the following:

GET https://platform.adobe.io/data/core/ups/segment/jobs/segmentJobID_value

This is going through different processing stages until it succeeds

"status": "QUEUED",
"status": "PROCESSING",
"status": "SUCCEEDED",
  • Results:
"segmentedProfileCounter": {
            "segmentID_value": 21
        }

},
        "segmentedProfileByStatusCounter": {
            "segmentID_value": }
                "existing": 18,
                "realized": 3,

NB: This segment was showing a population of 19 profiles, it went up to 21 following our on-demand segment job and this was outside of the daily batch evaluation.

On this page