Options

Reference for the configurable options available on the Glassix agent widget

This document outlines the available options for configuring and styling the Glassix agent widget and serves as a reference for developers integrating or maintaining the widget across our products.

Overview

Options let you customize how the agent widget behaves and looks. You add them to the widgetOptions object in your installation script, before you paste it onto your site. For a step-by-step walkthrough of how this fits into the installation process, see the Installation guide.

var widgetOptions = {
     departments: ["departments ids you want to sign into"],
     userName: "your-user-name",
     snippetId: "your-snippet-id",
     // Add any of the options below here
     width: "900px",
     position: "right"
};

The options are grouped into two categories:

  • Configuration: controls which agent signs in, which departments they're signed into, and the server the widget connects to.
  • Design: controls the widget's size and its position on the page.
📘

Unlike the chat widget, the agent widget's design isn't configured per snippet in the Glassix dashboard. Everything below is set in the widgetOptions object in the script itself.


Configuration

These options control which agent signs in, which departments they're signed into, and the server the widget connects to.

NameTypeDescriptionDefault
departmentsArray[string]List of department IDs to log into.[]
userNamestringThe specific agent's email.
snippetIdstringUse it if you have more than one script configured for your department.
baseUristringGlassix dedicated server URL.https://app.glassix.com
📘

userName is hardcoded in the default install script. To sign in different agents dynamically, override this value with JavaScript before the widget initializes. See Customizing the Username in the Installation guide.


Design

These options control the widget's size and its placement on the page. Values are standard CSS values unless noted otherwise.

NameTypeValueDefault
widthstringValid CSS value900px
heightstringValid CSS value550px
positionstringleft, rightright
🚧

The Design options apply to the widget Glassix injects into your page. They don't apply if you're embedding the widget in your own iframe — size and position that iframe with your own HTML/CSS instead. See the iFrame section of the Installation guide.


Methods

To control the widget after it has loaded, for example, to log the current agent out or open a specific ticket, see Methods.