Priority Score Calculator
business.priority_score
Overview
You send one item's criterion values and the weights that matter to you; we return the score together with the contribution of every criterion, so the number can be checked rather than trusted. Scoring is absolute: each value is mapped onto its own fixed rubric, so the same item scores the same today, tomorrow and next quarter, whatever else is waiting to be done. That is the whole difference from business.decision_matrix, which ranks options against each other and therefore moves when the set changes. A criterion can be inverted so that less is better, weighted at zero to document that it was deliberately ignored, or declared missing-tolerant so an incomplete item still scores. Everything runs on decimal arithmetic at 34 digits and rounds HALF_UP to the decimal places you ask for, and the contributions always add up to exactly the score.
Prioritisation arguments are rarely about the weights and almost always about the arithmetic: two spreadsheets disagree, nobody can say which cell is wrong, and the answer changes when a row is added. A scoring service that publishes the contribution of every criterion and guarantees they add up to the total moves the discussion back to the weights, where it belongs.
Reliability
Fully deterministic and reproducible to the digit: everything runs on BigDecimal at 34 significant digits, HALF_UP, then rounds once to your declared decimal places. No floating point is used anywhere, so the same request gives the same score on every machine. Contributions are reconciled to the score by largest remainder — each is rounded, and the leftover unit of the last decimal place goes to the criteria that lost the most in rounding, ties to the earlier one you declared — so a breakdown never drifts from the total beside it. A value outside its rubric is clamped to the rubric and noted rather than refused, because a rubric that breaks the first time reality exceeds it is useless. With normalizeWeights true and every weight zero the score is zero rather than a division by zero. Failures: SCORE_ITEM_INVALID means item is missing, empty, or carries something that is not a decimal. SCORE_WEIGHTS_INVALID means weights is empty, repeats a criterion, or declares a negative weight. SCORE_CRITERION_UNKNOWN means item.values names a criterion weights does not. SCORE_VALUE_MISSING means a criterion has no value and missing is REJECT. SCORE_SCALE_INVALID means a rubric's min is not below its max. SCORE_LIMIT_EXCEEDED means more than 64 values or 64 criteria. None is worth retrying unchanged.
Context footprint
The answer is one row per criterion plus five scalars, so it is bounded by your 64-criterion ceiling and never by your data volume. A successful call costs 1 execution credit.
When to use it
When you need one comparable, reproducible number per item from criteria you can write down, and you want to be able to explain it afterwards.
When the point is to rank a specific set of options against each other, or when the criteria cannot be reduced to numbers with rubrics.
Scope
Non-goals
- Does not rank several items, and does not normalise against a population — that is business.decision_matrix, which shares this skill's weighted-sum engine but answers a comparative question
- Does not invent weights, rubrics or defaults you did not send
- Does not decide what to work on: a score is an input to that decision
- Does not store the score or the item
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| item | object | Yes | Closed item being scored, with values and an optional echoed id. |
| weights | array | Yes | Bounded array of 1 through 64 closed criteria with unique ids and weights. |
| normalizeWeights | boolean | No | Whether weights are divided by their total; omit it for true. |
| scale | integer | No | Published decimal places; omit it for 4. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| score | number | Yes | Published weighted total at the declared decimal places. |
| breakdown | array | Yes | Bounded array of 0 through 64 closed contributions that sum to the score. |
| weightTotal | number | Yes | Sum of weights that took part, skipped criteria excluded. |
| criteriaUsed | integer | Yes | How many criteria contributed, equal to breakdown length. |
| criteriaSkipped | array | Yes | Bounded array of 0 through 64 skipped criterion ids; empty when every criterion took part. |
| itemId | string | No | Echoed item.id, present only when you supplied one. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"business.priority_score","input":{"item":{"id":"TCK-4711","values":{"impact":8,"effort":3}},"weights":[{"criterion":"impact","weight":0.7,"scale":{"min":0,"max":10}},{"criterion":"effort","weight":0.3,"direction":"LOWER_IS_BETTER","scale":{"min":0,"max":10}}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("business.priority_score", {"item":{"values":{"impact":8,"reach":1000,"effort":3},"id":"TCK-4711"},"weights":[{"criterion":"impact","weight":0.5,"scale":{"min":0,"max":10}},{"criterion":"effort","weight":0.3,"direction":"LOWER_IS_BETTER","scale":{"min":0,"max":10}},{"criterion":"reach","weight":0.2,"scale":{"min":0,"max":2000}}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| SCORE_ITEM_INVALID | 400 | No | The request payload failed this skill's input validation. |
| SCORE_WEIGHTS_INVALID | 400 | No | The request payload failed this skill's input validation. |
| SCORE_CRITERION_UNKNOWN | 400 | No | The request payload failed this skill's input validation. |
| SCORE_VALUE_MISSING | 400 | No | The request payload failed this skill's input validation. |
| SCORE_SCALE_INVALID | 400 | No | The request payload failed this skill's input validation. |
| SCORE_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not rank several items, and does not normalise against a population — that is business.decision_matrix, which shares this skill's weighted-sum engine but answers a comparative question
- Does not invent weights, rubrics or defaults you did not send
- Does not decide what to work on: a score is an input to that decision
- Does not store the score or the item
- Ranking a shortlist of options against each other — use business.decision_matrix
- Any scoring where the score should move when other items appear
- Free-form judgement that cannot be written as weighted criteria
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "business.priority_score",
"input": {
"item": {
"values": {
"impact": 8,
"reach": 1000,
"effort": 3
},
"id": "TCK-4711"
},
"weights": [
{
"criterion": "impact",
"weight": 0.5,
"scale": {
"min": 0,
"max": 10
}
},
{
"criterion": "effort",
"weight": 0.3,
"direction": "LOWER_IS_BETTER",
"scale": {
"min": 0,
"max": 10
}
},
{
"criterion": "reach",
"weight": 0.2,
"scale": {
"min": 0,
"max": 2000
}
}
]
}
}Examples
A ticket scored on impact, effort and reach, with effort inverted
{
"item": {
"values": {
"impact": 8,
"reach": 1000,
"effort": 3
},
"id": "TCK-4711"
},
"weights": [
{
"criterion": "impact",
"weight": 0.5,
"scale": {
"min": 0,
"max": 10
}
},
{
"criterion": "effort",
"weight": 0.3,
"direction": "LOWER_IS_BETTER",
"scale": {
"min": 0,
"max": 10
}
},
{
"criterion": "reach",
"weight": 0.2,
"scale": {
"min": 0,
"max": 2000
}
}
]
}{
"score": 0.41,
"itemId": "TCK-4711",
"criteriaUsed": 3,
"breakdown": [
{
"criterion": "impact",
"rawValue": 8,
"scaledValue": 0.8,
"weight": 0.5,
"normalizedWeight": 0.5,
"contribution": 0.4,
"direction": "HIGHER_IS_BETTER"
},
{
"criterion": "effort",
"rawValue": 3,
"scaledValue": -0.3,
"weight": 0.3,
"normalizedWeight": 0.3,
"contribution": -0.09,
"direction": "LOWER_IS_BETTER"
},
{
"criterion": "reach",
"rawValue": 1000,
"scaledValue": 0.5,
"weight": 0.2,
"normalizedWeight": 0.2,
"contribution": 0.1,
"direction": "HIGHER_IS_BETTER"
}
],
"criteriaSkipped": [],
"weightTotal": 1
}An incomplete item on raw weights: one value clamped to its rubric, one criterion skipped, one counted as zero
{
"weights": [
{
"criterion": "impact",
"weight": 2,
"scale": {
"min": 0,
"max": 10
}
},
{
"criterion": "effort",
"weight": 1,
"missing": "SKIP"
},
{
"criterion": "risk",
"weight": 1,
"missing": "ZERO"
}
],
"normalizeWeights": false,
"item": {
"values": {
"impact": 12
}
}
}{
"breakdown": [
{
"criterion": "impact",
"rawValue": 12,
"scaledValue": 1,
"weight": 2,
"normalizedWeight": 2,
"contribution": 2,
"direction": "HIGHER_IS_BETTER",
"note": "VALUE_CLAMPED_TO_RUBRIC"
},
{
"criterion": "risk",
"rawValue": 0,
"scaledValue": 0,
"weight": 1,
"normalizedWeight": 1,
"contribution": 0,
"direction": "HIGHER_IS_BETTER",
"note": "MISSING_TREATED_AS_ZERO"
}
],
"score": 2,
"weightTotal": 3,
"criteriaUsed": 2,
"criteriaSkipped": [
"effort"
]
}Recommended use cases
- Score a ticket or a request the same way every time, so two people agree on the number
- Publish the arithmetic behind a priority to whoever asks why
- Keep one rubric in configuration and score against it from several services
- Score an item whose data is incomplete, deliberately and visibly
Avoid for
- Ranking a shortlist of options against each other — use business.decision_matrix
- Any scoring where the score should move when other items appear
- Free-form judgement that cannot be written as weighted criteria
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.