Skip to main content
Dev Corner
CSV Product Import into PIM

CSV Product Import into PIM

The core of PIM is products and product information. The base product information is often created initially in an ERP system like SAP or ERPNext, then imported to your PIM. You can manually create the product information in Crystallize, or, when working with large product sets that frequently update, create an automatic import and update integration. We have made an open-source CSV product import for Crystallize to get you started.

Chunk product import from CSV

The CSV product import tool will help you speed up your development process, as it allows developers to use a JavaScript script to import all products. You just need to have a CSV file and your Crystallize Access Token. Then the script imports your products via the PIM API.

1: Generate an Access Token

First, you'll need an access token ID and secret from the Crystallize App. Read our documentation on access tokens if you need help with this step.

Generate access token

2: Download the CSV product import script

Second, head over to our repository and clone or download the CSV product import script.

After the download is completed, go to folder `product-import-from-csv` and install the dependencies `npm install` or `yarn install`.

3: Create your source CSV file

Create a CSV file by e.g. exporting from your ERP system. The structure of the CSV file needs to match so products can be correctly imported into your product catalogue. For your products, the CSV file structure should be:

  • id 
  • type
  • sku 
  • name 
  • price 
  • attributes
  • stock

4: Run the product import

Start the script, `npm start` or `yarn start`, and follow the command-line instructions.

The script will identify how many products you have in your CSV file.

You'll need your tenant identifier. In the Crystallize App, go to Settings, then click on Info. There's a button here that'll copy the identifier string to your clipboard.

Tenant info screen

Finally, enter your token ID and secret.

If everything goes as expected, when the script finishes, you should see a successful message and a list of the imported products.

And that’s it! You should be able to see your newly-imported products in your catalogue.

After this, you'll be one step closer to have your fast eCommerce website ready for your customers.

Have any questions or suggestions about the product import? Join our Slack community or create an issue in the product import GitHub repository. We’ll be glad to help.