Delivery and Shipping Tutorial
How does Delivery Cycle work?
A Delivery Cycle defines the structured schedule and availability of delivery options within the shipping domain of the Emporix Commerce platform. It is a core concept that governs how delivery times and delivery slots are organized, managed, and exposed through APIs to facilitate precise control over shipping logistics.
Delivery Times: Configurable time ranges (for example days of the week, business hours) during which deliveries are operationally feasible. These are scoped according to shipping zones or regions and form the upper-level availability constraints.
Delivery Slots: Smaller time intervals nested within Delivery Times, representing granular windows customers can select for order fulfillment. Slots enable scheduling precision and enhance customer choice.
Delivery Windows: Combinations of delivery times and slots filtered dynamically based on factors such as postal code, cart contents, and business rules – used on the cart to refine the shipping estimate.
How to calculate shipping cost on the cart and at checkout
Shipping Service prices a shipment in two moments. On the cart, Cart Service requests an estimate: the cheapest matching fee, or the fee for a delivery slot. No shipping method is selected. At checkout, the storefront lists methods with POST /quote, the customer chooses a method and zone, and Checkout Service re-prices that choice as the amount that is charged.
Do not write methodId, zoneId, or a shipping amount to the cart. Send the selected method in the checkout request.
Cart estimate – How to calculate shipping cost at cart level in the Cart Tutorial
Checkout quote – Trigger the checkout in the Checkout Tutorial
How to configure delivery and shipping settings
To allow customers to place orders, you need to configure delivery and shipping settings by following the process below.
Prerequisite
Ensure that you have created at least one customer.
Create a shipping zone
Shipping zones are countries that your business delivers products to. You can create a shipping zone by calling the Creating a shipping zone endpoint.
Create a shipping group
You can set up shipping groups for customers and define different shipping methods and costs for these groups. To create a shipping group, you need to call the Creating a shipping group endpoint.
Assign customers to shipping groups
By adding customers to shipping groups, you can offer them different shipping methods and costs. Assign customers to shipping groups by calling the Creating a customer-group relation endpoint.
Add shipping methods and define fees
Add shipping methods and configure shipping fees by calling the Creating a shipping method endpoint.
Add delivery times
Delivery times specify days of the week and hours of the day on which orders can be delivered. They are defined for particular shipping zones.
Add delivery times by calling the Creating a delivery time endpoint.
Add delivery slots
Delivery slots specify periods during the day, when the delivery can take place. You can create multiple slots for every day.
Add delivery time slots by calling the Creating a delivery time slot endpoint.
How to manage delivery and shipping information upon checkout
Delivery windows on the cart refine the shipping estimate. Method and zone belong in the checkout request.
Put the destination and an optional
deliveryWindowon the cart. Cart Service then uses Calculating the shipping cost for a given slot (POST /shipping/{tenant}/{site}/quote/slot) when a window and slot are set, or Calculating the minimum shipping cost (POST /shipping/{tenant}/{site}/quote/minimum) otherwise.At checkout, the storefront lists methods with Calculating the final shipping cost (
POST /shipping/{tenant}/{site}/quote), then sends the selectedmethodId,zoneId,methodName, andamountin the checkout request. IncludeshippingTaxCodewhen the quote returns it. Checkout Service re-prices that method and rejects a mismatchedamount. See Checkout Tutorial.Do not write
methodId,zoneId, or a shipping amount to the cart.
Retrieve available delivery windows for a particular postal code and cart
Shipping times for particular postal codes are automatically calculated based on the business' shipping configuration, for example shipping capacity, or cut-off time. Retrieve delivery windows by calling the Retrieving delivery windows by cart endpoint.
Update the cart with delivery information
Add the destination and optional deliveryWindow to the cart by calling the Updating a cart endpoint.
Last updated
Was this helpful?

