Overview
The CSV import is a convenient way for adding and creating multiple parts at once. Furthermore, the CSV import functionality - together with CSV export - can be used for bulk editing of existing parts.
In order to perform a CSV import, a well-structured CSV file with part data is required. A convenient way of getting a valid CSV file template is to create a CSV export and delete the parts data. A CSV export file is always a valid CSV import file.
Standard Columns
Here is an overview of the standard columns that can - and most of them should - be part of every CSV import file.
Column | Mandatory? | Description | Example |
---|---|---|---|
branch | Yes | Defines the part category that this part is assigned to when importing. The category corresponds to the form you would will out when creating the part manually in AMPI. The available categories (or branches) can be looked up in the admin panel under Valid values are the slug values of each branch. | branch = sparepart |
branchIsAdvanced | Yes | Determines whether the simplified or advanced from should be loaded when editing this part. See also Branches | branchIsAdvanced = FALSE |
status | No | Defines the part status that is assigned to this part when created. The available statuses can be looked up in the admin panel under Valid values are the slug values of each status. | status = draft |
author | No | Optional column during import User name of the user that should be assigned as part author. If column is not part of the import file, or value is blank, then the user performing the CSV import will be set as part author | author = xyz@3yourmind.com |
shortId | No | Can be used to match parts in the CSV file with parts in AMPI. If shortId already exists, then CSV import will update the existing part with values from the CSV import instead of creating a new part. | shortId = P-12345 |
values.standard.name | yes | The name of the part. | Name = "Tube connector metal" |
A number of columns are ignored by the CSV import if they are part of the import file. Those columns are
Column | Description |
---|---|
All score columns | Scores are always calculated inside the software, hence ignored during CSV import. |
values.standard.attachments | It is not possible to upload attachments via CSV, therefore this column is ignored. |
stlFile | It is possible to upload 3d files via CSV by matching the CAD model name to the part. |
Custom Property Columns
To import values into custom properties the column names need to match the property configuration in the admin panel. The following naming convention must be followed
variables.<name space>.<variable name>
Example
To import lead time into AMPI you add a column as follows to your CSV:
variables.custom.leadTimeExact
What values are accepted in each column depends on the property type of the respective column. The following table explains what values are expected in relation to the property type.
Property Type | Description | Example |
---|---|---|
Boolean | Fill in values using [TRUE, FALSE] | Qualification Required = TRUE |
Choice | Slug of a choice value. Check the corresponding property in the admin panel to find out the exact slug values available. | Demand frequency = demandOneTime |
Currency | Decimal values with maximum two digits after the decimal point | Current part price = 12.84 |
Files | Attachments cannot be imported into AMPI via CSV | |
Float | Decimal numbers | Min wall thickness = 0.4 |
Integer | Whole numbers, can also be negative | Lead time = 25 |
Multiple-Choice | Slugs of choice values separated by a space " " | Manufacturing method = milling turning sheetMetal |
Size | Size (dimensions) is a special property type in AMPI. Next to the x,y,z dimension you need to provide a shape type s = {sphere, cylinder, cuboid}. | Ex. 1 Ex. 2 Ex. 3 |
String | For text fields simply fill in the text as needed. | Manufacturer = "Company XYZ" |
Bulk Update of Parts in AMPI through CSV Import
A combination of CSV export and CSV import can be used to bulk update parts in AMPI by following these steps:
Run a CSV export to produce a CSV file of the existing parts in AMPI.
Open the CSV export file in any tool capable of reading and editing CSV files.
Modify the values of those parts and columns that you wish to change.
Export the entire changed file to CSV format again.
Run CSV import with the updated CSV file.
The CSV import will match the parts from the CSV import file with existing parts in AMPI based on the
ShortID
column and update the changed values.