Connectors: Importing Content (Automatically)


To automate the import of data from external sources such as an ERP, Sales Layer has an import connector. Its operation is based on the loading of a CSV periodically to insert or update content.

When activating the connector, the first thing we have to do is assign a private key. Then, we must decide if we are interested in the option of Overwrite always when importing. In the case of answering affirmatively, the information of the PIM will be overwritten with the contents of the connector file. Otherwise, only changes made to the csv file will be imported. If so, if we need to overwrite everything in a timely manner, the connector should be refreshed directly.

Force refresh

Also in Parameters there is another key configuration option: if we select Overwrite when importing, no new records will be created. This option will only be updated when references from the CSV file match those we have in Sales Layer, and thus avoid loading more products or variants in the PIM.

Only import existing items

Continuing with the input connector, in the following tab, we find all the tables (Categories, Products, Variants and Points of Sale) and their corresponding fields that we can update using this channel. The only mandatory field to link with category, product or variant is the item reference. As in other connectors, you can cancel any of these tables and leave the ones that interest you selected.

Also as in other connectors, when importing / updating the items it is possible to apply formulas. In the case of an input connector, we can do things like:

  • Change product status if certain conditions are met.
  • Change the category some products belong to.
  • Change or add labels, etc.

It is good to keep in mind that the more formulas are applied, especially if they are of a certain complexity, synchronization will take longer. In the formula documentation we will give you more information on how they work.

The last step would be to link the file in each table that you want to synchronize. You can add a url directly or type ftp and you will be asked for login and password.

After writing ‘ftp:’ the channel will directly ask us the user name, keyword and port.
After writing ‘ftp:’ the channel will directly ask us the user name, keyword and port.

Warning: Please note that the FTP needs to have a certificate signed by a certification authority. Following the security standard in apps, we do not accept self-signed certificates.

It is required that the remote server doesn’t block Sales Layer IPs. In a server with firewall, the following IPs should be added to the whitelist:  / for for for backprocess servers

Warning: It is essential that the fields that we write in the connector in Name on Import are called the same as they appear in the csv.

Once we have chosen the ones that we are going to synchronize, we have to choose the frequency (hourly, daily, etc.). Keep in mind that at the chosen time the file will be queued, the update will not be done immediately but will start when it is your turn and will take more or less time depending on the length and complexity of the formulas applied.

Note: If you want to import a CSV field into two different Sales Layer columns, you can use the GET_COLUMN_VALUE formula.

Another key aspect that needs to be understood with the input connectors is that if there are fields in Sales Layer synchronized with an input connector, what a user modifies from the account can be lost if the input connector updates that content. That is, let's say you have a connector that updates the description every night: the changes you make in the description in Sales Layer will be lost the next night when updating from the Csv file. To avoid this situation, we can block those fields so that the user cannot make changes in those PIM fields. We can do this when setting up a family or editing form.

Redesign form option
Redesigning form, it’s possible to block a field so the user doesn’t waste time changing a content that later will be modified by the import channel
Redesigning form, it’s possible to block a field so the user doesn’t waste time changing a content that later will be modified by the import channel

An additional note that may be useful is that in the input connectors it is possible to add information in some fields without deleting what has been previously and without duplicating content. We give you an example: you have the T-shirt category and you want to add the Promotions category without deleting the previous one, and without reloading the csv you add another category of Promotions. To do this, you could directly use ++ in the CSV or do it by adding the values in a formula containing ++ before Promotion. For example, this formula could be applied to the category field as in the following example: 


IF ({PRICE} <50, "++ PROMOTION"))

We would do that if the PRICE field is less than 50, add PROMOTION.

Keep in mind, both in case of a periodic synchronization or in case of a manually forced one, the synchronization will be queued and depending on the server load it will be done in more or less time (regularly it takes a few minutes to start , but it is not immediate).

Warning: To import multi-language content, map the corresponding field in the connector, and in the import file indicate the language in the column name. To do this, use colon and the language ISO (for ex. :en; :de; :fr; …) creating one column per language.

Tip: if you want to add a column from Csv in two fields, you can do it by using the formula GET_COLUMN_VALUE.

Note: API 1.18 can import large CSV files, either through manual import or automated import via connectors.

Note: Linked CSVs should not contain special characters in the name to avoid any issues with downloading (spaces, commas, quotes, periods, etc.).

Please, bear in mind that Sales Layer, as a product information management system, is not designed to manage stocks. However, it is possible to store the stock data like any other content. For this it is important to take into account that:

  • It may not work with the immediacy necessary to manage stocks, especially depending on how the content is transferred into Sales Layer (slower with CSV imports and faster with an implementation via API which would speed up the uploading process).
  • Whenever you modify product fields, all those products affected by the modification are sent by the API connectors in which the modified information is managed. As a consequence, updating the stock data of a consistent part of products, as it is supposed to happen, will considerably reduce the speed of the updating processes.

Note: Should the CSV contain the same reference on different lines, the connector will only import the first one and discard the following same references.