Configuring partial order fulfillment for out-of-stock items
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.
If your store uses partial order fulfillment and processes an order that contains an out-of-stock one-time product, Recharge removes the one-time product from the order and does not add it to the next upcoming charge. Instead, either you or your customer can add the one-time product to the next charge.
Inventory behavior
Shopify-billed orders
Recharge checks inventory for subscription products when creating Shopify-billed orders. For Shopify stores, Recharge uses the product’s Shopify inventory levels to determine how an order is processed.
The following is true when you enable the Partial Order Fulfillment setting:
- If some items in the order are in stock, Recharge creates the order and fulfills the available items
- If no inventory is available for any subscription items, Recharge does not create the order and marks it with an insufficient_inventory error
Free gifts added using the Surprise and Delight Subscription Experience or Rewards strategies are not compatible with partial order fulfillment.
See Shopify-billed orders for more information.
Recharge-billed orders
Recharge uses your inventory settings to determine whether to create a partial order. See Recharge-billed orders for more information.
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
If you use Recharge's email notifications, you need to manually update the verbiage in your email notification templates to notify customers about their out-of-stock items. Failing to do so might cause your customers not to be properly informed about out-of-stock items in their orders.
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.
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.
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
|
Upcoming order email
If you use the Upcoming order email, you can manually add a message to notify customers about out-of-stock items.
Example
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."
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:
| Considerations | Notes |
| Fixed-price discounts |
|
| Out-of-stock items |
|
| Processing times |
|
| Prepaid orders |
|
| Free gifts |
|
| Mixed orders |
|
| Bundles |
|
| SEPA/iDEAL |
|
| Location-based inventory rules |
Partial order fulfillment is incompatible with Shopify’s location-specific inventory rules. Recharge checks variant-level inventory before making a billing attempt. However, Shopify may reject the order during the billing attempt due to location-based inventory settings. This behavior can occur even when:
If Shopify rejects the order due to location-based inventory rules, Recharge cannot override the rejection, and partial order fulfillment does not proceed. If your store uses multiple active locations, review your Shopify inventory and fulfillment settings before enabling partial order fulfillment. |
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.
