What Is A Hierarchical File?

A hierarchical import file is a way of containing lots of different types of data within the same file. For example, where a flat-file (spreadsheet) can only contain products and sections (see How Does Importing Work?), a hierarchical file can contain sections, products, components, attributes and choices - as well as custom properties, customer data and shipping data.

Hierarchical files are generated by an export in Actinic (see Exporting Store Data) and are most commonly used to transfer data from one Actinic application to another.

They are structured in a very specific way. The first part of the file is made up of header records. They look something like this:

Header:Section

Section name

Section description

Section image

 

Header:Product

Product reference

Short description

Full description

Price

The 'Header:' field at the beginning indicates that it is a 'Header' row and that the list of fields to follow relate to a certain type of information. For instance, in the case of 'Header:Product', this tells you that it is a header row, and the fields that follow it are field headings that relate to products.

Following the header row is then a list of the fields that you have chosen to import.

The actual data is then listed row by row underneath these header rows, in the order that you want it to appear in Actinic. For example:

Section

Office Supplies

A fine selection of office products

office_supplies.gif

 

Product

12

Office Chair

A fine office chair

5000

Product

13

Wall Clock

Tell the time with this clock

1250

End

Section

 

 

 

The above fields will create a section called 'Office Supplies' that contains two products - 'Office Chair' and 'Wall Clock'. Notice how the fields in the main body begin with the words 'Section' or Product' depending on what type of data it is - this relates directly to the 'Header:' fields at the top of the import file. The actual data then follows, with the fields matching up exactly to the correct field headings in the header rows.

You can then build a file structure, row by row, item by item, with the data records matching up to the field headings in the header rows.

·      More detailed requirements for hierarchical importing can be found in Importing From A Hierarchical File.

·      A complete list of all the fields you can import is in Valid Fields in Hierarchical Files.

Hierarchical Importing the following to be imported (ideally in the order listed below):

·      Brochure pages and fragments

·      Customer Groups (Actinic Business/Designer only)

·      Sections

·      Products

·      Customer Group Prices (Actinic Business/Designer only)

·      Components

·      Attributes

·      Choices

·      Permutations

·      Shipping Zones, Classes and Rates

·      Searchable Properties (Actinic Business/Designer only)

·      Customer Accounts, addresses and buyers (Actinic Business/Designer only)

Example files

There are some example files within the 'Common' folder in your site folder to show you what a hierarchical import file looks like. These are:

·      SampleCustomerImportFile.txt - This shows the structure for importing customer accounts (Actinic Business/Designer only).

·      SampleHierarchicalBusinessImportFile.txt - This shows you an example content tree ready for importing into Actinic Business/Designer. This includes values for the attribute 'Type' field and the custom property 'Use as CUSTOMVAR' field.

·      SampleHierarchicalCatalogImportFile. txt - This shows you an example content tree ready for importing into Actinic Catalog.

·      SampleBrochureImportFile.txt - This shows the structure for importing nothing but brochure pages and fragments via a hierarchical import.

Note: The best way to understand how hierarchical files are structured is to export your current data and then examine the structure of the file. See Exporting Store Data for more.