Customer Satisfaction (CSAT)
1. CSAT Flow
Call ends
│
▼
Play IVR prompt ("Please rate this service...")
│
├── Press 1 = Very satisfied
├── Press 2 = Satisfied
├── Press 3 = Neutral
├── Press 4 = Dissatisfied
├── Press 5 = Very dissatisfied
│
▼
Record rating (cc_csat)
│
▼
Play thank-you message → Hang up
2. Configuration
CSAT operates as a standalone IVR application, referenced in route or queue configuration:
2.1 Queue Configuration
[[queue]]
name = "sales-queue"
[queue.after_call]
csat_enabled = true
csat_ivr = "csat-survey"
2.2 Custom CSAT IVR
CSAT uses the standard IVR Step protocol and can be customized via the IVR Editor:
| Step | Description |
|---|---|
| Play prompt | “Please rate this service, 1-5” |
| Collect digits | Wait for DTMF input |
| Confirm | “You rated X” |
| Thank you | “Thank you for your rating” |
| Hang up | End call |
3. CSAT API
3.1 Submit Rating
POST /cc/csat/{call_id}
Body: {
"score": 5,
"comment": "Great service",
"agent_id": "agent-001",
"queue_id": "sales-queue"
}
3.2 Query Agent Ratings
GET /cc/csat/agent/{agent_id}
Returns all CSAT scores for the agent:
- Average score
- Number of ratings
- Score distribution
3.3 Query Queue Ratings
GET /cc/csat/queue/{queue_id}
4. CSAT Statistics
4.1 By Agent
| Metric | Description |
|---|---|
| Average CSAT | Average score for the agent |
| Rating count | Total ratings received |
| Score distribution | Count per score (1-5) |
| Trend | Score changes over the past N days |
4.2 By Queue
| Metric | Description |
|---|---|
| Queue average CSAT | Overall satisfaction for the queue |
| Agent ranking | Agents ranked by CSAT within the queue |
5. Database
CSAT data is stored in the cc_csat table:
| Field | Description |
|---|---|
| id | Record ID |
| call_id | Associated call ID |
| agent_id | Agent ID |
| queue_id | Queue ID |
| score | Rating (1-5) |
| comment | Text feedback |
| created_at | Timestamp |
6. CSAT Result Service
The CSAT Result Service is a background service that:
- Aggregates daily / weekly / monthly CSAT statistics
- Calculates agent rankings
- Generates trend data for the reports API