I have started work using the Function - Product discount API and it seems to be very limited in what it can achieve. We are trying to apply different discount amounts to different line items. i.e. 40% to one line item and 5% to another. But there is no strategy that allows for this kind of discounting. The FIRST strategy only applies 1 of the discounts. I have looked briefly at the other cart/discount API’s and nothing does what we need. This is really troubling as we have a lot of complex scripts currently that will no longer work with the migration to functions. Have I misunderstood how this works? Is there a better API to use?
{
"discounts": [
{
"targets": [
{
"productVariant": {
"id": "gid://shopify/ProductVariant/45170063278355"
}
}
],
"value": {
"percentage": {
"value": "40.0"
}
}
},
{
"targets": [
{
"productVariant": {
"id": "gid://shopify/ProductVariant/45170063474963"
}
}
],
"value": {
"percentage": {
"value": "5.0"
}
}
}
],
"discountApplicationStrategy": "FIRST"
}

