Segment users and accounts by their commercial plan.
Overview
plans is a reserved structured attribute on every account. It lets you
natively segment and filter both users and accounts by their commercial plan
(trial, paid tiers, billing cadence) without ad-hoc queries or manual tagging.Because a user can belong to multiple accounts, plan data is also denormalized
onto each user, so user-level filtering stays fast.
The PlanItem contract
An account’s plans is an array of plan objects:
Field
Type
Required
Notes
key
string
Yes
Free-form identifier, stored lowercased. Used for filtering and segmentation.
label
string
Yes
Human-readable display name.
period
string
No
One of daily, weekly, monthly, yearly, custom.
price
number
No
Must be ≥ 0.
currency
string
No
ISO 4217 code (e.g. USD). Required when price is set.
Plan keys are deduplicated per account — sending the same key twice keeps the
last occurrence. Values are normalized and validated server-side regardless of
the write channel.
A reserved attribute
plans is reserved: it is always written into the typed account.plans field
and never into the generic custom-attributes map. An identify or API
caller cannot smuggle arbitrary structure into it.
plan (singular string) is a legacy field, now deprecated in favour of
plans. It is left untouched for backwards compatibility — new integrations
should use plans only.
Setting plans
Plans can be set through two channels:
SDK identify — via the account.plans array. See identify.
Server API — via the account upsert endpoint, or PATCH /accounts/:id
from the workspace.
In all cases, sending plansreplaces the account’s plan list. An empty
array ([]) clears all plans; omitting plans leaves them unchanged.