Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion __tests__/cold-start-brief.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,23 @@ describe("seedSetupActions (the honesty contract)", () => {
"wellness",
);
expect(actions).toHaveLength(3);
expect(actions[0].id).toBe("connect-booking");
// P1-S2: a non-Google booking tool now routes to the HONEST CSV path (no Google-
// only /settings/integrations dead-end), still quoting the tool name.
expect(actions[0].id).toBe("import-booking-csv");
expect(actions[0].href).toBe("/import");
expect(actions[0].why).toContain("Vagaro");
for (const a of actions) {
expect(a.why.length).toBeGreaterThan(0);
expect(`${a.headline} ${a.why}`).not.toMatch(/\$\d/);
}
});

it("Google Calendar routes to the live self-serve connector (the only tool that self-connects today)", () => {
const actions = seedSetupActions({ booking_tool: "Google Calendar" }, "wellness");
expect(actions[0].id).toBe("connect-booking");
expect(actions[0].href).toBe("/settings/integrations");
});

it("paper-or-phone owners get the simple import path, not an integration dead end", () => {
const actions = seedSetupActions({ booking_tool: "Paper or phone" }, "generic");
expect(actions[0].id).toBe("start-simple-import");
Expand Down
31 changes: 23 additions & 8 deletions lib/onboarding/cold-start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const QUESTION_SETS: Record<ColdStartVertical, readonly SeedQuestion[]> = {
id: "booking_tool",
label: "Where do your bookings live?",
kind: "choice",
options: ["Google Calendar", "Vagaro", "Square", "Paper or phone", "Other"],
options: ["Google Calendar", "Acuity", "Mindbody", "Vagaro", "Square", "Jane", "Paper or phone", "Other"],
helps: "Connecting it is how real opportunities appear here.",
},
],
Expand Down Expand Up @@ -135,7 +135,7 @@ const QUESTION_SETS: Record<ColdStartVertical, readonly SeedQuestion[]> = {
id: "booking_tool",
label: "Where do your bookings live?",
kind: "choice",
options: ["Google Calendar", "Square", "Paper or phone", "Other"],
options: ["Google Calendar", "Acuity", "Square", "Paper or phone", "Other"],
helps: "Connecting it is how real opportunities appear here.",
},
],
Expand Down Expand Up @@ -188,13 +188,28 @@ export function seedSetupActions(
const v = resolveColdStartVertical(vertical);

const tool = answers["booking_tool"];
// P1-S2: route by whether the named tool has a LIVE self-serve connector. Only
// Google Calendar self-connects today; sending an Acuity/Mindbody/Vagaro/Square shop
// to the Google-only /settings/integrations is an honest-looking dead-end. Every
// other tool gets the honest CSV path (the fastest real path today) — never a false
// "connect" promise for a connector that doesn't exist yet.
const LIVE_SELF_SERVE_BOOKING = new Set(["Google Calendar"]);
if (typeof tool === "string" && tool.length > 0 && tool !== "Paper or phone") {
out.push({
id: "connect-booking",
headline: `Connect ${tool} so Relay can see your schedule`,
why: `You said your bookings live in ${tool}.`,
href: "/settings/integrations",
});
if (LIVE_SELF_SERVE_BOOKING.has(tool)) {
out.push({
id: "connect-booking",
headline: `Connect ${tool} so Relay can see your schedule`,
why: `You said your bookings live in ${tool}.`,
href: "/settings/integrations",
});
} else {
out.push({
id: "import-booking-csv",
headline: `Export a client list from ${tool} to start today`,
why: `One-click ${tool} connect is on our roadmap; a CSV export from ${tool} gets Relay working now.`,
href: "/import",
});
}
} else if (tool === "Paper or phone") {
out.push({
id: "start-simple-import",
Expand Down