Question

Shopify error: The app returned "Invalid Syntax: Only numeric values are allowed

  • 19 July 2023
  • 2 replies
  • 41 views

So I have a zap setup to take orders from Shopify and send to square. I have a formater working as i need the dollar to multiply by 100 to move the decimal.  It works perfect with orders with 1 item. But if an order has more than 1 item it fails saying “The app returned "Invalid Syntax: Only numeric values are allowed".”

 

Any help on how to get orders with multiple items .

 

Im using Line Item Price for they price of each item.

 

 


2 replies

Userlevel 7
Badge +14

Hi @cdagesse

Good question.

You’ll have to use a Code step: https://zapier.com/apps/code/help

 

let Price = inputData.Price.split(",");

Price = multiplyBy100(Price);

function multiplyBy100(numbers) {
var multipliedArray = []; // Create an empty array to store the multiplied values

// Iterate over each element in the input array
for (var i = 0; i < numbers.length; i++) {
multipliedArray.push(numbers[i] * 100); // Multiply each element by 100 and add it to the multiplied array
}

return multipliedArray; // Return the resulting array with multiplied values
}

output = [{Price}];

 

 

Userlevel 7
Badge +11

Hi there, @cdagesse! I just wanted to check in to see how you got on. Were you able to get this working using a Code by Zapier action instead as Troy suggested?

Let us know if you’re still in need of some help with this! 🙂

Reply