Discount in excess of item cost

Is it possible, either through the API or Dashboard, to create a discount/pricing rule so that an order is discounted by more than the cost of the item in the rule?

Two scenarios that would be useful to my company are:

  1. Purchase a widget for $1.00 and receive a $5.00 discount on your total order.

  2. Purchase a widget for $1.00 and get a free item from the sprockets category even it it’s cost is more than the widget (e.g. $3.00), ideally with the order maximum discount enforced.

I have tried several setups and can’t seem to be able to create a discount/pricing rule combination that accomplishes this.

Thanks

A discount greater then the order total isn’t currently possible. I’m a bit confused on scenario 1. Would you be paying the customer? Would you mind sharing the use case?

As for scenario 2 you can set the price of the item to $0 within the order. :slightly_smiling_face:

Hi Bryan,

I truly appreciate you working with me and trying to help me. I am sure that I was unclear in my attempt to keep my message succinct.

Let me expand on the use cases a bit and see if you can understand what I’m trying to accomplish (even if it seems a bit squirrely to you).

I never want the discount to exceed the order total, but in some instances the discount may cover the total order and result in a zero balance.

The part I left out of my scenario 1 is that the customer buys additional items that receive a discount that may exceed the cost of the item that triggers the automatic rule. So, the customer purchases a widget for $1.00 and qty 4 sprockets at $3.00/ea, for a pre-discount total of $13,00, and an after $5.00 discount total of $8.00. If the customer only purchased a single additional sprocket at $3.00, the pre-discount total would be $4.00 and the after discount amount would be $0.00 (free!, but no cash to customer).

I believe this is very much how an order discount without a minimum purchase amount works, but I want the discount to be contingent upon the order actually containing a widget.

The second example is a buy 1 thing from category A and receive 1 thing from category B, even if the price of the category B item exceeds the cost of the category A item. An order of a single $1.00 widget from category A and the $3.00 sprocket from category B would end up costing a total of $1.00 since the category B item is free. If the order included qty 3 of category B sprockets, the first one would be free and the remaining two would be at the normal $3.00 price, for an order total of $7.00.

And when you say “you can set the price of the item to $0 within the order,” please elaborate on what you mean.

Note that I am trying to configure this to work in Square Register (Retail Plus), and not touch the active orders programmatically. I am fine doing any setup via the API, but my staff will be using the Register for retail transactions.

Let me know if this explanation is a little clearer and if you have any follow up questions or ideas.

Thanks!

Thanks for the additional explanation. This is all possible with automatic discounts. The discount will discount the order till it’s $0 if the discount is greater then the order total.

Since you said that your doing this in the Register you can configure the discounts in the Items of the Register. Unfortunately open orders won’t have the discounts backfilled but all new orders will have the discounts applied with automatic discounts. :slightly_smiling_face:

Hi Bryan,

I don’t mean to take up your valuable time, but can you (or someone else) show me a setup that does this?

In my attempts to do this on my own, I have not been able to either get an order discount triggered by a rule, nor have I been able to get a discount amount that exceeds the cost of the item in the rule.

I don’t mean to be overly needy, but I have tried many variations and none seems to work for me.

Thanks

If your doing this via API you’ll need to create a discount. For example this is the one I created for testing:

{
    "object": {
        "type": "DISCOUNT",
        "id": "6KOR2G2JZV7VNID23YIAFIDR",
        "updated_at": "2023-03-07T20:33:14.001Z",
        "created_at": "2023-03-07T20:33:14.001Z",
        "version": 1678221194001,
        "is_deleted": false,
        "present_at_all_locations": true,
        "discount_data": {
            "name": "large",
            "discount_type": "FIXED_AMOUNT",
            "amount_money": {
                "amount": 1000,
                "currency": "USD"
            },
            "application_method": "MANUALLY_APPLIED",
            "modify_tax_basis": "MODIFY_TAX_BASIS"
        }
    }
}

Then you’ll need to create a PRICING_RULE. This is the one I created:

{
    "object": {
        "type": "PRICING_RULE",
        "id": "YZFUPPLH5AZX4YQTZETBIVSJ",
        "updated_at": "2023-03-07T20:33:14.001Z",
        "created_at": "2023-03-07T20:33:14.001Z",
        "version": 1678221194001,
        "is_deleted": false,
        "present_at_all_locations": true,
        "pricing_rule_data": {
            "discount_id": "6KOR2G2JZV7VNID23YIAFIDR",
            "match_products_id": "UHJAZJWQVRC3XO7WZCBV6XVD",
            "application_mode": "AUTOMATIC",
            "discount_target_scope": "LINE_ITEM",
            "disabled_pricing_sources": [
                "SQUARE_ONLINE"
            ]
        }
    }
}

So the product that I added to this pricing rule UHJAZJWQVRC3XO7WZCBV6XVD has a cost of $1 and the discount I created is a $10 discount. When I created the order with the Orders API with with the blow order it created an order with $0 owed. :

{
  "idempotency_key": "{{$guid}}",
  "order": {
    "location_id": "{{location_id}}",
  	"reference_id": "my-order-0001",
  	  "line_items": [
    {
       "quantity": "1",
          "catalog_object_id": "M4ZCRV2XZ6E76FC5XDDJZQTK"
      }
  ],
  "discounts": [
        {
          "catalog_object_id": "6KOR2G2JZV7VNID23YIAFIDR"
        }
      ]
  }
}

Hope this help. :slightly_smiling_face:

Hi Bryan,

I tried to replicate your example, but I got different results.

For me, only the item referenced in the discount product set was discounted, but the other items I added to the Register order were not discounted.

This may or may not be the cause, but I used the API Explorer (which is my normal pattern before actually writing code), and I did not see the option to set ‘application_method’ attribute on the DISCOUNT item, nor the ‘discount_target_scope’ and ‘disabled_pricing_sources’ attributes on the PRICING_RULE object.

Are these missing from the API Explorer or is there another way I can set them from there?

Are you able to add other items to your order to get the total above the $10 discount to confirm that this setup discounts the other items?

And to confirm, you had to create a PRODUCT_SET including the item and did not use the ITEM_ID directly in the ‘match_products_id’ attribute, correct? (That’s how I had to do it.)

Thanks for helping me!