Implementation guide · WebChat example

Install a Teams Live Chat alternative without routing customers to the wrong channel

The snippet is only the last step. Channel ownership, environment separation, security policy and a real round-trip test determine whether the installation works.

Fact-checked: 3 Verified sources

Before code

Create a channel and ownership model

  • Choose whether the channel represents a website, language, department, product or campaign.
  • Name at least two operational owners and define business-hour coverage.
  • Confirm every agent has the required Teams access and understands thread-based replies.
  • Separate test and production routing where the product configuration permits it.
  • Document who can administer the WebChat backend and the Teams app.

Sources: 1, 2

Implementation

Use the asynchronous script with the exact locale channel

The supplied widget pattern loads widget.js asynchronously and identifies the route through a channel query parameter. A copied channel ID can send real customer requests to the wrong language or team.

Place the script near the closing body tag unless your CMS or consent platform requires a controlled loader. Do not duplicate the same widget through both source code and tag manager.

Sources: 2

Browser and privacy controls

Check CSP, consent, disclosure and accessibility

  • Allow only the required script, frame, connect and asset origins in Content Security Policy.
  • Decide with the privacy owner whether the widget loads immediately or after consent.
  • Update the privacy notice with verified controller, processor, retention and transfer information.
  • Test keyboard focus, visible labels, contrast, zoom and screen-reader announcements.
  • Do not publish unverified GDPR or hosting guarantees.

Acceptance

Run a complete round trip, not a launcher check

  1. 01

    Load

    Check desktop, mobile, slow connection, blocked storage and relevant consent states.

  2. 02

    Route

    Send distinct messages from each page, language and configured intent.

  3. 03

    Reply

    Answer from the intended Teams channel and verify the visitor receives it.

  4. 04

    Fail

    Test outside hours, unavailable agents, reconnect and a deliberately blocked script.

  5. 05

    Observe

    Check console errors, network requests, Teams notifications and operational ownership.

Production

Deploy gradually and retain rollback

Start with one representative route, validate real traffic and support ownership, then expand to templates and locales. Record the deployed channel-to-site mapping so future editors do not copy the wrong snippet.

Remove the old Microsoft widget only after the new production path is accepted and monitored.

FAQ

Frequently asked questions

Where should the WebChat script be placed?

The supplied pattern is intended before the closing body tag and loads asynchronously. Your CMS, CSP and consent implementation can require a controlled integration.

Can I reuse one channel ID for every language?

Only if that is an intentional operational design. Separate language channels usually provide clearer routing and ownership; never copy an unrelated project’s ID.

Does seeing the button prove installation works?

No. A valid acceptance test sends a visitor message into the correct Teams location and confirms the agent reply reaches that visitor.

Should the widget load before consent?

That depends on verified data flows, your legal basis and consent design. Have the privacy owner decide from actual vendor documentation rather than assumptions.

Verified sources

Sources and review date

  1. 01
    WebChat by inwebco GmbH

    Microsoft Marketplace / inwebco GmbH · Fact-checked:

    Open source
    verified
  2. 02
    Setting Up WebChat: The Complete Guide for Microsoft Teams

    inwebco GmbH · Fact-checked:

    Open source
    verified
  3. 03
    WebChat für Microsoft Teams

    inwebco GmbH · Fact-checked:

    Open source
    verified