Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

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.

1

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.

API Reference
2

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.

3

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.

API Reference
4

Add shipping methods and define fees

Add shipping methods and configure shipping fees by calling the Creating a shipping method endpoint.

API Reference
5

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.

API Reference
6

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.

API Reference
API Reference

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 deliveryWindow on 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 selected methodId, zoneId, methodName, and amount in the checkout request. Include shippingTaxCode when the quote returns it. Checkout Service re-prices that method and rejects a mismatched amount. See Checkout Tutorial.

  • Do not write methodId, zoneId, or a shipping amount to the cart.

1

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.

2

Update the cart with delivery information

Add the destination and optional deliveryWindow to the cart by calling the Updating a cart endpoint.

API Reference

Last updated

Was this helpful?