Business rule configuration and dynamic matching logic

Invoice matching rules

To provide a flexible and powerful invoice matching process, this solution uses a two-layered approach that combines a default setting in RPA with supplier-specific overrides managed by Infor ION Business Rules. This enables centralized control over matching logic without altering core automation.

This list shows the two-layered approach:

  1. RPA Arguments: Setting the default matching level

    The baseline for invoice matching is defined in the RPA configuration arguments. The header_line_matching field determines the default behavior for all incoming invoices:

    • Header: The system performs a header-level match, comparing the invoice total amount against the Purchase Order (PO) total amount. This is typically used for high-volume, trusted suppliers.
    • Lines: The system performs a line-level match, validating each invoice line, such as quantity, price, and charges, against the corresponding PO line for greater accuracy and control.
    • Expense invoice: The system processes the invoice as an expense invoice without performing PO matching. This is used for non-PO invoices where costs are allocated directly to general ledger accounts.
  2. ION Business Rules: Dynamic and supplier-specific overrides

    This solution uses ION Business Rules to dynamically override the RPA default setting for specific suppliers. This feature provides a centralized and adaptable way to manage matching logic. The Business Rule or Decision Matrix M3InvoiceProcessing_InvMatch_SendtoRC is included in the content pack and is deployed with the solution.

    For any given supplier, you can create a business rule row in the provided Decision Matrix that forces a specific matching behavior.

    This list shows the process:

    1. RPA applies the default matching level set in its arguments. For example, Header.
    2. RPA checks if an ION Business Rule exists for the supplier of the invoice.
      • If a rule specifies Override = Yes, the RPA switches its behavior.

        Example: If the default is Header but the rule for Supplier ABC specifies an override, the RPA performs a line-level match for that invoice.

      • If the rule specifies Override = No or no rule exists, the RPA continues with the default matching level, which is Header.

      This table shows the override behavior based on the default values:

      Default Override = Yes Override = No
      Header Lines Header
      Lines Header Lines
      Expense Invoice Header Expense Invoice

Invoice charge rules

If a purchase order (PO) invoice includes additional charges such as freight, handling, or service fees, these charges are usually also included in the PO in M3. To automatically match invoice charges to the correct PO charge lines, the solution uses ION Business Rules and AI. Together, they are used to identify the appropriate charge line on the PO to ensure that the invoice is matched correctly.

This list describes the matching process:

  • You can configure an ION Business Rule as a translation table to map invoice charge descriptions to internal M3 costing elements. You can define the mapping in one of these ways:
    • Supplier-specific, where the rule applies only to a particular supplier, or
    • Generic or supplier-independent, where the same mapping is applied across all suppliers

    For example, if a supplier uses Fuel Surcharge as the charge description on an invoice, you can define a rule that translates it to the correct M3 charge code, such as External Fuel. This setup enables accurate matching without manual effort. To achieve reliable results, Business Rules must be maintained over time.

  • If no Business Rule matches the charge description, either supplier-specific or generic, AI is used to compare the invoice charge with existing PO charge descriptions in M3 and identify the closest match.
  • If neither the Business Rule nor the AI similarity check can identify the correct charge, the invoice is sent to the Review Center, where you can manually assign the charge.
Note: Generic rules are evaluated together with supplier-specific rules, enabling you to reuse common charge mappings across multiple suppliers.

See Creating and maintaining a charge rule.

Business rule for invoice reference

To control how invoice reference values are processed, configure a business rule that determines how each reference is handled during processing.

Before you begin:

  • In the enablePaymentRefrenceBR RPA argument, specify true.
  • In the paymentRefrenceBusinessRule RPA argument, specify the business rule name, which is M3InvoiceProcessing_PaymentReference_BR.

For a more flexible handling of invoice references, the solution uses an ION Business Rule, decision matrix, to dynamically determine how invoice reference values are processed. This business rule enables centralized control over how reference identifiers such as KID, OCR, or Government ID are mapped during invoice processing.

Note: You should configure this rule based on the country localization fact sheets.

The business rule evaluates these inputs:

  • Division
  • Supplier country
  • Detected reference label from the invoice

Based on these inputs, the system determines whether the extracted value should be assigned to:

  • Parallel Invoice Number (PAIN), or
  • Additional Reference Number (Ref 1-3)

Using a decision matrix, you can define the logic where each row represents a mapping rule with these details:

  • Sequence number
  • Division
  • Country
  • Reference label: For example, KID, OCR, or Government ID
  • Target field: Parallel Invoice Number or Additional Reference Number

Example:

Sequence Division Country Invoice Labels Payment Reference Method
1 BBB NO KID Parallel Invoice Number
2 BBB HR Government ID Parallel Invoice Number
3 AAA SE OCR Invoice Reference Number
4 BBB SE OCR Invoice Reference Number