Response

The TargetDeliveryResponse returned by TargetClient.getOffers() has the following structure:

NameTypeDescription
requestTargetDeliveryRequest​Target request
responseDeliveryResponseTarget response
cookiesListList of session metadata for this user. Need to be passed in next target request for this user.
visitorStateMapVisitor state to be set on client side to be used by Visitor API
responseStatusResponseStatusAn object representing the status of the response

The ResponseStatus in the response contains the following fields:

NameTypeDescription
statusintHTTP status returned from Target
messageStringStatus message in case HTTP status is not 200
remoteMboxesList of StringsUsed for on-device decisioning. Contains a list of mboxes that have remote activities that cannot be decided entirely on-device.
remoteViewsList of StringsUsed for on-device decisioning. Contains a list of views that have remote activities that cannot be decided entirely on-device.

The TargetCookie object used for saving data for user session has the following structure:

NameTypeDescription
nameStringCookie name
valueStringCookie value, the value will be converted to string
maxAgeNumberThe maxAge option is a convenience for setting expires relative to the current time in seconds

You don’t have to worry about expiring the cookies. Target handles maxAge inside the SDK.

Example

Request

ClientConfig clientConfig = ClientConfig.builder()
        .client("acmeclient")
        .organizationId("1234567890@AdobeOrg")
        .build();

TargetClient targetJavaClient = TargetClient.create(clientConfig);

List<MboxRequest> mboxRequests = new ArrayList<>();
mboxRequests.add((MboxRequest) new MboxRequest().name("a1-serverside-ab").index(1));

TargetDeliveryRequest targetDeliveryRequest = TargetDeliveryRequest.builder()
        .context(new Context().channel(ChannelType.WEB))
        .execute(new ExecuteRequest().setMboxes(mboxRequests))
        .build();

Response

TargetDeliveryResponse targetResponse = targetJavaClient.getOffers(targetDeliveryRequest);
Previous pageInitialize the Java SDK
Next pageGet Attributes (Java)

Target


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.

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more