getDefaultString

The getDefaultString method returns the default string for the interaction point as defined in Unica Campaign.

getDefaultString()

If the RecommendedOffers object is empty, you should configure your touchpoint to present this string to ensure some content is presented. Unica Interact populates the DefaultString object only if the RecommendedOffers object is empty.

Return value

The getDefaultString method returns a string.

Example

The following example gets the default string if the offerList object does not contain any offers.

OfferList offerList=response.getOfferList();
if(offerList.getRecommendedOffers() != null)
{
    for(Offer offer : offerList.getRecommendedOffers())
    {
		System.out.println("Offer Name:"+offer.getOfferName());
    }
}
else // count on the default Offer String
    System.out.println("Default offer:"+offerList.getDefaultString());