Skip to main content

Import a file from a URL

Import your data source file from an HTTP, HTTPS, FTP, or SFTP URL using the Feed URL data source option in Productsup.

Introduction

To import your data into the Productsup platform from an HTTP, HTTPS, FTP, or SFTP URL, use the Feed URL data source option. It supports multiple file formats, including the following:

Import file via Feed URL

  1. Go to Data Sources from your site's main menu and select ADD DATA SOURCE.

  2. Search for Feed URL and select Add. Give it a custom name as desired and select Continue.

    Tip

    The custom name of a data source replaces the name of its data source option in Data Sources. For example, Feed URL is the name of a data source option, while Feed URL - winter clothes CSV can be a custom name of a data source.

  3. In Source URL, add your FTP, SFTP, HTTP, or HTTPS link. In Description (optional), edit the name of the data source as needed.

  4. If Productsup requires authentication to access data in your file, provide relevant access data in Username (optional) and Password (optional). If you need Productsup to use basic authentication and include an encoded credentials string in the HTTP authorization header of each request to your data source, choose Basic Authentication in the Password drop-down menu.

    In the Password drop-down menu, you can also select SSH Key (SFTP) to access the SSH Public Key that Productsup uses to authenticate in your SFTP server.

  5. Select Save.

  6. When the page reloads, you can select Additional Data Feed in the Content Mode panel to let Productsup import the data from your data source as new columns instead of new rows. See Enhance your products with additional data sources for more information.

Note

If you require a custom setup to upload your data to Productsup via the Feed URL data source option, contact support@productsup.com. Once the custom setup is ready, Productsup displays relevant information in Plugin (optional).

Modify import data in Content Options

Using Content Options, you can modify your data imported in Productsup via the Feed URL data source by adding or replacing headers, adding or removing columns, specifying custom delimiters, etc. Specific modifications available for your import depend on the type of file you are importing via the Feed URL data source option, such as a CSV, XML, or JSON.

Content Options - CSV Settings

The CSV Settings option in the Content Options panel lets you prepend or replace header rows and define the encoding, delimiter, enclosure, and the number of headers used in your CSV file. By default, Productsup detects the encoding, delimiters, and enclosures in CSV files automatically and considers the first row in your file to be the header.

See Import CSV files - advanced settings for more information.

  1. Select CSV Settings in Content Options to access the import modifications available for CSV files.

  2. In Encoding, define the file encoding.

  3. In Delimiter, specify the delimiter used in the file.

  4. In Enclosure, enter the enclosure used in the file.

  5. In Header in Row, set the number of the row that contains the header. A digit is the expected input format.

  6. If your file doesn't have a header, you can add it in Prepend Header Row. Enter all names of your columns and separate them with the delimiter used in your file.

    For example, to a file using the | delimiter, you can prepend the following header row:

    ID|title|mpn|product_type|description|url|image_url|price|sale_price|stock

    Prepending a header row in Prepend Header Row while setting up a Feed URL import using the CSV Settings option in Content Options
  7. If you have numerous data sources added to one site, you may need to know which attributes come from which data sources. You can distinguish between attribute sources by adding prefixes to the names of your attributes.

    In Prepend a String to the Header Columns, enter the prefix you want to add to the names of the attributes imported from this data source. If your data source produces files other than CSV or XML files, you can still use this option.

    Note

    If your data source has a product identifier, open the Settings tab on the Data Sources page and modify the name of your product identifier in ID Column according to the new prefix of the relevant attribute name.

  8. If the header in your file isn't correct, you can change it in Replace Header Row. Enter all names of your columns and separate them with the delimiter used in your file.

    For example, in a file using the ; delimiter, you can replace the header row with the following string:

    ID;title;description;product_type;url;image_url;price

    Note

    The number and order of column names in Prepend Header Row and Replace Header Row must match the number and order of columns in the file.

  9. Select Save all settings.

Content Options - XML Settings

The XML Settings option in the Content Options panel lets you change XML declarations, bundle repeating nodes into one column, define root nodes and maximum depths, and further modify your import data.

