Skip to content

Connect Website Chat and Booking

TROPIKAL Connect adapters can host Website Chat and Calendar Booking on the website’s own origin. Visitors never call a TROPIKAL dashboard from the browser and never receive a private connector credential.

WordPress and n2n use the same Connect public-channel core. A custom PHP adapter can use that core too, while keeping its framework code limited to routing, storage, HTTP transport, rate limits, logging, and page placement.

What the shared core does

  • Proxies active Website Chat metadata and declared widget assets.
  • Loads no Chat UI when the site has no active Chat job.
  • Validates availability and booking payloads against the live Job contract.
  • Requests real Calendar availability and confirmed event creation.
  • Applies local request limits before invoking TROPIKAL.
  • Delegates the browser human check through the signed site connection.
  • Maps unavailable, invalid, pending, and confirmed results consistently.
  • Publishes immutable JavaScript and CSS with a content version.

The connector does not implement Calendar rules or talk directly to Google. Those responsibilities stay in the TROPIKAL Jobs selected by the owner.

Owner setup

After Connect is active, the local admin screen shows Add Job:

  1. Click Add Job.
  2. Choose Add a booking calendar or Add a chat bubble.
  3. For Booking, select an approved Google Calendar Access.
  4. Wait for TROPIKAL to create and activate the required Job or Jobs.
  5. Return to the website and test the public page.

Repeating a completed setup repairs or reuses the existing binding. It does not create another live copy.

Public website routes

The adapter serves one local route family:

/tropikal-connect/api/chat/info
/tropikal-connect/api/chat
/tropikal-connect/api/booking/availability
/tropikal-connect/api/booking/intro-call
/tropikal-connect/api/booking/status
/tropikal-connect/assets/public-channels.js
/tropikal-connect/assets/public-channels.css
/tropikal-connect/health

Chat widget sub-assets also stay under /tropikal-connect/embed/. Requests from these routes are signed server to server. Do not expose signing state, access tokens, or private provider credentials in HTML or JavaScript.

Place Chat and Booking

Website Chat is an ambient site control. Load the versioned public-channel loader on connected public pages. It checks whether Chat is active and remains invisible when it is not.

Booking is page content and must be placed explicitly:

  • WordPress: add the TROPIKAL Booking block or [tropikal_booking] shortcode.
  • n2n: render a data-tropikal-booking marker in the intended view.
  • Custom PHP: render the same marker and load the versioned public-channel loader.

Do not append Booking to every page from the reusable adapter.

Readiness

/tropikal-connect/health reports safe state only:

Field Values
Installation connected, disconnected
Chat active, not_enabled, unavailable
Booking active, not_enabled, unavailable
Asset version Current immutable content version

not_enabled means the owner has not completed that setup. unavailable means the connector could not check it safely. Neither state should display invented availability or a substitute booking provider.

Signed human-verification and booking-status responses use dedicated Connect v1 contracts. Adapter storage failures—including rate-limit storage—fail closed as unavailable; they never bypass a request limit.

The hosted adapters trust visitor-address headers only at the configured Cloudflare edge. Connector PHP receives the normalized address from the web server and does not accept forwarding headers from arbitrary callers.

Release checks

Before release:

  1. Run the shared core tests and static analysis.
  2. Run the adapter tests.
  3. Confirm disconnected routes fail closed.
  4. Confirm active Chat appears once.
  5. Confirm Booking loads live slots on the intended page.
  6. Complete a test booking and confirm the Calendar invitation.
  7. Check mobile layout and keyboard labels.

See Website Calendar Booking, Website Embed, and Connect developer troubleshooting.