Defining Globals and Bucketsets
This rule has a QuoteRequest
as an input fact. This rule will check for the condition of Customer Type
and Item Quality
, and based on these conditions, chain of management approval, level of management approval, and discount offered will be decided.
For all the cases in the CheckCustomer
rule, your condition will keep a check on the Customer Type. For example in first case, if the Input quote
customer type is New
and Quality
is in the range of 0
to 10
then EffectiveDiscount
will have a 10% increment and others values will be set as follows:
If Quote.CustomerType == New and Quote.Quantity Is Between 0-10 Then Set ApprovalFlow.CustomerType = True Set ApprovalFlow.newEffectiveDiscount = Quote.EffectiveDiscount+10 Set ApprovalFlow..Number of Level for approval = 0 Set ApprovalFlow.Tier1ApprovalNeeded = False Set ApprovalFlow.Tier2ApprovalNeeded = False
You can have conditions which that are evaluated to give a fixed value (New
as Customer Type) and/or a range...