Table of contents
Overview
This article explains how to import service contracts when the external support mode is activated.
If you only use Octopus to provide internal support, refer to the Import Service Contracts - Internal Mode article.
When the external support mode is activated, some fields will become mandatory (the "ExternalSupport" column, the site or supplier).
References
- Import Service Contracts - Internal Mode
- Import CI Covered by a Service Contract
- XML Configuration File
- Back to main page for DataImporter
- Backto the Import Source Specification list
The reference template files (.xlsx et .xml) to prepare imports are included in the ServiceContract.zip file.
Required Fields
- Number - Text (50)
- Represents the contract number
- Can contain letters or numbers
- The number does not need to be unique
- Type - Text (100)
- Service contract type (Parts and Labour, Maintenance, Extended Warranty, etc.)
- If the type does not already exist, it will be created during import
- The service contract type can be configured from the Tools > Reference Data Management > General > Service contract types menu
- StartDate - Date and Time
- Represents the contract start date
- The date format must be compatible with the server settings; YYYY-MM-DD
- EndDate - Date and Time
- Represents the contract end date and must be greater then the start date
- The date format must be compatible with the server settings; YYYY-MM-DD
- IsExternalSupport - Boolean
- Indicates if the service contract is external (sold) or internal (bought)
- Accepted values are: 1 or 0, Vrai or Faux, True or False, Yes or No
- Site - Text (500)
- The site field is mandatory if it's for a service contract that was sold (ExternalSupport is at 1 or True)
- To specify sub-sites, use the pipe key "|" to separate the hierarchy
- The site can be configured from the Tools > Reference data management... > General > Sites menu
Optional Fields
- IsRenewed – Boolean
- Indicates that a contract has been renewed.
- Accepted values are: 1 or 0, True or False, Yes or No.
- By default, if this field is not filled, it will not be activated during creation and will stay as is during update.
- PurchaseOrderNumber - Text(50)
- Cost – Decimal
- The value must be between 0 and 9 999 999.99
- Example : 1234567.89
- CostCenter - Text (50)
- Represents the cost center
- Description - Text(5000)
- Service contract description
- A part of this description will be displayed in the CI file
- Note - Text (5000)
- Service contract note tab
- This field replaces the existing data at each import. The program does not add the information, but replaces it
Configuration File (XML)
The declaration of the source is done by indicating the ServiceContract value in the <Content> tag.
<?xml version="1.0" encoding="utf-8" ?> <Sources> <Source Name="Import External Service Contract"> <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\import\ServiceContract.xlsx;Extended Properties="Excel 12.0 xml;HDR=Yes;";</ConnectionString> <ViewName>[Import ExternalContract$]</ViewName> <Content>ServiceContract</Content> </Source> </Sources>
To explain the tags used in all types and to find out more about the types of files, please refer to the XMLConfiguration File article
Information on Additional Tags
To import service contracts, 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>
Thank you, your message has been sent.