PostHog / meta

This is a place to discuss non-product issues in public.
MIT License
18 stars 4 forks source link

The Zendesk & Email Domain Problem #201

Closed joethreepwood closed 1 month ago

joethreepwood commented 6 months ago

We seem to have a big issue around how Zendesk assigns tickets to orgs.

What happened?

I discovered this when I raised a bug ticket for a ticket which was timing out. In response, I got back the auto-response which we send to non-paying users. That seemed wrong! I looked at the ticket and alerted @slshults and @MarconLP

This is what we found:

cleanshot_2024-04-29_at_08 01 25_2x

It turns out that other users have been assigned to this org too, which is not the correct org.

What's causing this?

Basically, Zendesk has no concept of PostHog orgs. It goes by domain, and it lumps domains together.

In this case what happened was that I sent a bug ticket on a @posthog.com email domain. This is obviously the domain that Support use when testing new features.

Because domains are lumped together, if someone on posthog.com downgrades to the free tier (to test something) then all users on that domain are also downgraded according to Zendesk (not in PostHog, obviously). They get tagged as non_paying, and that impacts the support they get.

Why is this such a big problem?

Because of @gmail.com and @outlook.com domains.

If someone with a @gmail.com account upgrades or downgrades to the paid tier then all tickets from @gmail.com accounts will be associated with that org and treated as paying/non-paying users. As a result, they'll get the wrong support response and will be categorised in correctly.

What's the solution?

I am open to ideas.

simfish85 commented 6 months ago

This mostly works and is driven by Vitally / Zapier - more info here so worth checking out whether the edge cases which you mention are handled.

Re non-company domains you can also add users directly to a Zendesk org - I did set up some automation here to catch the gaps where our Vitally automation can't figure out the correct domain for a company.

I think in an ideal world we would look up the correct org by ID in Zendesk before submitting the ticket so that it's assigned that way rather than via domain which is still flaky.

slshults commented 6 months ago

Regarding "in an ideal world we would look up the correct org by ID", in the case of tickets where the user is logged in and using the support form in the sidebar, is there something currently preventing us from relaying one or more of their person IDs (other than email address as distict_id) along with their org ID to Vitally and/or Hubspot for matching with an existing org? (I assume so, but curious where that hurdle is in order to look for ways over or around it.)

joethreepwood commented 6 months ago

That would sound like a good solution, so I'm hoping there's no hurdle there. I've skimmed through the automations page and I'm unclear on whether automations would solve this for @gmail.com users and other common domains.

slshults commented 1 month ago

The solution is written up in this section of the handbook: Setting the correct organization in Zendesk for new tickets