You can deliver a promotion to site visitors in a variety of ways, such as via a scenario or coupon. The preceding sections describe how to create promotions and use these delivery methods. This section provides information on another way to deliver a promotion to site visitors – via a URL on a JSP. You embed the ID of the promotion you want to offer in the URL. When a site visitor clicks that URL, the promotion is added to the visitor’s activePromotions Profile property.

To deliver a promotion via a URL, do the following:

When a request is passed into PromotionServlet, if the servlet is disabled, it simply passes the request to the next servlet in the pipeline. If it is enabled, it looks for a PROMO parameter in the URL parameters of the request and retrieves the associated promotion ID. Next, the servlet looks for a promotion in the Promotions repository whose ID is the given ID and whose item descriptor is included in PromotionServlet.promotionItemDescriptorNames. If the promotion exists, then PromotionServlet checks that either the profile is persistent or the promotion’s Give To Anonymous Customers (giveToAnonymousProfiles) property is set to true. If either condition is true, the promotion is added to the user’s activePromotions Profile property.

 
loading table of contents...