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.

Unable to enable "combinesWith" flags through graphql api

Unable to enable "combinesWith" flags through graphql api

ArielCabib
Shopify Partner
8 1 6

Hi all,

 

I'm trying to programmatically create a price rule using GraphQL:

mutation {
priceRuleCreate(priceRule:
{
...
combinesWith: {
productDiscounts: true
shippingDiscounts: true
}
...
 
And the price rule is created successfully, but with the checkboxes off in the admin (discounts tab) - screenshot attached.
 
Can please someone explain what's going on? 🙂
 
Cheers,
Ariel
Want to sell more?
Check Zoorix
Reply 1 (1)

ShopifyDevSup
Shopify Staff
1453 239 532

Hey @ArielCabib - thanks for getting in touch. That is definitely odd. I wasn't able to replicate the issue on my end. Can you try using the discountCodeBasicCreate mutation and letting us know if the issue persists? The priceRuleCreate mutation has been deprecated and while it's still usable, we don't recommend relying on it for implementation - it's possible this could be related to that. 

If the issue persists with the discountCodeBasicCreate mutation, just reply back here and we'll definitely take a deeper look. If there is a use case for in terms of needing to continue to use the priceRuleCreate mutation, I'm happy to keep looking into this as well - just let us know!

Hope this helps! 

Al | Shopify Developer Support

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog