Response
{
"status": 200,
"requestId": "e8ac2dbf5f7d4a9f9280f6071f24a01e",
"id": {
"tntId": "08210e2d751a44779b8313e2d2692b96.21_27"
},
"client": "adobetargetmobile",
"edgeHost": "mboxedge21.tt.omtrdc.net",
"prefetch": {
"mboxes": [
{
"index": 0,
"name": "home",
"options": [
{
"type": "html",
"content": "HOME OFFER",
"eventToken": "t0FRvoWosOqHmYL5G18QCZNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q==",
"responseTokens": {
"profile.memberlevel": "0",
"geo.city": "dublin",
"activity.id": "302740",
"experience.name": "Experience B",
"geo.country": "ireland"
}
}
],
"state": "J+W1Fq18hxliDDJonTPfV0S+mzxapAO3d14M43EsM9f12A6QaqL+E3XKkRFlmq9U"
},
{
"index": 1,
"name": "product1",
"options": [
{
"type": "html",
"content": "TEST OFFER 1",
"eventToken": "t0FRvoWosOqHmYL5G18QCZNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q==",
"responseTokens": {
"profile.memberlevel": "0",
"geo.city": "dublin",
"activity.id": "302740",
"experience.name": "Experience B",
"geo.country": "ireland"
}
}
],
"state": "J+W1Fq18hxliDDJonTPfV0S+mzxapAO3d14M43EsM9f12A6QaqL+E3XKkRFlmq9U"
}
]
}
}
Note the mbox name
and state
fields, as well as the eventToken
field, in each of the Target content options. These should be provided in the sendNotifications()
request, as soon as each content option is displayed. Let’s suppose the product1
mbox has been displayed on a non-browser device. The notifications request will look like this:
Request
TargetDeliveryRequest mboxNotificationRequest = TargetDeliveryRequest.builder().notifications(new ArrayList() {{
add(new Notification()
.id("1")
.timestamp(System.currentTimeMillis())
.type(MetricType.DISPLAY)
.mbox(new NotificationMbox()
.name("product1")
.state("J+W1Fq18hxliDDJonTPfV0S+mzxapAO3d14M43EsM9f12A6QaqL+E3XKkRFlmq9U")
)
.tokens(Arrays.asList(new String[]{"t0FRvoWosOqHmYL5G18QCZNWHtnQtQrJfmRrQugEa2qCnQ9Y9OaLL2gsdrWQTvE54PwSz67rmXWmSnkXpSSS2Q=="}))
);
}}).build();
Notice that we’ve included both the mbox state and the event token corresponding to the Target offer delivered in the prefetch response. Having built the notifications request, we can send it to Target via sendNotifications()
API method:
Response
ResponseStatus notificationResponse = targetJavaClient.sendNotifications(mboxNotificationRequest);
Personalization & Experiementation Excellence with Recommendations and AI
Adobe Customer Success Webinars
Tuesday, Mar 4, 4:00 PM UTC
Adobe Target innovations, including GenAI, and best practices on AI-powered personalization and experimentation at scale.
RegisterAdobe Target at Summit
Register for these developer sessions:
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- Had Me at First Click: Activate Your Audience with AI Content Discovery
- How Air India’s Digital Transformation Is Driving Business Turnaround
- B2B Transformation Series: "No Limits" Digital Marketing at GE HealthCare
- Personalization at Scale, with Accuracy: Flexible Identity Graph Management (hands-on lab)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more