Skip to main content

calculateSupplierRating

Requires permission suppliers:supplier:update.

Recomputes one supplier's rating from its goods receipts. Returns success false with a message when there is no goods receipt data. 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:

mutation CalculateSupplierRating($supplierId: ID!) {
calculateSupplierRating(supplierId: $supplierId) {
deliveryRating
message
overallRating
performanceRating
qualityRating
serviceRating
metricsUsed {
issuesReported
onTimeDeliveries
totalDeliveries
totalGRNs
}
}
}

Variables:

{
"supplierId": "id"
}

Response:

{
"data": {
"calculateSupplierRating": {
"deliveryRating": 0,
"message": "string",
"overallRating": 0,
"performanceRating": 0,
"qualityRating": 0,
"serviceRating": 0,
"metricsUsed": {
"issuesReported": 0,
"onTimeDeliveries": 0,
"totalDeliveries": 0,
"totalGRNs": 0
}
}
}
}
calculateSupplierRating(
supplierId: ID!
): SupplierRatingResult!

Arguments​

calculateSupplierRating.supplierId ● ID! non-null scalar​

The ID of the supplier.

Type​

SupplierRatingResult object​

The result of working out a supplier's rating.