How We Fix Gmail Open Rates (Claude Code + Klaviyo)
A client of ours recently moved to a new sending domain. Click rates held up fine, but open rates lagged, and when we broke performance down by inbox provider in Klaviyo, the problem wasn't everywhere. It was Gmail and Yahoo. Every other provider looked healthy.
That distinction matters, because sender reputation is scored per provider. Gmail decides where your emails land based on how Gmail users treat them. If you respond to a Gmail problem by tightening your entire send, you shrink revenue from providers that were never the issue. The right move is surgical: keep sending to your full engaged audience everywhere else, and only tighten on the providers that are punishing you.
This post covers the exclusion segment that does that, and how we built it with Claude Code in a few minutes instead of hand-assembling conditions in the segment editor. It's part of how we run Klaviyo accounts now: the same setup that writes campaign copy and talks to the Klaviyo API also builds audiences.
The Play: Exclude, Don't Shrink
The account was already sending campaigns to a 30-day engaged segment, plus some browser and buyer segments on longer windows. Standard deliverability rebuild stuff. The temptation at this point is to cut to 14-day engaged for everyone, but that punishes the whole list for two providers' problem.
Instead, you build one exclusion segment: people on the problem providers who show no recent engagement anywhere. Then you keep including the full 30-day engaged audience and exclude that segment on top. Everyone on healthy providers is untouched. On Gmail and Yahoo, only the people actively opening, clicking, browsing, or buying still get mail. Those are exactly the signals that rebuild your reputation with that provider, so over time you loosen the exclusion and broaden back out.
Two Ways Klaviyo Can Target an Inbox Provider
Klaviyo gives you two mechanisms, and it's worth knowing both:
- The Inbox Provider dimension. Conditions like "Received Email... where Inbox Provider equals Gmail" use Klaviyo's own provider classification. This catches Gmail-hosted inboxes even on custom domains (Google Workspace), which a domain match misses.
- Email domain string match. "Properties about someone > Email contains gmail.com." Simpler and works for any profile whether or not they've received email yet. Two gotchas: values are case sensitive (gmail.com, not Gmail.com), and Microsoft is several domains, so you need hotmail.com, outlook.com, live.com, and msn.com to cover it.
We used the domain match for this build. It's transparent in the segment editor and easy for anyone on the team to read six months from now.
The Exclusion Segment
The logic: someone is on a problem provider AND shows no engagement on any channel we can see. One OR group for the providers, then AND conditions for the engagement checks:
- Email contains gmail.com OR hotmail.com OR outlook.com (add your own problem providers; use live.com and msn.com for full Microsoft coverage). This scopes the exclusion so nobody on a healthy provider is ever touched.
- Opened Email zero times in the last 30 days. The core signal, but never the only one. Opens are noisy: privacy features auto-fire them for some users and suppress them for others.
- Clicked Email zero times in the last 30 days. Catches people whose opens don't track but who still click. You never want to exclude a clicker.
- Active on Site zero times in the last 14 days. Someone browsing your store this week is not disengaged, whatever their open column says.
- Placed Order zero times in the last 30 days. Buyers stay in. Always.
On this account that segment came out to roughly 85,000 profiles. That sounds like a lot to stop mailing, but every one of them is a person on a problem provider who hasn't opened, clicked, visited, or bought in weeks. Continuing to mail them is what tanked Gmail opens in the first place.
Building It with Claude Code
Here's the AI part, and why this took minutes instead of an afternoon.
Each client we manage has a folder we treat as that client's brain: API access to their Klaviyo account, plus a strategy doc describing how we send for them. Claude Code works inside that folder. So the build went like this:
- Research. We described the goal (isolate unengaged Gmail and Yahoo profiles for exclusion) and had Claude pull Klaviyo's documentation. It came back with the two mechanisms above and a recommended structure. No digging through help-center tabs.
- Build. Claude found the account's metric IDs, sampled events to confirm everything tracked correctly, assembled the segment definition, and created it in the account through the API. The condition-builder clicking, the most error-prone part of any segment like this, never happened.
- Verify. The segment shows up in Klaviyo like any other. We opened it, checked the logic read exactly as designed, and sanity-checked the 85K count against the list size.
The part that compounds: the strategy doc. The exclusion rules live in the client's folder, so when we schedule campaigns with Claude in the loop, it flags which sends should carry the exclusion. The segment is a one-time build. The strategy applies itself every week after that.
How to Actually Use It
Don't exclude this audience on every campaign. It cuts your reachable audience meaningfully, and some sends are worth the full list. Our rules for this account:
- Apply it on roughly every other send, and on non-critical sends. Consistent positive signals reach Gmail and Yahoo without going fully dark to the excluded group. (Once the alternating sends gave a clear answer, we moved to every non-critical send. See the October update below.)
- Skip it for sales and launches. A promo is your best shot at re-engaging a quiet profile. Excluding them from it costs real revenue for marginal reputation gain.
- Broaden as opens recover. This is a rehab window, not a permanent state. Klaviyo's own per-provider guidance is the same shape: start with your most engaged, expand in stages as the provider's trust comes back. Watch the per-provider breakdown, not the blended open rate.
If your problem is list-wide rather than provider-specific, start with the full deliverability guide and a sunset flow. This play is for the case where the breakdown shows one or two providers dragging everything down.
Update: The Results After Three Weeks
We ran the same play on a second account, a personal care brand recovering on a new sending domain, where Gmail and Microsoft were the lagging providers. Tighter windows there (14-day opens and site activity instead of 30), about 7,000 profiles excluded per send, applied on alternating campaigns exactly as described above. Three weeks of treated sends versus untreated sends:
| Metric | Untreated sends | With exclusion |
|---|---|---|
| Gmail open rate | 37-39% | 44-47% |
| Microsoft open rate | ~26% | 34-39% |
| Microsoft bounce rate (first two treated sends) | 0.47-0.62% | 0.07-0.14% |
| Revenue per send | $1,890 | $2,535 |
The number that decided it for us: revenue per send went up on the treated sends. Excluding 7,000 dead profiles cost nothing, because they were dead. The bounce reduction looked like the cleanest signal (bounces are delivery failures, not open-tracking noise), though with only two treated sends the gap was overstated. More sends narrowed it; see below. Honest caveats: small sample, and the treated sends came later in the domain's recovery, so some open-rate lift belongs to the healing domain rather than the exclusion. We kept it, on the same alternating rotation. The full recovery story that this segment was one part of, including the audience layering that did the heavy lifting, is written up in the new-sending-domain case study.
Update, October 2026: Every Send, Three Months In
Three months later, the exclusion is still running on the personal care account, and it now runs on more sends, not fewer. Here's what changed and what the longer data says.
From every other send to every non-critical send
By mid-September we had five treated and seven untreated core sends to compare. Every pair gave the same answer, so the alternating rotation had stopped teaching us anything. Each untreated send just paid the higher Microsoft bounce rate. The every-other rule had also lapsed twice: the exclusion lives in the campaign calendar, and "every other" is easy to miss when a calendar gets rebuilt. On September 18 we made it a standing rule: the exclusion goes on every non-critical send built on the core engaged audience.
It still stays off sales and offer sends, layered audience tests (so month-over-month comparisons stay clean), subscriber-only sends, and small sends to contest participants or recent buyers. The excluded profiles still get those, plus every automated flow, and anyone who opens, clicks, or visits rejoins on their own.
The longer data also corrected the early bounce number. Across all twelve sends, treated Microsoft bounce sat at 0.40-0.63% against 0.65-0.90% untreated. That's a real gap, but smaller than the first two sends suggested.
The October re-check
With no control group left, we checked whether the expansion was earning its place. The results:
- Compliance: all seven eligible sends since the expansion carried the exclusion, and every send that should skip it did.
- Microsoft: treated sends opened at 45-47% with 0.50-0.58% bounce. The layered test sends, which skip the exclusion by rule, landed at 30-34% opens and about 0.65% bounce in the same weeks. That's an informal control, and the gap is still there.
- Account-wide Microsoft bounce, flows included, dropped from 0.9-1.2% a week in August to 0.52-0.66% every week since late September.
- Gmail: bounce flat, and the Google Postmaster spam rate flat at 0.094% (volume-weighted) against 0.093-0.105% before.
- Revenue: no cost. Shopify revenue per core send averaged $2,545 on the four sends old enough to read, against roughly $2,100-2,200 before. Small sample with very different content, so we read that as "no cost," not a lift.
Verdict: keep it exactly as is.
A Postmaster lesson: weight by volume
The same week, the weekly Postmaster digest flagged a 0.26% spam rate, up from 0.03%. That looks alarming next to Google's 0.1% guidance. But the digest averages the seven daily rates equally. On a day with no campaign, the account sends about 2,200 Gmail emails from flows, and 10 to 25 spam reports pushes the daily rate to 0.5-1.1%. Campaign days carry 8,000 to 29,000 Gmail sends and sat near 0.04%.
Weighted by how much mail each day actually sent, the week came out around 0.12%. Still worth watching, but nowhere near the 0.3% line. If you get these digests, weight the days by volume before you react to the headline number.
What we monitor now
- Reopen triggers: treated Microsoft bounce above about 0.7%, or Shopify revenue per core send under about $2,100 for three or more sends. Either one puts the rule back on the table.
- Flows are the next project. Splitting complaints by source showed automated flows draw spam complaints at about three times the campaign rate. Yahoo complaints run around 0.07% on campaigns and 0.2-0.27% on welcome and abandonment flows. Gmail's flow-only days show the same pattern in Postmaster. The campaign side is clean, so the next round of deliverability work is on the flows.
Why This Is the Pattern
Strip away the deliverability specifics and the workflow is the same one behind everything else in this series: give the AI real access (the Klaviyo API), real context (the strategy doc), and a real task. Research the mechanism, build the thing in the account, encode the decision so it applies itself going forward. We've used the identical loop to ship landing pages from Figma and to automate suppression reversal.
If your per-provider breakdown looks like this client's did, and you want the segment, the sending strategy, and the rebuild managed for you, reach out. Or build it yourself from the definition above. It's five conditions.