Finance Total Sales Report export - field Sale ID is a mystery

Topic summary

Users are struggling to reconcile Shopify’s Finance Total Sales report with data pulled from the Admin API. The core issue: the report contains a “Sale ID” field at the line-item level that doesn’t match any identifier available through the Admin API (not Line Item ID or Transaction ID).

Key Problems:

  • Admin API provides Order ID, Line Item ID, and Transaction ID
  • Finance reports use Order ID and Sale ID instead
  • Sale ID is essential for matching Gross/Net Sales calculations and revenue attribution by date
  • Without Sale ID in API exports, automated reconciliation with Shopify dashboard figures is nearly impossible
  • Line-item matching via product/variant ID fails when the same variant appears multiple times in an order

Solution Found:
Sale ID exists in the GraphQL API under order agreements, accessible via the Sale interface. A code sample demonstrates querying order.agreements.sales to retrieve Sale IDs along with action type, line type, and amounts.

Status: Resolved with GraphQL workaround, though the discrepancy between Admin API and reporting structure remains a pain point for finance automation.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hello Team,

We access the Admin API with an integration platform to feed our cloud data warehouse with all Shopify order and transaction data. Our Finance team relies upon reports from the portal to post financials, but we are trying to automate this and bridge the gap between portal reports and our detailed integrations.

The issue we are running into with this reconciliation is that our data from the Admin API contains Order ID and Line Item ID, and then for payment info Transaction ID – whereas their Finance Total Sales report contains Order ID and Sale ID. The “Sale ID” is at the line item level, but it does not match the Admin API Line Item ID -OR- Transaction ID.

So at the line item level, I don’t have any transaction ID match outside of also using product/variant ID. This does not always work in cases where we show the same variant more than once on an order (e.g. buy 1, get 1 50% off). Either way, “Sale ID” is a mystery and it seems as if there is misalignment between the Admin API and the GraphQL API when it comes to transaction/record ID’s.

Any insights for me? Thanks in advance!

3 Likes

This is very important question that needs answer from Shopify. I’ve a full export of the Shopify data into Big Query using a third party tool. It has dozens of tables related to order and orderliness, however, there is no sign of Sale ID anywhere in the structure.

Secondly, Shopify compute Gross Sale and Net Sale on the basis of Sale ID that happen on a given date, and attribute revenue to the date of the Sale ID. Since there is no Sale ID in the exported data via API, it’s nearly impossible to match figures with Shopify dashboard.

It is very important that this question is answered!

Many Thanks

3 Likes

I am dealing with the same discrepancy. Where can I find the Sale ID number that is found in the Shopify Reports?

Answer from 2025.

Sale ID is buried in agreements of orders. It can be found in GraphQL API here https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Sale.

Here’s sample code to access sale ID from an order.

query OrderSale($id: ID!) {
  order(id: $id) {
    id
    agreements(first: 4) {
      nodes {
        sales(first: 4) {
          nodes {
            id actionType lineType
            totalAmount {
              shopMoney {
                amount currencyCode
              }
            }
          }
        }
      }
    }
  }
}