Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
GraphQL query examples for revenue, payment, and customer analytics
query($storeId: String!) { orderStatistics(storeId: $storeId) { totalOrders totalRevenue } }
query($storeId: String!) { paymentStatistics(storeId: $storeId) { totalPayments successRate } }
query($storeId: String!) { productStatistics(storeId: $storeId) { totalProducts activeProducts } }
query($storeId: String!) { orderStatistics(storeId: $storeId) { totalOrders totalRevenue } paymentStatistics(storeId: $storeId) { totalPayments successRate } productStatistics(storeId: $storeId) { totalProducts activeProducts } }
{ "storeId": "STO_3bVzrkD0FJjFdZNLk8Ualx" }
const result = await client.graphql.query<{ orderStatistics: { totalOrders: number; totalRevenue: number }; paymentStatistics: { totalPayments: number; successRate: number }; productStatistics: { totalProducts: number; activeProducts: number }; }>({ query: `query($storeId: String!) { orderStatistics(storeId: $storeId) { totalOrders totalRevenue } paymentStatistics(storeId: $storeId) { totalPayments successRate } productStatistics(storeId: $storeId) { totalProducts activeProducts } }`, variables: { storeId: "STO_3bVzrkD0FJjFdZNLk8Ualx" }, });
query($storeId: String!) { trendAnalysis(storeId: $storeId) { period orders revenue payments } }
query($storeId: String!) { distributionAnalysis(storeId: $storeId) { dimension value count amount } }
query($storeId: String!) { customerAnalysis(storeId: $storeId) { totalCustomers newCustomers returningCustomers } }
query($storeId: String!) { subscriptionAnalysis(storeId: $storeId) { activeSubscriptions churnRate mrr } }
query($storeId: String!) { taxAnalysis(storeId: $storeId) { country taxAmount orderCount } }
query($storeId: String!) { refundTicketAnalysis(storeId: $storeId) { totalTickets approvedCount rejectedCount totalRefundedAmount } }
Was this page helpful?