trying to search specific customer from a specific discount code

ZekeMar
New Member
1 0 0

Hi, I'm try to search a specific customer from a specific discount code.

I'm currently using this query:

{
   priceRules(first10,query:"DISCOUNTCODE") {
    edges {
      node {
        customerSelection {
          customers(first10,query:"email:test@email.com") {
            edges {
              node {
                email
                id
                lastName
              }
            }
          }
        }
        title
        oncePerCustomer
        traits
        features
        hasTimelineComment
        id
        endsAt
        discountCodesCount
        status
        shippingEntitlements {
          targetAllShippingLines
          includeRestOfWorld
          countryCodes
        }
        target
        valueV2 {
          ... on MoneyV2 {
            __typename
            amount
            currencyCode
          }
          ... on PricingPercentageValue {
            __typename
            percentage
          }
        }
      }
    }
  }
}
 
As seen on the code above, the query in red doesn't seem to filter the customers.
Am I doing something wrong with my query?
Is there a workaround for this?
 
0 Likes