# Export Route Logs 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 Endpoint: GET /v1/logs/routing Version: 1.4.1 Security: BearerAuth ## Query parameters: - `from_date` (string, required) Start date for log export (ISO format) - `to_date` (string, required) End date for log export (ISO format) - `pool` (any) Filter by specific pool name - `object` (any) Filter by specific object type - `action` (any) Filter by specific action type - `format` (string) Export format (json, csv) - `include_diff` (boolean) Include diff data in export - `limit` (integer) Maximum number of records to return ## Response 200 fields (application/json): - `timestamp` (string, required) ISO timestamp of the action - `object` (string, required) Salesforce object type Enum: "Lead", "Contact", "Account", "Opportunity" - `object_id` (string, required) Salesforce ID of the object - `action` (string, required) Action performed on the object Enum: "assign", "convert", "merge", "enrich" - `pool` (any) Round-robin pool name (for assign actions) - `assigned_to` (any) Salesforce ID of assigned user (for assign actions) - `prev_owner` (any) Previous owner ID (for assign/convert actions) - `sequence` (any) Round-robin sequence number (for assign actions) - `reason` (any) Reason for the action (e.g., 'round_robin', 'manual_override') - `request_id` (any) Request ID for tracking - `idempotency_key` (any) Idempotency key for duplicate prevention - `diff` (any) Field changes for enrichment/merge actions ## Response 400 fields (application/json): - `success` (boolean) Always false for error responses - `error` (string, required) Error message - `details` (any) Additional error details - `request_id` (any) Request ID for tracking - `retry_after` (any) Seconds to wait before retrying for rate limit errors ## Response 401 fields (application/json): - `success` (boolean) Always false for error responses - `error` (string, required) Error message - `details` (any) Additional error details - `request_id` (any) Request ID for tracking - `retry_after` (any) Seconds to wait before retrying for rate limit errors ## Response 402 fields (application/json): - `success` (boolean) Always false for error responses - `error` (string, required) Error message - `details` (any) Additional error details - `request_id` (any) Request ID for tracking - `retry_after` (any) Seconds to wait before retrying for rate limit errors ## Response 422 fields (application/json): - `detail` (array) - `detail.loc` (array, required) - `detail.msg` (string, required) - `detail.type` (string, required) ## Response 429 fields (application/json): - `success` (boolean) Always false for error responses - `error` (string, required) Error message - `details` (any) Additional error details - `request_id` (any) Request ID for tracking - `retry_after` (any) Seconds to wait before retrying for rate limit errors ## Response 500 fields (application/json): - `success` (boolean) Always false for error responses - `error` (string, required) Error message - `details` (any) Additional error details - `request_id` (any) Request ID for tracking - `retry_after` (any) Seconds to wait before retrying for rate limit errors