AI chat · showFrame(prompt)

🚨Travel Emergencies

Scenario cards for travelers in a bind. Pick your crisis — or describe your own — and the AI concierge solves it.

Jump to How it works Sample code Customize it

What it does

A board of relatable situations (“Rain, two kids, Midtown”; “Date night, no reservation”), plus a free-text box for anything else. Each card is a ready-made prompt; the textarea wraps whatever the visitor types. It positions the AI as an in-the-moment concierge, not a pre-trip planner.

How it works

Each card owns a situational prompt. The custom box prepends a framing phrase to the visitor's text. Both just call showFrame() with a prompt.

Build it in 3 steps

1

List the scenarios

Each has display copy and a written-out prompt phrased as an urgent request.

2

Render the cards

One clickable card per scenario, each firing its own prompt.

3

Add a custom escape hatch

A textarea + button that wraps the visitor's words in a framing sentence.

The showFrame() call

Every card is just a prompt. The custom box wraps free text in a little framing so the AI knows it's an emergency.

// A scenario card
window.mindtrip.showFrame(null, {
  destination: 'New York City',
  prompt: incident.prompt,   // "Emergency: I'm in Midtown, it's pouring, two bored kids..."
  id: 'nyc-rescue-1'
});

// The custom box
window.mindtrip.showFrame(null, {
  destination: 'New York City',
  prompt: 'Travel emergency in New York City: ' + userText,
  id: 'nyc-rescue-custom'
});

Parameters used here

ParameterWhat it carries in this example
destinationThe city.
promptThe scenario, written as an urgent, specific request — or the visitor's own words with a framing prefix.
idTracking slug per scenario.
💡The specificity is the magic. “Rain, two kids ages 6 and 9, Midtown, next 4 hours” gets a far better answer than “what to do in the rain.” Write the prompts like a real person in trouble.

Sample code

A self-contained, working version of this experience. Copy it into an .html file, change the destination and content, and it runs. The Mindtrip embed script must be on the page (shown at the top).

<!-- Required on every page: the Mindtrip embed -->
<script src="https://partner.mindtrip.ai/overlay/embed.js?orgid=your-org-id" defer></script>

<div id="board"></div>

<textarea id="custom-text" placeholder="Describe your situation..."></textarea>
<button onclick="customRescue()">Rescue Me →</button>

<script>
  const incidents = [
    {
      emoji: '🌧️', title: 'Rain. Two kids. Midtown.',
      prompt: "Emergency: I'm in Midtown Manhattan, it's pouring rain, and I have "
            + "two bored kids (ages 6 and 9). I need an indoor rescue plan for the "
            + "next 4 hours — fun for them, survivable for me. Go."
    },
    {
      emoji: '💘', title: 'Date night. 3 hours. No reservation.',
      prompt: "Emergency: I have a date in NYC in 3 hours, no reservation, and I "
            + "promised something special. Build me a walk-in-friendly date plan."
    }
  ];

  const board = document.getElementById('board');
  incidents.forEach((inc, i) => {
    const btn = document.createElement('button');
    btn.innerHTML = `${inc.emoji} <strong>${inc.title}</strong>`;
    btn.onclick = () => window.mindtrip.showFrame(null, {
      destination: 'New York City',
      prompt: inc.prompt,
      id: 'nyc-rescue-' + (i + 1)
    });
    board.appendChild(btn);
  });

  function customRescue() {
    const text = document.getElementById('custom-text').value.trim();
    if (!text) return;   // ignore empty input
    window.mindtrip.showFrame(null, {
      destination: 'New York City',
      prompt: 'Travel emergency in New York City: ' + text,
      id: 'nyc-rescue-custom'
    });
  }
</script>

Customize it for your destination

Write scenarios for your destination

Think about the specific binds travelers hit in your city — weather, transit, last-minute plans, off-season worries — and write each as a vivid, detailed prompt.

Guard the custom box

Keep the early if (!text) return; so an empty submit never opens a blank conversation.

Mindtrip for Business Labs — Travel Emergencies Questions? Contact your Mindtrip account team.