Developer Resources



Adding Queue-Fair

The Queue-Fair Virtual Waiting Room is easily added to a wide variety of web and app platforms in minutes. Just use one of our Adapters. You can find more information about the best way to integrate Queue-Fair with your existing system in the Technical Guide, or the Queue-Fair Portal > Help section.

The Client-Side Adapter

For websites, the simplest way to integrate with Queue-Fair is to add the Client-Side Queue-Fair Adapter JavaScript tag to your pages. You can safely add the Adapter to all the pages on your site, and use the Activation Rules in the Queue-Fair Portal to determine which pages may throw a queue.

Because it runs in your visitors' browsers, the Client-Side Adapter can be disabled by technically skilled visitors, but is very effective at preventing overload as only a very small minority of people will attempt to skip the queue by tampering with the JavaScript. Most of our customers use the Client-Side Adapter because it is effective at preventing a crashed site, simple to install and does not introduce any dependency between our system and yours.

You can add a security layer by replacing the JavaScript tag with a Server-Side Adapter, or combine the flexibility of the JavaScript Adapter with the Hybrid Security Model described on this page; both methods are then secure.

Single Line of Code

To add the Client-Side Adapter to your site, just add the following single line of code to the <head> section of your pages:



Some customers add the word defer to the tag, which causes the Adapter script to be downloaded in parallel to parsing the page and also to only start execution of the script in the visitor’s browser when the page has finished parsing (so typically after any other scripts on your page have finished).

Adding the word defer can improve Time to First Paint by a small fraction of a second in some cases, but if you choose to do this it will mean that any visitors that should be queued will see your protected page for a fraction of a second longer before they are sent to the queue.

Google Tag Manager

We also provide the JavaScript Adapter Tag via Google Tag Manager. Search for Queue-Fair in the Community Templates Gallery, under Add Tag.

GitHub Repositories

Google Tag Manager

Google Tag Manager

The GitHub repository for the Queue-Fair Virtual Waiting Room Google Tag Manager Client-Side Adapter Tag.

Dynamic Queue Pages

Any data you wish can be passed from your site to our servers and the Queue Pages your visitors see by using the data-queue-fair-extra attribute that is available in the Client-Side JavaScript Tag and the Google Tag Manager implementation. Please contact support if you wish to enable Dynamic Queue Pages on your account.

You can use this feature to customise Queue Pages on the fly. You can also use Queue-Fair to pass data that you send us with your visitors back to your site as they are Passed by the queue, for an additional layer of security.

We also provide a Dynamic Queue Page API that uses the extra data to customise any aspect of a Queue Page, so you can create one queue for your whole site and customise it automatically for different events or products on your site, without having to make any changes to your Queue Pages in the Queue-Fair Portal.



Wordpress & WooCommerce

If you are using a Wordpress-based site, such as the WooCommerce shopping cart system, you can easily add the Client-Side JavasScript Adapter tag using the Wordpress Insert Headers & Footers Plugin, without having to modify any of your Themes or touch any Wordpress code.

Just download the Insert Headers & Footers Plugin, unzip it to your /wp-content/plugins/ folder, Activate the plugin in the Plugins menu, open the plugin from the Settings menu, add the tag to Scripts in Header as shown, hit Save at the bottom of the page, and you're done!

The Queue-Fair Portal Dashboard

Client-Side Adapter Additional Resources

The Client-Side Adapter is fully described in the Technical Guide. The Technical Guide is available in the Queue-Fair Portal > Help section, or you can request a copy from us.


Server-Side Adapters

Wheras the Client-Side Adapter runs in JavaScript in your visitors' browsers, the Queue-Fair Server-Side Adapters run on your webserver.

Web Server Adapters

This means your web server can take advantage of additional security features to deny access to people who have not been queued. This also means your web server avoids the load of generating and serving pages containing Adapter script.

Adding the Queue-Fair Server-Side Adapter libraries takes only a few minutes with minimal code changes to activate and run the Adapter.

Most of our customers start with the Client-Side JavaScript Adapter and move to the Server-Side Adapter only where there is a specific business need.

Simple & Safe Mode

The Queue-Fair Server-Side Adapters can operate in Simple or Safe mode.

