Skip to main content
New to Quarterzip? Be sure to visit the Getting Started page before continuing with this section.
Sdk Mockup

Quickstart Plan

  1. Configure your Quarterzip Workspace for SDK
  2. Install the Quarterzip SDK
  3. Grant Security Permissions
  4. Trigger the Quarterzip Agent

Configure your Quarterzip Workspace for SDK

Visit the SDK Settings (Settings -> SDK) in your Quarterzip workspace. This page provides the configuration options to restrict who may serve your agent on your behalf.
  • Workspace Token: a public token used to authenticate your site to Quarterzip.
  • Allowed Origins: an optional list of site origins that are authorised to serve your Quarterzip agent. This list may include wildcards for subdomains, i.e. https://*.example.com
SDK Settings Screenshot
Then visit the My Agents page and select your agent.
  • Agent ID: A 6 alpha-numeric character ID to identify your agent. Select the menu button in the top right and click share my agent. From here, the agent_id is the 6 alpha-numeric characters at the end of the url, after the /d/ .

Install the Quarterzip SDK

CDN Script

NPM Package

The CDN Script is the recommended installation method for Quarterzip. Please contact support before using this NPM package installation.

Grant Security Permissions

The Quarterzip SDK operates in a security sandbox separate from your site. In order for your Quarterzip agent to communicate with your users, the following permissions must be granted if enforced.

CSP requirements

Only relevant if your page sends a Content-Security-Policy header, then it must permit Quarterzip’s SDK origin to be framed.

Permissions Policy

Only relevant if your page sends a Permissions-Policy header, then it must permit Quarterzip’s SDK origin the following permissions:
Learn more at Security.

Trigger the Quarterzip Agent

Call window.Quarterzip.open() from any user interaction; i.e. a button-press. Visit SDK API Reference for more details.
Sdk Mockup

The Help icon button calls window.Quarterzip.open() on user interaction.

It’s important to verify integration by conducting a call with the agent; completing expected steps such as granting microphone permissions, screen-sharing and ending the call.

Best Practices

Set yourself up for success.

Webhooks

React and receive call data.

Advanced patterns

Passing additional context to the agent

The context parameter may be used to provide additional information to the agent to enhance the conversation; e.g. the user’s plan, country, or handover notes from another support tool. The agent only receives this information if the user decides to start the call. The amount of context is capped at 2,000 characters.

Conditionally present Quarterzip agents

Most customers prefer to show agents to users based on feature-flags or user-attributes. Screen-sharing requires the user’s browser to have the getDisplayMedia() web API, which is unavailable on most mobile devices and can help determine which users to filter out.

Closing on route change

End the call when a user navigates away from a specific area (React Router v6 example):

React wrapper hook

What’s Next?

Best Practices

Set yourself up for success.

Webhooks

React and receive call data.