Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.yo-lead.com/llms.txt

Use this file to discover all available pages before exploring further.

YoLead uses chat for the client-channel relationship and ticket for each separate request inside that chat.

Chat vs ticket

TermMeaning
company channelA connected social or messaging account of your company, such as a WhatsApp Business account, Telegram bot, Instagram account, Facebook page, or VK group.
chatA stable link between one company channel and one client account in a specific source channel, such as WhatsApp or Telegram. For example, if John writes in WhatsApp and then in Telegram, YoLead creates two separate chats. A chat does not have a business lifecycle end and can receive multiple tickets over time.
ticketA single request or work episode inside a chat.
chat.lastTicketThe last ticket in the chat.
ticket.previousTicketThe previous ticket in the same chat, present when a repeat request creates a new ticket.
One chat can have multiple tickets over time. For example, the same client can contact the company today, close the dialog, and contact the company again later. That later request may reopen the previous ticket or create a new ticket, depending on the channel restore period.

Ticket statuses

StatusMeaning
newA new incoming request that has not been taken into work yet.
activeThe request is in work. It is usually assigned to an employee.
inactiveThe request is closed. YoLead sets endedAt when the ticket is moved to this status.

Chat status

A chat also has a status. It stays in sync with the status of chat.lastTicket.

Allowed status transitions

FromToMeaning
newactiveTake a new request into work.
activeinactiveClose the request.
inactiveactiveReopen a closed request.
Direct new to inactive transitions are not allowed. A new request must be taken into work before it can be closed.

Scenarios

ScenarioResult
First incoming message from a client in a channelA new chat and the first ticket are created with ticket status new.
Incoming message while the current ticket is new or activeThe message is added to the current ticket.
Incoming message after the current ticket was closed, within the restore periodThe last ticket reopens automatically: its status changes from inactive to active.
Incoming message after the current ticket was closed, after the restore periodA new ticket is created in the same chat and linked to the previous ticket with previousTicket.

Restore period

The restore period controls what happens when a client sends a new message after a ticket was closed. The restore period is stored as restorePeriodMs and is configured in the YoLead UI in the company channel settings. If the client writes within the restore period, the message is treated as a continuation of the previous ticket and the ticket reopens. If the client writes after the restore period, the message is treated as a new request and a new ticket is created in the same chat.
EventWhen it is sent
ticket.createdA new ticket is created, including the first ticket in a new chat or a later repeat request after the restore period.
message.incomingA client message is added to an existing ticket.
ticket.status_changedA ticket changes between new, active, and inactive.
ticket.assignee_changedA ticket is assigned to another employee.
Endpoint-specific request and response fields are documented in the REST API reference.