Validates settlement records through a multi-step funnel, producing a reconciliation report.
| Step | Condition | Purpose |
|---|---|---|
| ------ | ----------- | --------- |
| Step 1 | Is Primary Attribution = true | Remove duplicates |
| Step 2 | Event Value contains transaction_id | Valid transactions |
| Step 3 | Channel matches target | Scope to partner |
| Step 4 | Event Time within promotion window | Active period check |
import re
pattern = r'"transaction_id"\s*:\s*"(\d+)"'
# Extract and validate numeric transaction IDs from Event Value
Load promotion record Excel to determine valid date range, then validate each record's Event Time falls within the window.
Settlement Verification Report
Channel: example_channel
==============================
Initial Data: 10,304 records
Step 1 (Primary): 4,521 (-43.9%)
Step 2 (TXN ID): 2,156 (-52.3%)
Step 3 (Channel): 2,156 ( 0.0%)
Step 4 (Window): 91 (-95.8%)
Valid Settlements: 91 records
Validation Rate: 0.88%
The following bundled scripts support this skill:
| Script | Purpose |
|---|---|
| -------- | --------- |
settlement_verify.py | Executable script |
pandas >= 1.5.0
openpyxl >= 3.1.0
re # Standard library
共 1 个版本