What It Does
The template listens for visitor check-ins across all Qminder locations. When someone checks in, it queries your CRM to check if they’re a VIP. If they are, it applies a “VIP” label to their ticket.Prerequisites
Before getting started, you’ll need:- Qminder API key - Create one in Qminder Dashboard under Organization Settings → Developer Tools. See Authentication for details.
- Docker (recommended) OR Node.js 20+ with Yarn
- CRM access - Credentials for your CRM system (Salesforce, HubSpot, or custom)
Quick Start
Clone the Repository
Option 1: Run with Docker (Recommended)
Option 2: Run with Node.js
How It Works
The template uses Qminder’s GraphQL API to subscribe to real-time events:- Connects to Qminder - Establishes a WebSocket connection using your API key
- Subscribes to check-ins - Listens for the
createdTicketssubscription across all locations - Extracts visitor info - When a ticket is created, extracts the visitor’s name, phone number, and email
- Queries your CRM - Calls your custom
checkVip()function to look up the customer - Applies the label - If the customer is a VIP, adds a “VIP” label to their Qminder ticket
Customization
Editsrc/crm.ts to connect to your CRM. This file contains the checkVip() function.
The Interface
Visitor object contains:
firstName- Visitor’s first namelastName- Visitor’s last namephoneNumber- Phone number (if provided)email- Email address (if provided)
Example: Salesforce Integration
Example: HubSpot Integration
Example: Custom Database
Project Structure
Configuration
| Environment Variable | Required | Description |
|---|---|---|
API_KEY | Yes | Your Qminder REST API key |
SF_USERNAME, HUBSPOT_TOKEN, DATABASE_URL).
Deployment
Docker (Production)
Cloud Platforms
The Docker image can be deployed to any container platform:- AWS - ECS, Fargate, or App Runner
- Google Cloud - Cloud Run or GKE
- Azure - Container Instances or AKS
- Heroku - Container Registry
Process Managers
If running directly on a VM without Docker, use a process manager like PM2:Troubleshooting
Template not receiving events
- Verify your API key is valid and has access to locations
- Check that the WebSocket connection is established (look for connection logs)
- Ensure your firewall allows outbound WebSocket connections
VIP labels not appearing
- Confirm your
checkVip()function returnstruefor test customers - Check the template logs for any CRM query errors
- Verify the “VIP” label exists in your Qminder location settings
CRM connection issues
- Double-check your CRM credentials in environment variables
- Ensure your CRM API rate limits aren’t being exceeded
- Test your CRM queries independently before integrating