Offer deduplication across offer attributes
Using the Interact application programming interface (API), two API calls deliver offers: getOffers and getOffersForMultipleInteractionPoints. getOffersForMultipleInteractionPoints can prevent the return of duplicate offers at the OfferID level, but cannot deduplicate offers across offer category. So, for example, for Interact to return only one offer from each offer category, a workaround was previously required. With the introduction of two parameters to the startSession API call, offer deduplication across offer attributes, such as category, is now possible.
This list summarizes the parameters that were added to the startSession API call. For more information about these parameters or any aspect of the Interact API, see the IBM® Interact Administrator's Guide, or the Javadoc files included with your Interact installation in <Interact_Home>/docs/apiJavaDoc.
*
UACIOfferDedupeAttribute. To create a startSession API call with offer deduplication, so that the subsequent getOffer calls return only one offer from each category, you must include the UACIOfferDedupeAttribute parameter as part of the API call. You can specify a parameter in the name,value,type format, as shown here:
UACIOfferDedupeAttribute,<attributeName>,string
In this example, you would replace <attributeName> with the name of the offer attribute you want to use as the criterion for deduplication, such as Category.
*
Interact examines the offers that have the same attribute value you specify (such as Category) and deduplicate to remove all but the offer that has the highest score. If the offers that have the duplicate attribute also have identical scores, Interact returns a random selection from among the matching offers.
*
UACINoAttributeDedupeIfFewerOf. When you include the UACIOfferDedupeAttribute in the startSession call, you can also set this UACINoAttributeDedupeIfFewerOf parameter to specify the behavior in cases where the offer list after deduplication no longer contains enough offers to satisfy the original request.
For example, if you set UACIOfferDedupeAttribute to use the offer category to deduplicate offers, and your subsequent getOffers call requests that eight offers be returned, deduplication might result in fewer than eight eligible offers. In that case, setting UACINoAttributeDedupeIfFewerOf parameter to true would result in adding some of the duplicated to the eligible list to satisfy the requested number of offers. In this example, if you set the parameter to false, the number of offers that are returned would be fewer than the requested number.
UACINoAttributeDedupeIfFewerOf is set to true by default.
For example, suppose you specified as a startSession parameter that the deduplication criterion is offer Category, as shown here:
UACIOfferDedupeAttribute, Category, string;UACINoAttributeDedupeIfFewerOffer, 0, string
These parameters together cause Interact to deduplicate offers based on the offer attribute "Category," and to return only the deduplicated offers even if the resulting number of offers is fewer than requested (UACINoAttributeDedupeIfFewerOffer is false).
When you issue a getOffers API call, the original set of eligible offers might include these offers:
*
*
*
In this case, there were two duplicate offers that match the first category, three duplicate offers that match the second category, and two duplicate offers that match the third category. The offers that are returned would be the highest scoring offers from each category, which are Offer A1, Offer B1, and Offer C1.
If the getOffers API call requested six offers, this example set UACINoAttributeDedupeIfFewerOffer to false, so only three offers would be returned.
If the getOffers API call requested six offers, and this example omitted the UACINoAttributeDedupeIfFewerOffer parameter, or specifically set it to true, some of the duplicate offers would be included in the result to satisfy the requested number.