getOffersForMultipleInteractionPoints(String sessionID, String requestStr)
![]() |
sessionID - a string identifying the current session.
|
![]() |
requestStr - a string providing an array of GetOfferRequest objects.
|
![]() |
ipName - The interaction point (IP) name for which the object is requesting offers
|
![]() |
numberRequested - The number of unique offers it needs for the specified IP
|
![]() |
offerAttributes - Requirements on the attributes of the delivered offers using an instance of OfferAttributeRequirements
|
![]() |
duplicationPolicy - Duplication policy ID for the offers that will be delivered
|
![]() |
NO_DUPLICATION (ID value = 1). None of the offers that have been included in the preceding GetOfferRequest instances will be included in this GetOfferRequest instance (that is, Interact will apply de-duplication).
|
![]() |
ALLOW_DUPLICATION (ID value = 2). Any of the offers satisfying the requirements specified in this GetOfferRequest instance will be included. The offers that have been included in the preceding GetOfferRequest instances will not be reconciled.
|
InteractAPI api = InteractAPI.getInstance("url");
String sessionId = "123";
String requestForIP1 = "{IP1,5,1,(5,attr1=1|numeric;attr2=value2|string,
(3,attr3=value3|string)(3,attr4=4|numeric))}";
String requestForIP2 = "{IP2,3,2,(3,attr5=value5|string)}";
String requestForIP3 = "{IP3,2,1}";
String requestStr = requestForIP1 + requestForIP2 + requestForIP3;
Response response = api.getOffersForMultipleInteractionPoints(sessionId,
requestStr);
if (response.getStatusCode() == Response.STATUS_SUCCESS) {
// Check to see if there are any offers
OfferList[] allOfferLists = response.getAllOfferLists();
if (allOfferLists != null) {
for (OfferList ol : allOfferLists) {
System.out.println("The following offers are delivered for interaction
point " + ol.getInteractionPointName() + ":");
for (Offer o : ol.getRecommendedOffers()) {
System.out.println(o.getOfferName());
}
}
}
}
else {
System.out.println("getOffersForMultipleInteractionPoints() method calls
returns an error with code: " + response.getStatusCode());
}
<requests_for_IP> = {ip_name,number_requested_for_this_ip,
dupe_policy[,child_requirements]]}
attribute_requirements = (number_requested_for_these_attribute_requirements
[,attribute_requirement[;individual_attribute_requirement])
[,(attribute_requirements))
individual_attribute_requirement = attribute_name=attribute_value | attribute_type
Copyright IBM Corporation 2014. All Rights Reserved.
|