Tickets
Ticket routes match the Biz1 dashboard customer-tickets workspace: list/count/details, chat reply, assignees, departments, ticket settings (team schedule, email/completion toggles, completion reasons, ticket automation), stock products on a ticket, encrypted customer fields, notes, and column visibility.
Core Ticket Data
- Tickets include topic/subject, messages, customer, department, assignees, status, urgency, due date, times, phone, address, custom fields, and files when supported.
- Use Ticket.FormData / Ticket.Get for detail screens. Use ticket_id from list/add for later actions.
- Ticket.Get also returns additive dashboard fields: ticket_products (stock lines), cust_enc_fields, enc_pwd_configured, enc_pwd_unlocked.
Lists, Counts, Search
- Ticket.List supports type, search, status, team, department, customer, phone, address, open/due dates, and sorting.
- type defaults to my_tickets (Biz1 Support). Send type=company_tickets for Customers Tickets.
- Ticket.Count uses the same filters for a single total. Ticket.Counts returns all/open/closed pill counts in one call (dashboard counts_json).
- Ticket.Search / Ticket.UnassignedList are for search and unassigned queues.
Chat And Assignees
- Ticket.Messages / Ticket.ChatList list CHAT panel rows (mapped who/name/text/file_url). Ticket.Get also returns additive data.chat; data.messages stays raw JSON.
- Ticket.Reply matches dashboard Send / Add chat (insert_message). data_type public/normal emails/shows to customer; only_member or internal is staff-only.
- Ticket.AssigneeAdd / Ticket.AssigneeRemove add or remove one member from assign_member_id (dashboard assignee chips).
- Ticket.Status changes status id. On close (status=2) when ticket_completion_reason_settings=1: send completion_reason_id (list) OR completion_reason text (Add manual, id=0) — same as dashboard Choose completion reason modal.
Settings (dashboard Ticket Settings 1–7)
- 1 Departments: Ticket.Department* (list/add/edit/delete).
- 2 Team Members schedule: Ticket.TeamSchedule* (tickets_teammember_time) + Ticket.ShowAllTickets for show_all_user_tickets.
- 3 Statuses: use Statuses.* with type=ticket (Opened/Closed/Assigned are system).
- 4 Email on create: Ticket.SettingsGet / Ticket.SettingsUpdate (ticket_email_settings).
- 5 Custom fields: TicketCustomFields.* (separate help category).
- 6 Completion reasons: Ticket.CompletionReason* + Ticket.SettingsUpdate ticket_completion_reason_settings.
- 7 Ticket automation: Ticket.Automation* on table ticket_automation (not AutomationEvents).
- Automation Send email (dashboard parity): email_to_customer → selected Email template to ticket customer email; email_to_team → staff notify all Ticket team members + current assignees; email_user_ids (Member) → staff notify only checked users.
- Customer template field: email_template_id (email_template.id, 0 = default support/prior behavior). Alias customer_email_template_id. Do not use bare template_id (that is mission_template_id). Ticket.Automation / AutomationGet return additive email_templates[] for the picker; or EmailTemplates.List.
- Automation timers on tickets: last_status_time (in_status rules) and last_assign_time (not_assigned rules). Ticket.Add sets both; Ticket.Status resets last_status_time on real status change; AssigneeAdd/Remove and Edit reset timers when assignees/status change.
Stock Products Vs Document Products
- Ticket.ProductsByCustomer = PO/invoice product picker stored on tickets.product_id (create form).
- Ticket.StockProduct* = ticket_products inventory lines with stock deduct/restore (detail Add product).
- Do not mix the two flows.
Encrypted Fields, Customer Assign, Notes, Columns
- Ticket.UnlockEncrypted then Ticket.EncryptedFields / Ticket.EncStatus for encrypted customer custom fields (dashboard password modal). Unlock is Node session per bearer login_token.
- Ticket.SearchCustomers + Ticket.AssignCustomer match the assign-customer modal.
- Ticket.NotesList / Ticket.NotesAdd manage tickets.notes JSON.
- Ticket.ColumnSettings* save list column visibility (user_detail_2.ticket_dashboard_fields / Field picker).
Common Flow
- Login and call User.Basic for permissions.
- Use Ticket.List + Ticket.Counts for the main table and All/Open/Closed pills.
- Open Ticket.Get for detail (data.chat for CHAT UI); Ticket.Messages for chat-only; Ticket.Reply for Send/Add chat; Ticket.Status / Assignee* for side actions.
- Use Ticket.Department*, TeamSchedule*, Settings*, CompletionReason*, Automation*, TicketCustomFields.* for Ticket Settings screens.
- Use StockProduct*, UnlockEncrypted/EncryptedFields, SearchCustomers/AssignCustomer, Notes*, ColumnSettings* as needed.
Routes In This Category
Ticket.AddTicket.AssignCustomerTicket.AssigneeAddTicket.AssigneeRemoveTicket.AutomationTicket.AutomationAddTicket.AutomationDeleteTicket.AutomationEditTicket.AutomationGetTicket.AutomationListTicket.AutomationRemoveTicket.AutomationSaveTicket.AutomationToggleTicket.AutomationUpdateTicket.ChatTicket.ChatListTicket.ColumnSettingsTicket.ColumnSettingsGetTicket.ColumnSettingsSaveTicket.CompletionReasonTicket.CompletionReasonAddTicket.CompletionReasonDeleteTicket.CompletionReasonEditTicket.CompletionReasonGetTicket.CompletionReasonListTicket.CompletionReasonRemoveTicket.CompletionReasonUpdateTicket.CountTicket.CountsTicket.DeleteTicket.DepartmentTicket.DepartmentAddTicket.DepartmentCountTicket.DepartmentDeleteTicket.DepartmentEditTicket.DepartmentGetTicket.DepartmentListTicket.DepartmentRemoveTicket.DepartmentUpdateTicket.EditTicket.EncStatusTicket.EncryptedFieldsTicket.FormDataTicket.GetTicket.ListTicket.MessagesTicket.MessagesListTicket.NotesAddTicket.NotesListTicket.ProductsByCustomerTicket.ReplyTicket.SearchTicket.SearchCustomersTicket.SettingsTicket.SettingsGetTicket.SettingsUpdateTicket.ShowAllTicketsTicket.StatusTicket.StockProductAddTicket.StockProductDeleteTicket.StockProductListTicket.StockProductRemoveTicket.StockProductSearchTicket.StockProductStoragesTicket.TeamScheduleTicket.TeamScheduleAddTicket.TeamScheduleDeleteTicket.TeamScheduleEditTicket.TeamScheduleGetTicket.TeamScheduleListTicket.TeamScheduleRemoveTicket.TeamScheduleUpdateTicket.UnassignedListTicket.UnlockEncrypted