Loading Line Sheet Data¶
In VibeIQ, "line sheet data" refers to Item
, ProjectItem
, and AssortmentItem
data.
Item
:Item
data is global and exists outside the context of aProject
.Item
s can also be part of a Family, as indicated by a single Family Item. Families can have Options, which are variations of the FamilyItem
. In other terms, you could think of this as Product (Family) vs Colorway (Option).
ProjectItem
:ProjectItem
data is specific to an Item as it exists in aProject
.- This is typically considered as seasonal data and can change season over season.
- If an
Item
is carried over into a following season, the data from the prior season, as represented byProjectItem
, will not necessarily be the same.
AssortmentItem
:AssortmentItem
data is specific to anItem
as it exists within anAssortment
and aProject
.- An item can exist within many different
Assortments
in a singleProject
. - Organizing your regions into many
Assortments
is an example of this.
- An item can exist within many different
Despite this hierarchical structure: Item
(Global) > ProjectItem
(Seasonal) > AssortmentItem
(Grouping/Regional), the load file for this structure remains tabular-CSV. This is possible because a single property key should not be shared across more than one of these three entities. An important note, the loader is only able to load data for one Project
at a time when it comes to ProjectItem
s and AssortmentItem
s.
Loading Items¶
Required Properties¶
In your load file, you must provide the following properties for each row. These may be the CSV column headers or usage of federatedMappings
or conditionalColumns
in the loader configuration to match these keys.
Loading an Item Option for a Family:¶
itemFamilyFederatedId
: The federatedId of the Item Option's Family Item.name
: The name of the Item Option's Family Item.itemOptionFederatedId
The federatedId of the Item Option.optionName
: The name of the Item Option itself.
Upon load, the loader will search for an Item Option by itemOptionFederatedId
. If one does not exist, a new Item will be created and assigned to the Item Family that has federatedId
of itemFamilyFederatedId
. If that Item Family does not exist, it will be created as well.
name
and optionName
will be updated on the Family and Option Items, respectively, if they already exist. Therefore, it's critical that name
and optionName
remain consistent across subsequent loads of the same Items.
loadType:
- ITEM
federatedMappings:
itemFamilyFederatedId: 'style'
itemOptionFederatedId: 'colorName'
name: 'styleName'
optionName: colorName
conditionalColumns:
- default: item:product:apparel
toProperty: typePath
- default: color
toProperty: optionGroup
{
"loadType": ["ITEM"],
"federatedMappings": {
"itemFamilyFederatedId": "style",
"itemOptionFederatedId": "colorName",
"name": "styleName",
"optionName": "colorName"
},
"conditionalColumns": [
{
"default": "item:product:apparel",
"toProperty": "typePath"
},
{
"default": "color",
"toProperty": "optionGroup"
}
]
}
Loading Only an Item Family¶
itemFamilyFederatedId
: The federatedId of the Item Option's Family Item.name
: The name of the Item Option's Family Item.
Upon load, the loader will search for an Item Family by itemFamilyFederatedId
. If one does not exist, a new Item will be created.
name
will be updated on the Family Item if it already exists. Therefore, it's critical that name
remains consistent across subsequent loads of the same Items.
loadType:
- ITEM
federatedMappings:
itemFamilyFederatedId: 'style'
name: 'styleName'
conditionalColumns:
- default: item:product:apparel
toProperty: typePath
- default: color
toProperty: optionGroup
{
"loadType": ["ITEM"],
"federatedMappings": {
"itemFamilyFederatedId": "style",
"name": "styleName",
},
"conditionalColumns": [
{
"default": "item:product:apparel",
"toProperty": "typePath"
},
{
"default": "color",
"toProperty": "optionGroup"
}
]
}
Loading ProjectItems:¶
Required Properties¶
Loading ProjectItem
s means taking a list of Item
s and inserting them into a Project
. An Item
's existence in an Project
is determined by the existence of a ProjectItem
entity.
To load ProjectItems, you must specify the federatedId
s for the Item
s you want to load into a Project
. There are
two different ways you can identify this Project
to load these Item
s into:
- Using Assortment Parameters (i.e.
assortmentSplit
) if you are also loading into anAssortment
. Since Assortments live withinProjects
, the loader will automatically identify and select theProject
from the specifiedAssortment
. See the "Loading AssortmentItem" section for more information. - Using the
workspaceIdentifier
if you are only loadingItem
s into aProject
and not also loading them into anAssortment
. Specify the user-definedidentifier
for theProject
. You may find and manage this in the Hub UI's Project view. Click the "hamburger menu" icon to the right of the project name, select "Configure Project", and view theProject
'sidentifier
property.
Example loading just into a Project
, without an Assortment
load (with workspaceIdentifier
):
loadType:
- ITEM
- PROJECT_ITEM
federatedMappings:
itemFamilyFederatedId: 'STYLE_NUMBER'
name: 'STYLE_NAME'
itemOptionFederatedId: 'MATERIAL_OPTION_NUMBER'
itemOption: 'MATERIAL_OPTION_NAME'
workspaceIdentifier: 'fall:2022'
{
"loadType": ["ITEM", "PROJECT_ITEM"],
"federatedMappings": {
"itemFamilyFederatedId": "STYLE_NUMBER",
"name": "STYLE_NAME",
"itemOptionFederatedId": "MATERIAL_OPTION_NUMBER",
"itemOption": "MATERIAL_OPTION_NAME"
},
"workspaceIdentifier": "fall:2022"
}
Loading AssortmentItems¶
Required Properties¶
Loading AssortmentItem
s means taking a list of Item
s and inserting them into an Assortment
. An Item
's existence in an Assortment
is specified by the existence of an AssortmentItem
entity. If you have included PROJECT_ITEM
in your loadType
parameter, the selected Project
that will be loaded into
will be automatically selected by the loader. The Project
in which the Assortment
lives in will be selected.
There are two types of AssortmentItem
loads:
Full Assortment Load (default)¶
When performing a full load, the entire state of the Assortment
's Item
s will match the load file. This means that any Item
s not in the load file will be removed from the Assortment
.
Using the parameters below, you may use the Assortment
's ID or Identifier to dictate the Assortment
to load into.
assortmentId
: The ID of theAssortment
to load into.assortmentIdentifier
: The identifier of theAssortment
to load into. This is an internal property and is not theAssortment
Name.assortmentSplit
: An object allowing you to conditionally split theItem
s in the load file across multipleAssortment
s.fieldToSplitOn
: The column name in the load file to use for splitting.values
: An array of objects specifying the value to split on and theAssortment
to load into.value
: The value in thefieldToSplitOn
column to split on. Example"mens"
.assortmentId
: The ID of theAssortment
to load any rows withvalue
matching in columnfieldToSplitOn
.assortmentIdentifier
: The identifier of theAssortment
to load any rows withvalue
matching in columnfieldToSplitOn
.- This may be combined with
assortmentId
only within theassortmentSplit
object.
- This may be combined with
Example with assortmentId
:¶
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
assortmentId: "assortmentId1"
# assortmentIdentifier: "assortmentIdentifier2" # this may be used interchangeably with assortmentId
{
"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"
}
],
"assortmentId": "assortmentId1"
// "assortmentIdentifier": "assortmentIdentifier2" // this may be used interchangeably with assortmentId
}
Example with assortmentSplit
:¶
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"
{
"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"
}
]
}
}
Partial Assortment Load¶
To add Item
sto an Assortment without removing existing Item
s that do not exist in the load file, you may do so with a few properties
within assortmentSplit
. With them, you can either add or remove Item
s from an Assortment without requiring the entire
Assortment's state on-hand while doing the load.
assortmentSplit
partialAssortmentUpdate?
: An optional boolean property indicating whether you want to perform a partial update on the Assortment instead of a full update.- Set this to
true
if you want to append theItem
s in the load file to the assortment(s). - Set this to
false
or omit it if you want to perform a full update on the Assortment.
- Set this to
addField?
: An optional string property where if a value exists in the column of this name, the row will be added to the Assortment. Expected values in the CSV aretrue
,false
, or empty''
.dropField?
: An optional string property where if a value exists in the column of this name, the row will be dropped from the Assortment. Expected values in the CSV aretrue
,false
, or empty''
.fieldToSplitOn
: The column name in the load file to use for splitting.values
: An array of objects specifying the value to split on and the Assortment to load into.value
: The value in thefieldToSplitOn
column to split on. Example"mens"
.assortmentId
: The ID of the Assortment to load any rows withvalue
matching in columnfieldToSplitOn
.assortmentIdentifier
: The identifier of the Assortment to load any rows withvalue
matching in columnfieldToSplitOn
.- This may be combined with
assortmentId
only within theassortmentSplit
object.
- This may be combined with
Example with partialAssortmentUpdate
:¶
loadType:
- ITEM
- PROJECT_ITEM
- ASSORTMENT
assortmentSplit:
partialAssortmentUpdate: true
addField: addItem
dropField: dropItem
fieldToSplitOn: season
values:
- value: "spring"
assortmentId: "someAssortmentId"
{
"loadType": [
"ITEM",
"PROJECT_ITEM",
"ASSORTMENT"
],
"assortmentSplit": {
"partialAssortmentUpdate": true,
"addField": "addItem",
"dropField": "dropItem",
"fieldToSplitOn": "season",
"values": [
{
"value": "spring",
"assortmentId": "someAssortmentId"
}
]
}
}