Discount rules questions

EasyAds_DevelopmentEasyAds_Development Member Posts: 6

Hi,

I have a couple of questions regarding the discount rules of the e-commerce API (https://developers.lightspeedhq.com/ecom/endpoints/discountrules/).

  • When retrieving all discount rules I noticed a ‘position’ property that can be used for the order. But in some cases we see multiple rules with ‘position=0’. What does that mean, and how can we know the correct order in this case?
  • For a discount of type ‘On Orders over x EUR, Get Discount’ I noticed an extra checkbox setting in the backend ‘Check minimum order amount after applying a discount’. This setting does not seem to show up in the API result. Whether I enable or disable it the resulting JSON remains the same. How can we retrieve the value of this setting?
  • When multiple discounts apply to a product, will the percentages be summed and then calculated once, or will they be calculated over each outcome?
  • There are 2 similar properties minCatProducts and minCategoryProducts in the response JSON. For some discount types minCatProducts will be returned and for some others minCategoryProducts will be returned.
  • For a discount rule of type "buy_x_items_from_cat_get_y_discount_on_cheapest" the returned DiscountType property is null. In backend we can only use percentage for this so I guess we can assume that.

Best regards,

Marc Selman - EasyAds

Tags:

5 comments

  • EasyAds_DevelopmentEasyAds_Development Member Posts: 6

    Good morning,

    Is there anyone that could clarify the above?

    Thanks!

    Daan

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 299 moderator

    Hi @EasyAds_Development,

    Thank you for contacting us. Sorry for this late reply I've missed this one I guess. 

    First of all I see EasyAds is a Lightspeed partner which means that you can use the direct email address that has been given by your partner manager.

    1. When a discount rule is created, the position will be 0 by default. When the priority is changed through the UI, the value of the position will be changed(you can't change the position via API). When all discount lines positions are at 0 you read out the createdAt data.
    2. I see this setting is missing in the API, I will report this.
    3. The discounts will be summed up. For example, when a product is in 2 discount rules 1 with 10% discount and 1 with 20% discount, the product will get 30% discount unless the option stop after discount rule is enabled. Please read how this works here: https://ecom-support.lightspeedhq.com/hc/en-us/articles/220662787#stopafter
    4. I need to test this. I guess these are the same.
    5. DiscountType isn't available in that discount rule.

    I hope this helps.

  • EasyAds_DevelopmentEasyAds_Development Member Posts: 6
    edited July 29

    Hi, Thanks for the reply. I need further clarification on 3rd point.

    Suppose if there are 5 discounts which can be applied for a product. First 2 are of type 'Percentage', 3rd one is of type 'Currency', 4th one is 'Percentage' and 5th one is 'Currency'. How do we calculate discount?

    • Do we sum up all percentage types and currency types then apply? if so, then on which order? first percentage or currency? Will second discount type be applied on outcome of first discount type or on original product price?
    • Or we sum up only first 2 percentages and calculate discount then apply 3rd currency type then 4th percentage then 5th currency?

    Regards, Rohini

  • EasyAds_DevelopmentEasyAds_Development Member Posts: 6

    Good day,

    Is someone able to answer the remaining question above?

    Thanks!

    PS. Regarding the API email support: in an email of may 1st from API support we received the message "Just a reminder that we've moved API Support from our email system to our recently launched Community Forums. ". That's why we did not use email for the questions.

    Best regards,

    Marc

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 299 moderator

    Hi @EasyAds_Development,

    Sorry I've missed your previous post.

    Suppose if there are 5 discounts which can be applied for a product. First 2 are of type 'Percentage', 3rd one is of type 'Currency', 4th one is 'Percentage' and 5th one is 'Currency'. How do we calculate discount?

    • Do we sum up all percentage types and currency types then apply? if so, then on which order? first percentage or currency? Will second discount type be applied on outcome of first discount type or on original product price?
    • Or we sum up only first 2 percentages and calculate discount then apply 3rd currency type then 4th percentage then 5th currency?

    Honestly I've never tested this, because this is very specific. But since you've access to the API you can test is yourself. :)

Sign In or Register to comment.