Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Ticket

Represents a person in the queue. Every time someone is added to the queue, a ticket is created in Qminder. The ticket contains the person's name, phone number, email address or other custom fields.

Tickets belong to lines. Tickets can have many TicketExtras.

If the location has SMS enabled, some visitors may exchange messages with the location. Those messages are stored with the ticket in the TicketMessages list.

Methods that work with Tickets can be found under {@link TicketService}, or Qminder.tickets.

For example:

To create a Ticket, call {@link TicketService.create}. To search for tickets, call {@link TicketService.search}.

Hierarchy

  • Ticket

Index

Properties

Optional assigned

assigned: { assignee: number; assigner: number }

If the ticket has been assigned to a user, this contains the assigner and assignee user IDs.

The assigner is the person who assigned the ticket. The assignee is the person who will call the ticket for service.

{ "assigner": 1459, "assignee": 1460 }

If the person has assigned a ticket to themselves, the assigner and assignee will be equal.

{ "assigner": 1459, "assignee": 1459 }

Type declaration

  • assignee: number
  • assigner: number

Optional called

called: { date: string }

If the ticket has been called, then this object contains the time the ticket was called, in ISO8601 format, with milliseconds.

{ "date": "2017-10-31T17:30:00.000Z" }

Type declaration

  • date: string

Optional cancelled

cancelled: { canceller: number; date: string }

If the ticket has been cancelled, this contains the time the ticket was cancelled, in ISO8601 format, and the ID of the User who cancelled the ticket.

{ "date": "2017-10-31T17:30:00.000Z", "canceller": 1445 }

Type declaration

  • canceller: number
  • date: string

created

created: { date: string }

An object that contains the creation timestamp of the ticket in ISO8601 format, with milliseconds.

{ "date": "2017-10-31T17:30:00.000Z" }

Type declaration

  • date: string

Optional email

email: string

The e-mail address of the visitor. For example: "jsmith224@example.com"

Optional extra

extra: TicketExtra[]

List of custom fields and their values attached to the ticket.

see

TicketExtra

Optional firstName

firstName: string

The first name of the visitor. For example, "Jane".

id

id: string | number

This ticket's unique ID. For example, 14995020

Optional interactions

interactions: TicketInteraction[]

List of interactions of this ticket.

see

TicketInteraction

Optional labels

labels: TicketLabel[]

List of the ticket's labels.

see

TicketLabel

Optional lastName

lastName: string

The last name of the visitor. For example, "Smith".

line

line: number

The ID of the line that this ticket belongs to. All tickets belong to a line. For example, 14142.

Optional messages

messages: TicketMessage[]

List of SMS messages exchanged with this visitor.

see

TicketMessage

Optional orderAfter

orderAfter: string

If the ticket has been reordered, this will contain an ISO8601 timestamp with milliseconds that should be preferred over the "created date" to sort tickets by.

"orderAfter": "2017-10-31T17:30:00.000Z"

To sort tickets chronologically, taking into account reordering, the orderAfter date should be preferred before the created date:

const tickets = [ ... ]; tickets.sort((ticketA, ticketB) => { const timeA = ticketA.orderAfter || ticketA.created.date; const timeB = ticketB.orderAfter || ticketB.created.date; return new Date(timeA) - new Date(timeB); });

Optional phoneNumber

phoneNumber: number

The phone number of the visitor. For example: 3725551111

Optional served

served: { date: string }

If the ticket has been marked served, then this object contains the time the ticket was served, in ISO8601 format, with milliseconds.

Type declaration

  • date: string

Optional source

source: "PRINTER" | "PHONE" | "MANUAL" | "NAME"

Describes how the visitor was added into the queue.

PHONE - The visitor used the discontinued Qminder Remote Queuing app.
MANUAL - The visitor was added into the queue by a clerk.
NAME - The visitor added themselves into a queue via iPad Sign-In (a Name Device).
PRINTER - The visitor used a printer (discontinued) to queue up.

Optional status

status: TicketStatus

The current status of this ticket.

Generated using TypeDoc