ticket.createdticket.status_changedmessage.incomingticket.assignee_changed
Objects used inside data
These reusable object shapes are nested under the event data field. Optional fields are omitted when the underlying value is not available.
Ticket object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | YoLead ticket id. |
chatId | string | Yes | YoLead chat id associated with the ticket. |
status | new | active | inactive | Yes | Current ticket status. |
channel.id | string | Yes | YoLead company channel id. |
channel.type | string | Yes | Source channel type, such as telegram, whatsapp, facebook, instagram, or vk. |
assigneeId | string | No | Current employee assigned to the ticket. |
startedAt | string | Yes | Ticket start time as an ISO 8601 date-time string. |
endedAt | string | No | Ticket close time as an ISO 8601 date-time string. |
Client object
| Field | Type | Required | Description |
|---|---|---|---|
firstName | string | Yes | Client display first name or fallback display name from the source channel. |
lastName | string | No | Client last name when provided by the source channel. |
photo | string | No | URL of the client profile photo. |
username | string | No | Username or profile name from the source channel. |
phone | string | No | Client phone number when available, usually from WhatsApp. |
parentUserId | string | No | Parent/source user id when provided by the channel payload. |
link | string | No | Link to the client’s profile or contact page in the source channel. |
gender | man | woman | No | Client gender when provided by the source channel. |
Message object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Source-channel message id. |
sentAt | string | No | Message send time as an ISO 8601 date-time string. |
fromId | string | Yes | Sender id from the source channel. |
text | string | Yes | Message text. Empty string when there is no text. |
attachments | array | Yes | Message attachments from the source channel. Empty array when there are none. |
Employee object
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | YoLead employee id. |
firstName | string | No | Employee first name. |
lastName | string | No | Employee last name. |
position | string | Yes | Employee position/title in YoLead. |
ticket.created
Sent when a new ticket is created from an incoming message.
message.incoming
Sent when a new incoming message is received for a ticket.
ticket.status_changed
Sent when a ticket status changes.
Payload fields:
| Field | Type | Required | Description |
|---|---|---|---|
ticketId | string | Yes | YoLead ticket id whose status changed. |
chatId | string | Yes | YoLead chat id associated with the ticket. |
oldStatus | new | active | inactive | Yes | Previous ticket status. |
newStatus | new | active | inactive | Yes | New ticket status. |
actor | string | Yes | Actor that triggered the status change. Public API changes use api; employee and embed UI changes use the employee display name; automatic reactivation by an incoming client message uses client. |
changedAt | string | Yes | Status change time as an ISO 8601 date-time string. |
oldStatus and newStatus can be new, active, or inactive.
ticket.assignee_changed
Sent when a ticket assignee changes.
Payload fields:
| Field | Type | Required | Description |
|---|---|---|---|
ticket | Ticket object | Yes | Ticket after the assignee change. |
previousAssigneeId | string | No | Previous employee assignee id, omitted when there was no previous assignee. |
assignee | Employee object | Yes | New employee assigned to the ticket. |
actor | string | Yes | Actor that triggered the assignee change. Public API changes use api; employee and embed UI changes use the employee display name. |
changedAt | string | Yes | Assignee change time as an ISO 8601 date-time string. |