Installation
Litium Integration kit is distributed as a zip containing two projects to be added to your Litium solution.
- Download integration kit zip
- Add the projects in the zip to your Litium solution in Visual Studio
Integration import files
Product Data Import
Price list import
Stock balance import
Web.config file settings
Try to avoid modifying the file DefaultFileImportBase.cs, this will make it easier to upgrade to new versions of the Integration Kit.
The methods common to all imports should be added to FileImportBase.cs which all Imports inherit from.
General:
- An import-folder for each job is generated when the job executes if it does not already exist.
- Files placed in the import folder are processed in chronological order.
- Sample import files are included in the folder Litium.Integration.Implementation\Samples
- Folders “Error”, “Archive” and “Ignore” are created automatically by jobs as they are needed.
- Successfully imported files are saved in the Archive-folder (except for media files which are removed from disk after import)
- All incomplete files are sent to the “Error” folder
- All unknown files are sent to the “Ignore” folder. For example price list files that does not have the same name as the price list.
The sample product data XML-file has a structured format to handle the base products, variants, price, and inventory information.
All information is in a single structure, to correctly handle the import the price list information is not run before the variant information has been imported.
If you add or delete any element in this file you also need to update the corresponding validation file: ProductDataImport.xsd. The XSD file validates that the XML-file is correct when importing. If a file cannot be validated it is sent to the “Error” folder.
The first step, prior to importing pricelists, is to set them up in Litium Studio. If a price list has not been created in Litium Studio before importing files it will NOT be created automatically, Note! The pricelist Id must be the same as the filename (excluding the extension).
Pricelists are imported as tab-separated text files: Article number (tab) Price (tab) minQuantity.
The first step, prior to importing stock balance, is to set it up in Litium Studio. If a warehouse has not been created in Litium Studio before importing files it will NOT be created automatically and the files will be sent to the “Ignore” folder. Note! The Inventory Id must be the same as the stock balance filename (excluding extension).
Pricelists are imported as tab-separated text files: Article number (tab) Quantity(tab).
Check off below settings in the Web.config file and make the changes needed.
Set the path to the Litium studio Integration Kit folder on your server in appSettings:
<appSettings>
<add key="IntegrationDirectory" value="[YourRootPath]\Src\Files\Integration" />
The Integration service covers four default important tasks:
Product data import - Litium.Integration.Implementation.Imports.ProductDataImport.
MediaArchive import - Litium.Integration.Implementation.Imports.MediaImport
Price list import - Litium.Integration.Implementation.Imports.PriceListImport,
Stock balance import - Litium.Integration.Implementation.Imports.StockBalanceImport
Add these tasks to scheduledTasks in Web.config:
- type – full type name for the task responsible for the integration process
- parameters – not mandatory, can be used to transfer additional data into the task
- startTime - time to start executing the integration task from service start
- interval – interval between executing the task
All default integration values can be changed:
<scheduledTask type="Litium.Integration.Implementation.Imports.ProductDataImport, Litium.Integration.Implementation" parameters="" startTime="04:00" interval="10m" />
<scheduledTask type="Litium.Integration.Implementation.Imports.MediaImport, Litium.Integration.Implementation" parameters="" startTime="04:00" interval="10m" />
<scheduledTask type="Litium.Integration.Implementation.Imports.PriceListImport, Litium.Integration.Implementation" parameters="" startTime="04:00" interval="10m" />
<scheduledTask type="Litium.Integration.Implementation.Imports.StockBalanceImport, Litium.Integration.Implementation" parameters="" startTime="04:00" interval="10m" />