calculateAllSupplierRatings
Requires permission suppliers:supplier:update.
Recomputes the rating of every supplier in the organization and returns one result per supplier. Needs the suppliers update 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
mutation CalculateAllSupplierRatings {
calculateAllSupplierRatings {
deliveryRating
message
overallRating
performanceRating
qualityRating
serviceRating
metricsUsed {
issuesReported
onTimeDeliveries
totalDeliveries
totalGRNs
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CalculateAllSupplierRatings {\n calculateAllSupplierRatings {\n deliveryRating\n message\n overallRating\n performanceRating\n qualityRating\n serviceRating\n metricsUsed {\n issuesReported\n onTimeDeliveries\n totalDeliveries\n totalGRNs\n }\n }\n}"
}
EOF
Response:
{
"data": {
"calculateAllSupplierRatings": [
{
"deliveryRating": 0,
"message": "string",
"overallRating": 0,
"performanceRating": 0,
"qualityRating": 0,
"serviceRating": 0,
"metricsUsed": {
"issuesReported": 0,
"onTimeDeliveries": 0,
"totalDeliveries": 0,
"totalGRNs": 0
}
}
]
}
}
calculateAllSupplierRatings: [SupplierRatingResult!]!
Type
SupplierRatingResult object
The result of working out a supplier's rating.