Advanced Rules give you fine-grained control over how returns are processed. They can often replace traditional tag-based setups like swap_noentry.
Each rule has two parts: conditions (when it applies) and actions (what happens). You can combine multiple conditions and actions in a single rule. Conditions can be joined with AND or OR logic — but not both in the same rule.
This article is for users of Returns V2. For the Returns V1 version, click here.
Quick Examples
Quick Examples
Here are two examples to show what Advanced Rules can do.
VIP customers get free returns
Condition: Customer tagged with VIP
Action: Return postage is free for this order
Discounted orders can't be refunded
Condition: Order made using one of the following discount codes
Action: This order can only be returned for the following types → Store credit, Exchange
Note: Avoid using "Order placed with discount code" if your store uses codes for free shipping — this would apply to those orders too.
Accessing advanced rules
To create or manage rules:
Go to the Swap Dashboard.
Under Returns, select Advanced Rules.
From this page, you can:
+ New Rule: Create a new rule.
Activate / Deactivate: Turn a rule on or off. Deactivated rules remain saved but don't apply. To reactivate, go to the Inactive tab.
Edit: Click on a rule to change its conditions or actions.
Delete: Permanently remove a rule. Deleted rules cannot be recovered.
Conditions
Conditions define when a rule should apply. You can use multiple conditions per rule, joined with AND or OR logic (not both in the same rule).
Customer
Condition | Description |
Customer email is one of the attached emails | Applies to returns from customers whose email is on the specified list. |
Customer email is not one of the attached emails | Applies to returns from customers whose email is not on the list. |
Customer has purchased more than X times in Y days | Triggers when a customer makes more than X purchases within Y days. |
Customer has returned more than X times in Y days | Triggers after a customer exceeds the return threshold. E.g. with "more than 1 return in 1 day": the 1st and 2nd returns are allowed; the rule triggers on the 3rd. |
Customer tagged with | Applies to returns from customers with a specific Shopify tag. |
Order
Condition | Description |
Order created X days ago | Targets orders created a certain number of days ago. Supports ranges like "greater than." |
Order fulfilled X days ago | Targets orders fulfilled a certain number of days ago. |
Order delivered X days ago | Targets orders delivered a certain number of days ago. |
Order fulfilled between dates | Targets orders fulfilled within a specific date range. |
Order delivered between dates | Targets orders delivered within a specific date range. |
Order made between X and Y days | Targets orders placed between X and Y days ago. |
Orders within the date range | Targets orders placed within a specified date range. |
Order is not tagged with | Targets orders that do not have a specific tag. |
Order tagged with | Targets orders that have a specific tag. |
Order made using one of the following discount codes | Applies to orders placed with a discount code from the specified list. |
Order placed with discount code | Applies to orders placed using any discount code. |
Order number is one of the following | Applies if the order number is on the specified list. |
Order number is not one of the following | Applies if the order number is not on the specified list. |
Order paid with gift card | Targets all orders paid for using a gift card. |
Order's value is | Targets orders of a certain value. Supports ranges like "greater than" or "equals." |
Orders originating from specific countries | Applies to orders shipped from specific countries. |
Return
Condition | Description |
Return's type is one of the following | Applies to returns of specified types: Refund, Store credit, or Exchange. |
Return's type is not one of the following | Applies to returns not of specified types. |
Return's number of items is | Applies based on the number of items being returned. |
Return's total package weight is | Applies based on the total weight of the return package. |
Return's shipping status is one of the following | Applies to returns with a specific shipping status. |
Return contains faulty items | Applies when the return includes items marked with a faulty return reason. |
Entire order returned (any number of returns) | Applies when all original items have been returned — whether in one return or across multiple. Does not apply if any original item is marked non-returnable or has not been returned. Exchange items are excluded from this evaluation. |
Return all items from the order | Applies when the current return request contains all remaining original items from the order. |
Product
Condition | Description |
Item is marked with faulty return reason | Applies to individual line items marked with a faulty reason. |
Product SKU is | Targets products with a specified SKU. |
Product SKU is missing | Applies to products where the SKU is empty or not defined. |
Product name is | Targets products with a specified name. |
Product tagged with | Targets products that have a specific tag. |
Product not tagged with | Targets products that do not have a specific tag. |
Product's value is | Targets products of a certain value. Supports ranges like "greater than." |
Product discount is | Targets products with a specified discount percentage. Three comparison options: Variant price (current vs. compare-at price); Parent price (current vs. parent product price, where assigned); Original purchase price (price paid vs. compare-at price). |
Product line item properties | Applies to line items containing a specific Name/Value property pair. Uses equals logic only. Multiple items in the same order can independently satisfy this condition. |
Actions
Actions define what happens when the rule is triggered. You can apply more than one action per rule.
Blocking & restricting
Action | Description |
Order is not eligible for return | Blocks the return entirely for this order. |
This product cannot be returned | Prevents return of a specific product. |
This order can only be returned for the following types | Restricts return types for the whole order to: Store credit, Exchange, or Refund. |
Product is only eligible for returns of the following types | Restricts return options for a specific product to: Store credit, Exchange, or Refund. |
Product is only eligible for the following carriers | Restricts eligible return carriers for a product. |
Return window does not affect this order | Ignores return window constraints for the order. |
Postage & fees
Action | Description |
Return postage is free for this order | Waives return postage for the order. |
Set postage fee to | Applies a flat return postage fee. |
Calculate the postage fee by multiplying | Increases postage cost by a fixed multiplier. |
This order receives reduced return postage | Applies discounted postage to the return. |
Set Return Handling Fee | Adds a fixed handling fee to the return. |
Refund outbound shipping | Refunds the original outbound shipping fee. Applies to refund returns only (not store credit–only returns). When combined with Entire order returned, refunds once all original items have been returned. |
Processing & automation
Action | Description |
Return will be automatically processed | Approves and processes the return automatically. |
After X days, return will be processed automatically | Auto-processes the return after a set number of days. |
Change status to needs review | Flags the return for manual review. |
Trigger webhook | Sends data to an external system via webhook. |
Bonuses
Action | Description |
Set Shop Now Bonus % | Overrides the Shop Now credit bonus percentage. Must be between 0% and 100%. |
Set Shop Later Bonus % | Overrides the Shop Later (gift card) bonus percentage. Must be between 0% and 100%. |
Faulty flow
Action | Description |
Mark item for 'return not required' (green return via faulty flow) | Forces a "return not required" faulty decision on the item — the item does not need to be shipped back and the notification email is sent automatically. Shipping fees are not waived unless a fee waiver action is also included. Instant Exchange is blocked. Works with product-level conditions only. |
Mark item for 'return is required' (faulty flow) | Forces a "return is required" faulty decision on the item. The portal does not display a "faulty" tag; the decision is placed automatically after RMA creation, and the notification email is then sent to the customer. Shipping fees are not waived unless a fee waiver action is also included. Instant Exchange is blocked. Works with product-level conditions only. |
Portal text
Action | Description |
Display a message in the portal | Shows a custom message on the portal's first page when the rule's conditions are met. Configure a Title, Text (at least one is required), and an optional background color. The message box matches the width of the items box and text wraps automatically. |
Return type classification
In general, if a return contains a refund, it is classified as a refund return — even if it also includes an exchange.
The exception is postage- and processing-related actions. For the following actions, if the return contains at least one exchange item, it is treated as an exchange return for rule evaluation and shipping fee calculation:
Set postage fee to
Calculate the postage fee by multiplying
Return postage is free for this order
Set Return Handling Fee
Return will be automatically processed
After X days, return will be processed automatically
Change status to needs review
RMA history
Advanced Rule activity
When an Advanced Rule is applied, a note is added to the RMA history:
Advanced Rule: [Rule Name] was applied.
If multiple rules are triggered, each generates its own entry. Repeated evaluations do not create additional entries.