Skip to content

Commit b486aba

Browse files
authored
fix(pricing): route Talk to sales CTA to demo request form instead of signup (#5602)
- pricing page's enterprise card was labeled "Talk to sales" but linked to /signup for every card, sending visitors to self-serve signup instead of the demo-request flow every other "Contact sales" CTA on the site uses - resolveCta now keys off the CTA's sales intent to pick the right href - extracted the /signup and /demo route literals (previously hardcoded independently in 6 files) into a single shared apps/sim/app/(landing)/constants.ts so no CTA can drift to the wrong destination again - hoisted the static per-column comparison sections out of render and deduped the annual-discount price math in pricing-plans.tsx
1 parent 7c2de1d commit b486aba

7 files changed

Lines changed: 52 additions & 30 deletions

File tree

apps/sim/app/(landing)/components/cta/cta.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ChipLink } from '@sim/emcn'
2+
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
23

34
/**
45
* Landing pre-footer CTA - the page's final conversion band. A tall, centered
@@ -28,10 +29,10 @@ export function Cta() {
2829
Build your first agent today.
2930
</h2>
3031
<div className='flex items-center gap-1'>
31-
<ChipLink variant='primary' href='/signup'>
32+
<ChipLink variant='primary' href={SIGNUP_HREF}>
3233
Get started
3334
</ChipLink>
34-
<ChipLink href='/demo' className='border border-[var(--border-1)]'>
35+
<ChipLink href={DEMO_HREF} className='border border-[var(--border-1)]'>
3536
Contact sales
3637
</ChipLink>
3738
</div>

apps/sim/app/(landing)/components/hero-cta/hero-cta.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ChipLink, cn } from '@sim/emcn'
2+
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
23

34
/**
45
* Hero-scale sizing shared by both CTAs - one step up from the navbar's 30px
@@ -24,11 +25,11 @@ const CTA_SIZE = 'h-[36px] px-[0.571em] text-[15px] [&>span]:[font-size:inherit]
2425
export function HeroCta() {
2526
return (
2627
<div className='flex items-center gap-2 max-sm:w-full max-sm:flex-col max-sm:items-stretch'>
27-
<ChipLink variant='primary' href='/demo' className={CTA_SIZE}>
28+
<ChipLink variant='primary' href={DEMO_HREF} className={CTA_SIZE}>
2829
Request a demo
2930
</ChipLink>
3031
<ChipLink
31-
href='/signup'
32+
href={SIGNUP_HREF}
3233
prefetch={false}
3334
className={cn(CTA_SIZE, 'border border-[var(--border-1)] max-sm:justify-center')}
3435
>

apps/sim/app/(landing)/components/navbar/components/mobile-nav/mobile-nav.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
NAVBAR_GLASS_SURFACE,
1111
useNavbarFrost,
1212
} from '@/app/(landing)/components/navbar/components/navbar-shell'
13+
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
1314

1415
/**
1516
* Mobile navigation - the `< lg` counterpart to the desktop nav clusters.
@@ -70,7 +71,7 @@ export function MobileNav({ stars }: MobileNavProps) {
7071

7172
return (
7273
<div className='ml-auto flex items-center gap-2 lg:hidden'>
73-
<ChipLink variant='primary' href='/signup' prefetch={false}>
74+
<ChipLink variant='primary' href={SIGNUP_HREF} prefetch={false}>
7475
Sign up
7576
</ChipLink>
7677
<button
@@ -166,7 +167,7 @@ export function MobileNav({ stars }: MobileNavProps) {
166167
</ChipLink>
167168
<ChipLink
168169
variant='primary'
169-
href='/demo'
170+
href={DEMO_HREF}
170171
fullWidth
171172
flush
172173
className='h-[40px] justify-center [&>span]:flex-none'

apps/sim/app/(landing)/components/navbar/navbar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
NavMenuChip,
1010
SimWordmark,
1111
} from '@/app/(landing)/components/navbar/components'
12+
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
1213

1314
/**
1415
* Landing navbar.
@@ -87,10 +88,10 @@ export function Navbar({ stars, logoOnly = false }: NavbarProps) {
8788
<ChipLink href='/login' prefetch={false}>
8889
Log in
8990
</ChipLink>
90-
<ChipLink variant='border' href='/demo'>
91+
<ChipLink variant='border' href={DEMO_HREF}>
9192
Contact sales
9293
</ChipLink>
93-
<ChipLink variant='primary' href='/signup' prefetch={false}>
94+
<ChipLink variant='primary' href={SIGNUP_HREF} prefetch={false}>
9495
Sign up
9596
</ChipLink>
9697
</div>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Shared landing-page CTA destinations. Every "Get started"/"Sign up" CTA
3+
* across the marketing site funnels to signup; every "Talk to sales"/
4+
* "Contact sales" CTA funnels to the demo-request form. Centralized here so
5+
* no CTA can drift to the wrong destination independently.
6+
*/
7+
export const SIGNUP_HREF = '/signup'
8+
export const DEMO_HREF = '/demo'

