Export route logs for audit and reporting purposes.
The Route Logs API provides comprehensive audit trails for all routing, conversion, merging, and enrichment actions performed on Salesforce objects. It supports filtering, export formats, and configurable retention policies.
from: Start date for log export (ISO format, required)to: End date for log export (ISO format, required)pool: Filter by specific pool name (optional)object: Filter by specific object type (Lead, Contact, Account, Opportunity) (optional)action: Filter by specific action type (assign, convert, merge, enrich) (optional)format: Export format (json, csv) (optional, default: json)include_diff: Include diff data in export (optional, default: true)limit: Maximum number of records to return (optional, default: 1000, max: 10000)
Each log entry includes:
timestamp: ISO timestamp of the actionobject: Salesforce object typeobject_id: Salesforce ID of the objectaction: Action performed (assign, convert, merge, enrich)pool: Round-robin pool name (for assign actions)assigned_to: Salesforce ID of assigned user (for assign actions)prev_owner: Previous owner ID (for assign/convert actions)sequence: Round-robin sequence number (for assign actions)reason: Reason for the actionrequest_id: Request ID for trackingidempotency_key: Idempotency key for duplicate preventiondiff: Field changes for enrichment/merge actions
Returns structured JSON data with full field information.
Returns comma-separated values suitable for spreadsheet applications.
- Headers: timestamp, object, object_id, action, pool, assigned_to, prev_owner, sequence, reason, request_id, idempotency_key, diff
- Diff data is JSON-encoded in the diff column
- Audit Compliance: Track all actions for regulatory compliance
- Performance Analysis: Analyze routing patterns and efficiency
- User Activity: Monitor user assignments and activity
- Enrichment Tracking: Track data enrichment changes and sources
- Troubleshooting: Debug routing issues and user assignments
- Default Retention: 365 days
- Maximum Retention: 1095 days (3 years)
- Auto Cleanup: Enabled by default (daily at 2 AM)
- Configurable: Retention can be adjusted per organization
- Standard Export: 10 requests per minute
- Large Exports: 2 requests per minute (for exports > 5000 records)
- Statistics: 20 requests per minute
Security
BearerAuth
- Lantern API serverhttps://api-gateway.agenthq.withlantern.com/v1/logs/routing
- Local API serverhttp://localhost:8000/v1/logs/routing
curl -i -X GET \
'https://api-gateway.agenthq.withlantern.com/v1/logs/routing?from_date=2019-08-24T14%3A15%3A22Z&to_date=2019-08-24T14%3A15%3A22Z&pool=string&object=string&action=string&format=json&include_diff=true&limit=1000' \
-H 'Authorization: Bearer <YOUR_ApiToken_HERE>'Success Response
Array []
Any of:
Salesforce ID of assigned user (for assign actions)
string
Any of:
Reason for the action (e.g., 'round_robin', 'manual_override')
string
Response
[ { "timestamp": "2025-09-18T16:12:00Z", "object": "Lead", "object_id": "00Qxx0000Lm789U", "action": "assign", "pool": "SDR_WEST_01", "assigned_to": "005xx0002ABCDE", "prev_owner": "005xx0001ZZZZZ", "sequence": 1245, "reason": "round_robin", "request_id": "req_abc123", "idempotency_key": "c1f2-..." }, { "timestamp": "2025-09-18T16:15:00Z", "object": "Lead", "object_id": "00Qxx0000Lm78AA", "action": "enrich", "reason": "auto_enrichment", "request_id": "req_def456", "idempotency_key": "a3b4-...", "diff": { … } } ]