fix: closed some holes in 'enterprise' plan detection
Problem
Fixing Enterprise plan detection
-
A ticket from one of our biggest enterprise customers wasn't tagged with
plan_enterpriseas it should have been. -
We saw a ticket which seemed to have cached value for the plan tag, and sent that value again the following day instead of the correct value (after we merged a bug fix)
Changes
- Enhanced Enterprise detection - Added comprehensive logic to catch special / legacy Enterprise configs
- org-specific fallback - Added a list where we can add specific org IDs to make sure we don't show the wrong plan for important enterprise customers. (There's only one org in the list in this PR.) We can potentially duplicate this for
plan_top20fallbacks later if needed. - Fixed Cancel button - Now properly clears form fields when clicked
- Added billing refresh - Opening the support form now gets it fresh billing data, to prevent caching issues
- Decluttered comments đ¤
How did you test this code?
On my local, by temporarily commenting out the onboarding logic, changing my billing level to different trials and plans, and temporarily adding my local's org_id to the org-specific fallback list.
Size Change: -171 B (-0.01%)
Total Size: 2.57 MB
âšī¸ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
2.57 MB | -171 B (-0.01%) |
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
[!CAUTION]
Detected flapping snapshots
These snapshots have auto-updated more than once since the last human commit:
scenes-app-insights-funnels--funnel-top-to-bottom-breakdown--dark.png(chromium, shard 2)The flippy-flappies are deadly and must be fixed ASAP. They're productivity killers. Run
pnpm storybooklocally and make the fix now. (Often, the cause isResizeObserverbeing used instead of the better CSS container queries.)
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 2) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
+1 this client side logic is getting confusing, we should just use the response from billing because it should solve this.
Aha, thanks much, makes sense! Will work on those changes tomorrow...
Couple of minor issues - approving in advance.
One additional idea for future improvements (not in the scope of this PR) - we surface
accountOwnerinfo inbillingLogic- we could add this so that we know who's the AE/CSM on a ticket - unless you already have this info from somewhere else?
Ooo, nice idea! We're getting it via 3rd party APIs and webhooks, but this idea would be much more dependable. Will add next week.
Thanks for the reviews @pawel-cebula and @zlwaterfield !