Skip to main content

tungsten-tickets

Help desk (ticketing) plugin for Tungsten, the admin panel for FastAPI.

What you get

  • Tickets with a number (TCK-00012), status, priority, category, agent, tags and the customer's name, email and phone.
  • A conversation on each ticket: replies to the customer, the customer's messages, internal notes only your team sees, and a log of status and agent changes.
  • Reply box with saved replies (canned answers), file attachments and "then set status".
  • SLA: each priority has hours to resolve (urgent 4, high 8, normal 24, low 72). Late tickets show in red and in the Overdue tab.
  • Tabs for Open, My tickets, Unassigned, Overdue, Waiting on customer and Resolved; filters; search; export.
  • Bulk actions: assign, resolve, close, delete.
  • Categories (Billing, Bug...) that can send new tickets to one agent.
  • Dashboard numbers: open, unassigned, overdue, resolved this week.
  • Support page for customers at <panel>/support: raise a ticket, then follow and answer it from a private link. No login needed.
  • Emails to the customer when the ticket is received, on every reply and when resolved. New tickets and customer replies go to the agent's notification bell.
  • Optional API: POST tickets to <panel>/api/tickets.
  • Hooks so other plugins (WhatsApp, Slack...) can act on new tickets, replies and status changes.

Install

pip install tungsten-tickets
from tungsten_tickets import TicketsPlugin

panel = Panel(..., app_url="https://admin.example.com", auth=Auth(User, mailer=send_mail))
panel.plugin(TicketsPlugin())
panel.create_tables(engine)   # creates the ticket tables too

mailer is your function send_mail(to, subject, body). app_url makes the links in emails full links.

Options

TicketsPlugin(
    statuses={"open": ("Open", "info"), ...},          # key: (label, color). "resolved" and "closed" mean done
    priorities={"low": ("Low", "gray"), ...},
    sla_hours={"urgent": 4, "high": 8, "normal": 24, "low": 72},   # None for no due time
    number_prefix="TCK-",
    portal=True, portal_path="support",                # the public support page
    api_token="long-secret",                           # turns on POST <panel>/api/tickets
    email_requester=True,                              # emails to the customer
    notify_agents=True,                                # bell notifications for agents
    mailer=None,                                       # defaults to Auth(mailer=...)
    navigation_group="Help desk",
    agent=None,                                        # fn(user, ctx) -> bool: who works the desk
    agents=None,                                       # fn(query, ctx) -> query: who is in the "Agent" lists
    ticket_resource=None,                              # your own TicketResource subclass (and category_/saved_reply_)
)

With agent, everyone else only sees, raises and answers their own tickets (matched by the user id saved on the ticket, not by email), never internal notes, categories, saved replies or the stats widget.

Open tickets from code

from tungsten_tickets import add_reply, create_ticket

ticket = create_ticket(db, subject="Order late", description="Where is order 12?",
                       requester_email="amit@example.com", priority="high", source="email")
add_reply(db, ticket, "It ships today.", user_id="1", status="waiting")
db.commit()

API

curl -X POST https://admin.example.com/admin/api/tickets \
  -H "X-Tickets-Token: long-secret" -H "Content-Type: application/json" \
  -d '{"subject": "Order late", "message": "Where is order 12?", "name": "Amit", "email": "amit@example.com"}'

Answer: {"id": 1, "number": "TCK-00001", "url": "<customer link>"}. Send external_id to skip duplicates.

Hooks

desk = panel.get_plugin("tickets")
desk.on_ticket_created("whatsapp", lambda db, ticket: ...)
desk.on_ticket_replied("whatsapp", lambda db, ticket, reply: ...)
desk.on_status_changed("slack", lambda db, ticket, old_status: ...)

Try it

pip install -e . -e plugins/tickets uvicorn
uvicorn plugins.tickets.example:app --reload

Sign in at http://127.0.0.1:8000/admin with admin@example.com / password. The support page is http://127.0.0.1:8000/admin/support.

More Tungsten plugins

Package What it adds Docs
tungsten-leads Leads list, stages, timeline and your own lead form fields README
tungsten-meta-leads Facebook and Instagram lead form leads, with one-click setup Guide
tungsten-whatsapp WhatsApp for leads: click-to-chat, Cloud API or WhatsApp Web Guide
tungsten-mcp MCP server, so AI assistants like Claude can read and change your data Guide
tungsten-blog Blog built for SEO, GEO and AEO, with a live score, sitemap and llms.txt Guide
tungsten-seo-audit SEO audit of your website: score, fix tips, AI search checks, history Guide
tungsten-security-audit Security audit with a score and fix tips, plus a login log with lockout Guide
tungsten-finance Accounts like Tally or Zoho Books: GST invoices, bills, ledger, stock, P&L, balance sheet, GSTR-1/3B Guide

Core package: tungsten-admin. Website and docs: https://tungsten.prisminfoways.com/

Metadata

Release files for tungsten-tickets 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tungsten-tickets 0.2.0
File Size Uploaded Provenance Actions
tungsten_tickets-0.2.0.tar.gz 27.0 kB Without provenance Details for tungsten_tickets-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tungsten-tickets 0.2.0
File Interpreter ABI Platform Actions
tungsten_tickets-0.2.0-py3-none-any.whl Python 3 none any Details for tungsten_tickets-0.2.0-py3-none-any.whl

Total release size: 53.8 kB

Release files / tungsten_tickets-0.2.0.tar.gz

Download URL tungsten_tickets-0.2.0.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fdae604f51b01cd8d40a994c83b056381210827631da9556e0e3d4081d53a1f7
BLAKE2b-256 checksum
How to use checksums
a741e22c145d8872d90ae59e7039ee3bed360e04736e39f41c8b54403cf74715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Release files / tungsten_tickets-0.2.0-py3-none-any.whl

Download URL tungsten_tickets-0.2.0-py3-none-any.whl
Size 26.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94c08e75b4ffb483fd88b3f3f515c52a4b824dcc2145198ff8ed7fda1ef8b6bf
BLAKE2b-256 checksum
How to use checksums
ac800d3f51cbc3aa232501ac3919fae5f01069c42bef6220e882487d3ee116dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.17

Security for tungsten-tickets 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page