Hi. Welcome to MacScripter.
It’s not clear which figures you want summed for the sales total, but the following should get you started. It sums the total_price values and assumes they’re all in euros:
-- Sample result from JSON Helper.
set mySales to {orders:{{total_line_items_price:"29.90", |id|:1.128527102016E+12, total_discounts:"0.00", created_at:"2019-06-06T06:47:57+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.128461041728E+12, total_discounts:"0.00", created_at:"2019-06-06T06:15:22+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"59.80", |id|:1.128348090432E+12, total_discounts:"0.00", created_at:"2019-06-06T05:27:35+07:00", refunds:{}, total_price:"59.80", subtotal_price:"59.80", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.128266104896E+12, total_discounts:"0.00", created_at:"2019-06-06T04:53:18+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.128199979072E+12, total_discounts:"0.00", created_at:"2019-06-06T04:32:48+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.128126480448E+12, total_discounts:"0.00", created_at:"2019-06-06T04:14:00+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.128063664192E+12, total_discounts:"0.00", created_at:"2019-06-06T03:58:52+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.128059469888E+12, total_discounts:"0.00", created_at:"2019-06-06T03:57:54+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"59.80", |id|:1.1280327312E+12, total_discounts:"0.00", created_at:"2019-06-06T03:51:58+07:00", refunds:{}, total_price:"59.80", subtotal_price:"59.80", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127699447872E+12, total_discounts:"0.00", created_at:"2019-06-06T01:49:29+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.12757184928E+12, total_discounts:"0.00", created_at:"2019-06-06T01:01:25+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127494877248E+12, total_discounts:"0.00", created_at:"2019-06-06T00:34:08+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127480852544E+12, total_discounts:"0.00", created_at:"2019-06-06T00:28:59+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127430586432E+12, total_discounts:"0.00", created_at:"2019-06-06T00:10:18+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.12733690272E+12, total_discounts:"0.00", created_at:"2019-06-05T23:36:02+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"59.80", |id|:1.127247151168E+12, total_discounts:"0.00", created_at:"2019-06-05T23:03:25+07:00", refunds:{}, total_price:"59.80", subtotal_price:"59.80", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.12721238432E+12, total_discounts:"0.00", created_at:"2019-06-05T22:50:29+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"79.70", |id|:1.127208747072E+12, total_discounts:"0.00", created_at:"2019-06-05T22:49:08+07:00", refunds:{}, total_price:"79.70", subtotal_price:"79.70", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127202783296E+12, total_discounts:"0.00", created_at:"2019-06-05T22:47:03+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127173914688E+12, total_discounts:"0.00", created_at:"2019-06-05T22:36:00+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127137738816E+12, total_discounts:"0.00", created_at:"2019-06-05T22:22:31+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127091601472E+12, total_discounts:"0.00", created_at:"2019-06-05T22:04:03+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.1270537872E+12, total_discounts:"0.00", created_at:"2019-06-05T21:50:08+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.127008534592E+12, total_discounts:"0.00", created_at:"2019-06-05T21:32:07+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.126935953472E+12, total_discounts:"0.00", created_at:"2019-06-05T21:04:08+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.126869925952E+12, total_discounts:"0.00", created_at:"2019-06-05T20:38:23+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}, {total_line_items_price:"29.90", |id|:1.126839844928E+12, total_discounts:"0.00", created_at:"2019-06-05T20:25:23+07:00", refunds:{}, total_price:"29.90", subtotal_price:"29.90", total_shipping_price_set:{shop_money:{amount:"0.00", currency_code:"EUR"}, presentment_money:{amount:"0.00", currency_code:"EUR"}}, total_tax:"0.00"}}}
set allOrders to mySales's orders
-- Count the orders.
set numberOfSales to (count allOrders)
-- Sum the total_price values, assuming the currency to be euros in all cases.
set totalPrice to 0
repeat with thisOrder in allOrders
set totalPrice to totalPrice + (thisOrder's total_price)
end repeat
-- Convert the price total to text, padding (if necessary) to two decimal places. The total must be at least 1 euro!
set myDecimalPoint to character 2 of (1 / 2 as text)
tell (totalPrice * 100 as integer as text) to set totalPrice to text 1 thru -3 & myDecimalPoint & text -2 thru -1
return (numberOfSales as text) & " Sales " & totalPrice & " EUR"