Get All Support Agents (SuperAdmin)
Retrieves paginated list of all support agents.
Path Parameters
Page number (starts at 1)
Query Parameters
Items per page (default: 50)
Response
Array of support agent objects
Total number of support agents
Response Codes
200 OK - Support agents retrieved
Example
curl -X GET "https://your-server.com/api/supports/page/1?pageSize=50" \
-H "Authorization: Bearer YOUR_ADMIN_JWT_TOKEN"
Success Response
{
"items": [
{
"id": "support-uuid-1",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Support",
"isActive": true,
"totalResolved": 342,
"averageResponseTime": "2.5 hours",
"createdAt": "2024-01-01T10:00:00Z"
},
{
"id": "support-uuid-2",
"email": "[email protected]",
"firstName": "John",
"lastName": "Helper",
"isActive": true,
"totalResolved": 198,
"averageResponseTime": "3.1 hours",
"createdAt": "2024-01-15T14:30:00Z"
}
],
"totalCount": 12,
"currentPage": 1,
"totalPages": 1
}
Create Support Agent (SuperAdmin)
Creates a new support agent account.
Request Body
Support agent email address
Initial password for the support agent
Response Codes
204 No Content - Support agent created successfully
400 Bad Request - Invalid data or validation error
409 Conflict - Email already exists
500 Internal Server Error - Error creating support agent
Examples
curl -X POST "https://your-server.com/api/supports" \
-H "Authorization: Bearer YOUR_ADMIN_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "SecurePassword123!",
"firstName": "Alex",
"lastName": "Support"
}'
Error Response Examples
Email Already Exists (409 Conflict):
"An account with this email already exists"
Invalid Email (400 Bad Request):
Weak Password (400 Bad Request):
"Password must be at least 8 characters and contain uppercase, lowercase, and numbers"
Delete Support Agent (SuperAdmin)
Deletes a support agent account.
Path Parameters
Response Codes
204 No Content - Support agent deleted
400 Bad Request - Cannot delete support agent with active tickets
404 Not Found - Support agent not found
500 Internal Server Error - Error during deletion
Example
curl -X DELETE "https://your-server.com/api/supports/support-uuid" \
-H "Authorization: Bearer YOUR_ADMIN_JWT_TOKEN"
Error Response Examples
Active Tickets (400 Bad Request):
"Cannot delete support agent with active support tickets. Reassign tickets first."
Before deleting a support agent, ensure all their active tickets are resolved or reassigned to other agents.
Support Management Overview
Support Agent Roles
Support agents have the Support role which grants them access to:
- View all pending support requests
- Respond to customer inquiries
- Cancel/close support requests
- View support request history
Support Agent Responsibilities
Timely Responses: Respond to customer requests within SLA timeframes
Quality Service: Provide accurate, helpful, and professional responses
Documentation: Keep detailed notes on support interactions
Escalation: Escalate complex issues to appropriate teams or supervisors
Response Time:
- Target: < 24 hours for first response
- Measured from request creation to first support response
Resolution Time:
- Target: < 72 hours for complete resolution
- Measured from request creation to final resolution
Customer Satisfaction:
- Tracked through post-resolution surveys
- Target: > 90% satisfaction rate
Ticket Volume:
- Number of tickets handled per agent
- Number of tickets resolved per day/week
Monitoring Support Queue
// Example: Support dashboard metrics
async function getSupportMetrics() {
// Get pending tickets
const pendingResponse = await fetch('/api/support-requests', {
headers: { 'Authorization': `Bearer ${token}` }
});
const pendingTickets = await pendingResponse.json();
// Calculate metrics
const metrics = {
totalPending: pendingTickets.length,
byCategory: {},
oldestTicket: null,
averageWaitTime: 0
};
// Group by category
pendingTickets.forEach(ticket => {
metrics.byCategory[ticket.category] =
(metrics.byCategory[ticket.category] || 0) + 1;
});
// Find oldest ticket
if (pendingTickets.length > 0) {
metrics.oldestTicket = pendingTickets.reduce((oldest, ticket) =>
new Date(ticket.createdAt) < new Date(oldest.createdAt) ? ticket : oldest
);
// Calculate average wait time
const now = new Date();
const totalWaitTime = pendingTickets.reduce((total, ticket) => {
return total + (now - new Date(ticket.createdAt));
}, 0);
metrics.averageWaitTime = totalWaitTime / pendingTickets.length;
}
return metrics;
}
Support Agent Onboarding
Create Agent Account
SuperAdmin creates support agent account with email and password
Agent Receives Credentials
New agent receives login credentials and onboarding materials
Training
Agent completes training on products, policies, and support procedures
System Access
Agent logs in with Support role and accesses support queue
Shadow Period
New agent shadows experienced agents before handling tickets independently
Independent Work
Agent begins handling support requests independently
Best Practices for Support Teams
Response Templates
Create response templates for common issues:
const responseTemplates = {
orderNotReceived: `Thank you for contacting us. I've checked your order status and found that [status details]. [Next steps]`,
productDefect: `We apologize for the inconvenience with your product. We take quality seriously and would like to make this right. [Resolution options]`,
accountAccess: `I can help you with your account access issue. [Troubleshooting steps]`,
generalInquiry: `Thank you for reaching out. [Answer to question]`
};
Escalation Guidelines
Escalate to supervisors or specialized teams when:
- Issue requires refunds > $100
- Customer requests manager/supervisor
- Technical issue beyond support agent expertise
- Legal or compliance concerns
- Abusive or threatening behavior
Quality Assurance
Regular review of support responses ensures quality and consistency across the team
Customer feedback helps identify areas for improvement in support processes