This scenario offers free shipping to customers in the USA who place orders over $400.

The first segment “GivePromo” waits for an item to be added to the order. First it checks to make sure that the locale is en_US. Then, whenever the cart’s total exceeds $400.00, a message is displayed in the “MediaSlot” slot informing the customer that shipping is now free. Notice that this segment fires every time that an item is added to the order, but that the promotion is given only once and the slot holds only one copy of this media. This works because one of the attributes of this promotion is that it can only be given to a customer once. The slot also does not allow duplicate items. Recognizing tricks like this can help make the logic in your scenarios much simpler.

The second segment in this scenario, “RemovePromo,” takes care of a special case. What if the customer removes some items from the cart, and is no longer eligible for the shipping discount? The promotion is simply not be applied because it knows to look for the order’s total price. However our slot would still be showing the congratulatory message. To avoid this mix-up, this segment watches for the “Item Removed from Order” event, and removes the media if the order’s total drops below $400.00.

 
loading table of contents...