// *********************************************************************************** // Rule 021 - Small Order // If the total amount of the order is less than the floor limit, then skip // customer detail lookup and analysis on the ORDER (eg the buyer & all recipients). // *********************************************************************************** rule "Rule 021 - Small Order" enabled (FraudRuleEvaluationHelper.isRuleEnabled("Rule 021 - Small Order")) ruleflow-group "customerActivityFilter" lock-on-active when $customer: CustomerFact() $order: OrderFact() eval ($customer.getCustomerLookupStatus() != ActivityLookupStatus.NOT_REQUIRED && ($order.getOrderTotal().compareTo(FraudOrderControl.findByOrderEntrySource($order.getEntrySource()).getOrderMinimumValue())) < 0) then modify($customer) { setCustomerLookupStatus(ActivityLookupStatus.NOT_REQUIRED) }; FraudRuleConsequenceHelper.logRuleFiring($order.getOrderId(), "021", $customer); end // *********************************************************************************** // Rule 042B - Companion Bad Country Recipients // if the entry source of the order is Telephone Request System, and the customer // detail lookup and analysis for the customer is skipped, and there is a suspect // reason code "E" for the customer, and the number of non-buyer recipients is more // than 0, then do customer detail lookup and analysis on the customer. // // salience is set low to make sure other rules in this group fire first (this rule // can potentially undo the action of prior rules). also set lower than 042A which // needs to fire first. // // the "B" version of this rule updates any customers ("$customer1") that DO meet // the customer selection criteria (status = NOT_REQUIRED and there's a suspect // reason code of "E"). // // together, rules 042A and 042B will set activity lookup status to REQUIRED on ALL // customers on the order, if ANY customers on the order meet the "NOT_REQUIRED" and // "E" selection criteria. // *********************************************************************************** rule "Rule 042B - Companion Bad Country Recipients" enabled (FraudRuleEvaluationHelper.isRuleEnabled("Rule 042B - Companion Bad Country Recipients")) ruleflow-group "customerActivityFilter" salience -15 no-loop when $order: OrderFact(entrySource=="1", numberOfNonBuyerRecipients>0) $customer: CustomerFact() $results: FraudResultsDTO() eval($customer.getCustomerLookupStatus() == ActivityLookupStatus.NOT_REQUIRED && FraudRuleEvaluationHelper.doesCustomerHaveSuspectReasonCode("E", $results, $customer)) then modify($customer) { setCustomerLookupStatus(ActivityLookupStatus.REQUIRED) }; FraudRuleConsequenceHelper.logRuleFiring($customer.getOrderId(), "042B", $customer); end