On this page

Visitor forms and bookings

The widget, full-page chat, PWA and SDK web renderer share two conditional navigation tabs:

  • Forms appears when the authenticated visitor has a form entry in this widget. It includes saved drafts and submitted forms.
  • Bookings appears when the visitor has a submitted reservation: pending, confirmed, approved, rejected, cancelled or failed. Draft and in-progress booking flows are excluded.

Cards show a title, status and dates. Expand a card to read saved answers or booking details. Bookings include the configured timezone and declared custom fields. Pagination fetches ten records at a time; Refresh retrieves the latest state. Records are read-only: viewing one does not resubmit, cancel or modify it. No administrator toggle is required.

Privacy

The read endpoint requires a browser secret and an owned conversation belonging to the requested widget. Queries also enforce tenant, company, visitor and widget-conversation ownership. A verified, redeemed and unrevoked migration link additionally grants read-only access to records created in its specific parent conversation before migration. New parent records after that cutoff are excluded. These are linked records showing their current saved answers/status, not historical snapshots of earlier edits. Matching phone numbers or a parent visitor ID alone never grant access.

Only declared, supported answer fields are returned. Passwords, internal metadata, approval/flow tokens, hidden fields and file payloads are omitted. Answers are rendered as text, never HTML. Records are not persisted in browser storage; responses use private, no-store.

Operations and checks

Run php artisan widget:history-indexes once when deploying this feature. The command is idempotent, creates a visitor-scoped MongoDB index, and builds the PostgreSQL booking index concurrently.

Run php artisan test tests/Feature/ChatWidgetExperienceApiTest.php and npm run test:chat-widget. Set CHAT_WIDGET_USE_BUILD=1 to test production assets, and CHAT_WIDGET_SCREENSHOT_DIR to capture records screens.