See Import XML files - advanced settings for more information.

  1. Select XML Settings in Content Options to access the import modifications available for XML files.

  2. To specify the root node used in your file, enter it in Root Node in the same format used in your file. For example, in the XML code abstract given in Step 3, <CD> is the root node of the file.

  3. In Max Depth, specify how far down into the structure of your XML file the platform should go to find the root node. A digit is the expected input format.

    Note

    XML depths are layers of nodes or branches in a file. That means the XML file begins at the initial layer, which is 0. The layer is the depth of the file.

    In the following example, the <CD> node begins at level 1:

    <CATALOG>
        <CD>
            <TITLE>Queen II</TITLE>
            <ARTIST>Queen</ARTIST>
            <COUNTRY>UK</COUNTRY>
            <COMPANY>EMI</COMPANY>
            <PRICE>24.90</PRICE>
            <YEAR>1974</YEAR>
        </CD>
    </CATALOG>

    To find the root node in this XML file, the platform should scan at least two depths. The depth value specified in Max Depth for this file should be at least 2.

  4. To add a header line to your XML file, enter it in Prepend Header Row.

    Warning

    The Productsup team doesn't recommend prepending a header row to your XML file.

  5. If you have numerous data sources added to one site, you may need to know which attributes come from which data sources. You can distinguish between attribute sources by adding prefixes to the names of your attributes.

    In Prepend a String to the Header Columns, enter the prefix you want to add to the names of the attributes imported from this data source. If your data source produces files other than CSV or XML files, you can still use this option.

    Note

    If your data source has a product identifier, open the Settings tab on the Data Sources page and modify the name of your product identifier in ID Column according to the new prefix of the relevant attribute name.

  6. If the XML declaration in your file isn't correct, you can change it in Replace Xml Declaration. The XML declaration typically contains the XML version and the encoding used in the file. It can look similar to this:

    <?xml version='1.0' encoding="UTF-8" standalone="yes" ?>

  7. If your file has multiple nodes describing the same product attribute with different values, you can bundle such nodes into one column in Bundle repeating nodes.

    By default, Productsup bundles 11 repeating nodes into one column and uses the semicolon (;) delimiter to separate them within the column. Specify a different number of repeating nodes in Bundle repeating nodes and add a different delimiter in Bundle delimiter as needed.

  8. If your XML file contains elements that may disrupt the parsing of your file, tick one or more of the following boxes:

    Tick one of the boxes to simplify parsing an XML file: Repair control characters, Remove DTD, Repair parent node, Allow empty node
    1. Repair control characters - This helps to repair broken control characters within your XML file. Although such unprinted characters can't appear in your product feed, they can cause parsing errors.

    2. Remove DTD - This lets you remove the Document Type Declaration (DTD) from your file. In files that use a DTD, this section comes directly after the XML declaration.

    3. Repair parent node - This helps to change a parent node that is incomplete or has an incorrect closure.

    4. Allow empty node - This helps to import nodes with empty values into the platform to avoid skipping them during import and disrupting your data structure.

  9. Select Save all settings.

Tip

Once Productsup scans your imported XML file, it suggests which nodes in your file could be the root nodes and displays them in Root nodes suggestions.

Checking whether Productsup correctly interprets an XML file in Root nodes suggestions

To check whether Productsup has correctly interpreted your file or if there have been some parsing issues:

  1. Run an import by selecting Import in the upper right corner of the Feed URL setup page.

  2. Take a look at the suggestions in Root nodes suggestions.

Content Options - JSON Settings

The JSON Settings option in the Content Options panel lets you define root and variant nodes, bundle repeating keys into one column, and exclude items from import.

See Import JSON files - advanced settings for more information.

Using the JSON Settings option in Content Options while setting up a Feed URL import
  1. Select Json Settings in Content Options to access the import modifications available for JSON files.

  2. If your JSON file has a root node, enter it in Root Node.

  3. If your JSON file has product variants nested in one root node, input the node containing the product variants in Variant Node.

  4. If your file has multiple keys featuring the same product attribute with different values, you can bundle such keys into one column by ticking the Bundle box.

    By default, Productsup uses the comma (,) delimiter to separate bundled values within a column. Specify a different delimiter in Bundle Delimiter as needed.

  5. If you don't want Productsup to import a particular key or keys from your JSON file, enter them in Exclude Items and separate the keys by commas if needed.

  6. Select Save all settings.

Content Options - Add/Filter columns

The Add/Filter columns option in the Content Options panel lets you modify your import data by allowing, blocking, adding, or removing columns. This option applies to all imports regardless of the type of import files involved.

add_filter_columns.png
  1. Go to Data Sources from your site's main menu and choose your feed URL's settings page by selecting the cogwheel icon (). Next, under Content Options, select Add/Filters Columns.

  2. Select Allow Columns or Block Columns and enter your column name in the Filter Columns field.

  3. Select Save all settings and perform an import by selecting Run.

  4. Go to Dataflow from your site's main menu and search for the column attribute you allowed or blocked. You can see an asterisk for all blocked column names while allowed column names appear as usual.

    Tip

    You can also use a regex to locate text. For example, if you select Allow Columns, entering the following regex /^part/ admits all column names that begin with part.

Content Options - Encryption

The Encryption option in the Content Options panel helps to provide Productsup with a password to let the platform read your password-protected import file.

Using the Encryption option in Content Options while setting up a Feed URL import
  1. Select Encryption in Content Options.

  2. Enter the password in File password.

  3. Select Save all settings.

Edit Feed URL data source via Advanced Settings tab

If you want to add a label to your data source, delete your data source, or use the advanced technical settings of your data source, you can go to the Advanced Settings tab on the Feed URL setup page.

To access the Advanced Settings tab:

  1. Go to Data Sources from your site's main menu.

  2. Select the cogwheel icon () next to a chosen data source.

  3. Select the Advanced Settings tab.

See Import your data into Productsup - Advanced Settings for more information.