Skip to content

Loading Line Sheet Data

In VibeIQ, "line sheet data" refers to item, project-item, and assortment-item data.

The line sheet loader is able to load new entities and update existing entities. The loader is not able to delete items or project-items, but is able to delete assortment-items. If the entity's federatedId is already in use we update the existing entity, and if its a new federatedId we create a new entity.

The line sheet loader is capable of loading items, project-items, and assortment-items, therefore we can have multiple load types when loading line sheet data.

The loader is only able to load data for one project at a time when it comes to project-items and assortment-items.


Loading Items

Required Properties

  • itemFamilyFederatedId
  • itemOptionFederatedId (if option)
  • name
  • optionName (if option)
  • optionGroup (use color as default)

Loading Project Items:

Required Properties

  • itemFamilyFederatedId
  • itemOptionFederatedId (if option)

We also need a way of knowing what project to use. We can do this with either:

  • An assortmentId set in the rows
  • The assortmentSplit property on the load configuration
  • The workspaceIdentifier property on the load configuration

In most cases we are loading all three types at a time and the assortmentSplit property will be utilized.


Loading Assortment Items

Required Properties

  • itemFamilyFederatedId
  • itemOptionFederatedId (if option)

We also need a way of knowing what assortment to use. We can do this with either:

  • An assortmentId set in the rows (this assumes all rows are for the same assortment - for multiple assortments in a file use assortmentSplit)
  • The assortmentSplit property on the load configuration

Loader Configuration

Example 1: Item Only

To load item data the configuration file will need to have the loadType set to ITEM. In the following example we would have a CSV file with the columns 'style', 'colorName', 'styleName', and whatever else is available on the item's type.

Since we set the typePath to 'item:product:apparel', all of the items in the load file will be created as the apparel subtype. This assumes there is an item subtype named product and a product subtype named apparel.

loadType:
  - ITEM
federatedMappings:
  itemFamilyFederatedId: 'style'
  itemOptionFederatedId: 'colorName'
  name: 'styleName'
  optionName: colorName
conditionalColumns:
  - default: item:product:apparel
    toProperty: typePath
  - default: color
    toProperty: optionGroup

Example 2: Project-Item Only

To load project-item data the configuration file will need to have the loadType set to PROJECT_ITEM. In the following example we would have a CSV file with the columns 'STYLE_NUMBER', 'MATERIAL_OPTION_NUMBER', and whatever else is available on the project-item's type.

Since we set the workspaceIdentifier to 'fall:2022', all of the project-items in the load file will be created in the fall 2020 project.

loadType:
  - PROJECT_ITEM
federatedMappings:
  itemFamilyFederatedId: 'STYLE_NUMBER'
  itemOptionFederatedId: 'MATERIAL_OPTION_NUMBER'
workspaceIdentifier: 'fall:2022'

Example 3: Item, Project-Item, Assortment-Item

To load all line sheet entities, the configuration file will need to have the loadType set to [ITEM, PROJECT_ITEM, ASSORTMENT]. In the following example we would have a CSV file with the columns 'style', 'colorName', 'styleName', 'wearer' and whatever else is available on the item, project-item, and assortment-item's types.

Since we set the assortmentSplit property (all assortments must be in the same project), we will use the project associated with the first assortment when creating project-items. We will also use the assortmentSplit property to break up the data into two assortments. In this case we are looking as a field 'wearer' in the row and if it is 'mens' we put the row in assortment1 and if the 'wearer is 'womans' we put the row in assortment2.

loadType:
  - ITEM
  - ASSORTMENT
  - PROJECT_ITEM
federatedMappings:
  itemFamilyFederatedId: 'style'
  itemOptionFederatedId: 'colorName'
  name: 'styleName'
  optionName: colorName
conditionalColumns:
  - default: item:product:apparel
    toProperty: typePath
  - default: color
    toProperty: optionGroup
assortmentSplit:
  fieldToSplitOn: wearer
  values:
  - value: mens
    assortmentId: "assortmentId1"
  - value: womens
    assortmentIdentifier: "assortmentIdentifier2"