Actions16
🧠 Get AI Context
AI-generatedSummary
Retrieve full customer context (contact info and recent call history) for AI Agent consumption.
Inputs
- phone — Phone number for the operation. If provided, recent call history is filtered to numbers matching this ANI/destination. Will be automatically normalized. Include country code for international numbers. Default: empty string. Note: UI marks as required, but runtime treats it as optional (default '') per source implementation where phone filtering is conditional on presence.
- email — Email address for contact lookup or creation. Default: empty string.
Output shape
Standardized AI output object. On success: contains customer context (phone, email, identified boolean, contact details from getContact), call history (last 30 days stats: total calls, average duration, last call; recent calls sliced to first 5), and generatedAt ISO timestamp. Confidence is 0.9 if successful, 0.1 if error. Summary (if includeSummary) reads 'Retrieved context for customer
Phone and email are optional at runtime; if omitted, contact fetch and call history still execute but without filtering. Errors during contact or call fetch are silently ignored per source implementation.
Examples
Example 1: Basic usage with phone
phone: '380501234567', email omitted, aiSettings default (includeSummary=true, standardizedOutput=true, errorMode=lenient, includeRawResponse=false, confidenceThreshold=0.7). Returns customer context with call history from last 30 days filtered to the provided phone number.
Example 2: Usage with email only
phone omitted, email: 'john.smith@example.com'. Returns contact info found by email and associated call history (no phone filtering).