support22 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.

Arguments

  • direction

    Default

    null
  • status

    Default

    null
  • pagination!

    Default

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

getPlatformTicket

#

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.

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,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Returns!
QUERY

myTickets

#

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

Arguments

  • limitInt!

    Default

    20
  • offsetInt!

    Default

    0
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

ticket

#

Get a support ticket by ID

Arguments

  • idString!
Returns

Mutations

MUTATION

assignTicket

#

Assign a support ticket to an agent Only available to SuperAdmin, TenantAdmin, and PartnerAdmin roles.

Arguments

  • input!
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

escalateTicket

#

Escalate a support ticket Only available to SuperAdmin, TenantAdmin, and PartnerAdmin roles.

Arguments

  • input!
Returns!
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 (per-tenant sequence) generated by the DB trigger.

Arguments

  • input!
Returns!
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

replyToPlatformTicket

#

Post a reply on a platform ticket. Sender type is derived from the caller's role: * PlatformAdminPLATFORM_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

sendPlatformTicket

#

Open a platform-initiated ticket targeted at a tenant owner. PlatformAdmin only. Numbering is PLAT-NNNNNN per target tenant.

Arguments

  • input!
Returns!
MUTATION

submitTicket

#

Submit a new support ticket Only available to Operator, Driver, Vendor, and Customer roles. The ticket will be submitted for tenant admin and partner admin attention.

Arguments

  • input!
Returns!
MUTATION

updateTicket

#

Update a support ticket's status, priority, severity, or internal notes Only available to SuperAdmin, TenantAdmin, and PartnerAdmin roles.

Arguments

  • input!
Returns!

Build the foundation once. Expand without limits.

BetterSuite is built for teams who see on-demand as a business — not a feature.