Import codes
Bulk import the following codes into the Transtream database through the Administration App:
- Product data (Data > Products)
- Account codes (Data > Billing Codes)
- Company codes (Data > Billing Codes)
- Cost Centers (Data > Billing Codes)
Adding, removing or editing a code manually in the Administration App updates the database real-time.
Import file structure
Supported are the following file types:
CSV file structure
Make sure your CSV file contains the following:
- The file extension is lowercase .csv, e.g. importFile.csv
- The file content is comma-delimited (,).
- Any field that includes comma (e.g. a Description field) as part of the content must be surrounded by the double quote character (“). Otherwise, the import process will read the comma as a delimiter rather than a character.
- The first row lists column headings that match database entity column names.
- Each data item corresponds to the column heading, and so it has the same column index as the heading.
Code sample
ProductNumber,ProductName,ProductReference1,ProductReference2,ProductReference3 PN-001,SULPHURIC ACID,,, PN-002,METHYL TRICHLOROACETATE,,,
TXT file structure
Make sure your text file contains the following:
- The file extension is lowercase .txt, e.g. importFile.txt
- The file content is pipe-delimited (|).
- Any field that includes pipe (e.g. a Description field) as part of the content must be surrounded by the double quote character (“). Otherwise, the import process will read the pipe as a delimiter rather than a character.
- The first row lists column headings that match database entity column names.
- Each data item corresponds to the column heading, and so it has the same column index as the heading.
Code sample
ProductNumber,ProductName,ProductReference1,ProductReference2,ProductReference3 PN-001|SULPHURIC ACID||| PN-002|METHYL TRICHLOROACETATE
XML file structure
Make sure your XML file contains the following:
- The file extension is lowercase .xml, e.g. importFile.xml.
- All records are surrounded by a top level xml node. This does not have to match the entity name in the database but should be meaningful, and correspod with what's been imported (e.g.
<CompanyCodes>
for company codes). - Each record has a node name that matches the the underlying entity (singular), e.g. for the Products table the node name that describes the record should be called Product.
- Each column heading corresponds to the entity column heading, e.g. the Products.ProductNumber database column should have the xml node name ProductNumber.
Code sample
<AccountCodes> <AccountCode> <Code>AC1</Code> <Description>[XML] Account Code 1</Description> </AccountCode> <AccountCode> <Code>AC2</Code> <Description>[XML] Account Code 2</Description> </AccountCode> </AccountCodes>
Database column names and types
Below listed are column names and data type required for the correct file structure when importing codes into Transtream.
Products
Supported entity column headings and data type for [dbo.Products]
Column Name | Type |
---|---|
ProductNumber | string |
ProductName | string |
ProductReference1 | string |
ProductReference2 | string |
ProductReference3 | string |
Weight | real |
WeightUnitID | int |
ContentCode | string |
ContainerTypeID | int |
QtyPerContainer | int |
HTSUnitOfMeasure | string |
ProductReference3 | string |
HTSScheduleBTariffCode | string |
HTSDescription | string |
HTSWeight | real |
HTSUnitValue | real |
Hazardous | bool |
HazAccessible | bool |
HazDOTIdentifier | string |
HazDOTClass | string |
HazDOTProperShippingName | string |
HazDOTLabelType | string |
HazDOTPackingGroup | string |
HazDOTSubClass | string |
HazDOTSymbols | string |
HazDOTSpecialProvisions | string |
HazDOTPackExceptions | string |
HazDOTPackBulk | string |
HazDOTPackNonBulk | string |
HazDOTPassengerQtyLimits | real |
HazDOTPassengerQtyLimitsUnitID | int |
HazDOTPassengerQtyLimitsForbidden | bool |
HazDOTPassengerQtyLimitsNoLimit | bool |
HazDOTCargoQtyLimits | real |
HazDOTCargoQtyLimitsUnitID | int |
HazDOTCargoQtyLimitsForbidden | bool |
HazDOTCargoQtyLimitsNoLimit | bool |
HazDOTVesselStowageLocation | bool |
HazDOTVesselStowageOther | string |
HazDOTMarinePollutant | bool |
HazDOTSMP | bool |
HazDOTLimitedQty | real |
HazDOTLimitedQtyUnitID | int |
HazDOTReportableQty | real |
HazDOTReportableQtyUnitID | int |
HazDOTCategoryID | int |
HazDOTTechnicalName | string |
HazDOTHazardousShippingMethodID | int |
HazDOTHazardousShippingModeID | int |
HazDOTColumnTwoExceptions | string |
HazDOTSubsiduaryRisk | string |
HazDOTPermitTypeID | int |
HazDOTPermitNumber | string |
HazDOTInhalationHazard | bool |
HazDOTInhalationHazardZone | string |
HazDOTCertificationMethodID | int |
HazDOTPoisonous | bool |
HazDOTConsumerCommodity | bool |
HazDOTIsLimitedQuantity | bool |
HazDOTLabelCodesMask | int |
HazDOTIs500KGExempt | bool |
HazardousPackingInstructions | string |
IsHazSpecialProvisionA1A2A51A109 | bool |
ECCN | string |
CurrencyCodeID | int |
Account Codes
Supported entity column headings and data type for [dbo.Account Codes].
Column Name | Type |
---|---|
Code | int |
Description | string |
Company Codes
Supported entity column headings and data type for [dbo.Company Codes].
Column Name | Type |
---|---|
Code | int |
Description | string |
Cost Centers
Supported entity column headings and data type for [dbo.Cost Centers].
Column Name | Type | Notes |
---|---|---|
ParentCostCenterID | int | Optional. If used, then this must be the ID of any existing cost centers that are in the database. |
Name | string | n/a |
Description | string | n/a |
CostCenterCode | string | n/a |
AccountID | int | Optional. If used, then this must be the ID of any existing accounts in the database. |
Active | bool | 1 or 0 |
AccountNumber | string | Optional. If used, then this must be the account number of any existing accounts in the database. In case of duplicate accounts, the first one is used. |
ParentCostCenterCode | string | Optional. If used, then this must be either the code of a cost center that already exists in the database OR a cost center code that forms part of the import. If part of the import, then it must be imported before any referring row (so place parent cost centers at the top of your import). |

- Product Codes gives an overview on configuring product codes in Administration App.