Megadesk Documentation

Popups

Show contextual prompts when elements enter view, then start the chat with a pre-filled message.

Popups nudge visitors with a short prompt when a specific element becomes visible (e.g., your pricing block). They live outside the chat window and send a pre-filled message into chat when clicked.

What you configure

  • CSS selector: The element to watch (e.g., #pricing, .faq-block).
  • Popup text: The small blurb shown to the visitor.
  • Pre-filled message: Sent to the bot when the popup is clicked, so the conversation starts with context.
  • Frequency: Once per session or Always whenever the selector is in view.
  • Delay (ms): How long to wait after the selector is visible before showing (default 3000ms).
  • Dismissible: Allow users to close the popup.

Add a popup

  1. Go to Settings > Developer > Popups.
  2. Click Add popup.
  3. Set CSS selector, Popup text, and Pre-filled message (all required).
  4. Choose Frequency, Delay (ms), and whether it is Dismissible.
  5. Save. The page refreshes to pull the saved rules from your tenant.

Tips:

  • Use specific selectors to avoid multiple matches; IDs are safest.
  • Make the pre-filled message actionable (e.g., “I have a question about pricing tiers”).
  • Start with a short delay (2–3s) so the prompt feels helpful, not instant.

How it appears on your site

  • The embed script observes your selector; when it enters view, it waits for the delay you set, then shows the popup.
  • Dismissed or shown popups respect the chosen frequency (tracked per rule in local storage).
  • Clicking the popup sends the pre-filled message to the chat widget and hides the popup.

That’s it—once configured, the widget handles detection, timing, and chat handoff automatically.