Sales Call Agent
The Sales Call Agent provides automated analysis of sales call recordings. It transcribes audio files and generates comprehensive insights including client sentiment, products mentioned, pricing discussions, action items, and conversation summaries. This agent helps sales teams quickly review and analyze their calls for better follow-up and performance tracking.
Base URL
/api/agents/sales_agent
Authentication
All endpoints require authentication. Sign up to the https://nextneural.superteams.ai to get your API key.
How It Works
The Sales Call Agent performs comprehensive sales call analysis:
- Audio Transcription: Converts sales call audio to text using AI-powered speech recognition
- Intelligent Analysis: Automatically extracts:
- Speaker identification (Sales Rep vs Client)
- Client sentiment analysis (Positive, Negative, Neutral)
- Products and services mentioned
- Pricing discussions and mentions
- Action items and commitments from both parties
- Conversation summary
- Caching: Automatically caches results to avoid re-processing the same audio
- Re-evaluation: Supports force re-processing for updated analysis
Endpoints
1. Health Check
Check if the Sales Call Agent service is running.
Endpoint: GET /health
Authentication: None required
Response:
{
"status": "healthy",
"service": "sales_call_agent"
}
2. Analyze Sales Call
Process a sales call audio file and generate comprehensive analysis.
Endpoint: POST /analyze_call
Authentication: Required
Request Body:
{
"file_name": "sales_call_2025_01_14.mp3",
"document_id": 123,
"force_reprocess": false
}
Parameters:
file_name(required): Filename of the audio in the media directorydocument_id(required): Reference to the knowledge base document ID for ownership verificationforce_reprocess(optional, default: false): Re-analyze call even if already processed
Request Example:
curl -X POST "https://nextneural-api.superteams.ai/api/agents/sales_agent/analyze_call" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"file_name": "sales_call_2025_01_14.mp3",
"document_id": 123,
"force_reprocess": false
}'
Response (New Analysis):
{
"analysis": {
"id": 456,
"userId": 1,
"kbDocumentId": 123,
"audioFilename": "sales_call_2025_01_14.mp3",
"callDuration": "00:15:30",
"clientSentiment": "Positive",
"productsMentioned": [
"Enterprise Plan",
"Premium Support Package",
"API Integration Module"
],
"pricingMentions": [
"$5,000 per month for Enterprise Plan",
"20% off for annual commitment",
"$500 setup fee waived for early adopters"
],
"actionItems": [
"Sales Rep will send a detailed pricing proposal by end of day Friday",
"Client will review the product demo video and share feedback by next Tuesday",
"Sales Rep will schedule a follow-up call with the technical team next week",
"Client will connect Sales Rep with the procurement department for contract discussion"
],
"conversationSummary": "Client expressed strong interest in the Enterprise Plan with API integration. Discussed pricing options and agreed on next steps for technical evaluation and procurement process.",
"transcript": [
{
"speaker": "Sales_Rep",
"text": "Good morning! Thank you for taking the time to speak with me today. I understand you're interested in our Enterprise Plan."
},
{
"speaker": "Client",
"text": "Yes, we've been evaluating several solutions and your platform looks promising for our needs."
}
],
"alreadyEvaluated": false,
"evaluatedAt": "2025-01-14T10:30:00",
"isReevaluation": false,
"createdAt": "2025-01-14T10:30:00",
"updatedAt": "2025-01-14T10:30:00"
}
}
Response (Cached Result):
{
"analysis": {
"id": 456,
"userId": 1,
"kbDocumentId": 123,
"audioFilename": "sales_call_2025_01_14.mp3",
"callDuration": "00:15:30",
"clientSentiment": "Positive",
"productsMentioned": [...],
"pricingMentions": [...],
"actionItems": [...],
"conversationSummary": "...",
"transcript": [...],
"alreadyEvaluated": true,
"evaluatedAt": "2025-01-14T10:30:00",
"isReevaluation": false,
"createdAt": "2025-01-14T10:30:00",
"updatedAt": "2025-01-14T10:30:00"
}
}
Response (Re-evaluation):
{
"analysis": {
"id": 456,
"userId": 1,
"kbDocumentId": 123,
"audioFilename": "sales_call_2025_01_14.mp3",
"callDuration": "00:15:30",
"clientSentiment": "Positive",
"productsMentioned": [...],
"pricingMentions": [...],
"actionItems": [...],
"conversationSummary": "...",
"transcript": [...],
"alreadyEvaluated": false,
"evaluatedAt": "2025-01-14T10:30:00",
"isReevaluation": true,
"createdAt": "2025-01-14T10:30:00",
"updatedAt": "2025-01-14T11:45:00"
}
}
Notes:
- The audio file must exist in the configured media directory
- Document ownership is verified before processing
- If
force_reprocess=falseand analysis exists, returns cached result - If
force_reprocess=true, re-analyzes and updates existing record - High-accuracy AI transcription and analysis ensures quality results
- Each document can only have one analysis record
3. Get My Analyses
Retrieve all sales call analyses for the authenticated user.
Endpoint: GET /my_analyses
Authentication: Required
Query Parameters:
limit(optional, default: 100): Maximum number of records to return
Request Example:
curl -X GET "https://nextneural-api.superteams.ai/api/agents/sales_agent/my_analyses?limit=50" \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"success": true,
"userId": 1,
"count": 3,
"analyses": [
{
"id": 456,
"userId": 1,
"kbDocumentId": 123,
"audioFilename": "sales_call_2025_01_14.mp3",
"callDuration": "00:15:30",
"clientSentiment": "Positive",
"productsMentioned": ["Enterprise Plan", "API Integration"],
"pricingMentions": ["$5,000 per month"],
"actionItems": [
"Sales Rep will send pricing proposal by Friday",
"Client will review demo video by Tuesday"
],
"conversationSummary": "Client interested in Enterprise Plan...",
"transcript": [...],
"alreadyEvaluated": false,
"evaluatedAt": "2025-01-14T10:30:00",
"isReevaluation": false,
"createdAt": "2025-01-14T10:30:00",
"updatedAt": "2025-01-14T10:30:00"
},
{
"id": 455,
"userId": 1,
"kbDocumentId": 122,
"audioFilename": "sales_call_2025_01_13.mp3",
"callDuration": "00:22:15",
"clientSentiment": "Neutral",
"productsMentioned": ["Standard Plan"],
"pricingMentions": ["$2,000 per month"],
"actionItems": [
"Sales Rep will provide case studies by next week"
],
"conversationSummary": "Initial discovery call...",
"transcript": [...],
"alreadyEvaluated": false,
"evaluatedAt": "2025-01-13T15:20:00",
"isReevaluation": false,
"createdAt": "2025-01-13T15:20:00",
"updatedAt": "2025-01-13T15:20:00"
}
]
}
Notes:
- Returns analyses in reverse chronological order (newest first)
- Only returns analyses belonging to the authenticated user
- Includes full analysis details for each record
4. Get Specific Analysis
Retrieve detailed information for a specific sales call analysis.
Endpoint: GET /analysis/{record_id}
Authentication: Required
Path Parameters:
record_id(required): The ID of the analysis record to retrieve
Request Example:
curl -X GET "https://nextneural-api.superteams.ai/api/agents/sales_agent/analysis/456" \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"success": true,
"analysis": {
"id": 456,
"userId": 1,
"kbDocumentId": 123,
"audioFilename": "sales_call_2025_01_14.mp3",
"callDuration": "00:15:30",
"clientSentiment": "Positive",
"productsMentioned": [
"Enterprise Plan",
"Premium Support Package",
"API Integration Module"
],
"pricingMentions": [
"$5,000 per month for Enterprise Plan",
"20% off for annual commitment",
"$500 setup fee waived for early adopters"
],
"actionItems": [
"Sales Rep will send a detailed pricing proposal by end of day Friday",
"Client will review the product demo video and share feedback by next Tuesday",
"Sales Rep will schedule a follow-up call with the technical team next week",
"Client will connect Sales Rep with the procurement department for contract discussion"
],
"conversationSummary": "Client expressed strong interest in the Enterprise Plan with API integration. Discussed pricing options and agreed on next steps for technical evaluation and procurement process.",
"transcript": [
{
"speaker": "Sales_Rep",
"text": "Good morning! Thank you for taking the time to speak with me today."
},
{
"speaker": "Client",
"text": "Yes, we've been evaluating several solutions."
}
],
"alreadyEvaluated": false,
"evaluatedAt": "2025-01-14T10:30:00",
"isReevaluation": false,
"createdAt": "2025-01-14T10:30:00",
"updatedAt": "2025-01-14T10:30:00"
}
}
Notes:
- Only the analysis owner can access their records
- Returns 404 if analysis doesn't exist or user doesn't have access
- Includes complete transcript with speaker identification
Data Models
Analysis Record Structure
{
"id": 456,
"userId": 1,
"kbDocumentId": 123,
"audioFilename": "sales_call_2025_01_14.mp3",
"callDuration": "00:15:30",
"clientSentiment": "Positive",
"productsMentioned": ["Product A", "Product B"],
"pricingMentions": ["$5,000 per month", "20% discount"],
"actionItems": [
"Sales Rep will send proposal by Friday",
"Client will review and respond by Tuesday"
],
"conversationSummary": "Brief summary of the call...",
"transcript": [
{
"speaker": "Sales_Rep",
"text": "Dialogue from sales representative"
},
{
"speaker": "Client",
"text": "Dialogue from client"
}
],
"alreadyEvaluated": false,
"evaluatedAt": "2025-01-14T10:30:00",
"isReevaluation": false,
"createdAt": "2025-01-14T10:30:00",
"updatedAt": "2025-01-14T10:30:00"
}
Field Descriptions:
id: Unique identifier for the analysis recorduserId: ID of the user who owns this analysiskbDocumentId: Reference to knowledge base document (unique per user)audioFilename: Original audio filenamecallDuration: Duration in HH:MM:SS formatclientSentiment: Client's sentiment - "Positive", "Negative", or "Neutral"productsMentioned: Array of products/services discussedpricingMentions: Array of pricing information mentionedactionItems: Array of complete, actionable follow-up itemsconversationSummary: 1-2 sentence summary of the calltranscript: Array of speaker turns with identified speakersalreadyEvaluated: Whether this was a cached resultevaluatedAt: When the analysis was performedisReevaluation: Whether this is an updated analysiscreatedAt: Record creation timestampupdatedAt: Last update timestamp
What Gets Analyzed
The Sales Call Agent automatically extracts:
-
Speaker Identification
- Separates dialogue between Sales Rep and Client
- Maintains conversation flow and context
-
Client Sentiment
- Analyzes overall client attitude: Positive, Negative, or Neutral
- Based on language, tone, and engagement level
-
Products & Pricing
- Identifies all products and services mentioned
- Captures pricing discussions, discounts, and negotiations
-
Action Items
- Extracts commitments and next steps from both parties
- Provides complete, actionable sentences with details
-
Conversation Summary
- Generates concise 1-2 sentence overview of the call
Action Items Extraction
The agent uses advanced prompting to extract complete, actionable sentences as action items:
✅ Correct Action Items:
- "Sales Rep will send a detailed pricing proposal by end of day Friday"
- "Client will review the product demo video and share feedback by next Tuesday"
- "Sales Rep will schedule a follow-up call with the technical team next week"
❌ Incorrect Action Items (Avoided):
- "Schedule demo" (too vague)
- "Follow up" (no details)
- "Send proposal" (missing who and when)
Sentiment Analysis
The agent analyzes client sentiment based on:
- Tone and language used
- Interest level expressed
- Objections or concerns raised
- Enthusiasm about products/pricing
- Commitment to next steps
Sentiment Categories:
- Positive: Client shows strong interest, enthusiasm, or commitment
- Negative: Client expresses concerns, objections, or disinterest
- Neutral: Client is exploratory, non-committal, or balanced
Error Responses
All endpoints may return the following error responses:
400 Bad Request:
{
"detail": "document_id is required for security validation"
}
400 Bad Request (Short Transcript):
{
"detail": "Transcript is too short or empty"
}
400 Bad Request (No Organization):
{
"detail": "User must belong to an organization to use this agent"
}
403 Forbidden (Missing API Keys):
{
"detail": "API keys not configured. Please configure in admin panel."
}
403 Forbidden (Document Access):
{
"detail": "Access denied. Document 123 does not belong to user 1"
}
404 Not Found:
{
"detail": "Audio file not found: sales_call_2025_01_14.mp3"
}
404 Not Found (Analysis):
{
"detail": "Analysis not found or you don't have access to it"
}
500 Internal Server Error:
{
"detail": {
"error": "Transcription failed: [error message]",
"error_type": "TranscriptionError",
"message": "Unexpected error during analysis"
}
}
Best Practices
Audio Quality Requirements
- Format: MP3, WAV, M4A, or other common audio formats
- Duration: 5-60 minutes optimal (longer calls supported)
- Audio Quality: Clear speech from both parties
- Recording: Use good quality recording equipment
- Background Noise: Minimize for better transcription accuracy
- Speaker Separation: Clear distinction between speakers helps
Recording Guidelines
- Use a dedicated call recording solution
- Ensure both parties are clearly audible
- Avoid overlapping speech when possible
- Record in a quiet environment
- Test recording quality before important calls
- Use headsets or quality microphones
Analysis Best Practices
- First Analysis: Let the system cache results for faster future access
- Re-evaluation: Use
force_reprocess=trueonly when needed - Review Action Items: Verify extracted action items for accuracy
- Sentiment Context: Consider sentiment in context of the full conversation
- Follow-up: Use action items as a checklist for follow-up tasks
Integration Workflow
# 1. Upload audio to media directory (via your file upload system)
# Audio file: sales_call_2025_01_14.mp3
# 2. Analyze the sales call
curl -X POST "https://nextneural-api.superteams.ai/api/agents/sales_agent/analyze_call" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"file_name": "sales_call_2025_01_14.mp3",
"document_id": 123
}'
# 3. Review the analysis results
# - Check client sentiment
# - Review products and pricing discussed
# - Follow up on action items
# 4. Retrieve all analyses for reporting
curl -X GET "https://nextneural-api.superteams.ai/api/agents/sales_agent/my_analyses" \
-H "Authorization: Bearer YOUR_TOKEN"
# 5. Get specific analysis for detailed review
curl -X GET "https://nextneural-api.superteams.ai/api/agents/sales_agent/analysis/456" \
-H "Authorization: Bearer YOUR_TOKEN"
# 6. Re-analyze if needed (e.g., improved AI model)
curl -X POST "https://nextneural-api.superteams.ai/api/agents/sales_agent/analyze_call" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"file_name": "sales_call_2025_01_14.mp3",
"document_id": 123,
"force_reprocess": true
}'
Performance Considerations
- Transcription Time:
- Short calls (< 10 min): 15-45 seconds
- Medium calls (10-30 min): 45-120 seconds
- Long calls (> 30 min): 2-5 minutes
- Analysis Time: 5-15 seconds for AI analysis
- Total Processing: Typically 30-90 seconds for a 15-minute call
- Caching: Results are cached; subsequent requests return instantly
- Concurrent Processing: Multiple calls can be analyzed simultaneously
- Storage: Each analysis record is compact (typically < 100KB)
Security Features
- User Isolation: All queries filtered by user_id
- Document Ownership: Validates KB document belongs to user
- Authentication: All endpoints require valid tokens with
agent:salesscope - Organization Context: API keys scoped to organization
- Unique Constraint: One analysis per document prevents duplicates
- Access Control: Users can only access their own analyses
Use Cases
1. Sales Team Performance Review
- Review sentiment trends across multiple calls
- Identify successful conversation patterns
- Track products mentioned and pricing discussions
- Monitor action item completion rates
2. Follow-up Management
- Extract action items automatically
- Create follow-up tasks from analysis
- Track commitments from both parties
- Ensure nothing falls through the cracks
3. Pricing Strategy Analysis
- Analyze pricing discussions across calls
- Identify common objections or concerns
- Track discount patterns and negotiations
- Optimize pricing presentations
4. Product Feedback
- Identify which products generate interest
- Track feature requests and questions
- Understand client priorities
- Guide product development
5. Training and Coaching
- Review call transcripts for training
- Identify best practices from positive sentiment calls
- Coach on objection handling
- Improve sales techniques
Troubleshooting
Transcription Issues
Problem: Poor transcription quality
- Cause: Background noise, unclear speech, low audio quality
- Solution: Re-record with better audio quality, use noise cancellation
Problem: Transcription failed
- Cause: Unsupported audio format, corrupted file, API issues
- Solution: Convert to MP3/WAV, verify file integrity, check API key
Problem: Transcript too short
- Cause: Audio file is empty or very short
- Solution: Verify audio file has actual content, check recording
Analysis Issues
Problem: Incorrect sentiment
- Cause: Complex conversation, mixed signals, sarcasm
- Solution: Review full transcript, use
force_reprocessfor re-analysis
Problem: Missing action items
- Cause: Action items not clearly stated in call
- Solution: Review transcript, manually add missing items
Problem: Wrong speaker identification
- Cause: Similar voices, overlapping speech
- Solution: Review transcript, note for future calls
Performance Issues
Problem: Slow processing
- Cause: Large audio file
- Solution: Split large files, retry if timeout occurs
Problem: Analysis timeout
- Cause: Very long transcript
- Solution: Ensure audio is under 2 hours, retry if needed
Limitations
- Language Support: Optimized for English; other languages may have reduced accuracy
- Speaker Count: Best with 2 speakers (sales rep and client); multiple clients may reduce accuracy
- Audio Length: Very long calls (> 2 hours) may have processing delays
- One Analysis Per Document: Each document can only have one analysis record
Future Enhancements
- Multi-language support with automatic detection
- Advanced speaker diarization for multi-party calls
- Emotion detection beyond sentiment (excitement, frustration, etc.)
- Competitive intelligence extraction
- Objection handling analysis
- Talk-time ratio and conversation flow analysis
- Integration with CRM systems for automatic follow-up creation
- Real-time analysis during live calls
- Custom analysis templates per industry
- Trend analysis across multiple calls