Professional Documents
Culture Documents
1. header
2. data
Those two can occur multiple times in an impex file.
Header
Operation: What to do with the following data: There are the following options:
INSERT: Create new Items
INSERT_UPDATE: Create new Items or update existing ones
UPDATE: Update existing items
REMOVE: Remove existing items
Itemtype: What type of items you want to edit (Product, Category, User...)
Attributes All attributes you want to edit separated by semicolons.
OPERATION ITEMTYPE;ATTRIUTE1;ATTRIBUTE2;
With this example that would be:
Data
After the header the data follows. For every attribute in the header you can add data.
Leave the first entry empty (start with a semicolon). Then add the value for each attribute
respecting the order of the attributes in the header.
Format:
;John;Doe;
When an attribute type is not a primitive (string, integer...) but a complex type you need
to define attributes that identify the value you want to set to your attribute. AN
EXAMPLE: If you want to create a price, you will need a currency for the price. Currency
is an own itemtype, so you need to identify the currency by an attribute of the itemtype
currency. Currency has a unique attribute called "isocode". So you use the isocode of
the currency to identify which currency should be used.
EXAMPLE
INSERT PriceRow;...; currency(isocode);
; ; USD ;
Using paranthesis you can add an attribute or a comma separated list of attributes to an
attribute in your header. If you need multiple attributes to identify the target value, the
values of these attributes are separed by colons. You can also nest those expressions
as in your example:
These values need to identify EXACTLY ONE item. Otherwise your script will fail.
Unique values
When using INSERT_UPDATE, UPDATE or REMOVE, you need to identify the items
you want to change. You do that by adding attribute to the header that uniquely identify
the item you want to change. You do that by adding [unique=true] to the attribute. As in
your example: