We're software that helps growing brands & retailers grow and scale. Sync, sell and ship your products and inventory on online marketplaces and storefronts faster, easier and more accurately.

Learn more now

Common JSON Configuration Errors

Automation configurations are written in JSON, and even a small syntax error can prevent your automation from being created or updated. This guide covers the most frequent JSON mistakes and how to fix them.


Trailing Commas

JSON does not allow a comma after the last item in an object or array. This is one of the most common mistakes, especially if you are used to JavaScript.

Wrong:


{
  "field_map": {
    "sku": "ItemNumber",
    "title": "ItemTitle",
    "price": "ItemPrice",
  }
}

Right:


{
  "field_map": {
    "sku": "ItemNumber",
    "title": "ItemTitle",
    "price": "ItemPrice"
  }
}

Remove the comma after the last key-value pair ("ItemPrice"). The same rule applies to the last element in arrays.


Single Quotes Instead of Double Quotes

JSON requires double quotes for all strings. Single quotes are not valid JSON.

Wrong:


{
  'identifier': 'sku',
  'create': 'add'
}

Right:


{
  "identifier": "sku",
  "create": "add"
}

Missing Quotes on Keys

Every key in a JSON object must be enclosed in double quotes, even if the key looks like a simple word.

Wrong:


{
  identifier: "sku",
  create: "add"
}

Right:


{
  "identifier": "sku",
  "create": "add"
}

Unmatched Braces and Brackets

Every opening { must have a matching }, and every [ must have a matching ]. Deeply nested configs are especially prone to this error.

Wrong:


{
  "file_configs": [
    {
      "name": "products.csv",
      "field_map": {
        "sku": "ItemNumber"
      }
  ]
}

The inner object { opened on line 3 was never closed before the ].

Right:


{
  "file_configs": [
    {
      "name": "products.csv",
      "field_map": {
        "sku": "ItemNumber"
      }
    }
  ]
}
Tip: Paste your JSON into a validator like jsonlint.com to catch unmatched braces quickly. VS Code also highlights mismatched brackets in real time.

Wrong Data Types

JSON has distinct types for strings, booleans, and numbers. While the automation validator is lenient and will accept string-wrapped booleans (like "true") and string-wrapped numbers (like "50"), using the correct native JSON types is strongly recommended for clarity and to avoid subtle issues downstream.

Avoid:


{
  "active": "true",
  "diff_update": "false",
  "limit_import": "50"
}

Preferred:


{
  "active": true,
  "diff_update": false,
  "limit_import": 50
}
  • true / false (no quotes) are booleans
  • 50 (no quotes) is a number
  • "true" / "50" (with quotes) are strings

The validator will coerce "true" to a boolean and accept "50" as numeric, so these won't produce validation errors. However, using native types makes your config easier to read and avoids potential issues with other tools that parse the JSON.

You will see a type error if you pass a completely wrong type -- for example, an array where a string is expected, or a non-numeric string where a number is expected. The error looks like: "The following fields must be of type boolean: active".


Invalid type or action Values

The type and action fields only accept specific values. Using anything else will produce a validation error.

Wrong:


{
  "type": "inventory",
  "action": "sync"
}

Right:


{
  "type": "products",
  "action": "import"
}
  • type must be one of: products, orders, fitment
  • action must be one of: import, export

Values are case-insensitive -- "Products" and "products" are both accepted.


Invalid Cron Schedule

The schedule field must be a valid cron expression. Common mistakes include using plain English or the wrong number of fields.

Wrong:


{
  "schedule": "every 5 minutes"
}

Right:


{
  "schedule": "*/5 * * * *"
}

A cron expression has five fields: minute, hour, day of month, month, and day of week. The error message will show: "Schedule must be valid cron expression. [your value] is invalid".


Incorrect Nesting

file_configs is an array of objects. A common mistake is putting file-level fields (like field_map, identifier, or create) at the top level of the config instead of inside the file_configs array.

Wrong:


{
  "name": "My Automation",
  "type": "products",
  "action": "import",
  "field_map": {
    "sku": "ItemNumber"
  },
  "create": "add"
}

Right:


{
  "name": "My Automation",
  "type": "products",
  "action": "import",
  "file_configs": [
    {
      "name": "products.csv",
      "field_map": {
        "sku": "ItemNumber"
      },
      "create": "add"
    }
  ]
}

If the validator reports "Invalid field: field_map" at the top level, your fields are likely in the wrong place.


Duplicate Keys

JSON silently overwrites duplicate keys. Only the last value is kept, which can lead to hard-to-find bugs.

Wrong:


{
  "field_map": {
    "sku": "PartNumber",
    "title": "Name",
    "sku": "ItemID"
  }
}

In this example, sku is mapped to "ItemID" and the "PartNumber" mapping is silently lost.

Right:


{
  "field_map": {
    "sku": "PartNumber",
    "title": "Name",
    "vendorsku": "ItemID"
  }
}
Tip: Most JSON validators will warn you about duplicate keys. Always review your field_map carefully if a field seems to be mapping to the wrong source.

Special Characters in Values

If a string value contains a double quote, you must escape it with a backslash (\"). Other special characters like newlines (\n) and tabs (\t) also need escaping.

Wrong:


{
  "template": "<div class="wrapper">content</div>"
}

Right:


{
  "template": "<div class=\"wrapper\">content</div>"
}

Using search and filters Together

The search field in file_configs overwrites the filters array. If you define both, filters will be replaced by the parsed result of search. Use one or the other, never both.

Wrong:


{
  "search": "stock:>0",
  "filters": [
    { "field": "condition", "filterType": "equals", "value": "New" }
  ]
}

The filters array will be overwritten by the search string, and your condition filter will be lost.

Right (using search):


{
  "search": "stock:>0 condition:New"
}

Right (using filters):


{
  "filters": [
    { "field": "stock", "filterType": "gt", "value": "0" },
    { "field": "condition", "filterType": "equals", "value": "New" }
  ]
}
Warning: This is a common source of "missing items" in automation results. If your automation is not processing the items you expect, check whether both search and filters are defined.

Missing Required Fields

For import automations, you must set at least one of create, update, or remove in each file config. Leaving all three out will produce the error: "Must set at least one of the following actions: create, update, remove".

For all automations, the following top-level fields are required: name, active, schedule, type, and action.


Before submitting your automation config, validate your JSON using one of these tools:

  • jsonlint.com -- Paste your JSON and click Validate. Shows line numbers for errors.
  • VS Code -- Open a .json file and VS Code highlights syntax errors automatically. Install the "JSON Tools" extension for formatting.
  • SureDone API -- Use the POST /v3/automations/custom/validate endpoint to validate your config against the automation schema, which checks both JSON syntax and field-level rules.