Ticket Rename Event
Sent when a ticket channel is renamed with the rename command or button. The ticket.rename webhook event, with its payload fields, an example and use cases.
Event Type
"ticket.rename"Description
This event is triggered when a ticket channel is renamed using the rename command or button.
Payload Structure
Prop
Type
Example Payload
{
"type": "ticket.rename",
"payload": {
"ticketId": "TKT-1234",
"panelId": "support-panel",
"channel": {
"id": "1140972530400776294",
"name": "billing-issue"
},
"creatorId": "713115896805064856",
"openDate": "2024-01-18T15:30:00.000Z",
"oldName": "ticket-0001",
"newName": "billing-issue"
}
}Example Usage
app.post('/webhook', (req, res) => {
const { type, payload } = req.body;
if (type === 'ticket.rename') {
console.log(`Ticket renamed:`);
console.log(` Old: ${payload.oldName}`);
console.log(` New: ${payload.newName}`);
// Log the rename event
await logTicketRename({
ticketId: payload.ticketId,
oldName: payload.oldName,
newName: payload.newName,
timestamp: new Date(),
});
}
res.status(200).send('OK');
});Use Cases
- Track ticket name changes for audit logs
- Update ticket names in external systems
- Analyze common rename patterns
- Monitor ticket organization practices
Close
Sent when a ticket is closed by a staff command, a button, autoclose or any other way. The ticket.close webhook event, with its payload and an example.
Priority
Sent when a ticket's priority is changed with the priority command or button. The ticket.priority webhook event, with the priority levels and an example.