Search Documentation

How to use the import feature of Cobalt

Learn how to import records from a .csv file in Cobalt.

One of the great features of Cobalt is the possibility to import large amounts of records from a .CSV or .JSON file into Cobalt so that you can create automatically new article/items/anything in your site. In addition, it is a smart import. If the users import the same file again, Cobalt will create new articles and update previously imported articles. For example, sellers may import their products’ CSV to update their stock or prices.

Before starting you need a Section and a Type where to import your records. You can find more information about it in the Quick start page.

Step 1 - Create Joomla Menu Element

As many other functions of Cobalt, you work with imports from the frontend of your site. So you need to create a menu item first to acess the import page.

Create menu item

choose Cobalt MenuItem types …

Cobalt type menu

scroll down and choose Import

Import menu item

then select a type you want to limit your imports.

Remember to limit the acess to this menu item accordingly to your site needs, otherwise anyone can populate your record database!

Step 2 - Import the CSV file

As you can guess you first upload your CSV or JSON file, this is how the import is presented

Cobalt Import page

wait for the upload to complete and click on next. You will now be able to choose an import profile or create a new one. When you create a new profile, the area below will show the parameter fields for the import along with the Fields you created for the Type you specified in the import menu settings (see Step 1 above).

Import fields

In the Name field, you give the name of the import profile you are creating.
The ID field is the special field you can use to allow updates, but you can also leave it alone selecting “Do not import anything here”. If you use it, select a column of your spreadsheet file with a “unique” name, so that with next imports, if you import selecting again that same “ID”, you will update your records in the DB and create new others if there is something new.
In the Title field you select a column to use to give to each record the title of the article.

The remaining fields are generated based on what you created in the selected Type of the import.

When you have selected all your required fields, click next to finish the process.

If you encounter any issues in the process try to resave your CSV file, and use COMMAS as delimiter of your file.