---
title: Multi-shipment examples
slug: commerce-connect-13/docs/multi-shipment-examples
docTags: 
createdAt: 2026-07-23T09:44:50.000Z
---

A split shipment could be a customer who buys two items, and each is shipped to a different address. During checkout, a customer can create a new address, or select from existing addresses.

If a customer purchases two or more items, the **Ship to multiple addresses** button appears during checkout.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/9i6V9ISdWw9eMKJelKal9_ee25e94-multipleshipment-1.png)

During checkout, the information for each *split shipping* part is added. The number of split shipments is equal to the number of items in the cart, so the customer can add/select a shipping address for each item.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/-d-vwF-6Hx3sKzyJqayU7_d1c5c74-multipleshipment-2.png)

Upon completing the information for each split shipment, the order process moves to next step. Here, choosing a shipping delivery option, billing address, and payment is required.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/aNzxzDkDVphKUjwp1Wj-N_d765b76-multipleshipment-3.png)

**Example:** Creating multiple shipment for Cart base on cart's LineItem

```csharp
var orderRepository = ServiceLocator.Current.GetInstance<IOrderRepository>();
    var currentMarket = ServiceLocator.Current.GetInstance<ICurrentMarket>();
    var cart = orderRepository.LoadCart(CustomerContext.Current.CurrentContactId, DefaultCartName, currentMarket);
    var form = cart.GetFirstForm();
    var cartLineItems = cart.GetAllLineItems().ToList();
    
    // Clean up line item in shipment
    foreach (var shipment in form.Shipments)
      {
        shipment.LineItems.Clear();
      }
    // Clean up shipments
    form.Shipments.Clear();
    
    // Adding shipment for each cart line item
    foreach (var item in cartLineItems)
      {
        var shipment = cart.CreateShipment(_orderGroupFactory);
        var lineItem = cart.CreateLineItem(item.Code, _orderGroupFactory);
        lineItem.IsGift = item.IsGift;
        lineItem.Quantity = item.Quantity;
        shipment.LineItems.Add(lineItem);
        form.Shipments.Add(shipment);
      }
    
    orderRepository.Save(cart);
```
