A scenario is a choreographed series of interactions with your Web site visitors. In a scenario, you anticipate and track the actions of the people who visit your Web site, and respond appropriately by, for example, tailoring the content of the Web site, offering price promotions, or sending targeted e-mail messages. You must view Commerce Reference Store scenarios using the ATG Control Center. Scenarios are not viewable in the ATG Business Control Center.
To view Commerce Reference Store scenarios:
Start up Commerce Reference Store and the ATG Control Center. For details on starting Commerce Reference Store, see the ATG Commerce Reference Store Installation and Configuration Guide. For details on starting the ATG Control Center, see ATG Personalization Guide for Business Users.
From the navigation menu, select Scenarios.
Make sure By Folders is selected from the filtering menu.
Expand
store. Commerce Reference Store scenarios are stored under the/storedirectory.Click a
/storesubdirectory, then select a scenario to view it in the Scenarios editor.Note: Scenarios are not accessible through the ATG Business Control Center.
This section describes the scenarios implemented in Commerce Reference Store. These include scenarios that provide content, scenarios that grant promotions, and one scenario that confirms orders.
Note: Commerce Reference Store does not use the HomeValues scenario located in the /store/homepage directory.
Scenarios That Provide Content
The scenarios described in this section provide content to JSP pages and use the slot/scenario/targeter mechanism described in Using Targeters, Slots, and Scenarios to Personalize Content.

The
BestSellersscenario is invoked when theGlobalBestSellersslot requests content. This slot appears in the/browse/gadgets/productHotSuggestion.jspgadget. To supply the slot with content, theBestSellersscenario calls theGlobalBestSellerstargeter. TheGlobalBestSellerstargeter returns a collection of products, based on user segment. ATargetingRandomservlet bean in theproductHotSuggestion.jspgadget randomly chooses two products from the collection to show on the page.

The
categoryPromotionsscenario has two segments. Both segments perform similar functions in that they provide a slot on a JSP page with content. The first segment is an example of content that is dynamically generated through the use of a targeter. The second segment provides static content to the slot.
The first segment is invoked when the
CategoryPromotionContent1slot requests content. This slot appears in several places in Commerce Reference Store, such as/atgsearch/atgSearchResultsContainer.jspand/browse/categoryDisplay.jsp. To supply the slot with content, thecategoryPromotionsscenario calls theCategoryPromotionstargeter. This targeter dynamically returns one of the followingpromotionalContentitems, depending on the customer:
The second segment is invoked when the
CategoryPromotionContent2slot requests content. In addition to all of the pages where theCategoryPromotionContent1slot appears, theCategoryPromotionContent2slot also appears in/browse/subcategoryDisplay.jsp. ThecategoryPromotionsscenario populates theCategoryPromotionContent2slot with static content in the form of the ATG Store - Free Shipping Over $100promotionalContentitem:

Note: See CRS Promotions for more details on the ATG Store - Free Shipping Over $100 promotion.

The
CurrentPromotionsscenario is invoked when theCurrentPromotionsslot requests content. This slot appears in the/global/gadgets/promotions.jspgadget. To supply the slot with content, theCurrentPromotionsscenario calls theCurrentPromotionstargeter. TheCurrentPromotionstargeter returns the Gift Certificates Are Always a Perfect FitpromotionalContentitem for all customers.

The
HomeFeaturedProductsscenario has three segments, which all follow the same pattern: a slot initiates a segment by requesting content and the scenario invokes a targeter to provide that content. All of the targeters return a static product ID that is determined by the user segments a customer belongs to, if any. The illustration below shows the products that are returned for an unregistered customer:

The first segment of the
HomeFeaturedProductsscenario is initiated by theHomeFeaturedProduct1slot, the second is initiated by theHomeFeaturedProduct2slot, and the third is initiated by theHomeFeaturedProduct3slot. All three slots appear in the/promo/gadgets/homeFeaturedProducts.jspgadget. Content for each slot is provided by theHomeFeaturedProduct1,HomeFeaturedProduct2, andHomeFeaturedProduct3targeters, respectively.
Theme
TheThemescenario, located in/store/homepage, looks like this:

The
Themescenario is initiated when theHomeThemeslot requests content. This slot appears in the/navigation/gadgets/homePromotions.jspgadget and provides the splash image for the home page. To supply the slot with content, theThemescenario calls theHomeThemetargeter. TheHomeThemetargeter returns apromotionalContentitem, based on user segment, that contains the splash image.
Scenarios That Grant Promotions
The scenarios described in this section grant promotions to customers.
Note: For detailed information on the promotions themselves, see CRS Promotions.
giveAbandonedOrderPromotion
ThegiveAbandonedOrderPromotionscenario, located in/store/abandonedorders, looks like this:

The
giveAbandonedOrderPromotionscenario encourages customers to return and complete abandoned orders.giveAbandonedOrderPromotionhas two segments. Segment 1 is responsible for granting the Abandoned Order Promotion to a customer when the customer has an abandoned order. The Abandoned Order Promotion offers customers 10% off their next order.
The ATG Commerce
AbandonedOrderServicechecks the order repository for orders that have been started but not checked out. You configure when and how often theAbandonedOrderServiceruns, as well as the age of the orders you want it to find. For example, you can set the service to find incomplete orders whose last modified date is at least a week old. When theAbandonedOrderServiceidentifies an order as abandoned, segment 1 is invoked and the customer is granted the Abandoned Order Promotion. Granting a promotion to a customer adds the promotion to the customer’sactivePromotionsprofile property. TheAbandonedOrderServicealso marks the order as abandoned, so it won’t find the order again the next time the service runs.
Segment 2 is responsible for notifying customers of the promotion they have been granted. When the Abandoned Order Promotion has been added to a customer’s
activePromotionsproperty, segment 2 is invoked and an email with details about the promotion is sent to the customer, using the/emailtemplates/abandonedOrderPromo.jsptemplate.
Note that, because this scenario relies on a customer’s profile, it only applies to registered customers.
For detailed information on the
AbandonedOrderService, see Using Abandoned Order Services in the ATG Commerce Programming Guide. For detailed information on theactivePromotionsproperty, see Creating Promotions in the ATG Commerce Programming Guide.

The
GrantPromotionsscenario grants a promotion to a newly registered customer. This scenario listens for theatg.dps.Registerevent message that is generated each time a customer registers. When it detects aRegistermessage, the scenario does one of the following:
Granting a promotion to a customer adds the promotion to the customer’s profile in the
activePromotionsproperty.
Note: For more information on the
atg.dps.Registerevent message, see Using Scenario Events in the ATG Personalization Programming Guide.
Scenario That Confirms Orders
The ordersubmit scenario, located in /store/orders, confirms a customer’s order. It looks like this:

The ordersubmit scenario sends a confirmation email after a customer has submitted an order. This scenario listens for the atg.commerce.fullfillment.SubmitOrder event message that is generated each time a customer submits an order. When it detects a SubmitOrder message, the scenario does one of the following:
If the customer’s email address is blank, the scenario ends without sending email.
If the customer’s email address is undefined, the scenario ends without sending email.
For all other cases,
ordersubmitsends a confirmation email to the address stored in the customer’s profile, using the/emailtemplates/orderConfirmation.jsptemplate.

