Mentioned before, but Shopify Segments (joined/left) webhooks, require filters to use. It’s not documented but without a filter it will throw an error. (2025-07). Tested in GraphiQL. Confirmed here in another thread.
If we want to keep track in real-time of segment members, it looks like we have to create, for Every Segment, a “joined” and “left” webhook subscription, with that segment ID.
Request for feature: Please allow segmentId: *, or similar, way to just get any joined/left event, for all segments.
For marketing apps, this is a big deal.
Questions:
- Is the filter syntax documented for this specific webhook type? I know it’s documented generally, but this webhook type seems different, especially in that it has required filters.
- Is it possible to use a filter segmentId: x OR y OR z, etc? Testing this didn’t work. This would at least allow us to not need a plethora of new webhooks for each shop (currently requires 2 per segment, one for joined, one for left). This would probably allow us to just need 2 total (assuming the OR syntax allows for 20+ gid variables).
Thanks!
2 Likes
Would be great to hear if there’s any word on this
Hey @James_Maroney
Sorry for the delay here. I should have replied with more than an emoji.
For CUSTOMER_JOINED_SEGMENT and CUSTOMER_LEFT_SEGMENT webhooks, you do need to include a specific segmentId filter when creating your webhook subscription. I’ve been consulting with our teams here and can confirm the filter requirement should be documented and have a request in to update that. 
Regarding your feature request for wildcard support (segmentId: *), this isn’t currently supported in our webhook filtering syntax so I’ll pass on that suggestion as well.
Thanks a lot @KyleG-Shopify
I should note that to get the built for Shopify badge, for marketing apps, segments must be supported. And Shopify generates 5-10 segments I believe for every shop. And shops often have 10-20 segments. We hook into about a dozen webhooks already but hooking into 20-40 more for every shop, 2 more for each segment, while not terribly painful, just seems a bit cluttered. Then if we want to make sure we have all webhooks still up to date, we have to grab a lot more from the graphql API, maybe even paginate them, etc etc. It just gets clunky when we need to make sure every webhook is still proper when we go from 12 to 50 just for segments. I know segments are relatively new, would be really great to optimize that process for devs.
Cheers
2 Likes
Thanks for sharing that. I can look in to that requirement further. That’s great context to add to the feature request. Can you share a bit more about how supporting segments requires the webhook subscriptions?
I was looking over the requirements and see the web pixels required, but not specifically supporting segments (beyond supporting all segments that are defined in the admin).
Sure
So for marketing apps, to “support a segment defined in the Shopify admin” would I imagine be, being able to send marketing communications to that segment, which, for our use case, means we also want to display to that user that their segments are synced through our app and Shopify.
So we display that they can use these segments for marketing communications.
To display these segments, we also want to show them how many members each segment has, and make sure that data is synced in real time to the members that are actually “subscribed” (confirmed double-opt-in) for marketing.
ergo, we have to show segments in our UI, we have to show segment members, we have to sync segment members, and we have to keep those up to date.
So, for an actual real-time representation of that, we need to hook into the JOINED/LEFT webhook, for every single segment. If we tried to just update those on every page refresh or something like that, that’s untenable, because shops can have hundreds of thousands of customers in a segment, etc etc.
Hope that helps, please let me know if you need any extra context!
Cheers
Thanks James, that really did help. I’ve shared this with our team as well.
Just thinking more solution based now, I can absolutely see how relying on the webhooks can ensure real time data. If you’re not already doing this though, you may be able to offload some of that to poll when needed. For example if you’re needing a count of the segments to display in your app, something like this would work and be quick in real time:
query {
segment1: customerSegmentMembers(segmentId: "gid://shopify/Segment/ID1", first: 1) {
totalCount
}
segment2: customerSegmentMembers(segmentId: "gid://shopify/Segment/ID2", first: 1) {
totalCount
}
}
1 Like
Hi @James_Maroney
Would the above method work for you?
We actually need to sync all segments at all times ideally, it’s syncing of segments and segment members, as a proper marketing app.
Sorry I didn’t see this earlier but just wondering if shopify has created a solution to this yet?
Hey James. There haven’t been changes to this yet. When things change, they will be posted in the developers changelog.