Skip to content

Commit d888674

Browse files
committed
Add support for starter, accelerate, and scale tiers
1 parent 2a7df33 commit d888674

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/dashboard/src/app/(dashboard)/support/create-ticket/components/create-ticket.action.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ const UNTHREAD_API_KEY = process.env.UNTHREAD_API_KEY || "";
1515

1616
const planToCustomerId = {
1717
free: process.env.UNTHREAD_FREE_TIER_ID as string,
18+
starter: process.env.UNTHREAD_STARTER_TIER_ID as string | undefined,
1819
growth: process.env.UNTHREAD_GROWTH_TIER_ID as string,
20+
accelerate: process.env.UNTHREAD_ACCELERATE_TIER_ID as string | undefined,
21+
scale: process.env.UNTHREAD_SCALE_TIER_ID as string | undefined,
1922
pro: process.env.UNTHREAD_PRO_TIER_ID as string,
2023
} as const;
2124

@@ -99,7 +102,8 @@ export async function createTicketAction(
99102
}
100103

101104
const customerId = isValidPlan(team.supportPlan)
102-
? planToCustomerId[team.supportPlan]
105+
? // fall back to "free" tier
106+
planToCustomerId[team.supportPlan] || planToCustomerId.free
103107
: // fallback to "free" tier
104108
planToCustomerId.free;
105109

0 commit comments

Comments
 (0)