As of API version 2020-07, we are updating the allocation methods available for explicit discounts. Currently explicit discounts are assigned an allocation method of
one as they apply to one line. With this change the allocation methods will now include
one being deprecated.
Discounts currently have 3 types of allocation methods: across all lines (
across), on each product (
each), or on one line (
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:
oneis 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
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
For discounts applied on a single line (
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.
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.
Please provide some solution about tha.
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.
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?
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.