BEA Logo BEA WLCS Release 3.5

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WLCS Documentation   |   Order Processing   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Discounts

 

This topic provides background information about discounts. It does not provide instructions on creating, maintaining, and removing discounts. For instructions on how to perform these tasks, see Using the E-Business Control Center.

This topic includes the following sections:

 


User and Global Discounts

There are two ways to use discounts. You can use discounts targeted to specific customers or have them available to all customers. Discounts targeted to specific customers are called user discounts. Discounts available to all customers are called global discounts.

Note: In the BEA E-Business Control Center, user discounts are referred to as campaign discounts and global discounts are referred to as stand-alone discounts.

If your product license is only for the BEA WebLogic Personalization Server with Portal FrameworkTM, discounts will not be available. If you have the BEA Campaign Manager for WebLogicTM, you can use both user and global discounts. With only the BEA WebLogic Commerce ServerTM, you can use global discounts, but not user discounts unless a Java developer writes the association coding.

 


Introduction to How Discounts Work

Discounts are based on either items or orders. Item discounts modify the price charged for one or more items placed in a shopping cart. Order discounts apply to the order subtotal.

Item discounts are based on the number of items and the properties (SKU and product category) of each item. A discount is applied when particular quantity and property conditions are met. The conditions are defined by the discount definition. For example, when a customer purchases two items where SKU=T123, apply a 15% discount.

Order discounts can be applied to any order or based on the subtotal of the order. For example, you could apply a 10% discount to every order or only to orders with subtotals greater than $50. Additionally, you can specify whether to apply order discounts to the order subtotal or to the shipping cost. For example, you could specify that an order with a subtotal greater than $100 is discounted by $10 or that the order will be shipped for free.

Items that cause a discount to be offered are called trigger items and the items that are discounted as a result are called target items. Both per item and set-based discounts are triggered based on the item (SKU), product category, or combination of items and product category. The discount can be targeted to the same items that triggered the discount or targeted to other items in the product catalog.

The Discount system is comprised of the Price service, Discount Management service, and Discount Association service. The Price service applies discounts to the items or orders in a shopping cart. The Discount Management service defines and maintains a set of discounts used by the Price service. The Association service is used by campaigns to determine if a particular customer is eligible for specific discounts.

These services work together to provide discounts to your customers. Each service is described in detail in the sections that follow.

 


Discount Management Service

The Discount Management service defines discounts. Business Analysts or Marketing Professionals can define discounts in the E-Business Control Center. Discount definitions include the duration of the discount, the amount of the discount, the type of discount, the discount limits, and the priority of each discounted item or order.

Definition Parameters

As previously mentioned, discounts are defined in the Discount Management service. Discounts are defined by the following parameters:

Notes: Campaign and discount dates are independent from each other. Campaign dates associate discounts to users. Irrespective of anything a campaigns may or may not do, the Price service attempts to apply a discount when the current date and time of the order is within the range of the start and end dates of the discount.

If you deploy a discount in a different time zone from where the discount was defined, it will deploy at the concurrent time in the local time zone. For example, if you set the discount to deploy at 12:00 A.M. Pacific Standard Time, it will deploy at 3:00 A.M. Eastern Standard Time.

Note: For user discounts, the displayed description is maintained in the association for the user and discount.

Saving Versus Deploying Discounts

Saving and deploying discounts is usually done in the E-Business Control Center. It is important to understand the difference between saving and deploying discounts. When a discount is saved, the Discount Management service stores it in an XML document and the discount is not available to pricing operations. To put a discount into action, it must be deployed.

A discount is deployed via a method call to the Discount Management service. Deploying a discount essentially involves the Discount system parsing the XML and populating a database table. After a discount is deployed, only the active/deactive flag, the priority of the discount, and end date for the discount may be modified; all other values are immutable. This restriction maintains the integrity in the Price service.

The XML document is actually a collection of discounts. XML is used to save discounts because XML documents are easily transferred from a development environment to a production environment.

BEA provides a utility to upload and download discount XML and to deploy discounts. This utility, called discountUtil, is most helpful for migrating discounts between servers. You can find the discountUtil file at the following location, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server:

%WL_COMMERCE_HOME%\bin\win\dscountUtil.bat (Windows)
$WL_COMMERCE_HOME/bin/unix/sdscountUtil.sh (UNIX)

Notes: To use the utility, WebLogic Commerce Server must be running.

The discount system is currently implemented to use a single discount set called DefaultDiscountSet.

Use the following syntax to specify the commands, options, and set:

discountUtil [<options>] <command> <setname>

The utility has the following commands:

The utility also has several options for specifying which server to talk to and the names of input and output files for the add/update and retrieve commands respectively. To see a list of all available options, run the utility with the help options. For example:

discountUtil.sh -h

The following options are most commonly necessary:

Deleting a Discount

You can delete a deployed discount only when it is not referred to by orders or discount associations. The Discount Management service enforces this constraint. Deleting a deployed discount definition does not delete the discount from the XML document. You can modify the XML document and then redeploy the discount using the E-Business Control Center.

 


Association Service

