Guides / SaaS
In B2B SaaS, expansion happens when an existing account adds seats, upgrades to a higher tier, or removes a usage cap. All of these are worth logging.
export async function logSeatExpansion(accountId: string, seatsAdded: number, newTotal: number, plan: string) {
const account = await db.account.findUnique({ where: { id: accountId } });
await logit.now("expansion", {
event: "Seats added",
description: `${account.name} added ${seatsAdded} seat${seatsAdded > 1 ? "s" : ""} (now ${newTotal})`,
icon: "💺",
notify: true,
tags: { accountId, plan, seatsAdded: seatsAdded.toString() },
metadata: {
accountId,
accountName: account.name,
seatsAdded,
newTotalSeats: newTotal,
estimatedMrrDelta: seatsAdded * getSeatPrice(plan),
},
});
}
export async function logPlanUpgrade(accountId: string, fromPlan: string, toPlan: string, mrrDelta: number) {
const account = await db.account.findUnique({ where: { id: accountId } });
await logit.now("expansion", {
event: "Plan upgraded",
description: `${account.name} upgraded ${fromPlan} → ${toPlan} (+${(mrrDelta / 100).toFixed(2)}/mo)`,
icon: "⬆️",
notify: true,
tags: { accountId, fromPlan, toPlan },
metadata: { accountId, accountName: account.name, fromPlan, toPlan, mrrDelta },
});
}
When multiple accounts expand in a short window, it signals strong product-market fit or a successful campaign:
| Field | Value |
|---|---|
| Name | Expansion wave |
| Channel | expansion |
| Event name | Seats added |
| Threshold | 5 |
| Window | 24 hours |
| Cooldown | 24 hours |
| Action | Push notification + Slack webhook |
estimatedMrrDelta in metadata so you can review it in the event detail panel.expansion from subscriptions: expansions are upsells to existing customers, subscriptions are new customers.notify: true on every expansion — they're high-signal events worth celebrating individually.Try LogIt free
7-day trial. No credit card required.