= Importing package numbers from shipping service providers
:lang: en
include::{includedir}/_header.adoc[]
:keywords: ElasticSync, Import, orders, Best Practice, automated, package numbers, shipping service provider
:position: 110
:id: NG7LSRE
:author: team-fulfillment

[#import-package-numbers]
== Importing package numbers from shipping service providers

This chapter describes how you can use the *import tool* to import package numbers for orders that are processed by your shipping service providers into your plentymarkets system. Usually, the shipping service provider provides a .csv or txt file which contains the order ID and the package number.

=== Creating the import via the import tool

To import the package numbers, go to *Data » Import* and create a new import of the type *Order*.

[TIP]
.Creating a new import
====
To ensure effective cooperation with your shipping service provider, we recommend that you create a separate import for importing package numbers and only use this import for this purpose. If the fields described below are added to an existing import, wrong mapping and malfunctions are likely to occur.
====

* It is mandatory that the matching is carried out via the *Order ID*. It is not necessary to add further matching fields.

* Add a new *Mapping* for the package number. Select the mapping field *Package number* as well as an option for the *Standard package*.

* Within the *Standard package* mapping, select the name of the column whose values should be imported from the source file.

* In the *Settings* area, select the *Source* that you use to import the file from the shipping service provider.

* *Save* the settings.

After carrying out and saving the settings, go to *Data » Import » [open the import] » Tab: Matching* and test the import. Once the *package number* has been successfully imported. it is displayed in the *Settings* tab of the respective order.

[#import-sync-file-template]
== Importing the import file template

To make it easier for you, we prepared an import template for the package number import for you. You can simply import the import file in the *Data » Import* menu.

[#download-sync-file-template]
=== Downloading the import file template

Download the import file by clicking on the following link: link:https://cdn02.plentymarkets.com/pmsbpnokwu6a/frontend/ElasticSync_BestPractice/Paketnummernimport.json.zip[Download import file^]{nbsp}icon:external-link[].

Please read the chapter about the <<data/importing-data/ElasticSync#1640, import and export>> on the <<data/importing-data/ElasticSync#, Using the import tool>> page of the manual. In this chapter, it is described how to import an import file.

Pay attention to the following information:

* During import, you will receive an error message that the client deviates from your client. This is why we created the import file in our test system. You can ignore this error message.
* After you have carried out the import, click on *Search* in the overview and open the import.

[#upload-csv-file-shipping-service-provider]
=== Uploading the CSV file of the shipping service provider

Now open the import and upload the CSV file of the shipping service provider in the *Source* area.

.Data source
image::data/importing-data/assets/BP-package-numbers-source.png[]

*_Note:_* Currently, it is only possible to manually upload CSV files. If you want to upload .txt files, you have to upload them to a webspace.

*_Important:_* The setting regarding the *header* is decisive. Before you import the CSV file, open it and check whether the file contains column headers. If a header is contained, you have to place a checkmark next to the option *Header row included*.

.Header row included?
image::data/importing-data/assets/BP-package-numbers-header.png[]

[.subhead]
Possible scenarios for importing with and without header:

* If the file contained a header, but you do not place a checkmark, an error message would appear when matching the package numbers.

* If the file did not contain a header, but you place a checkmark, the first order would be ignored since the matching would take place starting from the second line only.

[#automatically-matching-csv-file]
=== Automatically matching the CSV file

Some shipping service providers upload the file with the package numbers to an FTP server. Instead of manually uploading the file, select *FTP* as source and select an *interval*. By means of this interval, the import will be automatically carried out.

The login details of the FTP server as well as further possibilities regarding the data transfer can be obtained from your shipping service provider.

[#matching-order-id]
=== Matching of the order ID

As described above, the matching is only carried out via the order ID. It is required to select the column in the CSV file of your shipping service provider in which the order ID is contained. This column has to be selected in the *Matching* area of the import. By doing so, errors can be avoided.

.Column of the order ID
image::data/importing-data/assets/BP-package-numbers-column-orderid.png[]

[#select-shipping-package]
=== Selecting the shipping package

In this import, you have to select the target of the imported package numbers in order that these numbers are saved in the shipping package. Select the shipping package from the drop-down list in order that the package numbers are assigned to this shipping package.

.Selecting the shipping package
image::data/importing-data/assets/BP-package-numbers-shipping-package.png[]
