Lead Stage Distribution
Task Types
| Customer Name | Phone | Business Name | City | Industry | Lead Status | Source | Human Agent | Created | Last Activity | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Loading... | |||||||||||
| Type | Status | Lead | Scheduled At | Created | Reason | |
|---|---|---|---|---|---|---|
| Loading... | ||||||
| Direction | Lead | Outcome | Duration | Provider | Started | Recording | |
|---|---|---|---|---|---|---|---|
| Loading... | |||||||
Leads Over Time (30 days)
Call Outcomes
Stage Funnel
Task Success Rate by Type
Human Agent Performance
Stage changes & comments tracked from Activity log| Agent | Assigned | Active | Won | Lost | Win Rate | Stage Changes | Comments |
|---|---|---|---|---|---|---|---|
| Loading... | |||||||
| Date | Customer | Issue Category | Description | Ticket # | Ticket Status | Outcome | |
|---|---|---|---|---|---|---|---|
| Loading... | |||||||
| Date | Customer | Outcome | Duration | Issue Category | Ticket # | Recording | |
|---|---|---|---|---|---|---|---|
| Loading... | |||||||
Changes apply within 60 seconds (agent config cache TTL). Feature flags are final authority — they override everything including incident rules.
Feature Flags
Final authorityBehavior & Tone
Transaction Channels
Resend Policy
Requires enableResend=trueTicket Config
Incident Rules
| Name | Matches | Overrides | Customer Instruction | Expires | Actions |
|---|---|---|---|---|---|
| Loading… | |||||
Case 1 — Decision Breakdown
Kiosk Failed PaymentsCase 2 — Decision Breakdown
Vendor FailedRecent Scan Runs
last 10 runs| Time | Status | C1 Scanned | C1 Resent | C1 Dry-Run | C2 Scanned | C2 New | C2 Resent | C2 Retried | C3 Processed | C3 Resent |
|---|---|---|---|---|---|---|---|---|---|---|
| No scan runs yet | ||||||||||
TM Action Events
| Time | Terminal | Action Code | Group Type | Owner / Terminal Name | Txn Count | Transaction IDs | Status | Response / Note |
|---|---|---|---|---|---|---|---|---|
| No TM action events yet | ||||||||
| Transaction ID | Invoice | Terminal | Owner | Vendor | Amount | Failed At | Decision | Retries | Next Retry | Result | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Loading… | |||||||||||
| Parent Tx ID | Invoice | Family | Channel | Terminal | Owner | Vendor | Amount | Failed At | Decision | Trusted Checks | Attempts | Next Retry | Result | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Loading… | ||||||||||||||
| Job ID | Created Tx ID | Channel | Invoice | Amount | Vendor | Reason | Status | Decision | Submitted | Processed | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Loading… | |||||||||||
Submit Reconciliation Job
| Transaction ID | Retries | Max | Last Balance | Limit | Last Retry | Next Retry | Status |
|---|---|---|---|---|---|---|---|
| Loading… | |||||||
Vendors Without Provider Send Action Rules
These vendor IDs appear in failed transactions but have no providerSendActions rule in resendChecker.js. Transactions for these vendors are recorded but not resent. To enable auto-resend for a vendor, add it to VENDOR_RULE_MAP after confirming the correct provider send action name from real action logs.
| Vendor ID | Vendor Name | Failed Transactions | Total Amount (LKR) | Last Seen |
|---|---|---|---|---|
| Loading… | ||||
Agent Control
How often both Case 1 and Case 2 scans run.
Per-run cap applied to each case independently.
Payment failed because dealer deposit could not be deducted before the vendor request was sent. Safe to resend once balance is restored.
Scan Settings
How many days back to scan for Failed (terminalStatus=4) transactions.
Case 1 scans terminal/kiosk channel only.
Skip Rules (Case 1)
Transactions matching any rule are skipped with BLOCKED_BY_CONFIG. Enter comma-separated values.
Case-insensitive substring match on TerminalOwner field.
Saved but not yet active — field name to be confirmed.
Owner / Dealer Balance
Resend only when owner balance > this value. Typically negative (e.g. -50000).
After this many retries job expires as EXPIRED_OWNER_BALANCE_NOT_RECOVERED.
TM Action Code Automation
— triggers kiosk/updater when clustered failures detectedDefault: 6034
Min failures in window to trigger. Default: 2.
Default: 30 min.
Performance cap per cycle. Default: 200.
Vendor Rules
— provider send action detection per vendorOnly vendors with an enabled rule will be resent. Any unmapped vendor is marked NEEDS_VENDOR_RULE_MAPPING. Only add rules after confirming action names from real logs.
| Vendor ID | Vendor Name | Provider Send Actions | Status | Notes | Updated | |
|---|---|---|---|---|---|---|
| Loading… | ||||||
Action names from GetActionLogs that confirm a provider send was attempted.
Payment reached the vendor but the vendor returned a failure response. Per-service rules define which responses are safe to resend vs. permanent failures to skip.
Case 2 Settings
How many days back to scan for Vendor Failed transactions (independent of the global lookback).
Total resend attempts before marking expired.
Exact errorMessage from the status check API that confirms vendor did not process the payment. Any other response is treated as untrusted.
MegaPay terminalStatus code for FailedRetry. Confirm via admin filter. When set, the agent also scans for FailedRetry transactions across all 4 channels. Leave blank to disable FailedRetry scanning (existing candidates still retry normally).
Enable all channels where you see FailedOnVendor transactions. Each channel uses its own API endpoint.
Skip Rules (Case 2)
Transactions matching any rule are skipped with BLOCKED_BY_CONFIG and not resent.
Comma-separated vendor IDs — skip all their transactions.
Vendor Override Rules
Per-vendor rules that override the normal resend decision. Status checks always run regardless.
| Vendor | Action | Match Condition | Schedule / Amount | Status | Notes | |
|---|---|---|---|---|---|---|
| No override rules | ||||||
Case-insensitive substring match against vendor API response from TransactionLogs.
24-hour HH:MM in Sri Lanka time. Resend will be attempted the next calendar day at this time.
Leave blank to match all amounts for this vendor. Mobile number detected from AdditionalDetails field of the parent transaction.
Override ContractTypeId when the original is empty or wrong for the target vendor. Leave blank to use original.
Per-Service Vendor Response Rules
For each vendor/service, define which vendor response strings mean resendable (transient error, safe to retry) and which mean permanent failure (skip — do not resend). Applies across all selected channels for that service.
| Vendor / Service | Applicable Channels | Resendable Response Patterns | Skip (Permanent Fail) Patterns | Status | Notes | |
|---|---|---|---|---|---|---|
| No rules yet — add a service rule to get started | ||||||
Vendor response strings that mean the request did NOT reach the provider — safe to resend. Case-insensitive substring match.
Vendor response strings that mean the request was received and rejected permanently — do not resend.
Processes reconciliation resend jobs submitted by the Accounting Agent (any channel). Skips already-completed transactions; resends Created or FailedOnVendor transactions.
Reconciliation Resend Settings
Controls which jobs are picked up and processed each resend cycle. Applies to all channels (Cargills, Provider Check, etc.).
How many pending reconciliation jobs to process per cycle.
Comma-separated channel names. Only process jobs matching these channels. Leave empty to allow all.
Comma-separated reason values. Leave empty to allow all reasons.
Config Change History
| When | By | Section | Comment |
|---|---|---|---|
| Loading… | |||
Accounting Agent
All reconciliation jobs and accounting workflows managed by this agent.
JustPay · Cargills Bank Reconciliation
MegaPay completed transactions vs Cargills Bank credits — per reconciliation day
| Message ID | Type | Subject | From | Received | Files | Status |
|---|---|---|---|---|---|---|
| Loading… | ||||||
| App Transaction ID | Section | Amount (LKR) | External ID | Txn Date | Decision | Processed |
|---|---|---|---|---|---|---|
| Loading… | ||||||
| Severity | Type | Description | Reference | Status | Actions |
|---|---|---|---|---|---|
| Loading… | |||||
| Bill Reference | App Transaction ID | Amount (LKR) | TR Status | Recon Status | Date |
|---|---|---|---|---|---|
| Loading… | |||||
| Date | Reference | Gateway Ref | Amount (LKR) | Type | Recon Status |
|---|---|---|---|---|---|
| Loading… | |||||
| Time | What Happened | Transaction ID | Result |
|---|---|---|---|
| Loading… | |||
Mobitel — Transaction Status Check
Check PRE / POST transaction status against Mobitel merchant cabinet (AIMS portal)
Manual Lookup
| Reference | Channel | Check Date | Our Status | Mobitel Status | Action Taken | Checked At | |
|---|---|---|---|---|---|---|---|
| No checks run yet | |||||||
Cybersource — Card Batch Overview
Daily batch CSV reports per merchant · matched to MegaPay External Transactions by MerchantReferenceNumber
Cybersource Transaction Detail
Cybersource — Transactions
All rows from downloaded Cybersource batch CSVs and their reconciliation status
| Org | Report Date | MRN | Amount (LKR) | CSV Status | Request Date | Recon Status |
|---|---|---|---|---|---|---|
| Loading… | ||||||
Cybersource — Activity Log
Agent run events: OTP logins, downloads, reconciliation results, errors
Cybersource — Configuration
Settings for Cybersource daily batch CSV reconciliation
Core Settings
Cybersource generates the previous day's report in the early morning SLT. Default: 06:00.
Merchants
Agent Status
Action Gates
Independent gates for each live action. All default to OFF for safety. Dry Run above overrides all.
Reconciliation Scope
GatewayRef checkpoint bootstrap. Only change before a data reset.
Schedule & Polling
Reconciliation — Case 1: Cargills JustPay
Failed Transaction Report (FTR) emails from Cargills Bank. Agent completes the listed transactions in MegaPay and replies with a confirmation.
Reconciliation — Bank Statement Match
Cross-checks Transaction Reports (TR) against Bank Statements (BS). Flags mismatches as exceptions.
Email Notifications
Bank completion reply is sent from SMTP_FROM (currently info@megapaysl.com) to the original FTR email sender (Cargills Bank) as a reply-all in the same thread.
FTR reminders are sent from the same address to the recipients listed below.
Templates support {count}, {amount} (reply) and {name}, {date} (reminder).
People to remind when FTR email hasn't arrived by the deadline hour. Leave empty to disable reminders.
Sri Lanka Holiday Calendar
No FTR reminders are sent on public holidays. Add dates to suppress reminders.
Provider Cabinet Check
Automated status verification against provider payment portals (e.g. Mobitel AIMS). Triggered by the Case 2 Resend Agent when a PROVIDER_CABINET_CHECK override rule matches a transaction.
Mobitel AIMS Credentials
Vendor Routing Rules
Maps MegaPay vendor IDs to provider cabinets and defines how to construct the cabinet reference (e.g. MGPPRE or MPOPOS prefix) when vendor transaction logs don't contain one.
| Vendor ID | Vendor Name | Provider | Default Prefix | Reference Rules | Enabled | |
|---|---|---|---|---|---|---|
| Loading… | ||||||
Vendor Rule
subscriptionType true = Prepaid → MGPPRE. subscriptionType false = Postpaid → MPOPOS. always = unconditional catch-all.
Transaction Detail
Vendor Failed Candidate Detail
Provider Check — Diagnostic Report
Reconciliation Job Detail
KYC Agent
Recent Runs
| Started | Scanned | Approved | Rejected | Manual | Errors | Mode |
|---|---|---|---|---|---|---|
| Loading… | ||||||
| KYC ID | NIC / Passport | Name | Phone | Decision | Confidence | Processed At | Reason |
|---|---|---|---|---|---|---|---|
| Loading… | |||||||
Run History
| Run ID | Started | Duration | Scanned | Approved | Rejected | Manual | Errors | Mode |
|---|---|---|---|---|---|---|---|---|
| Loading… | ||||||||
Agent Control
LLM Vision Settings
Must support image input (gpt-4o, gpt-4o-mini). gpt-4o recommended for accuracy.
Confidence must be ≥ this to auto-approve (0–1).
Confidence must be ≥ this to auto-reject (0–1).
Below both thresholds → MANUAL_REVIEW (human agent decides).
Document Requirements
If a required document is missing, the application is sent to Manual Review instead of being processed by AI.
NIC Mismatch Rules
Rule-based hard blocks. Applied before LLM analysis — override the LLM decision if triggered.