ETLMCPData Conveyance Works
Log in Start free
Guides

Shopify order totals: shop vs presentment, original vs current

Each Shopify order amount comes in two currencies and up to three versions. Which one a revenue figure uses explains most mismatches.

Coming This connector is coming.

Most amounts on a Shopify order come in two currencies and often in more than one version. Each money field whose name ends in Set holds the amount in the store's own currency and in the currency the customer chose. Many come in versions too: totalPriceSet is the order total before returns, currentTotalPriceSet the total after them, and originalTotalPriceSet the total when the order was created. Two revenue figures for the same store usually disagree because one reads the customer's currency and the other the store's, or one reads totals before returns and the other after.

Two currencies in one field

In the Admin GraphQL API, a field such as totalPriceSet is a MoneyBag. A MoneyBag has two parts:

  • shopMoney: the amount in the store's base currency.
  • presentmentMoney: the same amount in the currency the customer chose at checkout.

Each part is a MoneyV2: an amount, a decimal value, and a currencyCode. The order itself names both currencies. Its currencyCode is the store's currency at the time the order was placed, and its presentmentCurrencyCode is the customer's. For a store that sells only in its own currency the two are the same. For a store that prices in local currencies they differ, and adding presentmentMoney amounts across orders adds euros to pounds to dollars. Sum shopMoney when you want one store-wide total.

Older money fields without the Set suffix, such as totalPrice, return a single amount and are marked deprecated on the Order object.

Before returns, after returns, and at creation

Most order totals have a version before returns and a current version after them:

Shopify field What it measures
totalPriceSet The order total before returns, with taxes and discounts.
currentTotalPriceSet The order total after returns, with taxes and discounts.
originalTotalPriceSet The total when the order was created; Shopify suggests comparing it with the current total after edits, returns or refunds.
subtotalPriceSet Line items after discounts and before returns; it includes tax when the store's prices include tax.
currentSubtotalPriceSet Despite its name, described as the order's price after returns and refunds, including taxes and discounts.
totalDiscountsSet / currentTotalDiscountsSet Discounts before returns, and discounts after returns and refunds, order and line level together.
totalTaxSet / currentTotalTaxSet Tax before returns, and the tax lines on line items after returns.
currentShippingPriceSet Shipping after refunds and discounts; it includes tax only when prices include tax.
totalRefundedSet Everything refunded on the order.
totalReceivedSet / netPaymentSet Money received before returns, and received minus refunded.

A figure built on totalPriceSet does not count returns, and one built on currentTotalPriceSet falls when the customer sends something back. An order edit can also change the current total, and originalTotalPriceSet keeps the value from when the order was created. Decide which question you are answering, what was sold or what was kept, and read the matching field for every order.

How etlmcp reads these fields

When the Shopify connector is available, etlmcp reads only the shopMoney half of each MoneyBag and never presentmentMoney, so every row is in the store's currency and carries the currency code Shopify gives with those amounts. It writes one row per day in the store's time zone, on the day each order was placed, without test and cancelled orders. Each column comes from one side of the pairs above:

  • Before returns: gross sales and discounts come from subtotalPriceSet and totalDiscountsSet, and units from the order's line-item quantity.
  • After returns: net sales come from currentSubtotalPriceSet, shipping from currentShippingPriceSet, taxes from currentTotalTaxSet and the shipping line's tax, and total sales is currentTotalPriceSet as it is.
  • Refunds: totalRefundedSet, the money given back on that day's orders, goods, shipping and tax together, so it is not the gap between gross and net sales.
  • Revenue: the same figure as net sales.

When a store's prices include tax, etlmcp takes the tax out of gross sales, discounts, net sales and shipping, so those columns are stated without tax for every store. The one exception is an order discounted to nothing: with no tax left to work out a rate from, its discount stays as Shopify gives it. etlmcp never reads originalTotalPriceSet.

Because net sales, shipping, taxes and total sales use the after-returns totals, a past day changes when an order placed that day is refunded or edited later. When the connector is available, each routine sync pulls the last 58 days again, so those changes reach your table. A refund or edit made after that window is not picked up by routine syncs, so the stored day keeps the figures from its last pull.

If an order's amounts name more than one store currency, or a store's currency changes during a day, the run fails with an error instead of adding two currencies together, and it is not retried. The columns are listed on the Shopify connector page, and you can read the rows with query_data.

Checking a mismatch

  1. Confirm both figures are in the store's currency. A report in the customer's currency will not match etlmcp's rows on a multi-currency store.
  2. Confirm both are after returns or both before. Compare etlmcp's total sales with a figure built on currentTotalPriceSet, not totalPriceSet.
  3. Confirm both count tax and shipping the same way. Net sales excludes both; total sales includes both.
  4. Confirm both use the order's placed date in the store's time zone, not the refund date.

Related

Sources

  1. Order - GraphQL Admin — shopify.dev, checked
  2. MoneyBag - GraphQL Admin — shopify.dev, checked
  3. MoneyV2 - GraphQL Admin — shopify.dev, checked