Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

Selecting the first of several customer references

Avatar

Level 3

Within my data a customer can have numerous activity IDs assigned to them.  They're assigned a new ID for each activity that they complete on our website.

Each activity ID has an activity date/time attached to it.  How can I add an activity ID as Additional Data within an enrichment that is the first activity ID of any given day?

Furthermore, a customer is also given an IdentityID

So the data would look like this.  How would I add only ActivityID 011d to the data within the workflow?

IdentityID
ActivityID
Activity Date Time
123011d03/13/19,12:00AM
123012s03/13/19,12:01AM
123013o03/13/19,12:02AM
123014pi03/13/19,12:03AM
123015uj03/13/19,12:04AM
123016mq03/13/19,12:05AM
123017hjk03/13/19,12:06AM
123018upo03/13/19,12:07AM
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Select min(@identityId), min(@activityId), min(@activityDate) and then group by DateOnly(@activityDate).

NB this assumes @activityID is monotonically increasing.

Thanks,

-Jon

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

Select min(@identityId), min(@activityId), min(@activityDate) and then group by DateOnly(@activityDate).

NB this assumes @activityID is monotonically increasing.

Thanks,

-Jon