# Logs ## Export Route Logs - [GET /v1/logs/routing](https://developers.withlantern.com/openapi/logs/export_route_logs_v1_logs_routing_get.md): Export route logs for audit and reporting purposes. ## Overview 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. ## Query Parameters - 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) ## Response Fields Each log entry includes: - timestamp: ISO timestamp of the action - object: Salesforce object type - object_id: Salesforce ID of the object - action: 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 action - request_id: Request ID for tracking - idempotency_key: Idempotency key for duplicate prevention - diff: Field changes for enrichment/merge actions ## Export Formats ### JSON Format (Default) Returns structured JSON data with full field information. ### CSV Format 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 ## Use Cases - 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 ## Retention Policy - 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 ## Rate Limits - Standard Export: 10 requests per minute - Large Exports: 2 requests per minute (for exports > 5000 records) - Statistics: 20 requests per minute