support46 ops

Support API

Support tickets, categories, and agent queues.

Queries

QUERY

adminListTickets

#

List all tickets with filters, sorting, and pagination (admin only). Requires TenantAdmin or PlatformAdmin role. ## Filtering All filters are optional. When multiple values are provided for array filters (statuses, priorities, severities, apps), OR logic is applied within each array. - accountId: Filter by customer account - orderId: Filter by associated order - statuses: Filter by ticket statuses (e.g., [Open, Assigned]) - priorities: Filter by priorities (e.g., [High, Critical]) - severities: Filter by severities (e.g., [Major, Critical]) - apps: Filter by application (e.g., [Taxi, Shop]) - assignedTo: Filter by assigned agent ID - assignedToRole: Filter by assigned role - escalatedOnly: Show only escalated tickets - unassignedOnly: Show only unassigned tickets ## Sorting Multiple sort criteria can be provided and are applied in order. Default sorting is: priority DESC, severity DESC, created_at DESC. ## Examples List open high-priority tickets assigned to a specific agent:

graphqladminListTickets(input: {
statuses: [Open, Assigned]
priorities: [High, Critical]
assignedTo: "agent-uuid"
pagination: { limit: 20, page: 1 }
})

List all tickets for a specific order:

graphqladminListTickets(input: {
orderId: "order-uuid"
})

List unassigned escalated tickets sorted by creation date:

graphqladminListTickets(input: {
unassignedOnly: true
escalatedOnly: true
sorts: [{ field: CREATED_AT, direction: Asc }]
})

