Commit graph

2 commits

Author SHA1 Message Date
jmcqueen
c20f387081 feat(lookup): add store-based ticket search for store callers
Store associates share accounts and iPads, so the existing
findMyTickets (keyed by reporter email) misses tickets a coworker
opened for the same store earlier in the shift. This adds a
store-keyed lookup so a store caller can see everything open at
their location.

- New service function searchOpenTicketsByStoreNumber(): normalizes
  to 5 digits, validates against the stores cache (warn-only on miss),
  runs the same Grok-enriched search as the reporter path.
- New route GET /wxccai/open-tickets-by-store?storeNumber=782 —
  accepts padded or unpadded input, degrade-gracefully 200 on
  runtime failures to match the sibling reporter route.
- JQL note: the CMDB "Store Number" field only matches on the
  object *label* (the 5-digit padded string). Neither the objectId,
  ASSET-<id> objectKey, workspace-qualified id, nor raw digits
  match. Probed all variants before landing.
- WxCC AI Agent docs updated: findMyStoreTickets promoted to the
  primary lookup for store callers; findMyTickets reframed as the
  corporate-caller path. System prompt Step 1 rewritten to route
  store vs corporate callers to the right tool.

Verified end-to-end against store 782 — returns 5 open tickets
including two from other reporters (SS-20380 wireless phone,
SS-11943 Zipline training) that email-based lookup misses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 11:40:29 -04:00
jmcqueen
e9a32e31c1 docs: WxCC AI Agent ticket-operations reference
Adds a shareable reference doc covering everything the Contact Center
AI agent needs to open, look up, comment on, and close SS tickets via
this service:

  1. Inventory of the 9 AI-facing endpoints (read / create / update / close)
  2. The 14 supported SS subTypes (copy-pasteable)
  3. A drop-in system prompt (call-flow discipline, safety rules)
  4. Tool definitions in OpenAI/JSON-schema function-calling format
  5. Two worked call examples
  6. Endpoints deliberately kept out of the AI's tool loop

Companion to the code shipped in this branch — no code changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 11:28:21 -04:00