The Campaign service uses the Association service to links discounts with particular customers. Campaigns provides the means to target behavior and associate a behavior with a discount. For example, in a campaign, when a customer clicks an ad or fills out a survey, that customer becomes eligible to receive a discount. The customer's behavior results in making an association between a discount and the customer. The Price service uses associations to discount items or orders for particular customers.

The association consists of a Customer ID (CustomerPk), a discount identifier (set and discount name), and a discount display description. The Association service maintains a count of uses for each association. The count of uses is the current value of how many times the customer has used the discount. Global discounts are also tracked in a similar manner. When an order is confirmed, the count of uses is updated.

 


Price Service

The Price service applies the discounts that are defined in the Discount Management service. The Price service checks with the Association service to determine if a particular customer is eligible for specific discounts. The Discount Management service defines which items and what quantities are required for a discount and which items receive the discounts. The items that qualify for a discount may or may not be the same as the items that receive the discounts. The application of the discount process is defined in terms or triggers and targets. The Shopping service uses the Price service to apply discounts.

 


Triggers and Targets Specifications

Triggers and targets specify which items are required to activate a discount and which items are discounted. Recall, that items that cause a discount to be offered are called trigger items and the items that are discounted as a result are called target items. A discount can be targeted to the same items that triggered the discount or targeted to other items in the product catalog.

Both triggers and target specifications must be satisfied in order for a discount to be applied. The rules for triggers and targets are quite complex. Before introducing these rules, you should understand triggers and targets in relation to per item discounts and set-based discounts. Both per item and set-based discounts are triggered based on the item (SKU), product category, or combination of items and product category.

In a per item discount, each individual trigger item must be paired with items designated by the target specification. Figure 2-1shows this relationship. Notice that in both cases the triggers and the targets is the same.

Figure 2-1 Per Item Discount Comparison


 

In set-based discounts, the set of trigger items as a whole are collectively matched with items designated by the target specification. Figure 2-2 shows a comparison of per item and set-based discounts. Both types of discounts have the same number of triggers and targets. However, the results are quite different: for the set-based discount a discount is applied but not for the per item discount.

Figure 2-2 Set-based Discount Versus Per Item Discount


 

Two Examples of Using Triggers and Targets

Example 1: Per Item Discounts

Trigger Specification: Up to 5 bats
Target Specification: 1 baseball

For per item discounts, select the trigger items and for each trigger item, and then pair each individual trigger item with the items designated by the target specification. If the target specification is 1 item and 5 trigger items are available, then 5 target items (if available) will be discounted. To illustrate this, suppose that your target item is a baseball and your trigger item is your line of baseball bats, all belonging to the same category. If a customer buys one bat from the bat category, the customer will get a free baseball, and if a customer buys two bats, two baseballs will be free, and so on up to five baseballs.

Example 2: Set-based Discounts

Trigger Specification: 5 CDs
Target Specification: 1 CD Wallet

For set-based discounts, select the trigger items that match the pattern described by the trigger specification, and then select a collection of targets that match the target specifications. For example, if the target is a single item and the trigger items are any five items, only 1 target item will be discounted, such as a CD Wallet. For example, if a customer buys any 5 CDs, the customer will get 1 free CD Wallet. If the customer buys only 4 CDs, the customer will not get a CD Wallet. If the customer buys 10 CDs, the customer will get only 1 CD Wallet.

An extensive list of trigger and target examples is in Examples. It shows a number of examples to illustrate the different discount combinations.

Consumption Model

To explain how the discounting operation works, a consumption model is used. Before describing how the model works, some terminology needs to be clarified. An item is one particular product represented by its SKU, such as a DVD player where SKU=T123. A line item is a particular product and its quantity, such as DVD player where quantity=3 and SKU=T123. The consumption model is based on items. Each item can be discounted only once; a line item where quantity=N may have up to N discounts. For example, you could offer a discount where your customers would receive a 15% price reduction if they buy two or more cases of dog food on each case up to 10 cases.

The Price Service applies discounts to a pool of items according to the discount definition. When a discount is applied to a pool of items, the set of items (triggers and targets) that match the discount definition are removed from the pool. The Price service continues to apply discounts to the items that match the discount definition and then remove those items from the pool until it runs out of discounts, or until no more items lie within the pool, or until no discounts match the remaining items. Recall that each item can be discounted only once.

The consumption model ensures that the items are consumed as the discount is applied. No item may be used to trigger two items and no item may be discounted more than once.

How Discounts Are Applied

The Price service gets global discounts for every pricing operation. A pricing operation is the process of examining the contents of a shopping cart or order and applying the appropriate discounts. Recall that the order discount can be applied to either the order subtotal or shipping charges. If a customer is specified in the request to the Price service, that customer's user discounts are applied; the Price service calls the Association service to get a list of associations for that customer, and then gets the discounts for those associations.

Discounts are applied in the following manner: The Price service first separates item discounts from order discounts. It then sorts item discounts by the priority, with 1 being the highest priority. Next, the Price service applies discounts to the set of items and computes the subtotal (that is, the sum of the line item prices). At this point, the Price service starts applying the order discounts. It first sorts the order discounts by priority and then applies them. After all the order discounts are applied, the discount process is complete.