Arguments

  • input!

    Default

    {
      "accountId": null,
      "orderId": null,
      "statuses": null,
      "priorities": null,
      "severities": null,
      "apps": null,
      "assignedTo": null,
      "assignedToRole": null,
      "escalatedOnly": null,
      "unassignedOnly": null,
      "sorts": [],
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Returns!
QUERY

entityNotes

#

List all notes attached to a specific entity Only accessible by tenant admins and operators.

Arguments

  • entityType!
  • entityId!
Returns[!]!
QUERY

getMyPlatformTickets

#

List the current tenant's platform tickets — both directions (tenant→platform outgoing and platform→tenant incoming). Available to tenant owners and tenant admins. Use direction to narrow to one side; omit it to get both. sort orders the whole inbox before it is paged; omitted, the newest ticket comes first.

Arguments

  • direction

    Default

    null
  • status

    Default

    null
  • sort
  • pagination!

    Default

    {
      "limit": 10,
      "page": 1,
      "after": null
    }
Returns!
QUERY

getPlatformTicket

Deprecated#

Fetch a platform ticket and its message thread. Access: PlatformAdmin (any tenant), or TenantOwner/TenantAdmin on tickets belonging to their tenant. Tenant-side callers receive only non-internal messages.

Deprecation reason: Use platformTicketDetails(ticketId); BET-205

Arguments

  • ticketIdID!
Returns!
QUERY

listPlatformCategories

#

Return the global platform-direction support categories (tenant_id IS NULL, app = PLATFORM_ADMIN). Used to populate the category dropdown on the tenant-owner ticket form and on the platform-admin compose flow. Open to any authenticated caller — the list is global, not tenant-specific.

Returns[!]!
QUERY

listPlatformTickets

#

Cross-tenant platform-ticket inbox (PlatformAdmin only).

Arguments

  • input!

    Default

    {
      "tenantId": null,
      "direction": null,
      "status": null,
      "statuses": null,
      "search": null,
      "updatedFrom": null,
      "updatedTo": null,
      "sort": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Returns!
QUERY

listScheduledPlatformTickets

#

Scheduled platform tickets, newest first (PlatformAdmin only).

Arguments

  • input!

    Default

    {
      "tenantId": null,
      "status": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Returns!
QUERY

myPlatformChat

#

One of the signed-in operator's own conversations. null when the id is not one of theirs.

Arguments

  • idID!
Returns
QUERY

myPlatformChats

#

The signed-in operator's conversations with BetterSuite, most recently active first: the ones they started from their dashboard, and the ones they started on the website and have since claimed. For a workspace's owner and its admins, each of whom sees only their own. CHAT_UNAVAILABLE for anyone else, for an impersonation session and for a shared demo login.

Returns[!]!
QUERY

myTickets

Deprecated#

List tickets for the current user. Returns tickets where the current user is the account holder.

Deprecation reason: Use myTicketsPage(pagination); legacy list retires through BET-204

Arguments

  • limitInt!

    Default

    20
  • offsetInt!

    Default

    0
Returns[!]!
QUERY

myTicketsPage

#

Tickets for the current app and role with standard pagination metadata.

Arguments

  • pagination
Returns!
QUERY

platformChatInfo

#

visitorChatInfo for a signed-in operator: whether anybody on the BetterSuite team is at the inbox, the stated reply hours, and who would answer.

Returns!
QUERY

platformTicketDetails

#

Arguments

  • ticketIdID!
Returns!
QUERY

supportCategories

#

List active support categories for the current app. Returns categories matching the caller's app context, ordered by position. Useful for populating category dropdowns in ticket submission forms.

Returns[!]!
QUERY

supportChatSettings

#

The caller's workspace chat settings: how teammates are shown to the people the team chats with, and the hours it says it answers in. Workspace owners and admins read their own; a platform admin reads the platform's, which are the system workspace's.

Returns!
QUERY

ticket

#

Get a support ticket by ID

Arguments

  • idString!
Returns
QUERY

visitorChat

#

A visitor's own conversation, by its bearer token. null when the token opens nothing — the conversation was deleted, or the token was never issued. Reading also marks the visitor as active.

Arguments

  • tokenString!
Returns
QUERY

visitorChatInfo

#

What a visitor is told about the team before they write: whether anybody is at the inbox, the stated reply hours, and — as far as the team's chat settings show them — who would answer. Public: needs no session and no conversation.

Returns!

Mutations

MUTATION

cancelScheduledPlatformTicket

#

Withdraw a scheduled platform ticket that has not been sent. PlatformAdmin only. Refused once the ticket has gone or is going.

Arguments

  • idID!
Returns!
MUTATION

claimVisitorChats

#

Hand the conversations this browser holds over to the signed-in account: pass the bearer tokens the website's chat stored. Each conversation is linked to the account and its token stops working, so drop every token sent, whatever comes back. Returns the conversations newly linked. A token that opens nothing, or whose conversation is already linked to an account, is skipped without an error. At most five tokens a call.

Arguments

  • tokens[String!]!
Returns[!]!
MUTATION

closePlatformTicket

#

Close a platform ticket. Either side may close. Optional satisfaction rating (1..=5) accepted from tenant side.

Arguments

  • ticketIdID!
  • satisfactionRatingInt

    Default

    null
  • satisfactionCommentString

    Default

    null
Returns!
MUTATION

closeTicket

#

Close a support ticket with a resolution Only available to SuperAdmin, TenantAdmin, and PartnerAdmin roles.

Arguments

  • input!
Returns!
MUTATION

createEntityNote

#

Create a new internal note on an entity Only accessible by tenant admins and operators.

Arguments

  • input!
Returns!
MUTATION

deleteEntityNote

#

Delete an entity note by ID Returns true if the note was deleted, false if it didn't exist. Only accessible by tenant admins and operators.

Arguments

  • id!
ReturnsBoolean!
MUTATION

draftPlatformReply

#

Draft a reply on a platform ticket from a short admin brief. PlatformAdmin only. Uses the system tenant's default AI provider.

Arguments

  • input!
Returns!
MUTATION

draftPlatformTicket

#

Draft a new platform→tenant ticket from a short brief. PlatformAdmin only. Uses the system tenant's default AI provider.

Arguments

  • input!
Returns!
MUTATION

markPlatformChatRead

#

markVisitorChatRead for a signed-in operator's own conversation.

Arguments

  • idID!
ReturnsBoolean!
MUTATION

markTicketMessagesSeen

#

Record that the caller opened a ticket's messages. Call this when a thread is actually displayed, not when a ticket is merely listed. Receipts are immutable: the stored timestamp is the first open, so repeat calls are safe and idempotent. The call also records that the caller opened the ticket itself (see SupportTicket.seenBy), so send it for a ticket with no replies too, with an empty messageIds. Access: any participant entitled to read the thread — PlatformAdmin on any ticket, tenant staff within their tenant, or the reporter of their own tenant-internal ticket. messageIds is intersected with the caller's visible messages; omit it to mark the whole thread.

Arguments

  • ticketIdID!
  • messageIds[ID!]
Returns!
MUTATION

markVisitorChatRead

#

Record that the visitor has the conversation open and in view: every message up to now is read. Call it when the thread is actually on screen, not when it is fetched in the background.

Arguments

  • tokenString!
ReturnsBoolean!
MUTATION

openPlatformTicket

#

Open a support ticket directed at BetterSuite platform admin. Available to tenant owners and tenant admins. The resulting ticket has kind = TENANT_TO_PLATFORM and app = PLATFORM_ADMIN. Numbering is PLAT-NNNNNN, globally monotonic across all tenants (single platform-admin inbox) and generated by the DB trigger.

Arguments

  • input!
Returns!
MUTATION

platformChatTyping

#

visitorChatTyping for a signed-in operator's own conversation.

Arguments

  • idID!
ReturnsBoolean!
MUTATION

regenerateTicketAiSuggestion

#

Regenerate the AI triage suggestion for one ticket. Admin-only. Requires the tenant to have support_triage_enabled turned on under Settings → AI Features and at least one configured AI provider with a remaining monthly budget.

Arguments

  • ticketIdString!
Returns!
MUTATION

replyToMyTicket

#

Reply to a support ticket you opened. The counterpart of respondToTicket, which is for staff. Only the account that opened the ticket may use it, the message is always visible to staff and to you, and a closed ticket takes no replies. A reply on a resolved ticket reopens it; a reply to a ticket waiting on you hands it back to the team.

Arguments

  • ticketIdString!
  • messageString!
Returns!
MUTATION

replyToPlatformTicket

#

Post a reply on a platform ticket. Sender type is derived from the caller's role: * PlatformAdmin → PLATFORM_ADMIN * TenantOwner/TenantAdmin on their own tenant → CUSTOMER isInternal = true is rejected for non-PlatformAdmin callers.

Arguments

  • ticketIdID!
  • messageString!
  • isInternalBoolean!

    Default

    false
Returns!
MUTATION

respondToTicket

#

Respond to a support ticket with a message Only available to SuperAdmin, TenantAdmin, and PartnerAdmin roles. Set isInternal to true for internal notes that won't be visible to the customer.

Arguments

  • input!
Returns!
MUTATION

schedulePlatformTicket

#

Write a platform ticket now and have it sent later: at sendAt, when the workspace's owner is next in their console, or whichever comes first. PlatformAdmin only. Nothing reaches the operator until then. The ticket, its PLAT-NNNNNN number and its email are created when it is sent, exactly as sendPlatformTicket creates them.

Arguments

  • input!
Returns!
MUTATION

sendPlatformChatMessage

#

Add a message to one of the signed-in operator's own conversations. Fails with CHAT_CLOSED once the team has closed it, and with CHAT_NOT_FOUND when the conversation is not theirs.

Arguments

  • idID!
  • messageString!
Returns!
MUTATION

sendPlatformTicket

#

Open a platform-initiated ticket targeted at a tenant owner. PlatformAdmin only. Numbering is PLAT-NNNNNN, globally monotonic across all tenants (single platform-admin inbox).

Arguments

  • input!
Returns!
MUTATION

sendVisitorChatMessage

#

Add a message to a visitor's conversation. Fails with CHAT_CLOSED once the team has closed it.

Arguments

  • tokenString!
  • messageString!
Returns!
MUTATION

startPlatformChat

#

Start a conversation with BetterSuite as the signed-in operator. It is linked to their account from the first message, so it is there on every device they sign in on; their name and email come from the account. For a workspace's owner and its admins. CHAT_UNAVAILABLE for anyone else, for an impersonation session and for a shared demo login.

Arguments

  • input!
Returns!
MUTATION

startVisitorChat

#

Start a conversation with BetterSuite as an anonymous website visitor. Public: needs no session. Refused with CHAT_UNAVAILABLE when called in another workspace's context. Returns the bearer token that owns the conversation — pass it to visitorChat, sendVisitorChatMessage and updateVisitorChatContact.

Arguments

  • input!
Returns!
MUTATION

submitTicket

#

Submit a new support ticket Only available to the app-facing roles: customer, driver, merchant, service provider and parking spot provider. An orderId must be an order the caller is on. The ticket is submitted for tenant admin and partner admin attention.

Arguments

  • input!
Returns!
MUTATION

updateSupportChatSettings

#

Save the caller's workspace chat settings. The input is the whole of the settings: an omitted replyHours clears the stated hours. Fails with INVALID_INPUT for hours that cannot be evaluated — an unknown time zone, a time that is not HH:MM, a window that ends before it starts, or a day listed twice.

Arguments

  • input!
Returns!
MUTATION

updateVisitorChatContact

#

Leave a name or an email on a visitor's conversation, so the team can follow up after the visitor has left the site.

Arguments

  • tokenString!
  • input!
Returns!
MUTATION

visitorChatTeamTyping

#

Say that a teammate is writing a reply on a visitor conversation. The visitor's widget shows it for a few seconds; send it again while the reply is being typed, no more than once every three seconds. Platform admins only. false on a conversation that is closed.

Arguments

  • ticketIdID!
ReturnsBoolean!
MUTATION

visitorChatTyping

#

Say that the visitor is writing. The team's inbox shows it for a few seconds; send it again while they keep typing, no more than once every three seconds. false when it was not passed on — the conversation is closed, or the pings came too fast. Neither is an error.

Arguments

  • tokenString!
ReturnsBoolean!