External Catalog Import



The OCS applications have the ability to load an external catalog from file. To do this the external catalog must be in a certain format. This format could be provided by the supplier or may have to be converted using a conversion tool/script/program. 

This document only deals with the format of the external catalog file but not the External Catalog functionality.


Interface Script

The external catalog file format follows the standard OCS file format guidelines. Refer to the "OCS Standard File Format Guidelines" knowledge base article for this information.

The external catalog can hold many different repeating pieces of information about a catalog item such as multiple lines of description, multiple cross references and multiple supersessions. Because of this each item in the external catalog must have  several different sections in the file to contain this information. Each line in the record will relate to 1 section only with only the fields relevant for that section to have data in it (although the common section must always be filled out). This will be clearly demonstrated in the examples below.

Unless otherwise indicated all fields left justified, alphanumeric and are mandatory. Fields indicated numeric are Right Justified and the length includes the number of decimal places and the decimal point. All date fields are in the format CCYYMMDD. All fields are uppercase characters (OCS will convert them to uppercase without reporting an error if required).

The format of the file is:

Field Length Comments
Common Section
Supplier 8 This is the provider of the external catalog, Generally referred to as the supplier. It will be the same for every record in the file.

NOTE: Even though this document refers to the provider of the catalog as the supplier it may be either a supplier or manufacturer that has supplied the external catalog.

This code must exist in the OCS manufacturer/supplier maintenance screen. 

If this is a true supplier then the supplier code must exist the the OCS supplier master table.

Manufacturer 60 The manufacturer that the part number relates to. 

NOTE: Even though this document refers to the parts manufacturer it may actually just be a supplier who has given a new part number to the item.

This manufacturer after conversion must exist in the OCS manufacturer/supplier maintenance screen. 

PartNumber 40 The part number.
Item Section
ShortDescription 45 Short Description of the part.
Unit 60 The unit of the part which after conversion must exist in the OCS unit code maintenance screen.
UnitCost 14 The Unit price of the part. Numeric with 4 decimal places. Can be 0 in which case prices will not be imported.
PriceDate 8 The date the price was set. If left blank then this will default to the day the import is run. Date Field. Optional Field.
Description Section
Sequence 2 Numeric Field. This section defines additional lines of description about the part. These rows must appear in sequence for the item starting form 1 and incrementing by 1 for each new line.
Description 40 The additional line of description
Cross Reference Section (ie. colloquial names, alternate names etc.)
CrossReferenceCode 2 The cross reference type. Must exist in the OCS catalog cross reference type maintenance screen.
CrossReference 40 The actual value for the cross reference. (ie. The colloquial)
Supersession Section
PartNumber 40 The part number for the new supersession
Quantity 14 Numeric with 4 decimal places.


Both the manufacturer code and unit code will go through a conversion by looking up the conversion table for the supplier of the external catalog. This lookup is done using either the manufacturer/supplier maintenance screen conversion tab or the supplier maintenance screen conversion tab if the supplier of the catalog is defined as a supplier in OCS. If the code is not found then no conversion is performed otherwise the code is converted before validating or importing it. Eg. A supplier unit codes for box may be BX whereas the OCS code had been defined as BOX.


Error Reporting

The catalog import will validate the file and not import anything if any error is found. The file will be rewritten with an additional error column explaining the error for that line. It may insert additional rows where more than 1 error has occurred. The errors must be fixed before an import can be successfully completed. The data file may be re-imported with or without the error columns remaining. The external catalog file will be validated again.


External Catalog File Rules

The external catalog may either be the suppliers full external catalog or just a partial external catalog. A partial catalog is one which only contains some of the suppliers parts. The user running the catalog import must know whether it is a full or partial catalog.

Only one suppliers catalog may be contained in the same file. In general separate files will be provided by each supplier and should be kept separate to avoid potential mixing of partial and full catalog's prior to import. This also means the manuf_supp_code field can be simply populated with the valid supplier code prior to import.

The sections for a part must be in the order defined above. 

Only the item section is mandatory, all other sections are optional.



All examples shown here use the standard OCS comma delimited format.