1. Field of the Invention
The invention generally relates to the data processing field. More specifically, the invention relates to the field of electronic order processing in an electronic commerce environment.
2. Description of the Related Art
In a business-to-consumer (B2C) or business-to-business (B2B) electronic commerce environment, customer orders often contain multiple line items comprising at least a unique item identifier, such as a Stock Keeping Unit (SKU), quantity ordered, and unit price for each item being ordered. At any time, there may be multiple discounts available to the customer based on the customer's identity, date of order, identities of individual items purchased, combinations of items purchased, quantity of items purchased, and total dollar amount of the items purchased.
In Internet e-commerce sites, such as those run by IBM WebSphere® Commerce Suite, available from IBM, NY, USA, a marketing manager needs to be able to easily create new discounts to be applied to customer (or business) orders. These discounts may be applicable only at a specific date and time, and must be evaluated with other discounts that may be in effect concurrently. Also, a business policy may be employed to provide the customer with the guaranteed best price (apply the current discounts in a way to minimize the cost to the customer) or to maximize the business profit (apply the discounts in such a way to maximize the margin (customer price—cost) or some other meta-level strategy).
Current solutions compute simple discounts only. The combinatorial explosion caused by large catalogs of items, large numbers of items in individual orders, and large numbers of applicable discounts can easily overwhelm an e-commerce website. This problem is usually tackled using customized algorithms or mathematical optimization techniques such as linear programming.
Making the specification of discounts a task a business manager can perform is also difficult in today's e-commerce environment. The discount rules are typically coded in a programming language such as C, C++, or Java requiring business managers to be dependent on IT staff for even the simplest changes to rules. This causes a drain on internal company resources and adds to implementation time. Another difficulty is that adding a new discount to the e-commerce transaction may override some other discounts or cause complex interactions in terms of the impact on the best price or profit. This makes the definition and addition of new discounts costly and error prone. Thus, the conventional systems do not adequately provide solutions easily adaptable in today's e-commerce environment where speed and flexibility are essential.
Thus, there is a need for a flexible way to allow business managers to enter and remove discounts from the customer order processing system. In order to adapt to the current e-commerce environment, a new system is needed which is tolerant of overlapping or conflicting discount rules. Moreover, a novel system is needed which can scale to large numbers of items in the product catalog, large numbers of applicable discount rules, and large numbers of items in the purchase order. Therefore, there is a need for an improved system and method of computing price discounts in a B2B or B2C e-commerce environment, which allows for an accurate streamlined approach, which is easy to use and implement.
In view of the foregoing, an embodiment of the invention provides a method of computing price discounts for an electronic commerce order and a program storage device implementing the method, wherein the method comprises categorizing all applicable price discounts for an individual customer order, computing all valid combinations of price discounts for the individual customer order, combining the valid combinations of price discounts into a price discount group, and selecting an optimal price discount based on the price discount group. The individual customer order comprises at least one order line item, wherein at least one order line item comprises a unique item identifier, a quantity ordered identifier, and a price per unit identifier for each item being ordered. The unique item identifier comprises a SKU identifier.
The applicable price discounts are based on a customer's identity, date of order, identities of individual items purchased, combinations of items purchased, quantity of items purchased, and total price of items purchased. Moreover, the price discounts comprise a fixed percentage off price discount, a fixed dollar amount off price discount, a free merchandise rebate price discount, and a combination discount thereof. Additionally, a discount object is created when a price discount ruleset is evaluated, wherein the discount object binds the price discounts to a respective item in the order. Also, the price discount object calculated by the discount ruleset are organized into groups of valid price discounts for later evaluation by the ruleset to find the optimal discount group to be applied to the order.
In another embodiment of the invention, a system for computing price discounts for an electronic commerce order is provided comprising a first unit operable for categorizing all applicable price discounts for an individual customer order, a computer configured to the first unit and operable for computing all valid combinations of price discounts for the individual customer order, a component configured to the computer and operable for combining the valid combinations of price discounts into a price discount group, a processing control mechanism configured to the component and operable for processing subsets of price discount rules within the price discount group, and a second unit configured to the component and operable for selecting an optimal price discount based on the price discount group.
The system further comprises a sequence of commands input into the computer, wherein these commands bind price discount information to a respective item in the electronic commerce order. The system also comprises a disabling mechanism configured to the computer and operable for preventing gratuitous discounts from being applied to the electronic commerce order. Additionally, the system further comprises a priority controller mechanism configured to the computer and operable for prioritizing a sequential order of evaluating the price discount rules.
The invention describes a method and apparatus for allowing the definition of discount rules and the evaluation of multiple, sometimes conflicting discount rules against a multi-item customer order to determine the “best” allowable group of discounts to be applied to the order.
The invention uses a combination of elements, including the IBM Accessible Business Rules (ABR) system to provide the date/time dependent nature of the rules, the IBM Agent Building and Learning Environment (ABLE) Rule Language and pattern match inference engines to solve the e-commerce problems articulated above.
The invention provides flexibility in that a marketing manager can identify new discounts and have them take effect, even though they may conflict with other existing discounts. The approach provided by the invention resolves the allowable discounts by applying a “meta-rule” that avoids having multiple discounts applied to the same items in the order. The rule-based inference algorithm used in the preferred embodiment of the invention provides superior performance. The basic principles of the invention could be applied to other systems where individual rules specify outcomes that abide by “meta-rules” and need subsequent evaluation to resolve conflicts and optimize the ruleset.
These and other aspects of the invention will be better appreciated and understood when considered in conjunction with the following description and the accompanying drawings. It should be understood, however, that the following description, while indicating preferred embodiments of the present invention and numerous specific details thereof, is given by way of illustration and not of limitation. Many changes and modifications may be made within the scope of the present invention without departing from the spirit thereof, and the invention includes all such modifications.
The invention will be better understood from the following detailed description with reference to the drawings, in which:
a) is a flowchart illustrating a method of the invention;
b) is a flowchart illustrating a method of the invention;
c) is a flowchart illustrating a method of the invention;
The invention and the various features and advantageous details thereof are explained more fully with reference to the non-limiting embodiments that are illustrated in the accompanying drawings and detailed in the following description. It should be noted that the features illustrated in the drawings are not necessarily drawn to scale. Descriptions of well-known components and processing techniques are omitted so as to not unnecessarily obscure the invention. The examples used herein are intended merely to facilitate an understanding of ways in which the invention may be practiced and to further enable those of skill in the art to practice the invention. Accordingly, the examples should not be construed as limiting the scope of the invention.
As previously mentioned, there is a need for an improved system and method of computing price discounts in a B2B or B2C e-commerce environment, which allows for an accurate streamlined approach, which is easy to use and implement. Referring now to the drawings, and more particularly to
The invention uses a forward chaining pattern matching inference engine to process a set of rules to compute the customer discounts. A pattern matching inference engine utilizes caching of partial matches in an associated working memory to limit the number of tests required on the data and to improve run-time performance. The invention also uses the Rete' algorithm to process the rules and data. Those skilled in the art appreciate that other algorithms could be used to perform this caching and alternate strategies to improve the inferencing performance are known.
The invention has a single ruleset composed of multiple rules to perform three separate phases of processing. Each business-level discount rule is represented by an associated pattern match rule. Each discount rule defines one or more items identified by part number or SKU, by category (sporting goods, wine, cheese, etc.) and by the quantity of items that must be purchased for the discount to apply. A single discount rule may require that multiple specific items or items from multiple categories be present in a single order for the discount to apply. In the invention, each discount pattern match rule has a single guard clause that ensures discount rules can only fire during the initial phase of the computation. During the processing of an order, each item in the order is entered into the working memory of the pattern match engine.
As illustrated in
The applicable price discounts are based on a customer's identity, date of order, identities of individual items purchased, combinations of items purchased, quantity of items purchased, and total price of items purchased. Moreover, the price discounts comprise a fixed percentage off price discount, a fixed dollar amount off price discount, a free merchandise rebate price discount, and a combination discount thereof. Additionally, a discount object is created when a price discount ruleset is evaluated, wherein the discount object binds the price discounts to a respective item in the order. Also, the price discount object calculated by the discount ruleset are organized into groups of valid price discounts for subsequent evaluation by the ruleset to find the optimal discount group to be applied to the order.
Alternatively, as shown in
Additionally, as shown in
In an embodiment of the invention, a system 1 for computing price discounts for an electronic commerce order is provided and illustrated in
The system 1 further comprises a sequence of commands 40 input into the computer 32, wherein the commands 40 bind price discount information to a respective item in the electronic commerce order. The system 1, shown in
For example, the invention operates in the following manner. The customer order is presented to the first unit 30 for evaluation by the system comprising a computer 32 running the discount ruleset rules (commands 40). The discount ruleset's rules are initially evaluated against an order and its individual order line items using filters for time and other criteria to see if they are applicable (disabling mechanism 42) and are evaluated in a priority order 44. Individual discount objects (component 34) are generated and bound to the order line item evaluated by the rules. Individual discount objects are combined in discount group objects as well (component 34). The second unit 38 evaluates the Discount Group objects and finds the optimal Discount Group. The order of Discount object, Discount Group object generation and evaluation to find the optimal Discount Group is controlled by the process control mechanism 36 and later evaluated by this mechanism 36 to find the optimal set of discounts to be applied to the entire order.
In phase 0, each order item is tested against the discount pattern match rules and partial matches are cached. When a rule is triggered (each antecedent condition is met) and fired (the consequent or action part is invoked) a Discount object is created binding the discount information (percentage off, specified dollar amount off, etc.) to the item or items in the order. The combination matching of all discount rules and order items is handled by the pattern match inference engine (not shown). The result of phase 0 is a set of Discount objects generated by the firing of the discount pattern match rules that reside in the working memory of the computer 32. When no other discount pattern match rules can fire, the phase variable is incremented to 1, which disables all individual discount rules from firing. The phase variable acts as a flow control mechanism 36 to stage the processing of subsets of rules within the ruleset. ABLE further supports a concept of rule priority that can affect the order in which rules are evaluated. Priorities are used in an example to separate the rules performing work from the rules used to transition from one phase to the next. Together, the phase 36 and priority 44 are used to control which rules are fired as subsets of rules within the ruleset.
In phase 1, a set of rules is defined to take the generated set of Discount objects and combine them into one or more groups of valid discounts. A new type of object, a DiscountGroup, is created for each initial discount. The phase 1 rules take each DiscountGroup object and tries to add additional Discount objects that do not conflict with Discounts that are already part of that DiscountGroup. For example one discount may offer 10% savings when item “SKU-194” is ordered and another discount may offer $10 off when the combination of items “SKU-194” and “SKU-192” are ordered. Given the meta-rule constraint that an item may only have one discount applied, we seek to determine whether the 10% savings or $10 off results in a “better” overall discount for the order. This is dependent on quantities ordered and unit pricing of the particular order and may vary between different customer orders. The result of Phase 1 is a set of DiscountGroup objects, generated by firing the discount group pattern match rules, which reside in the working memory. When no other discount group pattern match rules can fire, the phase variable is incremented to 2. This disables all of the discount group rules from firing.
In phase 2, a set of rules is defined to take the generated set of DiscountGroup objects and select the “best” one based on a business policy defined as one or more pattern match rules. For example, the business policy may be to guarantee the customer the lowest total price, in which case the best discount pattern match rules will examine the DiscountGroup objects and select the DiscountGroup with the lowest total price (or largest total discount amount). An alternative business policy may prefer to offer overstock merchandise rather than cash discounts. When no more best discount pattern match rules can fire, the main inference cycle is complete.
A representative hardware environment for practicing the present invention is depicted in
In a preferred embodiment of the invention, the ABLE rule language has an Idle rule block which can be used to perform end-of-processing cleanup. This can be used to remove items from the working memory and to actually apply the “best” discounts to the order line items. The following example illustrates a set of rules used in the invention:
By analyzing this set of rules, Discount Policy Rule 1 would not allow Discount Rule 1 and Discount Rule 4 to be applied to the same order because the order line item with part identifier “sku-194” would have more than one Discount Rule applied. The same is true for the following combinations of Discount Rules:
As the number of Discount Rules increases, the complexity of applying the Discount Policy Rule 1 increases dramatically. The invention reduces this complexity allowing more Discount Rules to be added and existing rules to be changed or removed, without having to manually work out the valid combinations of rules able to be applied. Furthermore, if there are N Discount Rules, the invention applies the constraints exemplified by Discount Policy Rule 1 to keep from having to evaluate all of the potential combinations of these Discount objects, reducing execution time and improving performance. By distinguishing between rules used to define discounts and rules used to manage how they are applied, the invention allows the customer to focus on the discounts they want to offer and have the rules engine manage conflicts and derive the best allowable discount (as defined in Discount Policy Rule 2) in a timely manner.
For example, the following illustrate order line items:
During Phase 0 of the rule processing, the Discount Rules are applied resulting in the following potential Discounts that might be applied to the order:
From Discount Rule 1 it is seen that: DiscountA: Purchase “sku-194” get 2 free “sku-191” =$15.00.
From Discount Rule 3 it is seen that: DiscountB: Purchase “sku-225” get 20.00% discount=$11.00.
From Discount Rule 4 it is seen that: DiscountC: Purchase “sku-194” and “sku-192” get 20.00% discount=$20.00.
From Discount Rule 6 it is seen that: DiscountD: Purchase “sku-225” and “sku-138” get $25.00 discount=$25.00.
During Phase 1 of the rule processing, these potential Discounts are then combined applying Discount Policy Rule 1 resulting in the following DiscountGroups:
DiscountGroupA=(Total Discount=$15.00 from Discount(s):
Purchase “sku-194” get 2.00 free “sku-191”=$15.00.
DiscountGroupB=(Total Discount=$11.00 from Discount(s):
Purchase “sku-225” get 20.00% discount=$11.00.
DiscountGroupC=(Total Discount=$20.00 from Discount(s):
Purchase “sku-194” and “sku-192” get 20.00% discount=$20.00.
DiscountGroupD=(Total Discount=$25.00 from Discount(s):
Purchase “sku-225” and “sku-138” get $25.00 discount=$25.00.
DiscountGroupE=(Total Discount=$26.00 from Discount(s):
Purchase “sku-194” get 2 free “sku-191”=$15.00.
Purchase “sku-225” get 20.00% discount=$11.00.
DiscountGroupF=(Total Discount=$40.00 from Discount(s):
Purchase “sku-194” get 2 free “sku-191”=$15.00.
Purchase “sku-225” and “sku-138” get $25.00 discount=$25.00.
DiscountGroupG=(Total Discount=$31.00 from Discount(s):
Purchase “sku-225” get 20.00% discount=$11.00.
Purchase “sku-194” and “sku-192” get 20.00% discount=$20.00.
DiscountGroupH=(Total Discount=$45.00 from Discount(s):
Purchase “sku-194” and “sku-192” get 20.00% discount=$20.00.
Purchase “sku-225” and “sku-138” get $25.00 discount=$25.00.
During Phase 2 of the rule processing, the Discount Policy Rule 2 is applied to determine DiscountGroupH to be the best discount allowed to be applied to the order because its Total Discount ($45.00) is greater than or equal to the Total Discount of all other Discount Groups.
By way of example, the following is the Java programmable code for an SKU item identifier class:
By way of example, the following is the Java programmable code for a DiscountGroup class:
By way of example, the following is the Java programmable code for an order class:
By way of example, the following is the Java programmable code for an OrderEntry class:
By way of example, the following is the Java programmable code for a Discount class:
By way of example, the following is the Java programmable code for a Discount RuleSet class:
The invention provides flexibility in that a marketing manager can identify new discounts and have them take effect, even though they may conflict with other existing discounts. The approach provided by the invention resolves the allowable discounts by applying a “meta-rule” that avoids having multiple discounts applied to the same items in the order. The rule-based inference algorithm used in the preferred embodiment of the invention provides superior performance. The basic principles of the invention could be applied to other systems where individual rules specify outcomes that abide by “meta-rules” and need subsequent evaluation to resolve conflicts and optimize the ruleset.
While the invention has been described in terms of preferred embodiments, those skilled in the art will recognize that the invention can be practiced with modification within the spirit and scope of the appended claims.
This application is a Continuation of U.S. application Ser. No. 10/674,306 filed Sep. 30, 2003, the complete disclosure of which, in its entirety, is herein incorporated by reference.
Number | Date | Country | |
---|---|---|---|
Parent | 10674306 | Sep 2003 | US |
Child | 12054456 | US |