Skip to main content
Print

Shopify Bundles

A bundle is a product made of other products, e.g. a running shoe plus two bottles. Shopify keeps the bundle’s stock in line with its components. The transmitter creates and updates bundles with the key bundleInput of the products datamap. The setup is on Shopify Transmitter.

Available from: 1.19.14 · 1.20.5 · 1.21.0; bundle format 1.22.0

What Shopify receives

Each component has the PIM identifier of its product, the quantity, and the selected options:

ComponentOption selection
Simple productone selection with the option Title
Product with variantsone selection per option of the product, with the selected value, e.g. Größe = 42
{"title": "Running set", "components": [
  {"productId": "<PIM identifier>", "quantity": 2, "optionSelections": [{"name": "Title"}]},
  {"productId": "<PIM identifier>", "quantity": 1, "optionSelections": [
    {"name": "Farbe", "values": ["Schwarz"]},
    {"name": "Größe", "values": ["42"]}
  ]}
]}

This sets the structure of the bundle. All other values (price, SKU, media, …) come from the product rows, as for a simple product.

A bundle in the Shopify admin: it can only be edited with the app

Bundle format

Available from: 1.22.0

The row bundleInput|{StoreView} with the format Send Shopify bundle builds the whole bundle, with any number of components. The template has it twice, both deactivated: components from the complex article table, and components from a product reference attribute. A product without components sends nothing, so both rows can be active.

The format Send Shopify bundle
FieldContent
(1) Components fromComplex article table or PIM reference
(2) Link typecomplex article table: the link type of the component rows
Quantity fieldPIM reference, instead of the link type: the quantity attribute on the reference; empty = 1
(3) Variant-building attributesfor variants as components: the attribute that lists the variant-building attributes, the same as for the options (see Products, Variants and Options)
Link type of the variantswhich rows of the complex article table are variants, to tell a variant from a simple product; as delivered No type specification (rows without a link type), the same as in the option formats
(4) PIM identifierthe attribute with the components’ PIM identifier; empty = the record ID, as in the template’s PIM identifier row

The bundle’s title is the product’s label (without one: MISSING_LABEL_<ID>). The components:

  • A simple product is selected with the option Title.
  • A variant is selected as its product, with the variant’s value per option.
  • A product with variants as a whole is skipped, and the job log names it: Shopify would create a bundle variant for each of its values. Use one of its variants instead.

Components from the complex article table

  1. Give the component rows a link type of their own (e.g. Bundle, value range SAWSConnectorLinkTypes).
  2. Select that link type in the format’s field Link type. The quantity is the row’s quantity.
Bundle components in the complex article table with their own link type

Important: the rows with the link type of the variants (as delivered: rows without a link type) are the variants. If the bundle’s components have that link type, the variants row reads them as variants of the bundle.

Components from a product reference attribute

  1. Create a class with a quantity attribute and set it as the reference class of a product reference attribute with multiple selection.
  2. On the bundle, reference the components and enter the quantity on each reference.
  3. Set the reference attribute as the row’s source, and the quantity attribute in the format’s field Quantity field.
Product reference attribute with a reference class
Components of a bundle with the quantity on each reference

Important for every bundle

  • The components must exist in Shopify first. On an empty shop, export the products twice.
  • A bundle created by the transmitter belongs to your app. The Shopify admin shows no list of its components and only offers Edit with your app. Change the components in Contentserv.
  • Option names and values must match the component’s options in Shopify exactly (default language). The bundle format takes them from the same attributes as the options of the component.
  • Select exactly one value per option. Without a value, Shopify creates a bundle variant for every value; these variants have no SKU, and their price is the sum of the component prices.
  • Products that are no bundles must not send any bundle row. The bundle format sends nothing without components; the row with the components per position is skipped while no component is set.
  • Changed quantities, removed components and a narrower option selection reach an existing bundle with the next export.
  • A bundle cannot be a gift card. From 1.22.0 the transmitter leaves the flag out for bundles; up to 1.21, the template’s gift card row is skipped for bundles.

Bundle components per position (for 1.21)

The datamap with legacy rows has one more row bundleInput|{StoreView}, deactivated and noted as Alternative. It takes the components from attributes per position: two components with up to two option selections each. On 1.21, use it instead of the bundle format.

The row has the format Create an array with the bundle’s title and the list of components. Each component is an array of its own: the PIM identifier of the product (1), the quantity (2), and the option selections (3), each with the option name and its value.

The entries of a bundle component in the products datamap

Important:

  • In the template, the entries and their conditions have no attributes yet. Set them for each component you use; the row’s own condition needs the attribute of the first component’s product.
  • On 1.21, also give the gift card row a condition that skips it for bundles, e.g. while the first component’s attribute is filled: the transmitter leaves the flag out for bundles only from 1.22.0.
  • Earlier templates have one row per entry instead, e.g. bundleInput|components|0|productId. They work the same.

Rows of the previous template

The previous template has two bundle rows that take any number of components, deactivated in the datamap with legacy rows. Their option selection is fixed to Title, so they take simple products only as components. Up to 1.21 they are the way to more than two components; from 1.22.0 the bundle format does the same and also takes variants. Use one bundle row only.

Both rows have a condition that marks a product as a bundle. As delivered it compares ObjecttypeID with a placeholder: replace it with the attribute or object type that marks your bundles. The components are set up as for the bundle format (see above), and in the rows:

  • Product reference attribute: set the reference attribute as source. In the loop (Loop for PIM references), select the attribute with the components’ PIM identifier, and the quantity attribute as field on the reference; read both in the loop values.
  • Complex article table: in the row’s Loop for Complex Articles, select the link type in Type of relation, and in the product map the attribute with the component’s PIM identifier.
Bundle row with the product reference loop
Bundle row with the complex article loop and its link type

Important: the reference loop only reads fields on the reference that are selected in its settings. As delivered, none is selected, and the quantity is empty.

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents