Partial order fulfillment
The partial order fulfillment feature improves out-of-stock inventory handling and reduces the number of orders that result in an inventory error state.
This article provides an overview of the feature and instructions for requesting access to the feature.
How it works
Partial order fulfillment allows you to ship part of a customer's order when inventory is insufficient to fulfill all items. Recharge automatically removes any out-of-stock items, adds them to the customer's next scheduled order, and ensures the available items are shipped as planned.
You can review the customer's order details for a list of out-of-stock items that Recharge removed from the order.
Enable partial order fulfillment
You can configure your partial order fulfillment settings from the merchant portal on the Order processing page
- From the merchant portal, click Settings and select Order processing.
- From the Order processing dropdown, choose Create order only if inventory is available (and reduce inventory).
- Locate the Partial order fulfillment section. Under How should Recharge handle orders that can only be partially fulfilled?, select Remove or adjust quantity of out of stock items, and retry the updated order right away from the dropdown menu.
- Save your setting preferences.
Optional - Add order conditions
Add order conditions to let Recharge know when to fulfill a partial order. For example, if you sell a product and its replacement parts, you could set a condition that the partial order is only fulfilled if the main product is present on the order.
Choose from the following conditions:
Conditions |
Description |
Require a minimum # of items |
This condition sets a minimum number of line items that will be accepted on any order containing out of stock items. If the order results in fewer line items than the minimum threshold, the entire order is marked with an insufficient inventory error. |
Require a minimum order subtotal |
This condition sets a minimum order subtotal that will be accepted on any order containing out of stock items. If the subtotal of the order is less than the minimum threshold, the entire order is marked with an insufficient inventory error. Note: The subtotal is calculated before taxes, shipping, etc. |
Required products |
This conditon controls whether an out-of-stock order is automatically retried if specific required products are in stock. A required product is a core product that must be shipped in the order, otherwise, the remaining contents of the order do not make sense to include. For example, if a merchant sells a subscription that includes a coffee mug and a bag of coffee, they might not want to ship the bag of coffee if the mug is out of stock. If this conditon is enabled, you must choose one of the following options:
After choosing an option, add the required products by clicking Select products. |
You can enable more than one condition, however, enabling all three conditions triggers an insufficient inventory error if an order does not meet any of the conditions.
Update email notifications
Although Recharge’s platform, including the default settings, is designed to help you stay compliant with relevant laws and regulations, you are advised to review such laws and regulations and consult with legal counsel as appropriate. It is ultimately your responsibility to ensure that you comply with all relevant laws and regulations.
After enabling and configuring the feature, you must update the following email notification templates:
Warning: If these email notifications are not updated and this feature is enabled, customers may not be properly notified of out of stock items in their orders.
Update non-customized email notifications
If you are using un-customized email notifications, update the verbiage from the Notifications settings page:
- From the merchant portal, click Settings and select Notifications.
- Click on the email notification you are updating.
- Click Use default language to update the notification to include the partial order fulfillment verbiage. This resets the notification template to include the updated verbiage. For more details on using the default language button, see Using default language.
Update customized email notifications
Note: Customizing email notifications requires custom coding. Custom coding is not supported by Recharge per the Recharge design and integration policy.
If you are using customized email notifications, you must manually add the updated verbiage to your email notification templates. Failure to do so may result in your customers not being properly notified of out of stock items in their orders.
Subscription upcoming charge
The code for the subscription upcoming charge email notification warns customers that their upcoming order may contain out of stock items. Refer to the following instructions to add the required verbiage to the notification template:
- Copy the following code sample to your clipboard:
{% if out_of_stock_handling_enabled %}
<br/><br/>Note that if some of the items in your subscription are out of stock or if we don’t have enough stock available, you may not receive the full order. If too many items are out of stock, we will not process the order but will try again later once more stock is available.
{% endif %} - From the merchant portal, click Settings and select Notifications.
- Click the Subscription upcoming charge notification.
- Paste the code sample in the email message text box.
- Click Save.
Subscription recurring charge confirmation
The code for the subscription recurring charge confirmation email notification informs customers of any out of stock items that were removed from their order. Refer to the following instructions to add the required verbiage to the notification template:
- Copy the following code sample to your clipboard:
{% if line_item_modifications %}
<p>The following items were out of stock and not included in this order:</p>
<ul>
{% for lim in line_item_modifications %}
<li>
{% if lim.modification_type == 'update' %}
{% for attr in lim.modifications %}
{% if attr.attribute == 'quantity' %}
{{ attr.previous_value|int - attr.value|int }}
{% endif %}
{% endfor %}
{{ line_items[lim.line_item_id - 1].product_title }}
{% if line_items[lim.line_item_id - 1].variant_title %}
{{ line_items[lim.line_item_id - 1].variant_title }}
{% endif %}
{% elif lim.modification_type == 'delete' %}
{% for attr in lim.modifications %}
{% if attr.attribute == 'quantity' %}
{{ attr.previous_value }}
{% endif %}
{% endfor %}
{% for attr in lim.modifications %}
{% if attr.attribute == 'product_title' %}
{{ attr.previous_value }}
{% endif %}
{% endfor %}
{% for attr in lim.modifications %}
{% if attr.attribute == 'variant_title' and attr.previous_value %}
{{ attr.previous_value }}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</ul>
<p>You were not charged for the removed items, and they were not included in any tax or shipping calculations.</p>
{% endif %} - From the merchant portal, click Settings and select Notifications.
- Click the Subscription recurring charge confirmation notification.
- Paste the code sample in the email message text box.
- Click Save.
Customize the recurring charge confirmation notification
Note: Customizing email notifications requires custom coding. Custom coding is not supported by Recharge per the Recharge design and integration policy.
You can customize the default code samples using notification variables. For more information on using variables in email notifications, see Using variables for notifications and scripts.
The following variables can be used to customize the partial order fulfillment code samples:
Variable |
Definition |
out_of_stock_handling_enabled
|
This variable reflects the store's Order processing setting for out of stock handling. Possible values are True or False. |
modifications
|
This variable is an array of attributes for the specific line item modification. For both deleted and updated line items, attributes values include:
Deleted line items have additional attributes:
|
modification_type
|
This variable represents the modification type. Possible values are delete or update:
|
line_item_modifications
|
This variable includes an array of line item modifications. |
line_item_id
|
This variable represents the For updated line items, the product details are found on the original line item via the |
lim
|
This variable represents a specific Each
|
Update the Shopify Order Confirmation notification template
Note: Customizing Shopify notification templates requires custom coding. Custom coding is not supported by Recharge per the Recharge design and integration policy.
Some merchants may use Shopify's Order Confirmation notification template. This template can be updated to display Removed items when items are out of stock:
Use the following code snippet to update your Shopify Order Confirmation notification template and display Remove items:
Shopify Order Confirmation code snippet
{% if attributes.rc_order_modifications != blank %}
{%
# Liquid doesn't support JSON objects so it has to be parsed
%}
{% assign mod_str = attributes.rc_order_modifications | split: '[' %}
{% assign line_item_str = mod_str[1] | split: ']' %}
{% assign line_items = line_item_str[0] | split: '}, {' %}
<table class="row section">
<tr>
<td class="section__cell">
<center>
<table class="container">
<tr>
<td>
<h3>Removed items</h3>
</td>
</tr>
</table>
<table class="container">
<tr>
<td>
<p>The following items were out of stock and not included in this order</p>
<ul>
{% for line in line_items %}
<li>
{%
# Liquid doesn't support JSON objects so it has to be parsed
%}
{% assign items = line | split: ',' %}
{% for itm in items %}
{% assign val = itm | split: ':' %}
{% assign prop_key = val[0] | remove: '{' | remove: '"' %}
{% assign prop_value = val[1] | remove: '}' | remove: '"' %}
{% if prop_key contains 'modification' %}
{% assign modification = prop_value %}
{% endif %}
{% if prop_key contains 'external_product_id' %}
{% assign external_product_id = prop_value %}
{% endif %}
{% if prop_key contains 'external_variant_id' %}
{% assign external_variant_id = prop_value %}
{% endif %}
{% if prop_key contains "product_title" %}
{% assign product_title = prop_value %}
{% endif %}
{% if prop_key contains "variant_title" %}
{% assign variant_title = prop_value %}
{% endif %}
{% if prop_key contains 'previous_value' %}
{% assign previous_value = prop_value %}
{% endif %}
{% if prop_key contains "value" %}
{% assign new_value = prop_value %}
{% endif %}
{% endfor %}
{%
# Now the values are available
%}
{{ product_title }} - {{ variant_title }} {% if modification contains 'update' %} reduced from {{ previous_value }} to {{ new_value }} {% else %} removed {% endif %}
</li>
{% endfor %}
</ul>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
{% endif %}
The HTML elements used in this code snippet are only provided as an example. Custom styling may need to be applied to match the existing notification design.
Update Klaviyo notifications
If you use Klaviyo to send customer notifications instead of using Recharge or Shopify notifications, we recommend updating any email triggered by Shopify's “Order Placed” event. The data received from Shopify for partial order fulfillment for this event is sent in JSON format to describe what was removed or updated.
To display a list of removed or updated items in your HTML emails using this data, use the following code snippet as a template. You can customize and add to this template as needed:
Klaviyo notification code snippet
{% for item in event.extra.note_attributes %}
{% if item|lookup:'name' == 'rc_order_modifications' %}
<p>
The following items were out of stock and not included in this order:
</p>
<ul>
{% for line in item|lookup:'value'|string_to_object|lookup:"line_items" %}
<li>
{{ line.product_title }} - {{ line.variant_title }} {% if line.modification == 'update' %} reduced from {{ line.previous_value }} to {{ line.value }} {% else %} removed {% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
Considerations
See the following considerations when enabling partial order fulfillment:
- Recurring orders with a fixed-price discount applied will not work with this feature.
- At this time, you cannot configure replacement products for out of stock items.
- At this time, customers cannot use substitute products to swap out of stock items. A check for out of stock products is done while processing the charge therefore any products flagged as out of stock will be removed. Customers are able to swap products through the customer portal anytime prior to processing the order.
- This feature works at the time of order processing and is not preemptive to the order processing date.
- Partial Order Fulfillment does not work with prepaid orders.
-
Free gifts added using the Surprise and Delight Subscription Experience or Rewards strategies do not follow partial order fulfillment rules.
- Orders with mixed physical and digital products are not compatible with this feature. These types of mixed orders may process incorrectly and have inaccurate tax and shipping costs.
- Recharge Bundles orders are not supported.
- Partial order fulfillment settings will not apply if orders contain standard subscription products and bundle products.
- For example, if a standard subscription is out of stock in an order that also contains bundles (that are in stock), the order will fail and will not follow partial order fulfillment settings.
- Partial order fulfillment settings will not apply if orders contain standard subscription products and bundle products.
- SEPA/iDEAL payments are not compatible with this feature.
FAQ
What happens if I offer free shipping on an order that is modified below the free shipping threshold?
When an out of stock item is removed from an order and that order falls below a free shipping threshold, we select the lowest shipping rate. If there is free shipping applied to the original order before an out of stock item is removed, the customer still receives free shipping.
When does an unfulfilled item ship?
If a customer’s order contains an out of stock item, Recharge removes the item from the order and processes the remaining items in the order. The removed out of stock item will not ship. The next upcoming order processes as normal.
If an out of stock item is removed, how can I ensure my customers still receive free shipping?
Free shipping will always be the lowest shipping rate and this logic specifically allows you to apply free shipping even if the customer does not hit the shipping threshold.
Refer to the following table to see three examples of shipping rates if an order is modified:
Original order |
Modified order |
Shipping cost |
Free shipping |
$14.99 |
Free shipping |
$30 |
$20 |
$20 |
$14.99 |
$19.95 |
$14.99 |
Troubleshooting
For more help, visit Troubleshooting the partial order fulfillment setting.