Wix eCommerce / Velo - Automatic Discounts Service Plugin

I’m building a sponsorship system for a Wix Studio eCommerce site using Velo and Kickflip.

I already have:

  • Custom Discount Trigger service plugin
  • Sponsorship CMS
  • Usage tracking

I can determine whether a customer is eligible and exactly how many complimentary strings they have remaining.

My business rule is:

  • Sponsor has 2 complimentary strings remaining.
  • Cart contains 3 qualifying string products.
  • First 2 strings should receive a 100% discount.
  • Third string should remain full price.

Kickflip has confirmed their products use the normal Wix cart and checkout flow and that Automatic Discounts are the recommended integration point.

My question:

Is there any supported Wix eCommerce extension point that allows custom business logic to control the number of qualifying line items that receive an automatic discount?

If not, what is the recommended architecture for implementing annual product entitlements?

I might be missing something - but can you share a few more details about what you’re trying to achieve?

We have Discount Rules - Introduction | API Reference - but I’m not sure that it answers your question.

Would you be able to explain the ideal flow and then we can take it from there :slight_smile:

Thanks for the response!

The goal is to give sponsored archers an annual allotment of complimentary strings while letting them use the normal Wix shopping and checkout experience.

Here’s the desired flow:

  1. A sponsored archer logs into their account.
  2. Their sponsorship benefits are stored in a CMS collection.
  3. I can already determine:
    • whether they have an active sponsorship,
    • how many complimentary strings they have remaining for the current year,
    • which products in the cart qualify for the benefit.
  4. They shop normally and can add any number of qualifying string products to their cart (including products configured through Kickflip, which still use the standard Wix cart and checkout).
  5. At checkout, I want only the number of qualifying strings they have remaining to receive a 100% discount.
  6. After the order is successfully completed, I record the redeemed strings against their annual allotment in my own CMS collection.

For example:

  • Sponsor has 2 complimentary strings remaining.
  • Cart contains 3 qualifying string products.
  • The first 2 qualifying strings receive a 100% discount.
  • The third string remains full price.

The part I’m trying to understand is whether the Automatic Discounts extension point supports this level of custom business logic.

Specifically:

  • Can a custom Discount Rule determine which individual line items receive a discount based on data from my own CMS?
  • Can it apply the discount to only a subset of the qualifying items (for example, the first two qualifying strings)?
  • Or can Discount Rules only return a simple yes/no decision for the entire cart?

If Automatic Discounts isn’t the right extension point, what would you recommend for implementing annual product entitlements like this while staying within the supported Wix eCommerce extension points?

For context, I’ve already built the sponsorship backend, CMS collections, and redemption tracking. The remaining challenge is determining how to apply the correct discount during checkout in a supported way.