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/store
directory.Click a
/store
subdirectory, 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
BestSellers
scenario is invoked when theGlobalBestSellers
slot requests content. This slot appears in the/browse/gadgets/productHotSuggestion.jsp
gadget. To supply the slot with content, theBestSellers
scenario calls theGlobalBestSellers
targeter. TheGlobalBestSellers
targeter returns a collection of products, based on user segment. ATargetingRandom
servlet bean in theproductHotSuggestion.jsp
gadget randomly chooses two products from the collection to show on the page.
The
categoryPromotions
scenario 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
CategoryPromotionContent1
slot requests content. This slot appears in several places in Commerce Reference Store, such as/atgsearch/atgSearchResultsContainer.jsp
and/browse/categoryDisplay.jsp
. To supply the slot with content, thecategoryPromotions
scenario calls theCategoryPromotions
targeter. This targeter dynamically returns one of the followingpromotionalContent
items, depending on the customer:
The second segment is invoked when the
CategoryPromotionContent2
slot requests content. In addition to all of the pages where theCategoryPromotionContent1
slot appears, theCategoryPromotionContent2
slot also appears in/browse/subcategoryDisplay.jsp
. ThecategoryPromotions
scenario populates theCategoryPromotionContent2
slot with static content in the form of the ATG Store - Free Shipping Over $100promotionalContent
item:
Note: See CRS Promotions for more details on the ATG Store - Free Shipping Over $100 promotion.
The
CurrentPromotions
scenario is invoked when theCurrentPromotions
slot requests content. This slot appears in the/global/gadgets/promotions.jsp
gadget. To supply the slot with content, theCurrentPromotions
scenario calls theCurrentPromotions
targeter. TheCurrentPromotions
targeter returns the Gift Certificates Are Always a Perfect FitpromotionalContent
item for all customers.
The
HomeFeaturedProducts
scenario 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
HomeFeaturedProducts
scenario is initiated by theHomeFeaturedProduct1
slot, the second is initiated by theHomeFeaturedProduct2
slot, and the third is initiated by theHomeFeaturedProduct3
slot. All three slots appear in the/promo/gadgets/homeFeaturedProducts.jsp
gadget. Content for each slot is provided by theHomeFeaturedProduct1
,HomeFeaturedProduct2
, andHomeFeaturedProduct3
targeters, respectively.
Theme
TheTheme
scenario, located in/store/homepage
, looks like this:
The
Theme
scenario is initiated when theHomeTheme
slot requests content. This slot appears in the/navigation/gadgets/homePromotions.jsp
gadget and provides the splash image for the home page. To supply the slot with content, theTheme
scenario calls theHomeTheme
targeter. TheHomeTheme
targeter returns apromotionalContent
item, 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
ThegiveAbandonedOrderPromotion
scenario, located in/store/abandonedorders
, looks like this:
The
giveAbandonedOrderPromotion
scenario encourages customers to return and complete abandoned orders.giveAbandonedOrderPromotion
has 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
AbandonedOrderService
checks the order repository for orders that have been started but not checked out. You configure when and how often theAbandonedOrderService
runs, 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 theAbandonedOrderService
identifies 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’sactivePromotions
profile property. TheAbandonedOrderService
also 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
activePromotions
property, segment 2 is invoked and an email with details about the promotion is sent to the customer, using the/emailtemplates/abandonedOrderPromo.jsp
template.
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 theactivePromotions
property, see Creating Promotions in the ATG Commerce Programming Guide.
The
GrantPromotions
scenario grants a promotion to a newly registered customer. This scenario listens for theatg.dps.Register
event message that is generated each time a customer registers. When it detects aRegister
message, the scenario does one of the following:
Granting a promotion to a customer adds the promotion to the customer’s profile in the
activePromotions
property.
Note: For more information on the
atg.dps.Register
event 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,
ordersubmit
sends a confirmation email to the address stored in the customer’s profile, using the/emailtemplates/orderConfirmation.jsp
template.