Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

544 B
Raw Blame
import { buildPopoutURL } from './urlParamsHelper';

export const popoutChatWindow = (
  origin,
  websiteToken,
  locale,
  conversationCookie
) => {
  try {
    const windowUrl = buildPopoutURL({
      origin,
      websiteToken,
      locale,
      conversationCookie,
    });
    const popoutWindow = window.open(
      windowUrl,
      `webwidget_session_${websiteToken}`,
      'resizable=off,width=400,height=600'
    );
    popoutWindow.focus();
  } catch (err) {
    // eslint-disable-next-line no-console
    console.log(err);
  }
};