Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

AutomaticDiscountNode issues with Customer Buys and Customer gets

AutomaticDiscountNode issues with Customer Buys and Customer gets

NickMason
Shopify Partner
2 0 0

So i am using this GraphQl query to test some automatic discounts  

 

query automaticDiscountNode($id: ID!) {
automaticDiscountNode(id: $id) {
...on DiscountAutomaticNode {
id
}
automaticDiscount {
...on DiscountAutomaticBxgy {
customerBuys {
items {
... on DiscountProducts {
products(first: 1) {
edges {
node {
id
title
}
}
}
}
}
}
customerGets {
items {
...on DiscountProducts {
products(first: 1) {
edges {
node {
id
}
}
}
}
}
}
}
}
}
}

 

Some of my discounts will list the customer buys and customer gets objects with their id, titles, etc. However some will not.  I have compared discounts and cant see a discernible difference. Both contain these fields with products selected, both are automatic discounts, all products are active not drafts etc. I can not figure out why this is happening. Help? 

Reply 1 (1)

topshop
Shopify Partner
166 15 19

Automatic Discounts can be one of 4 types. Only type "Buy X get Y" will have customerGets. For example, "Amount off products" will not have that. Is that what you're facing?

 

topshop_0-1720118174551.png

 

Founder, Discount Bot: Sitewide Sales
- Exclude hand-pick products/collections or on-sale items from discounts: Read the guide
- Increase AOV using multi-tier volume discounts
- Bulk coupon codes - for discount promotion