In Simple Mode, all visitors are sent to the Queue-Fair Servers to be counted, whether or not a Queue has formed. When there is no queue, they are returned to your Web Server straight away, without seeing a Queue Page - but with the signature your Web Server needs to ensure that only people who have been Passed by the queue can access your protected resources.

In Safe Mode, visitors are only sent to the Queue-Fair Servers when there is a Queue. Your web server consults our Queue Servers directly to make this determination. Visitors are still securely digitally signed whether or not a Queue Page is shown.

Safe Mode is recommended for day-to-day queues. Simple mode is appropriate for a timed event when you are expecting thousands of people, as it eliminates latency due to the checking call from your web server to our Queue Servers, which means you can send people to the queue more efficiently.

GitHub Repositories

PHP Virtual Waiting Room Adapter

PHP

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter in PHP.

Java Virtual Waiting Room Adapter

Java

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter for Java, including JBoss and Tomcat.

Ruby Virtual Waiting Room Adapter

Ruby

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter in Ruby and (optionally) Rails.

Python Virtual Waiting Room Adapter

Python

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter in Python and (optionally) Django.

dotNet Virtual Waiting Room Adapter

.NET

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter for .NET, ASP and C#.

Node.js & JavaScript Virtual Waiting Room Adapter

Node.js & JavaScript

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter for Node.js and (optionally) Express.



Dynamic Queue Pages

As with the Client-Side Adapter, any data you wish can be passed from your web server to our servers and the Queue Pages your visitors see by passing this information in the Server-Side Adapter call. This facilitates Dynamic Queue Page or other on-the-fly customisation in the same way - all features of the Client-Side Adapter are fully supported. Please contact support if you wish to enable Dynamic Queue Pages on your account.

Server-Side Adapter Additional Resources

Our Server-Side Adapters are fully described in the Technical Guide. The Technical Guide is available in the Queue-Fair Portal > Help section, or you can request a copy from us. You can also find more information about each of the Adapters in the README.md of each GitHub repository.


REST APIs

Queue-Fair gives developers access to six REST API Modules. You will need a Queue-Fair account to use the API. To enable API access for your account, please contact Queue-Fair Support. Our REST API Modules conform to the OpenAPI, RFC 7807 and RFC 3339 standards.

Our suite of API Modules is comprehensive - anything you can do in the Portal, you can also do with the API, except manage Portal Users which is excluded for privacy reasons.

Each API Module is fully documented at api.queue-fair.net, where you'll also find a Swagger interface for ease of use and testing. For security, all API calls are protected by secure TLS encryption and require an API Key that is specific to your account.

API Modules

Reporting API

For live, real-time reports, historical reports and aggregate queue statistics.

Queue Management API

For creating and modifying queues programmatically in real time.

Account Management API

For viewing and updating your account-wide settings.

Asset Management API

For managing the assets used by your Queue Pages served by Google CDN.

Presentation API

For changing any aspect of the HTML of your Queue Pages and the updating and creation of variants on the fly.

Activation API

For configuring the Activation Rules that determine which pages on your site may trigger a queue, and which page is shown.



Dynamic Queue Pages

You can also modify your Queue Pages on the fly without having to update the database using the Portal or Presentation API - Contact Support for further details and to enable Dynamic Queue Pages on your account.

REST API Additional Resources

As required by RFC 7807, you can find documentation about error messages that may be returned by our REST API Modules at queue-fair.com/api-error


Native Apps

Queue-Fair looks great on mobile browsers as well as desktops and laptops.

You can also use Queue-Fair directly in your native iOS and Android apps, and also React Native apps on iOS, Android, Windows and MacOS, to protect resource-intensive activities or operations.

The Queue-Fair App Adapters use a WebClient to display custom Queue displays to your users when your services are too busy, with the flexibility and ease of use of the Queue-Fair Portal.

You can queue users in the same queue as your website visitors, or set up a separate queue for your app users - it's up to you.

Just like our web-based queues, each user's place is automatically saved if they navigate away from your app too.

GitHub Repositories

iOS, MacOS and Apple Virtual Waiting Room Adapter

iOS & MacOS

The GitHub repository for the Queue-Fair Virtual Waiting Room iOS and MacOS Adapter.

