DataImporter - Import suppliers

Table of contents

Overview

This article explains how to import suppliers and manufacturers. 
In the next section you will find links to articles related to supplier imports and files with templates that can be used for it.

References

 

What you need to know:

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

Required Field

  • Name - Text (500)
    • Supplier name

Optional Fields

  • Number - Text (100)
  • 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
    • This field replaces the existing data at each import. The program does not add the information, but replaces it
  • Alias - Text (500)
    • Contains an alias list refering to manufacturers or suppliers.
    • Each alias must be separated by a vertical bar ("|", also known as pipe).
    • Future imports (DataImporter, WMI) referring to an alias will instead use the principal name.
    • If an alias specified already exists as a standalone manufacturer/supplier, data will have to be manually merged using the reference data management.

Configuration File (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. 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

 

<?xml version="1.0" encoding="utf-8" ?>

<Sources>

     <Source Name="Import Supplier">

          <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Import\Supplier_Contact.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>

          <ViewName>[Imp_Supplier$]</ViewName>

          <Content>Business</Content>

          <EmptyValueHandling>NoChange</EmptyValueHandling>

     </Source>

</Sources>

Information on Additional Tags

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

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








Help us improve our articles