In the fast-paced world of e-commerce, precise and flexible shipping options are essential for delivering a seamless customer experience. At Octolize, we pride ourselves on delivering tailored solutions that address our clients’ unique shipping challenges. In this article, we dive into a real-world scenario where we worked closely with one of our clients, the owner of a jewelry store, to streamline their shipping process, reduce costs, and enhance delivery reliability.
By leveraging our expertise and our best-selling Flexible Shipping PRO plugin, we tackled the client’s specific challenges head-on. Read on to discover how we transformed a common shipping challenge into a success story, providing tangible benefits for our client.
If you run a similar business, this case study could provide valuable insights to help you refine your shipping strategy.
Original shipping scenario provided by the store owner:
I run a jewelry store where I sell three categories of products—bracelets, necklaces, and rings. Shipping just bracelets costs $15, and just necklaces cost $10. If a customer orders both bracelets and necklaces together, I can ship them in the same package, but they require extra protection, so shipping is $30 if the total weight is under 6 kg, or $45 if it’s over. Rings, on the other hand, are small enough to fit inside other jewelry boxes, so to encourage purchases, I reduce the shipping cost by $5 for each ring ordered. However, there’s one special engagement ring that I don’t ship at all due to its value—it’s only available for in-store pickup. It’s so expensive that even Frodo wouldn’t dare carry this one to Mordor. Additionally, for all shipped orders, I add an insurance fee of 15% of the order value. For orders over $500 shipping is free. How do I piece all this together?
In this scenario, we have several moving parts:
We need to implement the above logic in a set of rules. However, rule-based shipping tables typically process from top to bottom, summing up costs from every matching rule, unless a rule’s special action stops further evaluation or cancels the method.
Key points and edge cases:
cancel
, meaning no shipping method is offered. The rest of the rules do not matter.This logical arrangement gives a “best fit” for the scenario, noting that once an order hits $500 or more, the shipping cost is forced to $0 and the process is stopped (no insurance or other adjustments). If you did want to apply the 15% insurance fee even on $500+ orders, you could remove the stop from that free-shipping rule, but then you would have to handle negative costs from ring discounts or more complex logic. The configuration below enforces a strict “$0 means fully free shipping if $500+.”
Below is the JSON configuration for the Flexible Shipping PRO “Rules Table.” It follows the schema from the attached instructions and example configurations. This JSON must validate against the rules-table-schema.json
. Copy and paste it into the plugin’s “Paste” feature to import.
{
"rules_table": {
"rules": [
{
"conditions": [
{
"condition_id": "product",
"operator": "any",
"product": [
"engagement_ring"
]
}
],
"cost_per_order": "0",
"additional_costs": [],
"special_action": "cancel"
},
{
"conditions": [
{
"condition_id": "value",
"operator": "is",
"min": "500",
"max": ""
}
],
"cost_per_order": "0",
"additional_costs": [],
"special_action": "stop"
},
{
"conditions": [
{
"condition_id": "none"
}
],
"cost_per_order": "0",
"additional_costs": [
{
"additional_cost": "0.15",
"per_value": "1",
"based_on": "value"
}
],
"special_action": "none"
},
{
"conditions": [
{
"condition_id": "product",
"operator": "any",
"product": [
"ring"
]
}
],
"cost_per_order": "0",
"additional_costs": [
{
"additional_cost": "-5",
"per_value": "1",
"based_on": "item"
}
],
"special_action": "none"
},
{
"conditions": [
{
"condition_id": "product",
"operator": "all",
"product": [
"bracelet",
"necklace"
]
},
{
"condition_id": "weight",
"operator": "is",
"min": "",
"max": "6"
}
],
"cost_per_order": "30",
"additional_costs": [],
"special_action": "stop"
},
{
"conditions": [
{
"condition_id": "product",
"operator": "all",
"product": [
"bracelet",
"necklace"
]
},
{
"condition_id": "weight",
"operator": "is",
"min": "6.001",
"max": ""
}
],
"cost_per_order": "45",
"additional_costs": [],
"special_action": "stop"
},
{
"conditions": [
{
"condition_id": "product",
"operator": "any",
"product": [
"bracelet"
]
}
],
"cost_per_order": "15",
"additional_costs": [],
"special_action": "none"
},
{
"conditions": [
{
"condition_id": "product",
"operator": "any",
"product": [
"necklace"
]
}
],
"cost_per_order": "10",
"additional_costs": [],
"special_action": "none"
}
]
}
}
To use this configuration, copy the JSON above and paste it into the “Rules Table” section of Flexible Shipping PRO via the “Paste” button.
Below are a few sample “edge” or “interesting” orders and how the rules combine to produce the final shipping cost:
product = engagement_ring
) → cancel shipping method. No shipping is offered.value >= 500
) → cost 0, stop. The method is free and no other rules are applied. Final shipping = $0.These examples show how the table logic works step by step, matching the store owner’s shipping rules as closely as possible within a straightforward “top-to-bottom” rule structure. If you need to allow the 15% insurance or ring discounts on top of free shipping for $500+ orders, you would remove or rework the “stop” in Rule #2. But that would no longer be true $0 shipping for high-value orders.
We hope this helps you configure the shipping scenario! Simply copy the JSON code above into your Flexible Shipping PRO “Rules Table,” and the plugin should handle the logic for you.