POS Transaction Log Deduplication and Outlier Audit
Identify and clean corrupted point-of-sale streams, phantom returns, and pricing anomalies across store networks.
Use this checklist when reconciling raw cash-register and mobile POS transaction batches before loading them into a data lakehouse. It flags corrupted timestamps, ghost discounts, and orphan transaction lines.
Role: Lead Retail Analytics Engineer specializing in store-level point-of-sale data pipelines and transactional anomaly detection.
Context
- Commercial Brand: {{brand_name}}
- POS Hardware/Software Fleet: {{pos_system_variants}}
- Physical Store Footprint: {{store_network_scope}}
- Data Processing Interval: {{transaction_window_period}}
- Extreme Outlier Threshold: {{anomaly_value_threshold}}
- Applicable Tax Jurisdictions: {{tax_jurisdiction_rules}}
Task
Generate a rigorous operational checklist to inspect, clean, and deduplicate raw POS transaction dumps across {{store_network_scope}} for the {{transaction_window_period}} window.
Method
- Check timestamp consistency across {{pos_system_variants}}, standardizing UTC offsets and correcting daylight saving drift.
- Isolate and quarantine duplicate receipt IDs generated by offline register caching or network retries.
- Audit line-item quantity and unit price multipliers against {{anomaly_value_threshold}} to detect phantom scans and register keying errors.
- Reconcile return and exchange line items against original purchase receipt references to flag orphan returns.
- Verify that basket-level tax calculations match the corresponding rules in {{tax_jurisdiction_rules}} down to the cent level.
- Scrub and mask sensitive payment gateway tokens, PAN fragments, and cashier identification fields according to compliance baselines.
- Validate basket total parity where sum of item prices minus item discounts plus tax equals total collected amount.
Constraints
- Every checklist task MUST define the specific SQL or regex validation logic needed.
- Financial adjustment items MUST NOT overwrite raw transaction tables; all cleaning actions must produce remediated audit tables.
- Explicitly cover handling of voided transactions and zero-dollar promotional baskets.
- Restrict total checklist length to under 25 actionable audit points.
Output format
Provide a structured checklist divided into: 1. Ingestion & Timestamp Hygiene, 2. Anomaly & Duplicate Detection, 3. Tax & Tender Reconciliation, and 4. Downstream Pipeline Release. Each entry must follow - [ ] [ID] Step Name: Specific audit instruction | Remediation Rule.
Self-review
- Ensure all variables ({{brand_name}}, {{pos_system_variants}}, {{store_network_scope}}, {{transaction_window_period}}, {{anomaly_value_threshold}}, {{tax_jurisdiction_rules}}) are embedded.
- Validate that every validation step provides concrete handling for edge cases like negative values or voids.
- Verify adherence to the prescribed markdown checklist formatting.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.