Function - Product discount API limited

Topic summary

Developers report that Shopify’s Product discount Function cannot apply different discounts to multiple line items in one pass. The API’s discountApplicationStrategy only supports FIRST or MAXIMUM, so a single Discount Node applies only one proposal from the returned array, despite per-item targets being specified.

Key points and attempts:

  • Setting Discount Node combinesWith.productDiscounts = true enables stacking with other discounts, but still limits each node to a single applied proposal. Guidance suggests creating multiple product discount nodes that can combine, but this is impractical for many line-specific discounts and is further constrained by a cap of 5 automatic app discounts.
  • Several users need line-item–level discounts (not variant-wide), as variant-level targeting applies the same discount to all occurrences of a variant, ignoring per-line attributes.
  • A requested solution is a new discountApplicationStrategy = ALL to apply every proposal in the array. Shopify acknowledged the feature request; no official update was provided.
  • One user reports a workaround using the “unstable” API by adding ALL in schema.graphql and seeing multiple discounts apply, but this is unsupported/unstable.

Status: Unresolved and ongoing. Open questions: official support for ALL and true line-item targeting. Images show example outputs but are not essential to understand the issue.

Summarized with AI on January 13. AI used: gpt-5.

Not OP, but I’m also trying to combine different discount levels on separate lines. I have made sure that the Discount Node was created with ProductDiscounts: true and it shows as being able to combine with Product Discounts in the Discounts tab of my test store. However, only the first discount in the array is processed on the checkout page. Here’s my function output as an example.

{
  "discountApplicationStrategy": "MAXIMUM",
  "discounts": [
    {
      "message": "Your member discount has been applied",
      "targets": [
        {
          "productVariant": {
            "id": "gid://shopify/ProductVariant/44721908678949"
          }
        }
      ],
      "value": {
        "percentage": {
          "value": "10"
        }
      }
    },
    {
      "message": "Your member discount has been applied",
      "targets": [
        {
          "productVariant": {
            "id": "gid://shopify/ProductVariant/44721908613413"
          }
        }
      ],
      "value": {
        "fixedAmount": {
          "amount": "30",
          "appliesToEachItem": true
        }
      }
    }
  ]
}