Fix BigCommerce Categories JSON Format Error - Skyvia

BigCommerce: The value of the column Categories has incorrect JSON format

Overview

When working with the Categories field in the Product object within the BigCommerce API, it is important to format the data correctly to ensure a successful import. In the BigCommerce API, the Categories field is an array. For more information on Products, refer to the BigCommerce Product Object documentation.

Required Format

Skyvia implements the Categories field as a string in JSON array format. When importing data into Products.Categories, specify the value as follows:

  • The value must start with [ and end with ].
  • Category IDs must be separated by commas.

Examples:

  • [21, 23] - two category IDs.
  • [22] - one category ID.

How to Pass Data in Array Format

Option 1: Format the value in your CSV file

Pre-format the Categories column values in brackets directly in your source CSV file as described above.

Option 2: Use Constant Mapping

Use Constant Mapping to pass a fixed value to the Categories column. Select Constant as the mapping type and specify the value directly.

For more details, refer to the Constant Mapping documentation.

Option 3: Use Expression Mapping

Use Expression Mapping to dynamically construct the JSON array. For example, if you have two Category IDs in separate columns, concatenate them as follows:

'[' + Category1 + ',' + Category2 + ']'

For more details on expression syntax, refer to the Expression Syntax documentation.