Class Name




The CouponDroplet servlet bean takes either a promotion object or promotion ID and generates a coupon for it in the Claimable repository. You could include the CouponDroplet in a targeted e-mail JSP, thereby creating a coupon code that is ready to send to a customer.

Input Parameters

promoId (Either this or promotions must be used)
The ID of the promotion used to create the coupon.

No longer used.

promotions (Either this or promoId must be used)
The promotions object or objects used to create the coupon.

displayName (optional)
The display name of the coupon. If none is provided, the name of the first associated promotion is used for the coupon’s display name. The default is null.

usePromotionSiteConstraint (optional)
If true, this flag means that the coupon that is created uses the same site constraints as the promotion with which it is associated. If more than one promotion is used to create the coupon, the promotions do not all have to have the same site constraints. The default is false.

Output Parameters

The coupon object. The claim code for this coupon can be obtained by using Note that claim codes for coupons are case-sensitive. For example, COUP100 and coup100 are two different claim codes.

Open Parameters

The open parameter rendered on successful creation of a coupon object.

The open parameter rendered if an error occurs during creation of a coupon.


The following example shows the JSP code for the CouponDroplet:

<dsp:importbean bean="/atg/commerce/promotion/CouponDroplet"/>
<h2>here is a coupon that was created: </h2>
<dsp:droplet name="CouponDroplet">
<dsp:param value="promo60001" name="promoId"/>
<dsp:oparam name="output">
   <dsp:valueof param="">no value</dsp:valueof>
<dsp:oparam name="error">

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices