Wonach suchst Du?
What are you looking for?

How do I add an import format?

Overview

By means of an import format, you can specify which data, or rather columns, from an import file are to be transferred, how these columns are named and delimited (separators), and into which database tables the import data are to be taken over.

Which columns you can choose from when adding an import format depends on the DB table that is linked to the format. As a system administrator, you can adapt, modify and extend this database table by adding custom fields to the import format.

The following data can be imported to metasfresh:

Steps

Add Import Format

  1. Open “Import Format” from the menu.
  2. Add a new import format.
  3. Give the import format a Name.
  4. Select the appropriate Table where the data are to be imported, e.g., Import Business Partner for business partners, Import Product for products, etc. (see overview table here).
  5. Select a Format (separator), e.g., Tab Separated.

    Note: In order to successfully import data, the separator in the import file must coincide with the one set in the import format (comma, semicolon, tab, etc.).

  6. Optional: Tick the checkbox IsManualImport if you want to import the data manually. Otherwise, they will be processed automatically unless an error occurs.

a) Add Format Fields

  1. Go to the record tab “Format Field” at the bottom of the page and click "Add new". An overlay window opens up.
  2. Give the format field a Name, e.g., “Search Key”.
  3. Pick a Column where the content of the import file is to be transferred later on, e.g., Value_Suchschlüssel.
  4. Select a Data Type, e.g., String or Number, depending on the import data type.
  5. Define a Data Format, where necessary (e.g., dd.MM.yyyy for the data type Date).

    Note: You can learn more about date and time patterns here.

  6. Enter a Start No.

    Note: The start number determines the position where a column is expected by metasfresh in the import file during import. It has nothing to do with the order (SeqNo) in which the format fields were added to the import format. It is therefore not necessary that the fields are placed in a fixed and ascending order, as long as the start numbers coincide with the column positions in the import file.

  7. Click “Done” to close the overlay window and add the format field to the list.

    Note: Repeat steps 1 to 6 to add further format fields.

b) Copy Format Fields

If you want to add a new import format with the same format fields as an existing format, you can very easily copy the format fields from the existing import format into the new one via the actions menu. To do so, please proceed as follows:

  1. Add a new import format as described above in steps 1 to 5.
  2. Start the action “Copy Lines”. An overlay window opens up.
  3. Select the appropriate Import Format from which you want to copy the format fields.

    Note: In order to successfully copy the format fields from an existing import format, the new format must be configured with the exact same DB table as the existing one.

  4. Click “Start” to copy the format fields and close the overlay window.

Next Steps

Example


View source file on GitHub.com