Customer segment search does not contain customer with recently added tag

Hi, I have tried to create customerSegmentMembers via GraphQL customerSegmentMembers - GraphQL Admin . Most of the time this request works normally, but now it doesn’t return full data. Here is an example of the request:

query {
          customerSegmentMembers(first: 250, query: "customer_tags CONTAINS 'test'") {
            edges {
              node {
                id
                firstName
                lastName
                defaultEmailAddress {
                  emailAddress
                }
              }
            }
          }
        }

I have 2–3 new customers with a specific tag, but the Shopify API returns only customers who already had this tag a while ago, not those who got this tag during recent several hours. The same situation occurs if you try to run the segment code in the Customers admin CP. Even if you delete a tag for an old customers, the request data doesn’t update. Is there any solution or update regarding this issue?

3 Likes

I tried replicating this by adding tags to several customers and immediately querying customerSegmentMembers with the same customer_tags CONTAINS filter. In my testing, the segments updated right away when adding and removing tags, so I wasn’t able to reproduce the delay you’re experiencing.

Since some segment queries can be processed asynchronously depending on complexity, can you test using the customerSegmentMembersQueryCreate mutation to see if the done field returns true or false? This will help determine if the query is still processing. If done returns true and you’re still missing customers that should match the segment criteria, I’d recommend reaching out to our support team so they can investigate the events around those specific customers and segments to identify what might be causing the sync delay.

I don’t see the error anymore at the moment, thank you for your attention.

1 Like