Priority

Item or order discounts are sorted by priority from 1 to 20, with 1 being the highest priority. Priority is especially important when two or more discounts refer to a similar collection of items. More specifically, if trigger and target specifications of two or more discounts potentially select the same items, the discounts conflict.

If two or more discounts have the same priority, each discount is still eligible for application. The order in which discounts with the same priority are applied is random. Recall that each item may be discounted only once. A line item with quantity=3 may have three discounts applied. The Price service applies all possible discounts.

Note: For best results, you should avoid conflicting discounts by adjusting the priorities.

How Discounts Are Calculated

There are three methods for adjusting prices on a product: a percentage off discount, a fixed off discount, and a fixed price discount. For each discount method, a calculator (class) exists in the Price service that calculates the new price for an item based on a value, such as 5% or $5. You can use the E-Business Control Center to set these values. Each method is defined in the following list:

Note: You can use a fixed price discount to raise the price of an item.

 


Examples

This section provides a number of examples for using triggers and targets for item discounts and order discounts.

Item Discounts

This section provides information about the form of item discount rules and examples of the rules. Before the form of the rules can be explained, some terminology needs to be explained. The following list describes this terminology.

Other elements are defined in the context of the discount rule or explanation.

Form of Discount Rules

Discount rules have a particular structure. The form of each part of a discount rule is presented, along with examples.

General Form

The general form of a discount has the following structure:

<qualifier clause> apply a <discount modifier> discount to <target clause>

Examples

Rule: For all items where SKU=123, apply a 10% discount to each qualifying item.

What It Means: Apply a 10% discount to all items.

Rule: For all items, apply a $5 discount to each qualifying item.

What It Means: Reduce the price of each item by $5.

Qualifier Clause with Property Clauses

The qualifier clause consists of the following forms:

<qualifier phrase> [AND <qualifier phrase>]*

The AND condition allows you to link phrases together.

The complete qualifier phrases consist of the following:

For <qualifier quantity clause> [<property clause> [OR <property clause>]*]

The OR condition allows you to specify conditions based on one set of properties or a different set of properties.

Per Item Discount with an OR Clause Example

Rule: For all items where Category=ABC or SKU=123, apply a 10% discount to each qualifying item.

What It Means: Apply a 10% discount to all items that have a SKU of 123 or belong to category ABC.

Per Item Discount with an AND Clause Example

Rule: For 3 items where Category=ABC and 2 items where SKU=123 items, apply a $5 fixed price discount to each qualifying item.

What It Means: For 5 items in a shopping cart where 3 items belong to Category=ABC and 2 items having SKU=123, reduce the price of each qualifying item by $5.

Other Per Item Discount Examples

Rule: For at least 3 items where SKU=123, apply a $10 fixed off discount to 2 items where Category=books for each qualifying item.

What It Means: If 5 items with SKU=123 exist and 9 items from the Category=books exist, 8 of the Category=books items are discounted. If 2 items with SKU=123 exist and any number of items from the Category=books exists, none of the Category=books items are discounted.

Rule: For between 3 and 5 items where SKU=123, apply a $10 fixed off discount for up to 2 items where Category=books for each qualifying item.

What It Means: If 6 items with SKU=123 exist and 14 items from the Category=books exist, 10 of the Category=books items are discounted. If 4 items with SKU=123 exist and 12 items from the Category=books exist, 8 of the Category=books items are discounted. If 2 items with SKU=123 exist and any number of items from the Category=books exists, none of the Category=books items are discounted.

Set Discounts Examples

Rule: For each set of 2 items where SKU=123, apply a 10% discount to each qualifying item.

What It Means: Apply a 10% discount to every group of 2 items with SKU=123 selected from the shopping cart. If 5 items with SKU=123 exist, 4 are discounted; if 1 item with SKU=123 exists, none are discounted.

Rule: For each set of 2 items where SKU=123, apply a $10 fixed off discount to 2 items.

What It Means: For every group of 2 items of SKU=123, 2 items (of any kind) are discounted. If 5 items with SKU=123 exist and 6 other items exist, 4 of the other items are discounted; if 5 items with SKU=123 exist and 3 other items exist, 2 of the other items are discounted.

Order Rules

The form of order rules is much more simple than the rules for item discounts. The following list describes the basic rules.

Rule: For order subtotal >= $50, apply a 10% discount to qualifying order.

What It Means: For any order subtotal greater then $50 apply a 10% to the order subtotal.

Rule: For order subtotal >= $50 AND order subtotal <= $100 apply a 10% discount to qualifying item.

What It Means: For any order subtotal between $50 and $100, apply a 10% to the order subtotal.

Rule: For order subtotal >= $100, apply a 10% discount to shipping.

What It Means: For any order subtotal greater then $100, apply a 10% to the cost of shipping.

Rule: For order subtotal >= $100 OR order subtotal <= $25 apply a 10% discount to shipping.

What It Means: For any order subtotal less than $25 or greater than $100 apply a 10% discount to the shipping costs.

 

back to top previous page next page