I’ve noticed that, after you’ve added new redeem codes to a discount, even if you delete all the redeem codes, you can’t ever rename the discount again.
Steps to reproduce:
Create a discount code (for example, via discountCodeAppCreate) named EXAMPLE.
Using discountRedeemCodeBulkAdd, add new redeem codes to your discount.
Using discountRedeemCodeBulkDelete, delete the codes you created, except for EXAMPLE.
Using discountCodeAppUpdate, try to update the code of the discount to EXAMPLE2. You’ll get this error: “Cannot update code for a bulk price rule.”
To prevent user confusion, in our app, we currently show users an info banner before they add redeem codes to inform them they won’t be able to rename the discount afterward.
Is there a specific reason why the code cannot be renamed, even if:
Hey @tobebuilds - I did a bit of digging into this, but might need a bit more info to give you a solid answer. Would you be able to share the discount code node ID you’re seeing this error pop up on?
For the discountCodeAppUpdate mutation - could you share a full input example of how you’re trying to rename it? I just want to see if I can try to replicate the issue exactly on my test shop here.
Hi @Rohan_Vasava - are you following the same process as Tobe was in his message above? I still haven’t been able to confirm an answer, but if you’re able to share the same/similar details, I can dig into this further for both of you and prioritize this as my focus so we can get this looked into - hope to hear from you soon!
Thanks @BKspace - did you happen to catch a request ID for that error or if you could share a Discount ID/Shop ID t here? If not no worries, thanks for confirming it’s still occurring, but just wanted to see if we could trace that example in the logs if possible.
What I was doing is discountCodeAppCreate → discountRedeemCodeBulkAdd → discountCodeAppUpdate
Create a code app discount SUMMER30
Create bulk discounts from that discounts
Edit the SUMMER30 discount settings
Error occurs
in discountCodeAppUpdate i was facing the issue. I was changing the schedule settings in discount code
so on for the discount which is used in discountRedeemCodeBulkAdd whenever you are updating the discount with discountCodeAppUpdate, you need to omit the code field in the body.
that worked for me.
found it on slack community, attaching the slack thread here
Thanks for sharing @Rohan_Vasava! @bkspace, does the above workaround work for you? Just wanted to ping you here just in case, if not and you’re still seeing issues, I’m happy to keep digging as always!
^ this would work, meaning that it won’t throw an error, but it obviously wouldn’t let you update the discount title.
I have tested this with native Shopify discounts, and if you follow the steps in the OP, you can update the title of the discount.
I think you could argue either way, that this is just how it works, or that the behaviour is different from native Shopify behaviour and is therefore a bug.
My understanding is that this is a current limitation, but I definitely get where you’re coming from, especially since you’ve noted the behavior differs from native Shopify discounts. Can’t guarantee anything, but I’ll reach out to our product team to report this inconsistency and loop back with any next steps I have.
Hi all, just reaching out with an update as I was able to connect with our Discounts product team on this and they’ve confirmed that this is expected behaviour at the moment, though it’s not ideal for sure.
I was able to work with them to see if we could suggest a workaround and it does look like you can delete the last remaining code ( for example: NAME_PRE) and then create a new one with the new value (NAME_POST). Customers could then start using the new value immediately, since discount configuration lives under the price rule, the only continuity loss would be between the two codes themselves (they’d both still be using the same price rule if that makes sense).
I definitely understand this isn’t ideal though, so I’m going to set up a feature request for you so that we can look into enabling parity between Discount Functions and admin-created discounts in terms of process and making this process a bit easier.
Let me know if I can include anything in that feature request and I’d be happy to edit that on my end or if I can help out any further, just feel free to ping me as always