wxccai/src
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
..
config feat(close): programmatic SS-ticket closure for the CC agent 2026-07-07 11:20:41 -04:00
prompts Initial commit: Webex CC + Jira + xAI service 2026-07-01 15:23:20 -04:00
routes feat(lookup): add store-based ticket search for store callers 2026-07-07 11:40:29 -04:00
services feat(lookup): add store-based ticket search for store callers 2026-07-07 11:40:29 -04:00
utilities Initial commit: Webex CC + Jira + xAI service 2026-07-01 15:23:20 -04:00
app.js feat(close): programmatic SS-ticket closure for the CC agent 2026-07-07 11:20:41 -04:00