One Time SKU Swap Configuration in the Subscription Manager
SKU Swap is an out-of-the-box feature that allows customers to change from one SKU to another without needing to cancel one product and resubscribe to another. This feature helps retention by getting ahead of common subscription cancel symptoms — often referred to as “flavor fatigue” — whether that’s flavor, size, scent, or anything else.
What Are the Benefits of a One-Time Swap?
By default, SKU Swap permanently changes the subscription to the newly chosen product. In some cases, a customer may only want to swap their next upcoming order without permanently switching. A common example is when an item is out of stock — customers may want to swap to avoid waiting, but keep their original subscription going. The instructions below add the ability for customers to choose between a permanent swap or a one-time swap.
Setting Up One Time SKU Swap
There are two main steps: access the advanced editor, then modify the relevant files.
1. Accessing the Subscription Manager Advanced Editor
You can access the advanced editor through your Ordergroove Admin:
- Log in to Ordergroove.
- Go to Subscriptions on the top toolbar, and select Subscription Manager.
- Toggle Advanced on the top left.
Support
Some aspects of this article require technical expertise with coding languages. This is self-serve and outside of the normal support policy.
2. Adding the Code Snippets
File: locales/en-US.js
Update the message for the existing SKU swap confirm button and add a new key for the one-time change button:
File: change-product.liquid
Update the SKU Swap experience with the following changes:
-
Add the current product to the SKU Swap modal. Normally the current product is excluded since customers are swapping away from it — but for a one-time swap, the customer may want to swap back. This snippet makes the existing product visible in the swap experience:
-
Replace the default product list (
alternative_ids) with the customized options from step 1: -
Add a hidden input with the
order_idfor use in the one-time swap call: -
Create the new one-time change button. This button calls the custom function
change_item_productdefined inscript.js: -
Add a call to the custom function within the regular SKU swap form so that a permanent swap also updates the item for the current shipment:
The top of the form code will look something like this:
File: script.js
Add this code at the end of script.js:
Styling
File: order-item.less
Add this snippet inside the .og-product class to style the one-time change disclaimer:
Class: .og-change-product-control
To style the buttons, add this snippet inside the .og-change-product-control class: