Skip to main content

Exporting data for reporting

With Traide you have access to all the underlying data; this can be powerful but also something to ensure you manage if you do regular data pulls and requests.

Useful queries for reporting data​

Below are some endpoints that can be used to extract common data, use the Docs panel in GraphiQL to learn more about endpoints you can use, and also for those listed below how you can request additional information by modifying the request itself.

Dashboard orders summary​

The dashboardOrdersSummary query returns summarized sales data for a given date range (current), the same totals for the range one month earlier (previous), and the change between them (deltas). It requires the MANAGE_ORDERS permission. To limit it to one seller, pass the seller's ID as identifier.

{
dashboardOrdersSummary(startDate: "2022-01-01", endDate: "2022-12-31") {
ordersToFulfill
current {
net
gross
orders
}
previous {
gross
orders
}
deltas {
percent {
gross
orders
}
}
}
}
Show more ↓

Top performing products​

The insightsTopPerformingProducts query ranks product variants by sales for a date range. Set perspective to TOP for the best sellers or WORST for the weakest, and limit to the number of rows.

{
insightsTopPerformingProducts(
startDate: "2022-05-01"
endDate: "2022-07-31"
perspective: TOP
limit: 5
) {
summary {
grossRevenue
quantityOrdered
}
report {
name
grossRevenue
quantityOrdered
}
}
}
note

Review the other endpoints that start with insights to see more reporting-specific endpoints.

Orders​

The orders query returns details about every order.

{
orders (first: 10) {
edges {
node {
id,
isPaid,
lines {
productName,
variantName,
totalPrice {
net {
amount,
currency
}
}
}
}
}
}
}
Show more ↓

Was this page helpful?