{"title":"DeliveryGroup - Liquid Object Reference","slug":"delivery-group-liquid-object-reference","url":"https://support.storeconnect.com/articles/delivery-group-liquid-object-reference","url_markdown":"https://support.storeconnect.com/articles/delivery-group-liquid-object-reference.md","subtitle":null,"summary":"Attributes of the DeliveryGroup Liquid object, one delivery in a multi-shipping cart. Use it to build a per-delivery shipping selector, submit a choice, or assign deliveries from a theme.","type":"Developer_Documentation","video_url":"","keywords":"liquid, objects, DeliveryGroup, delivery groups, multi-shipping, shipping rates, pickup options, cheapest rate, group key, checkout shipping, template, storeconnect","last_modified":"2026-11-03T23:10:57+0000","body_markdown":"## Description\n\nThe DeliveryGroup object is one of the deliveries a cart splits into when multi-shipping is enabled. Items are grouped by the shipping methods their products offer, counting only the methods the store can quote on the web, and the customer chooses a method for each delivery. See [how items are grouped](multi-shipping) for which methods count.\n\nReach them through `current_cart.delivery_groups`. A cart that is not split still returns one group, so you do not need separate markup for a single delivery.\n\n\n```liquid\n\n{% for group in current_cart.delivery_groups %}\n  \u003cfieldset\u003e\n    \u003clegend\u003eDelivery {{ forloop.index }}\u003c/legend\u003e\n    {% for rate in group.rates %}\n      \u003clabel\u003e\n        \u003cinput type=\"radio\" name=\"method[{{ group.key }}]\" value=\"{{ rate.form_value }}\"\u003e\n        {{ rate.name }}\n      \u003c/label\u003e\n    {% endfor %}\n  \u003c/fieldset\u003e\n{% endfor %}\n```\n\n\n## Attributes\n\n| Attribute | Type | Description |\n|-----------|------|-------------|\n| `cheapest_rate` | [ShippingRate](shipping-rate-liquid-object-reference) | Returns the cheapest rate for this delivery that is not a pickup, or nil |\n| `items` | List[[CartItem](cart-item-liquid-object-reference)] | Returns the cart items in this delivery |\n| `key` | String | Returns the identifier for this delivery, used to name the delivery's form field when the form is submitted |\n| `pickup_options` | List[PickupOption] | Returns the pickup options available to this delivery, with stock checked against this delivery's items only |\n| `rates` | List[[ShippingRate](shipping-rate-liquid-object-reference)] | Returns the shipping rates available to this delivery |\n| `shipping_methods` | List[String] | Returns the shipping methods available to this delivery |\n\n## Available on\n\n- [Cart - Liquid Object Reference](cart-liquid-object-reference) — `delivery_groups`, and `multiple_delivery_groups?` to branch before fetching rates\n\n## Rendering the groups is what saves them\n\nRendering `current_cart.delivery_groups` also persists the quoted deliveries onto the cart, and the checkout validation step requires them to be there. Always present the choices through this collection, or through `item.delivery_group`, which persists the same way. If you build the markup from anything else, checkout has nothing to validate against and rejects the submission.\n\n`multiple_delivery_groups?` groups the items without fetching any rates. Use it to decide what to render before running a rate lookup.\n\n## Submitting a choice\n\nPost one selection per delivery, in a radio named `method[\u003cgroup_key\u003e]`. The radio value is a rate's `form_value`, or `Click and Collect_\u003cstock location id\u003e_\u003ccollection point id\u003e` for a pickup.\n\nA submission missing a delivery is rejected, as is one quoted against a cart whose items, quantities, methods or address have since changed. The customer is returned to the shipping step to choose again.\n\n## Loading the selector without blocking the page\n\nRate lookups can be slow, so the built-in shipping step renders its selector through a deferred component:\n\n\n```liquid\n\n{% component \"checkout/shipping_rates/page\", defer: true %}\n```\n\n\n`defer: true` renders a placeholder and loads the component as soon as the component loader on the page registers it. This is not the same as `lazy: true`, which renders an empty container that loads only when one of the `reload:` events set on it fires.\n\n## Assigning deliveries from a theme\n\nA theme can assign deliveries itself rather than asking the customer, using the `shipping.add` action to nominate the items each shipment covers. Those groups are marked as theme-assigned and survive a rate refresh instead of being regrouped, for as long as the cart still matches what they were saved against. The assignment is discarded when the items, quantities or address change, or when anything else would regroup the items, such as a change to a product's **Shipping Methods** or to the store's shipping providers and rates. Automatic grouping then resumes until the theme calls `shipping.add` again.\n\nItems left in no delivery produce no shipment at all. When you assign deliveries, StoreConnect reports those items as a warning in the [web console](web-console). See [Action - Liquid Tag Reference](action-tag-reference)."}