Discussing APIs and development related to customers, discounts, and order management.
TL;DR
As of API version 2020-07, we are updating the allocation methods available for explicit discounts. Currently explicit discounts are assigned an allocation method ofone
as they apply to one line. With this change the allocation methods will now includeeach
andacross
, withone
being deprecated.
Context
Discounts currently have 3 types of allocation methods: across all lines (across
), on each product (each
), or on one line (one
).
For example, imagine a checkout with two identical t-shirts, costing $10 each. Because they are the same product, they will be stored in a single line item, with a quantity of 2. Now, imagine we want to apply a $5 discount. This is how each value of allocation method would change the application of the discount:
one
.one
is the exact same as across, except it also signals that the discount is an explicit discount - was applied on an explicit line only.
What does the change look like?
Currently, explicit discounts are always represented by allocation method one
, and target_selection explicit
.
To know whether a discount targets a single line, target_selection
parameter should be used where a value of explicit
would be expected; instead of the allocation_method
parameter with a value of one
.
For discounts applied on a single line (explicit
), an allocation_method
value across
means that the discount had the intention of being applied across a line item. If the quantity of products on the line changes, the discount applied across the line will not change. While a value of each
means that the discount had the intention of being applied on each product of the line. Thus, should the quantity of the line change, the total discount amount applied on that line should as well.
To learn more visit the Shopify Help Center or the Community Blog.
Hi @Jason_Tigas, we have been the AllocationMethod warning in all store that use our app but we still don't know why. We are not getting directly allocationMethod just calling orders. We tried too updating default version for webhooks and we verify too into our app that we are using version 2020-10 weeks ago. But the warning still there. Bellow is data we have when we call deprecated_api_calls.
"api_type": "REST",
"description": "The allocationMethod field on DiscountApplication for explicit discounts will now either be each, or across. The option for one has been removed.",
"documentation_url": "https://shopify.dev/changelog/removing-discount-allocation-method-one-1",
"endpoint": "Order",
Could you help us to have a clue of what is going? please.
although we already upgraded to 2021-04 version and not using the allocationMethod anywere in the app we still get the warning, any help appriciated
our app id is: 2586985
The same here I all api requests are on 2021-04 and I do not have any request where api version is not specified.
Thank you in advance.
Facing same issue here. i have already changed to admin/api/2021-04/webhooks.json
The allocationMethod field on discountApplication for explicit discounts will now either be each, or across. The option for one hs been removed.
Note to all apps getting this warning. If you know your app doesn't use the discount allocation field and you've updated your webhook and api calls to the latest version (2021-04 as of today), then you can ignore this warning. There's likely an unversioned api call somewhere in you app, that's defaulting to 2020-04, but this will resolve itself as the version is eventually expired.
To learn more visit the Shopify Help Center or the Community Blog.
We're still getting this error and now our app is 'Unsupported' . Can we get some help on identifying the exact calls that are being made? We've gone through our logs and are not finding any deprecated calls. We are also on 2020-07
In order to get rid of this deprecated message, should I update the API version in all the installed webhooks? I mean, manually one by one?
The Unsupported App messaging should now be removed for any apps that are only affected by this discount allocation method change, sorry for the fire alarm!
@manuelmontoya the merchant-facing alert should no longer be a problem, but if you'd like to be extra cautious, you'll want to make sure all your orders webhooks are updated to at least API version 2020-07 or later.
To learn more visit the Shopify Help Center or the Community Blog.