Shipping Costs: Simple Setup and Customization

Setting up shipping in Optimizely Configured Commerce can be simple once you understand the building blocks. Whether you're offering basic flat rates or integrating real-time carrier services, everything starts with proper configuration in the Admin Console.
🔧 Where to Begin
You can manage shipping settings in: Admin Console > Shipping & Fulfillment
Here’s what you’ll typically set up:
📦 Carriers
In Configured Commerce, a Carrier represents a delivery service — such as UPS, FedEx, or a local courier. Carriers act as the bridge between your shipping methods and shipping providers, helping organize and display delivery options during checkout.
Setting up carriers is well-documented here:
👉 Creating a Carrier (Optimizely Docs)
Real-World Example: Vendor in Poland
Here’s a small setup I recently configured for one of our vendors in Poland.
Scenario:
We wanted to offer 5% shipping cost based on order value, with a minimum charge of 500 PLN for orders up to 35,000 PLN.
For orders above 35,000 PLN, shipping would be free.
💡 Note: All business logic was handled on the ERP side, so on the Configured Commerce side, only a minimal setup was needed.
🔧 Configuration Steps
1️⃣ Created a custom Carrier named Freight PL
2️⃣ Added a Generic Rule
This rule ensures the shipping method is only available to customers based in Poland.
✅ Note: This could also be achieved using rules based on the delivery address country (e.g., if
Country == "PL"
).
3️⃣ Added Two Services Under the Carrier
4️⃣ Service #1 – For Orders ≤ 35,000 PLN
Shipping cost: 5% of order value
Minimum: 500 PLN
Includes a rule limiting this to orders up to 35,000 PLN
5️⃣ Service #2 – For Orders > 35,000 PLN
Shipping cost: 0 PLN (free)
Rule applies to orders greater than 35,000 PLN
✅ Configuration Summary
This setup highlights how flexible the shipping module in Configured Commerce really is — especially when most of your shipping logic is handled in the ERP.
It’s also incredibly easy to extend with additional rules or location-based customizations.
For example, I’ve previously configured flat-rate shipping based on area and ZIP codes, using:
Single ZIP code matches
Lists of ZIP codes
Partial matches on ZIP prefixes
This flexibility allows for a wide range of rule-based shipping scenarios right from the Admin Console.
🤔 But What If You Need Full Custom Logic?
Sometimes, your shipping logic can’t be defined using Admin Console rules at all — maybe you're relying on a third-party pricing API, or need to calculate prices dynamically based on data unavailable in Configured Commerce.
No problem — one approach is to set up a "dummy" carrier in the Admin Console and handle all pricing logic in code.
💻 Example: Custom Shipping Logic via Cart Pipeline
You can hook into the cart pricing pipeline and inject your own logic. Here’s a simplified example of a custom shipping calculator:
internal class MyCustomShippingCalculator : IPipe<GetCartPricingParameter, GetCartPricingResult>
{
private readonly ICustomShippingServive _customShippingServive;
public MyCustomShippingCalculator (ICustomShippingServive customShippingServive)
{
_customShippingServive= customShippingServive;
}
public GetCartPricingResult Execute(
IUnitOfWork unitOfWork,
GetCartPricingParameter parameter,
GetCartPricingResult result)
{
//Here you can create your own logic based eiter on = parameter.Cart items in it
// You could even get weights and sizes from products in cart and use it for calcualtion.
decimal shippingCharges = _customShippingServive.Get()
result.Cart.ShippingCharges = shippingCharges;
return result;
}
public int Order => 450;
}
This pattern gives you full control over shipping calculations at runtime, while still fitting cleanly into Configured Commerce's extensibility model.
Subscribe to my newsletter
Read articles from Marcin G directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