Android Virtual Waiting Room Adapter

Android

The GitHub repository for the Queue-Fair Virtual Waiting Room Adapter for Android.

React Native App Virtual Waiting Room Adapter

React Native

The GitHub repository for the Queue-Fair Virtual Waiting Room Adapter for React Native apps for Android, iOS, MacOS and Windows.

Queue Notifications

The Queue-Fair Adapter makes it easy to send Push Notification to users who are not using your app or queue when their turn is called. The user's place in the queue is automatically persistently stored by the Adapter in your App. If the user navigates away from your app, your app tells your Push Notification server that a notification should be sent, sending the stored queue position information as part of that message to your Push Notification server.

It's the same technology we use for our WeQ4U consumer app, which has had around 2 million downloads in the UK alone.

Your Push Notification server consults the Queue-Fair Status API periodically to query the queue position currently being served. When this is greater than a particular user's queue position, it's time to send that user the notification. If the user returns to the queue or is Passed before a Push Notification has been sent, the Adapter notifies your app, and your app tells your Push Notification server that the notification is no longer required.

To our knowledge, we are the only Virtual Waiting Room provider that supports this feature.

Video Resources

Here's a video of the Native App Adapter in action, showing that the user's place is saved even if the app is completely stopped, and also showing the Adapter hooks your app uses to send Push Notifications.

Additional Resources

Our Native App Adapters are described in the Technical Guide. The Technical Guide is available in the Queue-Fair Portal > Help section, or you can request a copy from us. You can also find more information sabout each of the Adapters that is specific to iOS and Android in the README.md of each GitHub repository.


ECommerce Adapters

Queue-Fair can be added easily to any eCommerce system using the Client-Side JavaScript Adapter described above.

We also offer Adapter code to work at the Server-Side with many popular eCommerce servers.

GitHub Repositories

Magento Plugin

Magento

The GitHub repository for the Queue-Fair Virtual Waiting Room Adapter for Magento.

WooCommerce/PHP Virtual Waiting Room Adapter

WooCommerce

The GitHub repository for the Queue-Fair Virtual Waiting Room Adapter for WooCommerce in PHP.

PrestaShop/PHP Virtual Waiting Room Adapter

PrestaShop

The GitHub repository for the Queue-Fair Virtual Waiting Room Adapter for PrestaShop in PHP.

Additional Resources

Our Adapters are described in the Technical Guide. The Technical Guide is available in the Queue-Fair Portal > Help section, or you can request a copy from us.

We also have supplementary Guides available for most eCommerce platforms - just ask for the one you want.


Hybrid Security

You can easily combine the flexibility of the Client-Side JavaScript Adapter with the additional security layer provided by our Server-Side code.

Queue-Fair signs each visitor we Pass with a digital fingerprint that is unique to that Visitor. Uniquely in the industry, the signature also includes code specific to the visitor's browser, to prevent access tokens from being shared.

Your web server can validate the signature using a secret known only to you and to us - not your visitors - to ensure that each visitor has been fairly passed by the Queue-Fair servers.

So, you can use the Client-Side JavaScript Adapter to send and receive visitors to and from the queue, and check for tampering before they order with minimal Server-Side code, and avoid introducing a dependency on our system.

Example code is included in our GitHub Repositories in every major web programming language.

GitHub Repositories

Amelia

PHP

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter in PHP.

Amelia

Java

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter for Java, including JBoss and Tomcat.

Amelia

Ruby

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter in Ruby and (optionally) Rails.

Amelia

Python

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter in Python and (optionally) Django.

Amelia

.NET

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter for .NET, ASP and C#.

Node.js & JavaScript Virtual Waiting Room Adapter

Node.js & JavaScript

The GitHub repository for the Queue-Fair Virtual Waiting Room Server-Side Adapter for Node.js and (optionally) Express.

Additional Resources

The Hybrid Security Model is fully described in the Technical Guide. The Technical Guide is available in the Queue-Fair Portal > Help section, or you can request a copy from us.


Licence

Our published code available at The GitHub Queue-Fair Repository is licenced under the MIT Licence, which is amongst the most permissive of Open Source licences.


Want to know how Queue-Fair works?