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>