Overview
AUTO-TOW-047, Prioritize Invoice Review, ranks towing invoices for review, correction, or approval by invoice amount, billing discrepancy severity, payer priority, invoice age, documentation gaps, and collection risk.
- Decision ID
AUTO-TOW-047- Decision Name
- Prioritize Invoice Review
- Decision Preparation Model
auto-towing-prioritize-invoice-review-auto-tow-047version1.0.0- Default Profile
balanced- Default Scenario
standard- Catalog
DKR-AUTO-RUNTIME-001, active Decision Catalog runtime catalog
5-Minute Quick Path
Goal
prioritize invoice review using invoice amount, billing discrepancy, payer priority, aging, documentation gaps, and collection risk.
Recommended mode
Business Data Mode when you have ordinary operational records.
You provide
Candidate records matching the published input schema and Decision Preparation Model.
DecisioQ returns
A ranked recommendation with the winning option and score evidence.
Understanding This Decision
Prioritize Invoice Review helps a towing operation decide which invoices should be reviewed first when billing teams need to resolve discrepancies, approve clean invoices, or intervene before collection risk grows.
Business question
Which invoice review should be recommended for the selected Auto Towing billing context?
Expected outcome
A recommended invoice review or ranked set of invoice reviews with the criteria that most influenced the result.
Typical users
Billing managers, collections teams, towing dispatch administrators, insurer-account coordinators, and integrators building billing review workflows.
Decision boundary
Use this decision to rank supplied invoice review candidates. It does not replace contractual, insurance, tax, or legal billing review.
Criteria
Criterion IDs are intentionally stable machine identifiers. Display labels are for users; request values should be keyed by canonical criterionId.
| Criterion ID | Name | Direction | Weight | Validation |
|---|---|---|---|---|
invoice_amount | Invoice Amount | maximize | 20 | non_negative_currency |
billing_discrepancy_score | Billing Discrepancy Score | maximize | 25 | score_0_to_100 |
payer_priority_score | Payer Priority Score | maximize | 15 | score_0_to_100 |
aging_days | Aging Days | minimize | 15 | non_negative_integer |
documentation_gap_score | Documentation Gap Score | minimize | 15 | score_0_to_100 |
collection_risk_score | Collection Risk Score | minimize | 10 | score_0_to_100 |
Data Preparation Guide
Constraint Processing
This decision includes a catalog-defined hard constraint. Decision Catalog returns the constraint with the decision detail, and Decision Service evaluates it before criteria-based ranking.
| Verified Catalog Constraint | Status | Effect |
|---|---|---|
AUTO-TOW-047-AGING-DAYS-MAX-3 | Hard, enabled, mandatory | Requires aging_days <= 3 before a candidate can participate in routine ranking. |
Candidates older than three days are intentionally removed from this routine-review ranking. Route them to the configured exception or escalation workflow; exclusion does not mean that the invoice should be ignored.
{
"constraintSummary": {
"definedConstraintCount": 1,
"activeConstraintCount": 1,
"eligibleOptionCount": 2,
"excludedOptionCount": 1,
"eligibleOptions": [
"option-1",
"option-2"
],
"excludedOptions": [
{
"optionId": "option-3",
"reasons": [
"Aging days exceeds the standard review window of 3 days."
]
}
]
}
}
const constraints = decisionDetail.constraints || [];
if (constraints.length > 0) {
// Decision Service applies catalog constraints before ranking.
// Excluded candidates appear in response.constraintSummary.excludedOptions.
}
const summary = response.constraintSummary;
const excluded = response.decisionResult?.excludedOptions || [];
Excluded candidates do not participate in ranking because hard constraints are evaluated before scoring. For AUTO-TOW-047, option-3 is excluded from the showcase sample because its invoice age is outside the standard review window.
Decision Preparation Model
The published Decision Preparation Model validates and transforms illustrative Business Data into the canonical criteria required by AUTO-TOW-047 before Decision Service applies ranking.
- Profile ID
auto-towing-prioritize-invoice-review-auto-tow-047- Version
1.0.0- Options Path
$.towRequests- Option ID Path
$.optionId- Display Name Path
$.name
| Client Business Data Path | Transformation | Canonical Criterion ID | Unit | Validation |
|---|---|---|---|---|
option.financial.invoiceAmount | direct value | invoice_amount | Currency | Input Contract |
option.assessment.billingDiscrepancyScore | direct value | billing_discrepancy_score | Score | Input Contract |
option.assessment.payerPriorityScore | direct value | payer_priority_score | Score | Input Contract |
option.billing.and.collections.agingDays | direct value | aging_days | Days | Input Contract |
option.assessment.documentationGapScore | direct value | documentation_gap_score | Score | Input Contract |
option.risk.collectionRiskScore | direct value | collection_risk_score | Score | Input Contract |
{
"requestContext": {
"sourceSystem": "automotive-profile-factory",
"correlationId": "factory-auto-tow-047"
},
"towRequests": [
{
"optionId": "TOW-047-01",
"name": "Prioritize Invoice Review Option 1",
"financial": {
"invoiceAmount": 42000.0
},
"assessment": {
"billingDiscrepancyScore": 70.0,
"payerPriorityScore": 37.0,
"documentationGapScore": 70.0
},
"billing": {
"and": {
"collections": {
"agingDays": 2.0
}
}
},
"risk": {
"collectionRiskScore": 64.0
}
},
{
"optionId": "TOW-047-02",
"name": "Prioritize Invoice Review Option 2",
"financial": {
"invoiceAmount": 31000.0
},
"assessment": {
"billingDiscrepancyScore": 30.0,
"payerPriorityScore": 44.0,
"documentationGapScore": 46.0
},
"billing": {
"and": {
"collections": {
"agingDays": 1.0
}
}
},
"risk": {
"collectionRiskScore": 71.0
}
}
]
}
{
"optionId": "TOW-047-01",
"name": "Prioritize Invoice Review Option 1",
"values": {
"invoice_amount": 42000.0,
"billing_discrepancy_score": 70.0,
"payer_priority_score": 37.0,
"aging_days": 2.0,
"documentation_gap_score": 70.0,
"collection_risk_score": 64.0
}
}
Profiles and Scenarios
This example selects a Profile for evaluation emphasis and a Scenario for operating context. Discover both from the selected Decision Catalog definition.
| Profile ID | Name | Purpose |
|---|---|---|
balanced | Balanced | Preserves the default Decision Catalog criterion weights. |
customer_focused | Customer Focused | Places stronger emphasis on customer priority, satisfaction, communication urgency, and service experience. |
cost_control | Cost Control | Places stronger emphasis on fees, collection risk, waiver exposure, and financial discipline. |
compliance_focused | Compliance Focused | Places stronger emphasis on policy, documentation, authorization, insurance, and auditability. |
| Scenario ID | Name | Use When |
|---|---|---|
standard | Standard Operating Scenario | Normal towing customer and billing operating context. |
urgent_customer | Urgent Customer Scenario | Customer urgency, stranded motorists, or service recovery require stronger emphasis. |
cost_control | Cost Control Scenario | Fee recovery, margin protection, or collection risk must be controlled. |
compliance_review | Compliance Review Scenario | Authorization, policy, documentation, or insurance rules require stronger control. |
Business Data Mode
Start here when your application has operational data. DecisioQ applies the published Decision Preparation Model to produce the required criteria.
{
"decisionId": "AUTO-TOW-047",
"businessData": {
"requestContext": {
"sourceSystem": "automotive-profile-factory",
"correlationId": "factory-auto-tow-047"
},
"towRequests": [
{
"optionId": "TOW-047-01",
"name": "Prioritize Invoice Review Option 1",
"financial": {
"invoiceAmount": 42000.0
},
"assessment": {
"billingDiscrepancyScore": 70.0,
"payerPriorityScore": 37.0,
"documentationGapScore": 70.0
},
"billing": {
"and": {
"collections": {
"agingDays": 2.0
}
}
},
"risk": {
"collectionRiskScore": 64.0
}
},
{
"optionId": "TOW-047-02",
"name": "Prioritize Invoice Review Option 2",
"financial": {
"invoiceAmount": 31000.0
},
"assessment": {
"billingDiscrepancyScore": 30.0,
"payerPriorityScore": 44.0,
"documentationGapScore": 46.0
},
"billing": {
"and": {
"collections": {
"agingDays": 1.0
}
}
},
"risk": {
"collectionRiskScore": 71.0
}
}
]
}
}Prepared Criteria Mode
Use this mode when your application already calculates decision-ready values keyed by authoritative criterion IDs. Prepared Criteria go directly to the decision.
Download Prepared Criteria request
For Prepared Criteria Mode, send decisionId, selected profile/scenario IDs, and option values keyed by canonical criterion ID. The optional mappingProfileId and mappingProfileVersion fields preserve preparation-model lineage; they are not required when submitting already prepared criteria unless the active API contract requires that lineage. The showcase request includes two eligible invoice reviews and one excluded invoice so constraint handling is visible.
{
"decisionId": "AUTO-TOW-047",
"mappingProfileId": "auto-towing-prioritize-invoice-review-auto-tow-047",
"mappingProfileVersion": "1.0.0",
"profileId": "balanced",
"scenarioId": "standard",
"algorithm": "TOPSIS",
"weightStrategy": "Expert",
"runSensitivity": false,
"requestContext": {
"correlationId": "auto-tow-047-demo-001"
},
"options": [
{
"optionId": "option-1",
"name": "High-Value Insurance Invoice",
"values": {
"invoice_amount": 125,
"billing_discrepancy_score": 88,
"payer_priority_score": 88,
"aging_days": 1,
"documentation_gap_score": 88,
"collection_risk_score": 88
}
},
{
"optionId": "option-2",
"name": "Disputed Commercial Invoice",
"values": {
"invoice_amount": 250,
"billing_discrepancy_score": 81,
"payer_priority_score": 81,
"aging_days": 2,
"documentation_gap_score": 81,
"collection_risk_score": 81
}
},
{
"optionId": "option-3",
"name": "Aged Storage Invoice",
"values": {
"invoice_amount": 500,
"billing_discrepancy_score": 74,
"payer_priority_score": 74,
"aging_days": 4,
"documentation_gap_score": 74,
"collection_risk_score": 74
}
}
]
}
Execute
curl -X POST "https://dde.vinquery.com/api/v1/decide" \
-H "Authorization: Bearer ${DECISIOQ_TOKEN}" \
-H "Content-Type: application/json" \
-H "X-Correlation-Id: auto-tow-047-demo-001" \
--data @auto-tow-047-execute.json
Decision Service retrieves authoritative criteria, constraints, and validation metadata from Decision Catalog, executes the deterministic ranking, and returns the decision result plus execution metadata.
Understanding the Result
Verified Local Result
Recommended option: TOW-047-01
Scores are relative TOPSIS closeness coefficients within this candidate set, not probabilities.
| Rank | Option | ID | Score |
|---|---|---|---|
| 1 | Prioritize Invoice Review Option 1 | TOW-047-01 | 0.563508 |
| 2 | Prioritize Invoice Review Option 2 | TOW-047-02 | 0.436492 |
The ranking was calculated in-process with DecisioQ.DecisionEngine.Services.TopsisEngine from the published canonical request. It is not a hosted API capture. Download evidence.
The successful response includes both the deterministic decisionResult and a top-level explanation object. The explanation adds context but does not select, rerank, recalculate, or override the ranking.
{
"success": true,
"decisionType": "AUTO-TOW-047",
"decisionResult": {
"winner": "option-1",
"ranking": [
{
"optionId": "option-1",
"name": "High-Value Insurance Invoice",
"score": 0.91
},
{
"optionId": "option-2",
"name": "Disputed Commercial Invoice",
"score": 0.84
}
],
"excludedOptions": [
{
"optionId": "option-3",
"reasons": [
"Aging days exceeds the standard review window of 3 days."
]
}
]
},
"explanation": {
"summary": "The selected invoice review provided the strongest billing review priority.",
"whyRecommended": "It combined invoice value, billing discrepancy severity, payer priority, and acceptable invoice age.",
"keyDrivers": [],
"tradeoffs": [],
"competitors": [],
"sensitivitySummary": "Sensitivity analysis was not included in this response.",
"scenarioSummary": "The standard scenario was selected.",
"risks": [],
"nextSteps": [],
"assumptions": []
},
"constraintSummary": {
"definedConstraintCount": 1,
"activeConstraintCount": 1,
"eligibleOptionCount": 2,
"excludedOptionCount": 1
},
"requestContext": {
"correlationId": "auto-tow-047-demo-001"
}
}
decisionResult.winner.Sensitivity Analysis
runSensitivity is an optional execution flag supported by both Business Data Mode and Prepared Criteria Mode. Set it to true when the client wants recommendation-stability information in the same response. The sensitivity engine analyzes the prepared criteria produced by either input path, perturbs criterion weights by controlled factors, and reports whether the winner remains stable.
{
"sensitivityResult": {
"stableWinner": true,
"winner": "option-1",
"mostSensitiveCriterion": "invoice_amount",
"confidence": 95,
"criterionImpacts": {
"invoice_amount": 0.1842
},
"winnerChangeCounts": {
"invoice_amount": 0
}
}
}
Use sensitivity output to decide whether a recommendation is robust enough for automation or should be reviewed by a person.
Scenario Analysis
Use a published scenario only when it matches the operating context: standard, urgent_customer, cost_control, compliance_review. Compare the winner, ranking gap, and key trade-offs with the baseline run.
Explanation of Decision Result
Every successful response includes a provider-neutral top-level explanation object. It explains the already-finalized deterministic result and does not change the ranking.
{
"explanation": {
"summary": "The selected invoice review provided the strongest billing review priority.",
"whyRecommended": "It combined invoice value, billing discrepancy severity, payer priority, and acceptable invoice age.",
"keyDrivers": [],
"tradeoffs": [],
"competitors": [],
"sensitivitySummary": "Sensitivity analysis was not included in this response.",
"scenarioSummary": "The standard scenario was selected.",
"risks": [],
"nextSteps": [],
"assumptions": []
}
}
Tracing and Logs
Use request identifiers to connect client, catalog, and execution activity during support or integration testing.
X-Request-Id- Optional client-supplied request ID. If omitted, the server generates one.
X-Correlation-Id- Optional client correlation value propagated from Decision Service to Decision Catalog.
requestContext.correlationId- Optional payload value echoed in the response and used for tracing.
configurationUsed- The authoritative effective weight strategy, ranking algorithm, profile, scenario, sensitivity setting, and source for each value.
diagnostics- Safe execution counts returned only when
responseOptions.includeDiagnosticsis true.
Integration Examples
These examples demonstrate the current DecisioQ flow:
- Request
jwtTokenfromhttps://identity.vinquery.com/connect/token. - Load
AUTO-TOW-047metadata fromhttps://dks.vinquery.com/decisioncatalog/decisions/AUTO-TOW-047. - Execute a Prepared Criteria Mode at
https://dde.vinquery.com/api/v1/decide.
Set these environment variables before running any companion example:
DECISIOQ_CLIENT_ID
DECISIOQ_CLIENT_SECRET
DECISIOQ_AUDIENCE=vinquery:api:decisioq
Optional:
DECISIOQ_IDENTITY_URL=https://identity.vinquery.com/connect/token
DECISIOQ_DKS_URL=https://dks.vinquery.com
DECISIOQ_DDE_URL=https://dde.vinquery.com
Download the source files directly:
Troubleshooting
| Symptom | Likely Cause | What to Check |
|---|---|---|
| 401 Unauthorized | Missing, expired, or invalid bearer token. | Request a fresh jwtToken from Identity and send it as Authorization: Bearer .... |
| Decision not found | The decision ID is not in the active catalog. | Load /decisioncatalog/decisions/AUTO-TOW-047 and confirm the ID is published. |
| Validation failed | A required criterion value is missing or outside its rule. | Use canonical criterion IDs and keep score values in the expected range. |
| Candidate excluded | The candidate violates a hard catalog constraint. | Review constraintSummary.excludedOptions; for AUTO-TOW-047, aging days must be no greater than 3. |
| HTML error response | An upstream hosted service failed before returning JSON. | Check service health and server logs for Identity, Decision Catalog, or Decision Service. |
Production Checklist
Security
Keep API Consumer credentials and jwtTokens on the server side. Use HTTPS, short-lived bearer tokens, and an API Consumer linked to a DecisioQ account for usage accounting.
Catalog
Load decision metadata from Decision Catalog and cache cautiously. Refresh when catalog versions change.
Request Quality
Use canonical criterion IDs, validate value ranges, and send at least two candidate options.
Operations
Send correlation IDs, record request IDs, and monitor non-JSON upstream failures.
Explanation
Display explanation text as supporting context only. Never let generated explanation text override deterministic results.
User Experience
Show business labels to users and keep raw execution trace collapsed for advanced diagnostics.
Next Steps
Review Decision Concepts for criteria, weights, profiles, scenarios, confidence, and sensitivity; use the API Guide for transport details; and return to the examples library to compare related workflows.
