Shopify Order Calculations

When importing orders shopify will calculate the total and subtotal fields based on your imported data. In order to ensure these fields are calculated properly you should have the following fields in your csv file and selected in your "Data Mappings" configuration.

  1. The line_items.price field will be used to build your subtotals. This field will be multiplied by the line_items.quantity field. This will give you your subtotal.
  2. You can apply discounts to your orders by mapping your discount fields to the Discount Codes tab on your Data Mapping. Shopify will apply the discount to the subtotal using the discount_codes.amount field fond on the Discount Codes tab.
  3. You can apply shipping charges to your orders as well. You can do this by mapping the Shipping Lines tab on your Data Mapping. The shipping_lines.title will display the shipping title for the order. For your shipping costs to be applied to the order you'll need to map the shipping_lines.price field.
  4. You can apply taxes to your order by mapping the total_tax field on the Order Details tab of your Data Mapping. Shopify will add the values found in the total_tax to the orders subtotal. To learn more about how to map your taxes click here.
  5. Shopify does not automatically associate the total of the order with your customer. By default the Paid by customer section of the order will be 0. If you want this value to be populated and have your order total associated with your customer you need to map the transaction data. In order to get the amount paid by customer populated you have to map the transaction.amount field on the Transactions tab on your Data Mapping. To read more about transactions click here.


Shopify Order Totals

You'll get a full picture of your Order when you add all of the above fields to your Import.

A good way to think about the Shopify order calculation is:

Total = Sum((line_items.price * line_items.quantity)) - discount_codes.amount + 
shipping_lines.price + total_tax 

App: EZ Importer

Tags: line items, getting started