Editing orders with an active discount code in Customer Portal

In Customer Portal, Cleverific can preserve discount codes when customers edit their orders. Depending on the discount type and the edit being made, the discount is either automatically redistributed or the action is restricted to protect the discount amount. This article will explain how to enable support for this and how it works.

Preserve and re-apply existing discounts after order edits

Steps

  1. From your Shopify admin, go to Apps > Cleverific Order Editor.
  2. Click Customer Portal.
  3. In your Customer Portal settings, navigate to the Discounts section and enable Preserve and re-apply existing discounts after order edits

  1. Click Save in the top bar.

Grant permissions

To authorize Cleverific to read your discount setup, you need to grant permissions to do so. As soon as you first click to enable this setting, a pop-up should appear for you to update the permissions:

The staff member logging in needs the "Manage and install apps and channels" permission enabled in Shopify Admin (Settings → Users and permissions)

A couple of things worth knowing:

  • The store owner always has this permission by default.
  • For staff or collaborator accounts, it needs to be explicitly enabled. It controls app installation and approval of app charges, so approving new access scopes falls under it.
  • Without it, the permission modal can't be completed, and the feature will remain inaccessible until someone with the right permission approves it.

How discount codes are handled during edits

The behavior depends on the type of discount applied at checkout.

Percentage discounts (e.g., 10% off an order or 10% off a product) are handled natively by Shopify. This includes order-level percentage codes, product- or collection-scoped percentage codes, and automatic percentage discounts. The discount recalculates automatically whenever a customer swaps a variant, adds an item, removes an item, or changes a quantity.

Fixed-amount discounts (e.g., $10 off) require additional handling. This includes:

  • Order-level fixed-amount discounts
  • Product-specific fixed-amount discounts
  • Collection-specific fixed-amount discounts
  • Variant-specific fixed-amount discounts
  • Automatic fixed-amount discounts.

Cleverific redistributes the discount when the customer swaps a variant or adds an item.

Removing an item or changing a quantity on an order with a fixed-amount discount is not allowed, because the discount cannot be reliably redistributed across fewer or different items. Those edits are disabled in Customer Portal with a message indicating the order is locked by an active discount.

What customers can and can't do

Edit type Percentage discount codes Fixed-amount discount codes
Swap a variant ✅ Allowed ✅ Allowed, discount redistributes across line items
Add an item ✅ Allowed ✅ Allowed, discount redistributes across line items
Remove an item ✅ Allowed 🚫 Not allowed
Change quantity ✅ Allowed 🚫 Not allowed

Known limitations

  • Fixed-amount restrictions apply to all fixed-amount discount types, including product-specific codes, collection-specific codes, and automatic fixed-amount discounts.
  • If a customer swaps to a variant that is not eligible for a product-restricted or variant-restricted discount code, the discount will drop to $0 on the new line without an error message. This is a Shopify limitation.
  • If a discount code was limited to one use per customer and that use was consumed at checkout, the discount may not carry over fully to newly created lines after a variant swap.
  • On orders with a percentage discount and a minimum spend requirement, reducing the quantity below the minimum is allowed. Shopify does not re-check minimum spend thresholds on edits, so the discount continues to apply.

Any questions or use cases? Feel free to reach out at support@cleverific.com!