Genpact Deductions Recovery Knowledge Center

Support

Pre and Post Validation Routing Configuration

V1.0

Overview

By default, a case is sent to Exception Handling (if required) post-validation. However, based on some YAML rules the Genpact Deductions Recovery system can decide if a case must be sent to Exception Handling pre-validation.

The pre-validation-routing-ruleset.yaml and post-validation-routing-ruleset.yaml files define the rules for routing a case to Exception Handling pre- or post-validation.

Sample YAML settings

pre-validation-routing-ruleset.yaml
kind: ruleset
metadata:
  name: deduction/v1/ruleset/pre-validation-routing-ruleset

spec:
  nodes:

    - name: redirect-manual-exception
      if: 'true'
      nodes:

     ########################################################################
        #  No POD discrepancies → Validation (skip UOM matching)
        ########################################################################
        - name: no-pod-discrepancies
          if: '(Convert.ToDecimal(it.FactHeader["PodTotalDiscrepancyCases"]) 
            + Convert.ToDecimal(it.FactHeader["PodTotalDiscrepancyCasesWithIdentifier"])) == 0'
          then:
            ruleName: "no-pod-discrepancies"
            category: "PODSummary"
            reason: "No POD discrepancies found (total cases with and without identifier = 0)."
            logEntry: "No POD discrepancies found (total cases with and without identifier = 0)."
            outputs:
              redirect: "Validation"                

       ########################################################################
        #  Manual exception flag raised on backup → Exception Handling
        ########################################################################
        - name: manual-exception
          if: 'it.FactHeader["IsManualException"] != null 
            && Convert.ToBoolean(it.FactHeader["IsManualException"]) == true'
          then:
            ruleName: "manual-exception"
            category: "PODSummary"
            reason: "Backup post-processing flagged this case for manual handling."
            logEntry: "Backup post-processing flagged this case for manual handling."
            outputs:
              redirect: "Exception Handling"
              

       ########################################################################
        #  Null Deducted Line Amount → Exception Handling
        ########################################################################
        - name: manual-exception-deducted-line
          if:  'Convert.ToDecimal(it.Facts["BckDeductedLineAmount"])==0 && Convert.ToDecimal(it.Facts["BckDeductedQuantity"]) > 0'
          then:
            ruleName: "manual-exception-deducted-line"
            category: "BackupsSummary"
            reason: "Could not allocate case deducted amount to line level."
            logEntry: "Could not allocate case deducted amount to line level."
            outputs:
              redirect: "Exception Handling"          
  


Parameter Description
name The name of the condition/rule.
if thenThe condition/rule which when fulfilled will route the case to either Validation or Exception Handling. Thus, deciding whether the case is sent to Exception Handling before validation.


post-validation-routing-ruleset.yaml
kind: ruleset
metadata:
  name: deduction/v1/ruleset/post-validation-routing-ruleset

spec:
  nodes:

    - name: all-cases
      if: '1==1'
      nodes:

         ########################################################################
        # 1 - discrepancy cases on POD → Exception Handling
        #     Fires when POD discrepancies exist (> 0) but are less than total
        #     backup cases, with multiple SKUs (partial validity, human needed).
        ########################################################################
        - name: pod-discrepancy
          if: '
            (Convert.ToDecimal(it.FactHeader["PodTotalDiscrepancyCases"])
              + Convert.ToDecimal(it.FactHeader["PodTotalDiscrepancyCasesWithIdentifier"])) > 0
            && (Convert.ToDecimal(it.FactHeader["PodTotalDiscrepancyCases"])
              + Convert.ToDecimal(it.FactHeader["PodTotalDiscrepancyCasesWithIdentifier"])) < Convert.ToDecimal(it.FactHeader["BackupCaseQuantityTotal"])
            && Convert.ToDecimal(it.FactHeader["BckSkuCount"]) > 1'
          then:
            ruleName: "pod-discrepancy"
            category: "PODSummary"
            reason: "POD does not support shortages."
            logEntry: "Case is partially valid with more than one SKU, human intervention required."
            outputs:
              redirect: "Exception Handling"
        ########################################################################
        # 2 - overage on POD -> Exception Handling
        ########################################################################
        - name: pod-overage-discrepancy
          if: 'Convert.ToDecimal(it.FactHeader["PodTotalOverage"]) > 0'
          then:
            ruleName: "pod-overage-discrepancy"
            category: "POD"
            reason: "POD overage discrepancy quantity is greater than zero."
            logEntry: "POD contains an Overage notation , human intervention required."
            outputs:
              redirect: "Exception Handling"

        ########################################################################
        # 3 - return/refused on POD -> Exception Handling
        ########################################################################
        - name: pod-return-refused-discrepancy
          if: 'Convert.ToDecimal(it.FactHeader["PodTotalReturn"]) > 0'
          then:
            ruleName: "pod-return-refused-discrepancy"
            category: "POD"
            reason: "POD return/refused discrepancy quantity is greater than zero."
            logEntry: "POD contains a Refused/Returned notation, human intervention required."
            outputs:
              redirect: "Exception Handling


Parameter Description
name The name of the condition/rule.
if thenThe condition/rule which when fulfilled will route the case to Exception Handling. Thus, deciding that the case is sent to Exception Handling after validation.