How does Shopify work in Dataslayer and how can I avoid discrepancies?
How does Shopify work in Dataslayer?
In Dataslayer we use only the official APIs from each data source. In the case of Shopify, it's their API that processes the query request and sends the data to Dataslayer.
The Shopify API and the Shopify console are different products, so they work differently in some aspects.
What are the differences between Shopify API and Shopify Console?
The main difference is that Shopify's API only returns data at an ORDERS level.
In the Shopify's console we can look at the data in different sections: the analytics and the reporting sections, which show the data at a SALES level, and the orders section, which shows the data at an ORDERS level. But, the Shopify API ONLY sends us data at an ORDERS level.
In a previous version of the API, it allowed to obtain data at a SALES level as well, but after an API update it only allows us to get data at an ORDERS level.
Why can there be data discrepancy?
Discrepancies between data at the "Orders" level and data at the "Sales" level in Shopify can occur due to various reasons. Here are some possible explanations:
Discounts and promotions: Sales-level data may include discounts applied to products or special promotions that impact the total sales. These discounts and promotions may not be reflected at the "Orders" level, resulting in a discrepancy in the totals.
Shipping and handling fees: Sales-level data may include the shipping and handling costs associated with each order. These additional costs are not reflected at the "Orders" level, which can cause differences in the totals.
Taxes: Sales-level data may include taxes applied to each order, such as sales tax. These taxes may not be included in the "Orders" level data, resulting in discrepancies in the totals.
Cancellations and refunds: If there have been cancellations or partial refunds of orders, the "Orders" and "Sales" data may not be synchronized.
Shopify's API only takes into account data from orders that are in the selected period: For example, when an order is placed before the selected date range and is returned (partially or fully) in the selected date range, we will not be able to get this return to be added to the total sales and refunds.
This is one of the most significant differences between Shopify's console and its API.
Shipping cost in refunds: If an order with shipping cost is cancelled, the shipping cost is added to the refund, while Shopify does not. Example, a 50€ order with 5€ shipping, the customer pays 55€, if it is refunded, in Shopify it comes out as 0€ shipping and 50€ refunds, but in our case it will come out as 5€ shipping and 55€ refunds. The total sales metric should be the same (0€).
It's important to note that Shopify provides different metrics and perspectives regarding order and sales data. Each of these perspectives may take into account different elements, such as discounts, taxes, and shipping costs, which can lead to discrepancies in the totals.
How can I see the same data in the Shopify console and in Dataslayer and avoid discrepancies?
To see the same data in both platforms, you will need to check the Shopify console at the ORDERS section, which is the same data the API returns.
In the Shopify platform, you can follow these steps:
Log in to your Shopify account.
Go to the main dashboard.
Click on "Orders" in the main menu. This option may vary depending on your account setup. Here, you will find a list of all the orders placed in your store. You can use filters and search options to find specific orders if needed.
Click on a particular order to see more details about that specific order. Here, you can view detailed information about the order, such as the purchased products, shipping address, payment status, etc.
Please note that in the Shopify platform, the "Sales" data may include additional information such as taxes, applied discounts, shipping and handling, among others. This can lead to discrepancies when compared to the "Orders" data obtained through the API.
Do you have further questions? Don't hesitate to write us through our website chat or through our email.
Updated on: 25/07/2023