DataImporter - Import Supplier Contacts

SHOW ALL CONTENT

Table of contents

Overview

Importing contacts will add information related to the contact of a supplier.

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 (100)
    • Contact last name

Optional Fields

  • FirstName - Text (100)
    • Contact first name
  • IsActive
    • Indicates if the contact is active or not.
    • Accepted values are: 1 or 0, Vrai or Faux, True or False, Yes or No.

  • Title - Text (100)
    • Contact title
  • Address - Text (500)
    • Contact postal address
    • It is possible to enter the full address on several lines in this field or use the individual fields to do so.
  • City
  • State
  • PostalCode
  • Country
  • OfficePhone - Text (50)
    • Contact phone
  • PhoneExtension - Text (50)
    • Contact phone extension
  • CellPhone - Text (50)
    • Contact cell phone
  • Pager - Text (50)
    • Contact pager
  • Fax - Text (50)
    • Contact fax
  • Company - Text (250)
    • Represents the name of the supplier or manufacturer associated to the contact
    • The system will create the supplier during import if it does not already exist
    • This information is related to the supplier module. For more information, refer to the Import suppliers article
  • 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)
    • This field allows to import additional information that cannot be linked to a field in the contact file
    • This field replaces the existing data at each import. The program does not add the information, but replaces it
WARNING: The information in this field is overwritten with each import. So you have to make sure that all the information is there.
  • Language
    • Accepted values are: English, French or Portuguese.

    • By default, if this field is not filled, it will be configured with the database default language.

Configuration File (Contacts.xml)

The declaration of the source is done by indicating the Contact 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 Contact">
<ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\Import\Suppliers_Contacts.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>
<ViewName>[Contacts$]</ViewName> 
<Content>Contact</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 supplier contacts, 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 exept:

  • 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