Skip to main content

Rush Fee Waivers

Overviewโ€‹

Waives rush fees (100% off) for exchange orders during checkout.

Eligibilityโ€‹

Both conditions must be met:

  1. Customer has tag: "RUSH-FEE-EXCHANGE-DISCOUNT"
  2. Product has tag: "rush-fee-exchange-match-tag"

Discount Detailsโ€‹

  • Discount Amount: 100% (price set to $0)
  • Use Case: Exchange orders where rush fees should be waived

How It Worksโ€‹

When both the customer and product have the required tags, the rush fee line item is repriced to $0.

Discount Messageโ€‹

Customers see: "Free Rush Fees on Exchanges"

Technical Implementationโ€‹

Logic Flowโ€‹

Input.cart.line_items.each do |line_item|
customer_eligible = customer_tags.include?("RUSH-FEE-EXCHANGE-DISCOUNT")
product_eligible = line_item.variant.product.tags.include?("rush-fee-exchange-match-tag")

if customer_eligible && product_eligible
apply_discount(line_item, 0, "Free Rush Fees on Exchanges")
end
end

Helper Methodโ€‹

def apply_discount(line_item, price, message)
new_line_price = Money.new(cents: price) * line_item.quantity
line_item.change_line_price(new_line_price, message: message)
end

Tagging Workflowโ€‹

Customer Taggingโ€‹

Customer must be tagged with "RUSH-FEE-EXCHANGE-DISCOUNT" (typically done by CS team for exchange orders).

Product Taggingโ€‹

Rush fee products must be tagged with "rush-fee-exchange-match-tag".

Guest Handlingโ€‹

โŒ Guests cannot receive this discount since they don't have customer tags.