Out now! Check out the Poll results: Do you have a Shopify store?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Removing discount allocation method "one"

Removing discount allocation method "one"

Jason_Tigas
Shopify Staff (Retired)
28 0 18

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:

 

  • With across, the discount would be applied on the final value of the line item. Since we have two t-shirts, each costing $10, that would amount to $20. Applying the discount, we'd have $20 - $5 = $15, meaning the final total price would be $15.
  • With each, the discount is applied on each product. In the example, we would first discount the product, meaning each product would cost $10 - $5 = $5 instead. Then, we would multiply that by the quantity, which is 2, giving us a final price of $10.
  • Finally, we have 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.

Replies 58 (58)

dennieru
Shopify Partner
1 0 0

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.

ihalilaltun
Visitor
1 0 1

@Jason_Tigas 

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

 

Screen Shot 2021-06-23 at 14.33.57.png

Screen Shot 2021-06-23 at 14.59.38.png

our app id is: 2586985

babken
Shopify Partner
6 0 1

 

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.

 

ivx
Visitor
1 0 0

@Jason_Tigas , could you please look DM about this topic? (I sent it recently)

idsk
Visitor
1 0 0

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.

Jason_Tigas
Shopify Staff (Retired)
28 0 18

https://community.shopify.com/c/Shopify-APIs-SDKs/Removing-discount-allocation-method-quot-one-quot/...

 

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.

heng
Visitor
2 0 3

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

manuelmontoya
Shopify Partner
11 0 3

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?  

stephers
Shopify Staff (Retired)
9 0 4

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.