Discount codes added using the discountRedeemCodeBulkAdd GraphQL mutation don’t work when manually creating draft orders. The codes work fine on the storefront (cart + checkout), but they do not appear or apply when trying to manually add them in the Shopify Admin → Draft Orders page.
From what I’m finding this is not yet resolved. I would like to attempt to replicate your specific scenario though. Can you share more details on the kind and type of discount this is?
If you use draftOrderCreate with the discountCodes, do they apply properly?
The type of discount is DiscountCodeApp (Amount off Products)
Discount ID - “gid://shopify/DiscountCodeNode/1471730876478”
Function UID - “60e1f4a4-a9a7-10ac-9f2c-c2b50b0d1f2717a070b8”
If you’re using the parent code (the one used to create the discount), then draftOrderCreate it works fine and applies the discount as expected. However, when you try using a child code generated via discountRedeemCodeBulkAdd, those codes aren’t found in the list and don’t apply properly.
Thanks for that clarity @Pius_Osuji, after digging in to this, I have found this is a limitation with draft orders currently. I have passed the feedback on to the team to share how this has affected you.