Discounts, delivery, and tax

Add delivery fees, tax, tips, and discounts with price fields, and set a minimum order.

Quick Answer

How do I add delivery fees, tax, or discounts in Neartail?

In the editor, choose Add price field and pick Delivery Fee, Discount, Tax, Tip, or Donation. Choose a percentage, a fixed amount, or a custom calculation. Then add a Net Amount field calculated with NETTOTAL(), which combines the order amount with those price fields, so customers see the final amount.

You rarely need to write a formula for this. Add price field has a type for each common charge.

Add a price field

Open the field menu

In a section of the editor, open the dropdown beside Add field and choose Add price field.

Choose the type

Types you've already added don't appear again.

Choose how it's calculated

See the table below. Options depend on the type.

Add Net Amount

Add one more price field of type Net Amount, using Standard calculation using NETTOTAL(). This is the final figure.

TypeCalculation options
Order AmountStandard using TOTAL(), or custom
Delivery FeePercentage, fixed amount, or custom
DiscountPercentage, fixed amount, or custom
TaxStandard using TAX(), percentage, or custom
TipPercentage or an amount the customer enters
DonationPercentage, fixed amount, or an amount the customer enters
Net AmountStandard using NETTOTAL(), or custom

Delivery fee by area

Add a question listing your delivery areas, then calculate the fee with FEE. It matches each answer choice to an amount, in the same order as the choices.

FEE("$", @DeliveryArea, 5, 8, 12)

Insert the question by typing @, rather than typing its name. In this example the first area costs $5, the second $8, and the third $12. If you reorder the choices, reorder the amounts too.

For free delivery above a threshold, use IFS:

IFS(TOTAL() >= 50, 0, 5)

This charges $5 on orders below $50 and nothing from $50 up.

Tiered discounts

IFS returns the value for the first condition that's true, so put the highest threshold first.

IFS(TOTAL() >= 100, TOTAL() * 0.15, TOTAL() >= 50, TOTAL() * 0.05, 0)

This gives 15% off at $100 and 5% off at $50. It returns the discount amount, and the Discount price field subtracts it in Net Amount.

Coupon codes

Add a short-answer question for the code and calculate the discount from it:

IFS(@CouponCode == "WELCOME10", TOTAL() * 0.10, 0)

The code is visible in your form's settings, so use it for promotions rather than secrets.

Tax on one product

To tax products at different rates, use Tax in the product's settings, and a Tax price field with Standard calculation using TAX(). Use one approach or the other, so tax isn't counted twice.

Tax rules are your responsibility. Neartail calculates what you configure and doesn't determine the rate.

Minimum order

Add a validation rule to Order Amount or Order Quantity.

Open the field's settings

Select the field and open its gear, then the Answer tab.

Set a validation

Require a value that is greater than or equal to your minimum, and write a clear message such as Choose at least 6 meals to continue.

Test the boundary

Try five meals (blocked), six (allowed), and removing an item after you reach six.

Test every rule

Write down an order's expected subtotal, fee, tax, and discount, then place it on the live form. Test just below, exactly at, and just above each threshold.

Next steps