I’m getting an ‘unexpected token’ error when uploading a Product or Product Variant to Shopify

If you’re getting an HTTP 400 response code error when uploading a Product or Product Variant to Shopify where the Last API Result value looks like this:

{
“error”: “419: unexpected token at ‘{ \”id\”:1315190970547841, …
}

the issue here is most likely the presence of a comma in one of the number fields such as price, comparison price or weight. We’ve added a new custom function to v1.3 that simply substitutes out any commas in these fields like this:

Substitute ( number ; “,” ; “.” )

You can update the calculations formula for the ShopifyProductVariantJSON and ShopifyVariantJSON fields by changing the references to the price, comparison price and weight fields from this format:

BE_JSON_Encode ( “price” ; Price ) & “,” &

to this format

BE_JSON_Encode ( “price” ; ConvertComma ( Price ) ) & “,” &

If you are using v1.3 or later and FileMaker Pro v16 or later you don’t have to worry about these changes as FileMaker’s native JSON functions handle the presence of the commas automatically.

Still need help? Contact Us Contact Us