DataImporter - Import suppliers

SHOW ALL CONTENT

Table of contents

Overview

This article explains how to import suppliers and manufacturers. 

References

 

What you need to know:

The reference template files (.xlsx et .xml) to prepare imports are included in the Suppliers_Contacts.zip file.

Required Field

  • Name - Text (500)
    • Supplier name.

Optional Fields

  • Number - Text (100)
  • IsActive - Boolean
    • Indicates if the manufacturer is active or not.
    • Accepted values are: 1 or 0, Vrai or Faux, True or False, Yes or No.

  • IsAManufacturer - Boolean
    • Indicates if it is a manufacturer and if it is also a supplier.
    • If the manufacturer field is at 0 (or False or No), then this field becomes mandatory and must be at 1 (or True or Yes).
    • Accepted values are: 1 or 0, Vrai or Faux, True or False, Yes or No.
  • IsASupplier - Boolean
    • Indicates if it is a supplier or if it is also a manufacturer.
    • If the supplier field is at 0 (or False or No), then this field becomes mandatory and must be at 1 (or True or Yes).
    • Accepted values are: 1 or 0, Vrai or Faux, True or False, Yes or No.
  • Address - Text (500)
  • Telephone - Text (50)
  • Fax - Text (50)
  • WebSite - Text (250)
  • Email - Text (320)
    • The address must be in a valid format, namely, contain a @ and a period (.) in a com, .ca, .gouv.qc.ca, etc.
  • Note - Text (5000)
    • Supplier note tab.
WARNING: The information in this field is overwritten with each import. So you have to make sure that all the information is there.
  • Alias - Text (500)
    • Contains an alias list refering to manufacturers or suppliers.
    • Each alias must be separated by a pipe ( | ).
    • Future imports (DataImporter, WMI) referring to an alias will instead use the name.
    • If an alias specified already exists as a standalone manufacturer/supplier, data will have to be manually merged from the Tools > Reference data management > General > Manufacturers menu. 
What you need to know:

To import an Alias, you must separate each alias in the field by the "|" (pipe) character, respecting the following format:

Alias | Alias1 | Alias2 | Allias3 and so on.

All aliases will therefore be imported with the same field in Excel, Access or another ODBC source. The system will create aliases if they do not exist.

Example: Octopus | Octopus-itsm | Octopus-esi-itsm

Configuration File (Suppliers.xml)

The declaration of the source is done by indicating the Business value in the <Content> tag. 

NOTE: The XML file used as this example is for an import done from Excel 2007 or 2010. 
<?xml version="1.0" encoding="utf-8" ?>
<Sources>
    <Source Name="Import Supplier">
<ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Import\Suppliers_Contacts.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>
<ViewName>[Suppliers$]</ViewName> 
<Content>Business</Content>

<!-- Additional Tags -->
    <EmptyValueHandling>NoChange</EmptyValueHandling>
    </Source>
</Sources>

To explain the tags used in all types and to find out more about the types of files, please refer to the XML Configuration File article

Information on Additional Tags

To import suppliers, the XML file can contain one additional tag. This tag is not mandatory and if it's not specified, the default value will be used. 

What you need to know:

The additional tags are case sensitive.

If the value is not written exactly the way it is documented, Octopus will ignore the tag and use to the default value. 

Management of Empty Fields

DataImporter can help clean the data contained in Octopus when empty fields are encountered. If this tag is not present, the NoChange default value will be used. 
If you want to use this tag as part of an import, it is important that your data source only contain columns to act on. DataImporter will systematically try to clean all these columns. You can clean all fields except:

  • Required fields
  • Fields that have been configured as mandatory in the Octopus database
  • Fields that accept only specific values, for example boolean type fields (yes/no)

Permitted values for the EmptyValueHandling tag:

  • Clear: The existing value in Octopus will be cleared and the field will be empty
  • NoChange (Default Value): Fields that are empty in the data source being imported will be ignored and the existing value in Octopus will be kept

To use this tag, add the following line to the XML file: 

<EmptyValueHandling>VALUE</EmptyValueHandling>
X
Help us improve our articles