Evaluate Transactions and Totals based on Client Defined Rules (sa_rules_eval_job)
Module Name |
sa_rules_eval_job |
Description |
Evaluate Transactions and Totals based on Client Defined Rules |
Functional Area |
Oracle Retail Sales Audit |
Module Type |
Admin - Ad hoc |
Module Technology |
Background Processing |
Catalog ID |
N/A |
Wrapper Script |
b8dwrap.ksh |
Design Overview
This background job is composed of two steps processing. It will have a threading assignment and a business logic processing.
Thread assignment program will filter eligible records from the Sales Audit Store/Day table for all stores wherein auditing status is "Totaled". Evaluating rules is integral to the sales auditing process. Rules make the comparisons between data from various sources. These comparisons find data errors that could be the result of either honest mistakes or fraud. Finding these mistakes during the sales auditing process prevents these errors from being passed on to merchandising and data warehouse systems.
Rules in Sales Audit are dynamic. Aside from basic data validations rules are not predefined in the system. Retailers have the ability to define through the online Rule Definition Wizard. Errors uncovered by these rules are available for review on-line during the interactive audit process. After users modify existing rules or create new ones, they become part of the rules the next time that this program runs. These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.
The Business logic program will process all records from the staging table. Using bulk processing, this program will process the records for auditing evaluation by calling SA_AUDIT_RULES_SQL.PROCESS_AUDIT_RULES for each store day captured. It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.
Key Tables Affected
Table 19-2 Key Tables Affected
Table | Select | Insert | Update | Delete |
---|---|---|---|---|
RMS_BATCH_STATUS |
Yes |
No |
No |
No |
B8D_PROCESS_CONFIG |
Yes |
No |
No |
No |
JOB_AUDIT_LOGS |
No |
Yes |
No |
No |
B8D_SA_RULES_EVAL_STG |
Yes |
No |
Yes |
Yes |
SA_STORE_DAY |
Yes |
No |
Yes |
No |
SA_RULE_HEAD |
Yes |
No |
No |
No |
SA_RULE_LOC_TRAIT |
Yes |
No |
No |
No |
SA_ERROR_WKSHT |
No |
Yes |
No |
Yes |
SA_ERROR_TEMP |
No |
Yes |
No |
No |
SA_ERROR |
No |
Yes |
Yes |
Yes |
SA_TOTAL |
No |
No |
Yes |
No |
SA_TRAN_HEAD |
No |
No |
Yes |
No |
SA_TRAN_ITEM |
No |
No |
Yes |
No |
SA_TRAN_DISC |
No |
No |
Yes |
No |
SA_TRAN_TENDER |
No |
No |
Yes |
No |
SA_TRAN_TAX |
No |
No |
Yes |
No |