All things Shopify and commerce
Hi,
When I try to run the mutation to create automaticAppDiscount - https://shopify.dev/docs/api/admin-graphql/2023-07/mutations/discountAutomaticAppCreate I get an error that:
"data": { "discountAutomaticAppCreate": { "automaticAppDiscount": null, "userErrors": [ { "field": [ "automaticAppDiscount", "title" ], "message": "must be unique" } ] } },
But there is no discount with that name on the store when I run the automaticDiscountNodes query - https://shopify.dev/docs/api/admin-graphql/2023-07/queries/automaticDiscountNodes:
"data": { "automaticDiscountNodes": { "edges": [ { "node": { "automaticDiscount": { "__typename": "DiscountAutomaticBxgy", "title": "Buy one, get the second 10 percent off" } } }, { "node": { "automaticDiscount": { "__typename": "DiscountAutomaticBasic", "title": "Buy three, get 30 percent off" } } } ] } },
Why is it then preventing me from creating a new discount with the error - title must be unique?
Solved! Go to the solution
This is an accepted solution.
I ran into this in one of my development stores. My best guess is that you might have created a discount with the title / code in question with a previous function that I had created. But when you delete that function and pushed out another function, the old discount is in the system, but doesn't show up in the UI because the old function is no more. Again, this is just my guess.
This is an accepted solution.
I ran into this in one of my development stores. My best guess is that you might have created a discount with the title / code in question with a previous function that I had created. But when you delete that function and pushed out another function, the old discount is in the system, but doesn't show up in the UI because the old function is no more. Again, this is just my guess.
Thanks for the reply. I think this could be the reason since I had a lot of functions deployed so due to the new simplified deployment, I think my actual function got deleted and some other function got activated in its place and because of this the discount associated with the old function also disappeared from the dashboard.
User | RANK |
---|---|
44 | |
42 | |
41 | |
28 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023