apps/sim/app/(landing)/enterprise/enterprise.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '@/app/(landing)/components/solutions-page/components'
1010
import { SOLUTIONS_SPACING } from '@/app/(landing)/components/solutions-page/constants'
1111
import type { SolutionsPageConfig } from '@/app/(landing)/components/solutions-page/types'
12+
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
1213
import { EnterpriseFeatureGrid } from '@/app/(landing)/enterprise/components/enterprise-feature-grid'
1314
import { EnterprisePlatformLoop } from '@/app/(landing)/enterprise/components/enterprise-platform-loop'
1415
import {
@@ -84,7 +85,7 @@ const ENTERPRISE_CONFIG: SolutionsPageConfig = {
8485
title: 'Build, Deploy, and Manage Enterprise AI Agents in One Workspace',
8586
subtitle:
8687
'Build enterprise AI agents, ship to production, and manage every version from one workspace.',
87-
cta: { label: 'Start building', href: '/signup' },
88+
cta: { label: 'Start building', href: SIGNUP_HREF },
8889
cards: [
8990
{
9091
title: 'Build visually or with code',
@@ -111,7 +112,7 @@ const ENTERPRISE_CONFIG: SolutionsPageConfig = {
111112
title: 'Governance and Security for Enterprise AI Agents',
112113
subtitle:
113114
'Security, approvals, and controls keep enterprise AI agents trusted in production.',
114-
cta: { label: 'See security', href: '/demo' },
115+
cta: { label: 'See security', href: DEMO_HREF },
115116
cards: [
116117
{
117118
title: 'Control who can do what',
@@ -138,7 +139,7 @@ const ENTERPRISE_CONFIG: SolutionsPageConfig = {
138139
id: 'deploy',
139140
title: 'Deploy Enterprise Workflow Agents with Confidence',
140141
subtitle: 'Stage, observe, and version workflow agents before they reach production.',
141-
cta: { label: 'Explore deployment', href: '/signup' },
142+
cta: { label: 'Explore deployment', href: SIGNUP_HREF },
142143
cards: [
143144
{
144145
title: 'Stage before you ship',
@@ -162,7 +163,7 @@ const ENTERPRISE_CONFIG: SolutionsPageConfig = {
162163
title: 'Built for Enterprise Teams',
163164
subtitle:
164165
'Built for the teams that own enterprise AI agents across IT, operations, and engineering.',
165-
cta: { label: 'Talk to sales', href: '/demo' },
166+
cta: { label: 'Talk to sales', href: DEMO_HREF },
166167
cards: [
167168
{
168169
title: 'IT and platform teams',

apps/sim/app/(landing)/pricing/components/pricing-plans/pricing-plans.tsx

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { ReactNode } from 'react'
44
import { useQueryStates } from 'nuqs'
55
import { getUpgradeCardCta, type PlanTier, type UpgradeCardId } from '@/lib/billing/client'
66
import { ANNUAL_DISCOUNT_RATE, CREDIT_TIERS } from '@/lib/billing/constants'
7+
import { DEMO_HREF, SIGNUP_HREF } from '@/app/(landing)/constants'
78
import {
89
PricingCard,
910
type PricingCardCta,
@@ -18,14 +19,12 @@ import {
1819

1920
/**
2021
* A public visitor has no subscription, so each card's canonical label and
21-
* variant resolves against the `free` tier. On this page every CTA funnels to
22-
* sign-up regardless of plan.
22+
* variant resolves against the `free` tier. On this page every self-serve CTA
23+
* funnels to sign-up regardless of plan; the enterprise CTA routes to the
24+
* demo-request form instead.
2325
*/
2426
const VISITOR_TIER: PlanTier = 'free'
2527

26-
/** Every CTA on the public pricing page funnels logged-out visitors to sign-up. */
27-
const SIGNUP_HREF = '/signup'
28-
2928
/** This section's rows render on the public cards without their group header. */
3029
const HEADERLESS_SECTION_TITLE = 'Credits & pricing'
3130

@@ -52,13 +51,27 @@ function sectionsForColumn(col: number): PricingCardSection[] {
5251
}))
5352
}
5453

54+
/** The four card columns (Free, Pro, Max, Enterprise) transposed once at module load - the source data is static, so this never needs to be redone per render. */
55+
const SECTIONS_BY_COLUMN = [0, 1, 2, 3].map(sectionsForColumn)
56+
57+
/** Round a dollar amount down to the annual-billing discounted price. */
58+
function annualPrice(dollars: number): number {
59+
return Math.round(dollars * (1 - ANNUAL_DISCOUNT_RATE))
60+
}
61+
5562
/**
56-
* Resolve a card's canonical label and variant from the free-tier matrix; the
57-
* CTA always funnels logged-out visitors to sign-up.
63+
* Resolve a card's canonical label and variant from the free-tier matrix. A
64+
* `sales` intent ("Talk to sales") routes to the demo-request form, matching
65+
* every other "Contact sales" CTA on the landing site; every other intent
66+
* funnels logged-out visitors to sign-up.
5867
*/
5968
function resolveCta(card: UpgradeCardId): PricingCardCta {
6069
const cta = getUpgradeCardCta(VISITOR_TIER, card)
61-
return { label: cta.label, variant: cta.variant, href: SIGNUP_HREF }
70+
return {
71+
label: cta.label,
72+
variant: cta.variant,
73+
href: cta.intent === 'sales' ? DEMO_HREF : SIGNUP_HREF,
74+
}
6275
}
6376

6477
const FREE_CTA: PricingCardCta = {
@@ -86,12 +99,8 @@ export function PricingPlans({ heading }: PricingPlansProps) {
8699
const setIsAnnual = (next: boolean) => setParams({ billing: next ? 'annual' : 'monthly' })
87100

88101
const discountPct = Math.round(ANNUAL_DISCOUNT_RATE * 100)
89-
const proPrice = isAnnual
90-
? Math.round(CREDIT_TIERS[0].dollars * (1 - ANNUAL_DISCOUNT_RATE))
91-
: CREDIT_TIERS[0].dollars
92-
const maxPrice = isAnnual
93-
? Math.round(CREDIT_TIERS[1].dollars * (1 - ANNUAL_DISCOUNT_RATE))
94-
: CREDIT_TIERS[1].dollars
102+
const proPrice = isAnnual ? annualPrice(CREDIT_TIERS[0].dollars) : CREDIT_TIERS[0].dollars
103+
const maxPrice = isAnnual ? annualPrice(CREDIT_TIERS[1].dollars) : CREDIT_TIERS[1].dollars
95104
const priceSubtext = isAnnual
96105
? 'per user/month, billed annually'
97106
: 'per user/month, billed monthly'
@@ -114,30 +123,30 @@ export function PricingPlans({ heading }: PricingPlansProps) {
114123
price='$0'
115124
priceSubtext='Free forever'
116125
cta={FREE_CTA}
117-
sections={sectionsForColumn(0)}
126+
sections={SECTIONS_BY_COLUMN[0]}
118127
/>
119128
<PricingCard
120129
name='Pro'
121130
price={`$${proPrice}`}
122131
discountLabel={discountLabel}
123132
priceSubtext={priceSubtext}
124133
cta={proCta}
125-
sections={sectionsForColumn(1)}
134+
sections={SECTIONS_BY_COLUMN[1]}
126135
/>
127136
<PricingCard
128137
name='Max'
129138
price={`$${maxPrice}`}
130139
discountLabel={discountLabel}
131140
priceSubtext={priceSubtext}
132141
cta={maxCta}
133-
sections={sectionsForColumn(2)}
142+
sections={SECTIONS_BY_COLUMN[2]}
134143
/>
135144
<PricingCard
136145
name='Enterprise'
137146
price='Custom'
138147
priceSubtext='Tailored to your team'
139148
cta={enterpriseCta}
140-
sections={sectionsForColumn(3)}
149+
sections={SECTIONS_BY_COLUMN[3]}
141150
/>
142151
</div>
143152
</>

0 commit comments

Comments
 (0)