How to send dynamically calculated value in JSON when making API request

I’m writing an API request to update my eCommerce website product price. I’m trying to calculate discounted price using PERCENTAGE but this result is treated as NaN.

"sale_price": floor(​​PRICE -​​ PRICE ​*​​ PERCENTAGE/100)​)​)​*100)​/100)

PRICE and PERCENTAGE are values from spreadsheet.

How do I make this work? How do I make it a number?

Thank you for your help!

1 Like

Hi @Sue0312
Sample variable I set to test:


Use the following formula(Just copy paste and replace the variables from sheet):
{{floor((309.price - (309.price * 309.percentage / 100)) * 100 / 100)}}

image

Output:
image

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation