Search Results rule_level




Overview

The CN_RULES_ALL_B table is a core data object within the Oracle E-Business Suite (EBS) Incentive Compensation (CN) module. It serves as the master repository for defining revenue classification rules. These rules are the fundamental logic used by the revenue classification generator to automatically categorize and assign revenue transactions to specific revenue classes. The table's "ALL_B" suffix indicates it is a multi-organization (Multi-Org) enabled table, storing data partitioned by the operating unit (ORG_ID). This design is critical for supporting deployments where a single EBS instance manages multiple legal entities or business units, ensuring data isolation and security. The table's integrity is maintained through a primary key on RULE_ID, RULESET_ID, and ORG_ID, and it is central to the rule definition hierarchy.

Key Information Stored

The table stores the essential metadata for each classification rule. The primary key columns uniquely identify a rule within the system: RULE_ID is the unique identifier, RULESET_ID links the rule to its parent rule set (CN_RULESETS_ALL_B), and ORG_ID denotes the operating unit. Another critical column is REVENUE_CLASS_ID, which is a foreign key to CN_REVENUE_CLASSES_ALL and defines the target revenue class for transactions that match the rule's criteria. The RULE_LEVEL column, part of a secondary unique key (CN_RULES_ALL_B_UK2), indicates the rule's position or precedence within a hierarchical evaluation structure. Additional columns not detailed in the excerpt but typically present would include control attributes such as START_DATE, END_DATE, and ENABLED_FLAG to manage the rule's active lifecycle.

Common Use Cases and Queries

The primary use case is the configuration and maintenance of the revenue classification engine. Administrators create, update, or inactivate rules in this table to define how different types of sales transactions should be categorized for compensation purposes. Common reporting and diagnostic queries involve analyzing rule definitions and their relationships. For instance, to list all active rules within a specific rule set for an operating unit, a query would be: SELECT rule_id, revenue_class_id FROM cn_rules_all_b WHERE ruleset_id = &RULESET_ID AND org_id = &ORG_ID AND SYSDATE BETWEEN start_date AND NVL(end_date, SYSDATE+1) AND enabled_flag = 'Y';. Another frequent operation is tracing the assignment of a revenue class by joining this table to its related attribute rule tables (CN_ATTRIBUTE_RULES_ALL, CN_RULE_ATTR_EXPRESSION_ALL) to understand the full conditional logic.

Related Objects

CN_RULES_ALL_B is a central hub within the Incentive Compensation schema, with documented relationships to several key tables:

  • Parent References (Foreign Keys Outbound):
    • CN_RULESETS_ALL_B: Via RULESET_ID. Every rule must belong to a defined rule set.
    • CN_REVENUE_CLASSES_ALL: Via REVENUE_CLASS_ID. Each rule must point to a valid target revenue class.
  • Child References (Foreign Keys Inbound):
    • CN_ATTRIBUTE_RULES_ALL: Referenced by RULE_ID, RULESET_ID, and ORG_ID. Stores the attributes used to evaluate the rule.
    • CN_RULES_HIERARCHY_ALL: Referenced by RULE_ID and PARENT_RULE_ID (along with RULESET_ID, ORG_ID). Defines the parent-child relationships between rules for hierarchical evaluation.
    • CN_RULE_ATTR_EXPRESSION_ALL: Referenced by RULE_ID. Stores complex conditional expressions for rule logic.