Website Widgets

This page documents the public widgets currently available in the Sendeasy frontend.

Current status

Active in production:

  1. Chat Widget
  2. Live Chat
  3. WhatsApp Floating

Planned (not active in frontend yet):

  1. Form
  2. Pop-up

Quick matrix

WidgetGlobal objectScriptPrimary use case
Chat Widgetwindow.sendeasyConfighttps://widget.sendeasy.pro/sendeasy-widget-chat-dev.jsLead capture and guided conversation start
Live Chatwindow.liveChatConfighttps://widget.sendeasy.pro/widget-live-chat.jsReal-time bidirectional web chat with ticket creation
WhatsApp Floatingwindow.sendeasyWhatsApphttps://widget.sendeasy.pro/whatsapp-floating.jsFloating WhatsApp CTA with prefilled message

1) Chat Widget

Use it when you need visitor data capture and routing into your messaging operation.

Main fields:

  • sendToken: outbound channel token
  • contactToken: contacts project token
  • defaultCountry: default country (BR, US, etc.)
  • sector: target queue/sector (optional)
  • captureEmail, hidePoweredBy, autoOpen
  • languages: text configuration by country/language

Example:

<script>
  window.sendeasyConfig = {
    sendToken: "YOUR_SEND_TOKEN",
    contactToken: "YOUR_CONTACT_TOKEN",
    defaultCountry: "US",
    captureEmail: true,
    hidePoweredBy: false,
    autoOpen: false,
    chatButtonColor: "#000000",
    chatButtonTextColor: "#FFFFFF",
    sendButtonColor: "#58BE55",
    sector: "QUEUE_ID",
    languages: {
      US: {
        questions: [
          "Hello, how can we help you today?",
          "What is your name?",
          "What is your email?",
          "Finally, what is your WhatsApp number?",
        ],
        finish: "Thank you! We will contact you shortly.",
        thanksMessage: "{name}, we received your message and will reply shortly.",
        chatButton: "Chat",
        chatPlaceholder: "Type your message...",
        closeChatButton: "Close Chat",
      },
    },
  };
</script>
<script src="https://widget.sendeasy.pro/sendeasy-widget-chat-dev.js" defer></script>

2) Live Chat

Use it for real-time website chat with UI branding, queue routing, and per-language overrides (pt, en, es).

Main fields:

  • token: site/widget token generated in dashboard
  • backendUrl: public backend URL
  • primaryColor, secondaryColor, textColor
  • position: left or right
  • title, subtitle (optional)
  • queueId (optional)
  • languages (optional language overrides)

Example:

<script>
  window.liveChatConfig = {
    token: "YOUR_SITE_TOKEN",
    backendUrl: "https://api.sendeasy.app",
    primaryColor: "#4F46E5",
    secondaryColor: "#ffffff",
    textColor: "#ffffff",
    position: "right",
    title: "Support",
    subtitle: "We reply in minutes",
    queueId: 10,
    languages: {
      en: {
        title: "Support",
        subtitle: "We reply in minutes",
        namePlaceholder: "Your name *",
        emailPlaceholder: "Your email (optional)",
        startButton: "Start chat",
        messagePlaceholder: "Type your message...",
        sendButton: "Send",
      },
      pt: {
        title: "Suporte",
        subtitle: "Respondemos em minutos",
        namePlaceholder: "Seu nome *",
        emailPlaceholder: "Seu e-mail (opcional)",
        startButton: "Iniciar conversa",
        messagePlaceholder: "Digite sua mensagem...",
        sendButton: "Enviar",
      },
      es: {
        title: "Soporte",
        subtitle: "Respondemos en minutos",
        namePlaceholder: "Tu nombre *",
        emailPlaceholder: "Tu correo (opcional)",
        startButton: "Iniciar chat",
        messagePlaceholder: "Escribe tu mensaje...",
        sendButton: "Enviar",
      },
    },
  };
</script>
<script src="https://widget.sendeasy.pro/widget-live-chat.js" defer></script>

3) WhatsApp Floating

Use it for a fixed WhatsApp button that opens a chat with a predefined message.

Main fields:

  • phoneNumber: international format (example: 5511999999999)
  • message: predefined first message
  • position: left or right
  • delay: display delay in seconds
  • showBadge, badgeText
  • backgroundColor, textColor

Example:

<script>
  window.sendeasyWhatsApp = {
    phoneNumber: "5511999999999",
    message: "Hello! I would like more information.",
    position: "right",
    delay: 5,
    showBadge: true,
    badgeText: "Need help?",
    backgroundColor: "#25D366",
    textColor: "#ffffff",
  };
</script>
<script src="https://widget.sendeasy.pro/whatsapp-floating.js" defer></script>

Production best practices

  • Restrict allowed origins where applicable.
  • Never expose tokens in public repositories.
  • Validate snippets in staging before production rollout.
  • Review queue/sector, texts, and default language periodically.

Essa informação foi útil?