# Make your chat button open web chat for signed-in customers, and tell it who they are

> The SkedX Flow chat button can send visitors to WhatsApp or another app, or open web chat on the page. On pages where a customer is signed in (an account area, a portal), a few lines of the website’s own JavaScript change what the button does there: window.SkodeWidget.launch = ’webchat’ makes it open web chat on that page, with the chat icon and the brand colour, even if the button opens WhatsApp everywhere else; setLaunch(’webchat’) does the same for a button already on the page. A getVisitor() function that returns the signed-in person’s name, email and phone puts those details on every message, so the chat lands on their contact in SkedX Flow and the pre-chat form is not shown. It needs an email or a phone; it is a claim like the pre-chat form and signs nobody in. reset() forgets the chat on that browser when they sign out, so the next person on a shared computer never sees it. open() opens the chat from the page’s own button. A page that uses none of this works exactly as before.

Product: SkedX Flow · Topic: APIs & Developers · Verified in the live product on 2026-11-30 · Updated 2026-11-17

Your chat button sends visitors to WhatsApp, but inside your account area the people are already signed in. There it can open your web chat and say who is writing.

## Video (1:32)

Watch: https://skedx.io/help/flow/developers/open-web-chat-for-signed-in-customers/ · MP4: https://skedx.io/help/videos/flow/developers/open-web-chat-for-signed-in-customers.mp4 · Short: https://skedx.io/help/videos/flow/developers/open-web-chat-for-signed-in-customers-short.mp4

- 0:13 Step 1: Have the chat button on your website
- 0:23 Step 2: Make it open web chat on signed-in pages
- 0:36 Step 3: Tell the chat who is signed in
- 0:58 Step 4: Sign the details on your server
- 1:13 Step 5: Forget the chat when they sign out
- 1:26 Step 6: Or open it from your own button

Transcript:

On pages where your customers are signed in, the SkedX chat button can open web chat, and say who is writing. Your web chat and the SkedX script are on your website, so the chat button shows on every page. On pages where people are signed in, set launch to web chat. The button then opens web chat there, with the chat icon and your brand colour. Give the chat the person's name, email and phone. Every message carries them, the chat lands on their contact, and the pre-chat form is skipped. Your server signs the email and phone with your widget's identity secret. In SkedX Flow, it is under Settings, Channels, Web Chat, the widget's code button. Only admins can show it. On sign-out, clear the details and forget the chat on this browser. The button goes back to what it does on the rest of the site. Prefer a Help link of your own? Call open. The chat may load a moment after the page, so wait for it.

## Step 1: Have the chat button on your website

Your web chat and the SkedX script are already on the site, so the chat button shows on every page.

## Step 2: Make it open web chat on signed-in pages

On the pages where people are signed in, run this once. The button then opens web chat there, with the chat icon and your brand colour. Use **'menu'** instead to offer two choices: **Chat here** and your WhatsApp.

```js
window.SkodeWidget = window.SkodeWidget || {};
window.SkodeWidget.launch = 'webchat'; // or 'menu': Chat here + WhatsApp
// The button is already on the page? Repaint it now:
if (window.SkodeWidget.setLaunch) window.SkodeWidget.setLaunch('webchat');
```

## Step 3: Tell the chat who is signed in

Give the chat the person’s name, email and phone. Every message carries them, the chat lands on their contact, and the pre-chat form is skipped.

```js
window.SkodeWidget.getVisitor = function () {
  return { name: 'Asha Rao', email: 'asha@example.com', phone: '+91 90000 00000' };
};
```

## Step 4: Sign the details on your server

So the first message can go straight to the person who owns them in your CRM, your server signs the email and phone with your widget's identity secret. Find it in SkedX Flow: **Settings** -> **Channels** -> **Web Chat**, the widget's code button, **Identity secret** -> **Show**; admins only; **How to sign** opens this step. Your page then adds **signature**. Without it the details only fill the contact.

```js
// On your server (Node.js). email: trimmed, lower case. phone: '+' and its digits, or ''.
const signature = 'v1:' + require('crypto').createHmac('sha256', IDENTITY_SECRET)
  .update('v1|' + email + '|' + phone).digest('hex');
// The page: return { name, email, phone, signature } from getVisitor().
```

## Step 5: Forget the chat when they sign out

On sign-out, clear the details and forget the chat on this browser. The button goes back to what it does on the rest of the site.

```js
delete window.SkodeWidget.getVisitor;
if (window.SkodeWidget.setLaunch) window.SkodeWidget.setLaunch(null);
if (window.SkodeWidget.reset) window.SkodeWidget.reset();
```

## Step 6: Or open it from your own button

Prefer a **Help** link of your own? Call **open()**. The chat may load a moment after the page, so wait for it.

```js
function openChat() {
  if (window.SkodeWidget && window.SkodeWidget.open) return window.SkodeWidget.open();
  window.addEventListener('skode:widget-ready', function () { window.SkodeWidget.open(); }, { once: true });
}
```

## Common questions

### Does this sign the person in to SkedX?

No. The details are a claim, like the pre-chat form. They fill the contact so your team sees who wrote, and nothing more.

### What if someone else signs in on the same browser and reset() was never called?

The chat sees a different email or phone from getVisitor() and starts a new chat, so they never see the last person’s messages. Still call reset() on sign-out. Added 23 Nov 2026.

### What if I give only a name?

Nothing is sent: a name alone identifies nobody. Give an email or a phone.

### Will pages without this code change?

No. The button keeps doing what your web chat settings say.

### Which page does my team see?

Every message carries the address of the page it was sent from.

Videos and screenshots © 2026 SkedX, with sample data only. Share and link to them freely; copying the SkedX product or its design is not allowed. Terms: https://skedx.io/terms/

## Related guides
- Put SkedX Signal on your website: https://skedx.io/help/accounts/your-organization/put-skode-signal-on-your-website/
- Contacts and conversations over the API: https://skedx.io/help/flow/developers/contacts-and-conversations-api/

Source: https://skedx.io/help/flow/developers/open-web-chat-for-signed-in-customers/