What are Custom Metrics?
Custom metrics allow you to define AI-powered analysis rules that extract specific insights from your calls automatically. Combined with post-call webhooks, you can send this data directly to your systems for further processing.Key Features
AI-Powered Extraction
AI analyzes call transcripts to extract custom metrics
Multiple Data Types
Text, Numbers, Yes/No, and List data types
Post-Call Webhooks
Send metrics to your external systems automatically
Default Metrics
Standard metrics included by default
How It Works
Setting Up Custom Metrics
Dashboard Configuration
- Navigate to your agent settings
- Go to the Metrics tab
- Scroll to Custom Metrics section
- Click Add Custom Metric
- Configure:
- Metric Name: What to call this metric
- Data Type: Text, Number, Yes/No, or List
- AI Analysis Prompt: Instructions for AI extraction
- Required: Whether this metric must always have a value
- Description: Optional notes about this metric
- Click Create Metric or Update Metric to save
Configuration Example
Data Types
Choose the appropriate data type for your metric:Text (String)
Store textual responses or extracted information. Example:Number
Store numerical values like scores, ratings, or counts. Example:Yes/No (Boolean)
Store true/false values for yes/no questions. Example:List (Array)
Store multiple values as a list. Example:Default Metrics
Dialgen includes standard metrics for every call. These are always included unless explicitly disabled:| Metric | Type | Description |
|---|---|---|
summary | string | Overall call summary |
intent | string | Primary customer intent |
sentiment | string | Customer sentiment (positive/neutral/negative) |
confidence | number | AI confidence in the analysis (0-1) |
keyPoints | array | Key discussion points |
actionItems | array | Items requiring follow-up action |
callStatus | string | Call status (SUCCESS, UNRESOLVED, ESCALATION) |
callbackRequired | string | Whether callback is needed |
promisedDate | string | Any promised date mentioned |
selfEvaluation | array | Agent’s self-evaluation of performance |
followUpAction | string | Recommended follow-up action |
ticketRaised | string | Support ticket number if created |
Disable Default Metrics
You can disable default metrics if you only want custom ones:- In the Metrics tab
- Find Default Dialgen Metrics section
- Toggle Enable switch to OFF
Post-Call Webhooks
What are Post-Call Webhooks?
Post-call webhooks are HTTP POST requests sent to your server immediately after a call completes. They contain:- Complete call data
- All default metrics
- All custom metrics with their schema
- Recording URL and transcript
Configuration
- Go to Metrics tab in agent settings
- Find Post-Call Webhook section
- Enter your webhook URL:
https://api.yourdomain.com/webhook - Save
Webhook Payload with Schema
The
metricSchema field contains the complete definition of all custom metrics, including their type, description, and whether they’re required. This allows your system to properly validate and process the custom metric values.Processing Webhooks
Node.js Example
Python Example
Best Practices
Writing Effective Prompts
❌ Vague:Choose Right Data Types
| Metric Type | Best Data Type |
|---|---|
| Scores or ratings | Number |
| Yes/No decisions | Boolean |
| Multiple values | Array |
| Descriptions or feedback | String |
Required Fields
Mark metrics as “Required” only when:- The metric must always have a value
- Missing values would cause problems in your system
- You want to validate quality
Testing Metrics
- Create test agents with your metrics
- Run test calls with various scenarios
- Review webhook payloads to verify accuracy
- Adjust prompts based on results
- Deploy when confident
Security
- ✓ Validate webhook signatures if possible
- ✓ Use HTTPS URLs only
- ✓ Implement rate limiting
- ✓ Log all webhook activity
- ✓ Handle errors gracefully
Common Use Cases
Lead Scoring
Sentiment Tracking
Issue Documentation
Follow-up Actions
Troubleshooting
Webhook Not Received
Check:- URL is correct and publicly accessible
- Server is responding with 2xx status code
- Firewall isn’t blocking incoming requests
- Check Dialgen logs for errors
Metrics Empty or Incorrect
Solutions:- Review and clarify your AI prompt
- Provide examples in the prompt
- Use simpler, more direct language
- Test with different call scenarios
High CPU Usage
Optimization:- Reduce number of custom metrics
- Simplify AI prompts
- Disable default metrics if not needed
- Increase webhook processing interval
Retrieving Metrics via API
In addition to webhooks, you can retrieve custom metrics by calling theget-call-metric endpoint. The endpoint will return the complete schema definition for all custom metrics configured for that agent.
Get Call Metrics Endpoint
Response with Custom Metric Schema
Both the
get-call-metric endpoint and the onCallComplete webhook return the complete metric schema, allowing your application to properly understand and validate each custom metric’s structure.