b2bDashboard
Requires permission dashboard:main:read.
B2B dashboard figures for a date range. Both the start and end dates are required. Needs the dashboard read permission.
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 B2bDashboard($dateRange: DateRangeInput!) {
b2bDashboard(dateRange: $dateRange) {
customerMetrics {
churnRate
customerLifetimeValue
customerSatisfaction
retentionRate
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query B2bDashboard($dateRange: DateRangeInput!) {\n b2bDashboard(dateRange: $dateRange) {\n customerMetrics {\n churnRate\n customerLifetimeValue\n customerSatisfaction\n retentionRate\n }\n }\n}",
"variables": {
"dateRange": {
"endDate": "string",
"startDate": "string"
}
}
}
EOF
Variables:
{
"dateRange": {
"endDate": "string",
"startDate": "string"
}
}
Response:
{
"data": {
"b2bDashboard": {
"customerMetrics": {
"churnRate": 0,
"customerLifetimeValue": 0,
"customerSatisfaction": 0,
"retentionRate": 0
}
}
}
}
b2bDashboard(
dateRange: DateRangeInput!
): B2BDashboard!
Arguments
b2bDashboard.dateRange ● DateRangeInput! non-null input
The start and end dates. Both are required.
Type
B2BDashboard object
The B2B dashboard.