Follow these 3 steps to connect your support dashboard and receive live customer escalations.
Add this script tag to your dashboard HTML header:
<script src="https://connect.petstore.co.ke/petstore-socket-sdk.js"></script>
ticket.created event fires instantly in real-time. You can use this to play an audio chime, pop up an alert, or highlight a queue item on your human agent dashboard.
Initialize the SDK in JavaScript to receive live escalation popups:
// Connect to server
const petstoreChat = new PetstoreSocketSDK({
serverUrl: 'https://connect.petstore.co.ke',
apiKey: 'petstore_live_key_2026'
});
// 🚨 Listen for real-time customer escalations / new tickets
petstoreChat.on('ticket.created', (data) => {
console.log('New Ticket / Escalation Received:', data);
// Show pop-up alert or play sound on human agent dashboard UI!
});
Call this endpoint when an agent takes over a chat:
https://connect.petstore.co.ke/api/tickets/:ticketId/takeover{
"agentName": "Sarah",
"agentId": "agent_123"
}