Productsup

Split parent items to create product variants with the Split Variants data service

Split parent attributes to create product variants using the Split Variants data service in Productsup.

Introduction

If a product attribute in your feed contains all product variants, such as sizes or colors, in one (1) row, you can split these product variants into separate rows using the Split Variants data service.

The Split Variants data service is only available for the import stage.

For example, the following feed contains the size attribute that stores all sizes of each product in the same row, separated by a comma:

parent_idsizetitle
1XS,S,Lt-shirt
2XS,Mpolo shirt

After applying the Split Variants data source with the Mutliply Variants mode, each size takes a separate row, and the feed looks as follows:

parent_idsizetitle
1XSt-shirt
1St-shirt
1Lt-shirt
2XSpolo shirt
2Mpolo shirt

The Split Variants data service creates more rows in your feed, increasing the number of imported and maintained products.

This service is the opposite of the Merge Variants data service. See Combine product variants into one parent item with the Merge Variants data service.

Prerequisites

To set up the Split Variants data service, you need:

  1. A unique item identifier. See Set a unique item identifier.
  2. Products in your feed that contain variants in one of their attributes.

Add the Split Variants data service

Go to Data Services from your site's main menu and select ADD SERVICE.

Search for Split Variants and select Add. UUID-5bdc9edf-6007-a034-8ed3-522d0e2feb66

Give the service a desired name and column prefix, and select Add.

By default, ___service_split is the column prefix.

Select Add Split Column.

Select the column that you want to split in Source Columns. The source column is typically the parent_id or the item_group_id attribute.

In Delimiter, enter the character that currently separates the values in the source column.

In Split mode, select from one of the options. See Set up split modes for more information.

Select Save. UUID-eeb1a757-140b-3ac9-08f9-defabf5dc8a0

To run the data service, select Import in the top-right corner of your site's view.

Set up split modes

You can select from three (3) different modes to split your product variants:

  • Multiply Variants mode creates separate rows for each product variant.
  • Aggregate Variants mode creates separate rows for each product variant combining values from different columns according to their position in a row.
  • Static Variants appends and/or prepends static strings to the attribute values creating a new row for each added variant.

Multiply Variants split mode

The Multiply Variants split mode lets you select one (1) or more source attributes to split them into new rows with all possible combinations of product variants.

For example, you have the following feed:

idsizecolor
123S,M,Lblue,red

To split product variants of products by sizes and colors into separate rows, use the following setup:

  1. Select Add Split Column.
  2. Select size and color in Source Columns and enter a comma (,) in Delimiter.

    Using Multiple Variants, you must add one (1) or several columns in Source Columns.

  3. Select Multiply Variants in Split mode. UUID-dfc2c564-d52f-4835-25cf-0f7186871c2a
  4. Select Import in the top-right corner of your site's view to let the platform split the product variants into separate rows as follows:
    idsizecolor
    123Sred
    123Mred
    123Lred
    123Sblue
    123Mblue
    123Lblue

Aggregate Variants split mode

The Aggregate Variants split mode lets you split two (2) or more columns into separate product variant rows combining values by their position in the source columns.

For example, you have the following feed:

idcountryfood
123France,Germany,United Kingdomcheese,sausage,pudding

To split variants of products into separate rows where each row contains a country and its corresponding food, use the following setup:

  1. Select Add Split Column.
  2. Select country and food in Source Columns and enter a comma (,) in Delimiter.

    Using Aggregate Variants, you must add at least two (2) columns in Source Columns.

  3. Select Aggregate Variants in Split mode. UUID-d9c83afc-5af5-bd60-b91c-49f27c8563de
  4. Select Import in the top-right corner of your site's view to let the platform split the product variants into separate rows as follows:
    idsizecolor
    123Francecheese
    123Germanysausage
    123United Kingdompudding

Static Variants split mode

The Static Variants split mode lets you append and/or prepend static variants to the attribute values creating a new row for each variant.

For example, you have the following feed:

idtitle
123My product is the best

To append the static variants Alpha, Bravo, and Charlie to the title attribute, use the following setup:

  1. Select Add Split Column.
  2. Select title in Source Columns.

    The Static Variants split mode is only available if you select one (1) column in Source Columns.

  3. Select Static Variants in Split mode. UUID-d9c83afc-5af5-bd60-b91c-49f27c8563de
  4. Enter variants separated by a comma in Comma separated list of variants.
  5. In Variant Format, enter how you want the data service to add your variants to the attribute. By default, the value is {{ value }} {{ variant }}, which means that your variant appears after the title value.
  6. Select Save. UUID-bf4da1b1-b85b-e4b7-757f-d24a700fa562
  7. Select Import in the top-right corner of your site's view to let the platform split the product variants into separate rows as follows:
    idtitle
    123My product is the best Alpha
    123My product is the best Bravo
    123My product is the best Charlie

Edit the Split Variants data service

Go to Data Services from your site's main menu.

Search for your data service.

Select the cogwheel icon () next to the desired data service to edit settings.

Select Save.

Delete the Split Variants data service

Go to Data Services from your site's main menu.

Select the cogwheel icon UUID-e19d1a4d-9ea0-6607-b841-3cd22c1101e2 next to the desired data service.

In the Danger Area panel, select Remove this service.

Select Yes.

How is this guide?

On this page