{"section":"announcements","requestedLocale":"en","requestedSlug":"2019-03-20-get-order-json-now-delivers-new-variables-in-order-calculations","locale":"en","slug":"2019-03-20-get-order-json-now-delivers-new-variables-in-order-calculations","path":"docs/en/announcements/2019/march/2019-03-20-get-order-json-now-delivers-new-variables-in-order-calculations.md","branch":"main","content":"> ⚠️ Due to technical reasons, the launch of this feature was postponed until further notice.\n\nStarting  April 1, 2019, the request JSON will return a new object called `alternativeTotals`. It will appear in the totalizers that are inside the array of `totals`, for queries made by the APIs Get Order.\n\nFor example:\nIn an order where the shipping value calculated is 9.90 and is reduced by a free delivery sale, the JSON responds with the following data\n\n```\n\"totals\": [\n       {\n           \"id\": \"Items\",\n           \"name\": \"Total Items\",\n           \"value\": 23970,\n       },\n       {\n           \"id\": \"Discounts\",\n           \"name\": \"Total Discounts\",\n           \"value\": 0,\n       },\n       {\n           \"id\": \"Shipping\",\n           \"name\": \"Total Shipping\",\n           \"value\": 0,\n\n              }\n           ]\n\n\n```\nWith the new field, the return will become:\n```\n\n\"totals\": [\n       {\n           \"id\": \"Items\",\n           \"name\": \"Total Items\",\n           \"value\": 23970,\n           \"alternativeTotals\": null\n       },\n       {\n           \"id\": \"Discounts\",\n           \"name\": \"Total Discounts\",\n           \"value\": 0,\n           \"alternativeTotals\": null\n       },\n       {\n           \"id\": \"Shipping\",\n           \"name\": \"Total Shipping\",\n           \"value\": 0,\n           \"alternativeTotals\": [\n               {\n                   \"id\": \"AlternativeShippingTotal\",\n                   \"name\": \"Alternative Shipping Total\",\n                   \"value\": 990,\n                   \"alternativeTotals\": null\n               },\n               {\n                   \"id\": \"AlternativeShippingDiscount\",\n                   \"name\": \"Alternative Shipping Discount\",\n                   \"value\": -990,\n                   \"alternativeTotals\": null\n               }\n           ]\n```\nNote that in the shipping value, we have the value 0. In alternativeTotals, we have the data used by the system to arrive at the shipping calculation of 9.90. Additionally, we had a discount of 9.90, resulting in the final shipping value of 0.\n\n## Main Advantages \nThis new field allows the use of the data in the module interface, showing the admin user the calculation made for shipping in a clear and intuitive way.\n\nAnother advantage is the possibility of having the calculation data made by the system available for consumption of your BI system.\n\n## What you need to do\n\nIt is critical to review the integrations that use the APIs Get Order, such as ERP, for example. Those who are not prepared to receive the new response must be adjusted before March 29, 2019.\n\nWarning: for now, the change will occur only in the API. The Orders Management UI will not undergo any modification."}