Removing discount allocation method "one"

Highlighted
Shopify Staff
Shopify Staff
16 0 5

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.

0 Likes
Highlighted
Shopify Partner
2 0 1

Hi, 

We don't use any discount allocation features in our app. Even we don't use any type of discount on our app.

Still why I am seeing This

"The allocationMethod field on DiscountApplication for explicit discounts will now either be each, or across. The option for one has been removed" on my App API health Check. 

We don't find any discount feature in our app. We just collect the order in transfer to the CRM's. Our app is Skylio - CRM Connector.

See the below image.

Screenshot (304).png

Please provide some solution about tha.

Highlighted
Shopify Staff
Shopify Staff
16 0 5

Hi, this is an alert for a deprecation that "might" affect you. The change occurred on a return value which was included in the payload of one of the calls you made.

This message will go away when you update your calls to version 2020-07.

0 Likes
Highlighted
New Member
2 0 0

Hey @Jason_Tigas out of curiosity here - is there a way we can find the "exact" call that's being made from our application that you're giving us this notice about? Unless we're missing something - we can't seem to find the culprit that is making use of this value anywhere. We want to stay in compliance at all times / and up to speed on all changes being made but just need a little more help to find out what needs to be changed.

Thanks!

ShopSync

0 Likes
Highlighted
Shopify Staff
Shopify Staff
16 0 5

Sure will DM you!

0 Likes
Highlighted

Hi @Jason_Tigas! We seem to have exactly the same problem as @Skylitech described. All requests were upgraded to be 2020-07 or just don't specify the version, so the latest version is used. We have tried to reach out to partner support with no chance to get any detailed info - is there a chance we can get more info about what's causing the warning in our particular case?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
16 0 5

Hi @ArchitechproOU,

Actually, please read the following about not specifying the version.

If your request doesn't include a version, then the API also defaults to the oldest supported stable version. However, we do not recommend relying on this behaviour for adopting deprecated changes. As you update your app, you should specify the API version with every request. By making your app version aware, you anchor your code to a specific set of features that are guaranteed to behave in the same way for the supported timeframe.

 

 

Highlighted

@Jason_Tigas thank you very much for the note! This should resolve the problem.

0 Likes