The fundamental problem that I’m experiencing is that the draft order visible in the API or Shopify’s admin side does not match the draft order that the customer sees when they open it as an invoice.
You can replicate this problem yourself:
- Set up an automatic discount applying to a specific product.
- On Shopify’s Admin side, configure a draft order like:
- The purchasing entity is a company location.
- Contains your line item that is the target of the automatic discount.
- “Apply Automatic Discounts” is enabled.
- You should see that the automatic discount does not apply on Shopify’s admin side.
- Copy the draft’s invoice link and open it as if you were the customer.
- You should see that the automatic discount does apply in this view.
Here’s a video from my store: https://drive.google.com/file/d/19vYivjFo2XOzGXju3aaKTsL7NHU_ndzr/view?usp=drive_link
AI Disclosure - I did not use AI to write this post.