Skip to content
Quenza
MCPNew: use this help center in Claude, ChatGPT or CursorConnect →

Follow up on invitations

2 min read

Find clients who have not accepted their Quenza invitation after a week and remind your coaches, so no new client gets lost before the start.

A client who never opens their invitation never sees their first activity. Most of them only need a friendly reminder. This guide finds clients whose invitation is more than a week old and still not accepted, and sends their coach a short list every Monday.

At Bright Path Coaching, Lucas Meyer was invited ten days ago and has not set up his account. On Monday, Sarah Bennett’s list says so, and she sends him the invitation again with one click.

The examples come in JavaScript (Node.js 18 or later), Python (with requests) and PHP (with Guzzle); pick your language in the tabs.

List the clients and keep those with the status pending whose invited_at is more than seven days ago:

const API = 'https://developers.quenza.com/v1';
const headers = { Authorization: `Bearer ${process.env.QUENZA_API_TOKEN}`, Accept: 'application/json' };
async function* allClients() {
let url = `${API}/clients?limit=100`;
while (url) {
const response = await fetch(url, { headers });
if (!response.ok) throw new Error(`Quenza API error ${response.status}`);
const page = await response.json();
yield* page.data;
url = page.links.next;
}
}
const weekAgo = Date.now() - 7 * 24 * 60 * 60 * 1000;
const waiting = [];
for await (const client of allClients()) {
if (client.status === 'pending' && client.invited_at && Date.parse(client.invited_at) < weekAgo) {
waiting.push(client);
}
}

Send the list to whoever follows up, for example by email. Use your mail provider’s server settings; most need a login as well:

import nodemailer from 'nodemailer'; // npm install nodemailer
const lines = waiting
.sort((a, b) => a.invited_at.localeCompare(b.invited_at))
.map((c) => `- ${c.first_name} ${c.last_name} (${c.email}), invited ${c.invited_at.slice(0, 10)}`);
if (lines.length) {
const mail = nodemailer.createTransport({ host: process.env.SMTP_HOST, port: Number(process.env.SMTP_PORT ?? 25) });
await mail.sendMail({
from: 'reports@example.com',
to: 'sarah.bennett@example.com',
subject: `${lines.length} clients have not accepted their invitation yet`,
text:
'These clients were invited more than a week ago and have not set up their account:\n\n' +
lines.join('\n') +
"\n\nResend the invitation from the client's ⋯ menu in Quenza.",
});
}

Run it once a week, for example every Monday morning with cron.

The API cannot resend invitations. In Quenza, open the client’s ⋯ menu and choose Resend Invitation. See Add clients.

  • Per coach: a token sees every client in the workspace, and the client record does not say who their professional is. To split the list per coach, keep the mapping in your own system, for example the CRM that created the client.
  • Know the moment they start: the Client Invitation Accepted webhook tells your system as soon as a client sets up their account, so you can thank them or mark them as started in your CRM.
  • Clean up: archive clients who never respond after several reminders with Archive a client, so your lists stay short. Archived clients still count toward your client limit; to free a place, delete them in Quenza. See Client limits.
Enlarged screenshot from this article