Data Integrity Email Background Job Overview
DataIntegrityEmail_Sendbackground job – identifies and reports potential data integrity issues in your system. This is an advanced topic – contact Support if you have questions about configuring or customizing the Data Integrity Email Background Job for your environmentPurpose
The Data Integrity Email Background Job checks various aspects of Accounting and Operational data to identify potential integrity issues, discrepancies, and errors. It generates an email report that is sent to specified recipients, allowing Accounting and Operations teams to address problems before they impact financial reporting or business operations
Benefits
- Proactive identification of accounting and data integrity issues
- Prevents financial reporting errors
- Helps maintain clean operational data
- Easy-to-follow links to problem records
- Regular automated checks reduce manual review efforts
Job Parameters
| Parameter | Description | Default |
|---|---|---|
@ps_CompanyNo |
Company number to check. Use ‘%’ for all companies | ” |
@ps_Recipients |
Email addresses to receive the report (comma-separated) | ” |
@pd_CutOffDate |
Date used when CutOffDays is zero. Only checks data after this date | NULL |
@pn_CutOffDays |
Number of days in the past to check (only used if > 0) | 0 |
@ps_MailFrom |
Email address to send from | ” |
@ps_OptArg |
Optional arguments – use ‘Verbose’ to see detailed output | ” |
Data Integrity Checks
This procedure performs the following integrity checks:
Accounting Integrity
- AR Account Balance Verification – Checks whether Invoice balances match corresponding entries in the AR Journal
- Revenue Account Posting – Detects revenue accounts posted for Invoices on Deferred Revenue Projects
- Deferred Revenue Account Errors – Identifies Account Number errors on Service Contract Invoices
- Deferred Revenue Date Errors – Finds date-related issues with Deferred Revenue (missing dates, invalid date ranges)
- Journal Entry Balance – Verifies that Journal Entries balance (sum to zero)
- Inactive Account Balances – Identifies GL Accounts marked as inactive but still carrying balances
- Unposted Project Revenue – Flags Unposted Revenue from the previous month’s Project WIP
Operational Integrity
- Project Status Validation – Identifies Projects with End Dates in the past that have not been properly closed
- Unposted Time Bills – Highlights Time Bills that remain unposted after 7 days
- Customer Consistency – Identifies Orders (Contracts) linked to Projects with different Customer Numbers
- Inventory Quantity Verification – Checks for mismatches between Asset Counts and Master Branch Quantities
Implementation Considerations
Before implementing in production:
- Test thoroughly in a non-production environment
- Verify all Configuration Settings (WEBMAIL, EmailTestAddress, EMAILENGINE, etc.)
- Review Account Numbers used in queries to ensure they match your configuration
Configuration Settings
This job uses the following Configuration Settings that should be verified:
WEBROOT– Base URL for application links in the emailEMAILQDEFAULTREPLYTO– Default Sender Email if not specifiedEmailTestAddress– Email address for testing in non-production environmentsEMAILENGINE– Email sending mechanism configurationPRODUCTIONDBNAME– Production database name for environment detection
SQL Queries Considerations
- Account numbers are hard-coded
Setup Instructions
- Create a scheduled job to run the
DataIntegrityEmail_Sendstored procedure - Configure job parameters:
@ps_CompanyNo: Company number to check, or ‘%’ for all@ps_Recipients: Email addresses to receive the report@pn_CutOffDays: Days in the past to check (e.g., 7, 14, 30)
- Set appropriate schedule (daily or weekly recommended)
- Run a test execution with
@ps_OptArg = 'Verbose'to preview results
Sample Email Output
Below is a sample of what the Data Integrity Email report includes:
Data Integrity Report for Company: 01
AR account does not balance for invoice:
Invoice No:INV-12345/01/
View Invoice
Invoice No:INV-67890/01/
View Invoice
Revenue Account posted for Invoice on Deferred Revenue Project:
Invoice No:INV-56789/01/4010-00/
View Invoice
Deferred Revenue Account Number error on Service Contract Invoice:
Invoice No:INV-98765/01/PART-123/ Line No.2
View Invoice
Journal Entry Balance error:
Journal/Entry:GL-JNL / EntryNo:1234
Projects with invalid End Dates:
Project:PRJ-1001 / Title:Office Renovation
View Project
Inactive Accounts with a Balance:
Account:6010-00 / 01 / Balance:1250.00
Unposted Time Bills older than 7 days:
Time Bill:TB-12345 / User ID:jsmith
View Time Bill