Issue with Shopify Functions API Reporting Customer Tags Incorrectly

Hello,

We are currently experiencing an issue with the Shopify Functions API where a customer is reported as not having a specific tag, despite having it assigned in their profile. This is affecting our automatic discount functionality.

We would appreciate any insights or guidance on whether this has been encountered by others.


1 Like

Here are the relevant parts of our query for amount-off-product discounts:

query Input(
  $customerTagsToCheck: [String!]
  $collectionIdsToCheck: [ID!]
  $metafieldKeyToCheck: String = ""
  $metafieldNamespaceToCheck: String = ""
  $productTagsToCheck: [String!]
) {
  cart {
    buyerIdentity {
      customer {
        id
        hasTags(tags: $customerTagsToCheck) {
          tag
          hasTag
        }
        numberOfOrders
        checkMetafield: metafield(
          key: $metafieldKeyToCheck
          namespace: $metafieldNamespaceToCheck
        ) {
          value
        }
      }
      isAuthenticated
    }
    
    // Irrelevant fields redacted
  }
}

However, for one specific customer, the hasTag is false.

Thanks in advance for any help!

Hi Seun again :slight_smile:

Have you followed the steps in this other related issue and if so can you share your findings to help debug this further? If not, can you and please report back? thank you.