customerDashboard
Requires a customer (portal or buyer app) session.
Returns the signed-in customer's home summary: open orders, recent orders, quotes, invoices and balances. Order figures follow the customer's branch visibility; quotes, invoices and balances cover the whole company. A part that cannot be read is reported as unavailable, not as zero.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query CustomerDashboard {
customerDashboard {
viewerFirstName
activeOrders
availableCredit
balanceUnavailable
outstandingBalance
overdueInvoices
recentOrders {
id
orderNumber
status
createdAt
branchAddressId
branchLabel
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomerDashboard {\n customerDashboard {\n viewerFirstName\n activeOrders\n availableCredit\n balanceUnavailable\n outstandingBalance\n overdueInvoices\n recentOrders {\n id\n orderNumber\n status\n createdAt\n branchAddressId\n branchLabel\n }\n }\n}"
}
EOF
Response:
{
"data": {
"customerDashboard": {
"viewerFirstName": "string",
"activeOrders": 0,
"availableCredit": 0,
"balanceUnavailable": true,
"outstandingBalance": 0,
"overdueInvoices": 0,
"recentOrders": [
{
"id": "id",
"orderNumber": "string",
"status": "string",
"createdAt": "2025-01-15T00:00:00Z",
"branchAddressId": "string",
"branchLabel": "string"
}
]
}
}
}
customerDashboard: CustomerDashboard!
Type
CustomerDashboard object
The customer's dashboard figures.