DecisioQ System Architecture Decision Concepts Decision List API Guide Client Kit Developer Center Decision Studio Quick Start Playground End-to-End Examples

AUTO-FLEET-001 End-to-End Example

Determine Fleet Vehicle Replacement compares candidate fleet vehicles using lifecycle cost, operational availability risk, maintenance burden, utilization criticality, and safety rating.

Automotive Fleet Vehicle Management Vehicle Lifecycle TOPSIS
IdentityIssue bearer token
Decision CatalogDiscover decision knowledge
MappingTranslate business data
Decision ServiceExecute request
Decision ServiceRank vehicles
ExplanationExplain the result

Overview

AUTO-FLEET-001, Determine Fleet Vehicle Replacement, ranks candidate fleet vehicles by lifecycle cost, operational availability risk, maintenance burden, utilization criticality, and safety rating.

Decision ID
AUTO-FLEET-001
Decision Name
Determine Fleet Vehicle Replacement
Description
Determine Fleet Vehicle Replacement using the relevant Fleet Vehicle Management business criteria, profile, and operating scenario.
Industry
Automotive
Sector
Fleet Vehicle Management (AUTO-FLEET)
Category
Vehicle Lifecycle (AUTO-FLEET-VEHICLE-LIFECYCLE)
Decision Preparation Model
fleet-vehicle-replacement version 1.0.0
Default Profile
balanced
Default Scenario
standard
Algorithm
TOPSIS
Weight Strategy
Expert (Manual) (API value Expert)
Catalog
DKR-AUTO-RUNTIME-001, version 13.9.3
The deterministic Decision Service evaluates and ranks the vehicles. The Explanation of Decision Result is explanatory only and must not select, rerank, recalculate, or override the deterministic result.

Understanding This Decision

Determine Fleet Vehicle Replacement helps fleet operations teams decide which vehicle should be prioritized for replacement by balancing ownership cost, expected annual downtime, recurring maintenance burden, mission criticality, and safety condition.

Business question

Which vehicle should be recommended for replacement in the selected Fleet Vehicle Management context?

Expected outcome

A ranked list of candidate vehicles with a recommended vehicle and criterion-level score evidence.

Typical users

Fleet managers, maintenance planners, operations managers, asset lifecycle teams, finance teams, and integration teams building fleet replacement workflows.

Decision boundary

Use this decision to prioritize supplied fleet vehicles. It does not replace safety inspection, regulatory review, procurement approval, driver input, or asset-disposal governance.

Criteria

Use exact criterionId keys. Display names can change; canonical IDs drive validation, mapping, weighting, and execution.

Criterion IDNameDescriptionDirectionWeightUnitData TypeValidationRequired
lifecycle_costLifecycle CostExpected financial cost associated with the vehicle over the replacement horizon.minimize25CurrencyCurrencynon_negative_currencytrue
downtime_riskOperational Availability RiskExpected annual out-of-service days.minimize20Days per YearNumbernon_negative_decimaltrue
maintenance_trendMaintenance BurdenAnnual repair-event frequency indicating recurring maintenance burden.minimize20Events per YearIntegernon_negative_integertrue
utilization_criticalityUtilization CriticalityHow important the vehicle is to day-to-day operations and service coverage.maximize20PercentageNumberpercentage_0_to_100true
safety_ratingSafety RatingInspection-based safety rating for continued use.maximize15RatingNumberrating_1_to_5true

Data Preparation Guide

Loading criterion-specific integration guidance...

Constraint Processing

This decision currently has no catalog-defined hard constraints. All validated candidates proceed to criteria-based ranking.

Verified Catalog ConstraintStatusEffect
None returned by Decision Catalog for AUTO-FLEET-001No hard constraints definedCandidate eligibility is determined by request validation; all validated candidates are ranked by criteria.
Eligible and Excluded Candidates
{
  "constraintSummary": {
    "definedConstraintCount": 0,
    "activeConstraintCount": 0,
    "eligibleOptionCount": 3,
    "excludedOptionCount": 0,
    "eligibleOptions": [
      "VEHICLE-001",
      "VEHICLE-002",
      "VEHICLE-003"
    ],
    "excludedOptions": []
  }
}
Constraint Handling Pattern
const constraints = decisionDetail.constraints || [];
if (constraints.length === 0) {
  // No catalog-defined hard constraints.
  // Submit all validated candidates for criteria-based ranking.
}

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-FLEET-001, no candidates are excluded by catalog-defined constraints because Decision Catalog currently defines none for this decision.

Decision Preparation Model

The active decision preparation model reads fleet asset options from $.assets, option IDs from option.assetId, and display names from option.unitName. It prepares canonical values for AUTO-FLEET-001 before Decision Service applies decision validation and ranking.

Profile ID
fleet-vehicle-replacement
Version
1.0.0
Options Path
$.assets
Option ID Path
option.assetId
Display Name Path
option.unitName
Client Business Data PathTransformationCanonical Criterion IDUnitValidation
option.annualMaintenanceCost, option.projectedRepairCost, option.downtimeCostsumlifecycle_costCurrencynon_negative_currency
option.daysOutOfService, payload.observationPeriodDaysannualize observed downtimedowntime_riskDays per Yearnon_negative_decimal
option.repairEventsLastYearpreserve annual event countmaintenance_trendEvents per Yearnon_negative_integer
option.missionCriticalitymission-criticality lookuputilization_criticalityPercentagepercentage_0_to_100
option.safetyInspectionScoredirect numeric valuesafety_ratingRatingrating_1_to_5
Raw Business Data
{
  "fleetId": "FLEET-DEMO-001",
  "observationPeriodDays": 365,
  "assets": [
    {
      "assetId": "VEHICLE-001",
      "unitName": "Vehicle 001",
      "annualMaintenanceCost": 8200,
      "projectedRepairCost": 6200,
      "downtimeCost": 3600,
      "daysOutOfService": 9,
      "repairEventsLastYear": 6,
      "missionCriticality": "High",
      "safetyInspectionScore": 4.5
    }
  ]
}
Prepared Option Values
{
  "optionId": "VEHICLE-001",
  "name": "Vehicle 001",
  "values": {
    "lifecycle_cost": 18000,
    "downtime_risk": 9,
    "maintenance_trend": 6,
    "utilization_criticality": 90,
    "safety_rating": 4.5
  }
}
Client applications own operational facts. Decision Catalog owns canonical decision knowledge.

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 IDNamePurpose
balancedBalancedPreserves the default criterion priorities for this fleet decision.
cost_focusedCost FocusedEmphasizes minimized financial and operating cost criteria.
quality_focusedQuality FocusedEmphasizes maximized quality, value, condition, and performance criteria.
risk_averseRisk AverseEmphasizes risk reduction, reliability, safety, condition, and repair exposure.
Scenario IDNameUse When
standardStandard Operating ScenarioNormal fleet replacement and asset lifecycle context.
budget_reductionBudget Reduction ScenarioCapital, cost, or budget pressure is higher than normal.
high_demandHigh Demand ScenarioAvailability, demand, or throughput pressure is higher than normal.
emergency_operationsEmergency Operations ScenarioOperational continuity and risk control outweigh routine optimization.

Prepared Input

The active Decision Service Prepared Criteria Mode contract accepts decisionId, profileId, scenarioId, algorithm, weightStrategy, runSensitivity, requestContext, and options.

Prepared Criteria Mode JSON
{
  "decisionId": "AUTO-FLEET-001",
  "profileId": "balanced",
  "scenarioId": null,
  "algorithm": "TOPSIS",
  "weightStrategy": "Expert",
  "runSensitivity": false,
  "requestContext": {
    "correlationId": "auto-fleet-001-demo-001"
  },
  "options": [
    {
      "optionId": "VEHICLE-001",
      "name": "Vehicle 001",
      "values": {
        "lifecycle_cost": 18000,
        "downtime_risk": 9,
        "maintenance_trend": 6,
        "utilization_criticality": 92,
        "safety_rating": 4.5
      }
    },
    {
      "optionId": "VEHICLE-002",
      "name": "Vehicle 002",
      "values": {
        "lifecycle_cost": 14500,
        "downtime_risk": 3,
        "maintenance_trend": 2,
        "utilization_criticality": 76,
        "safety_rating": 4
      }
    },
    {
      "optionId": "VEHICLE-003",
      "name": "Vehicle 003",
      "values": {
        "lifecycle_cost": 22500,
        "downtime_risk": 15,
        "maintenance_trend": 8,
        "utilization_criticality": 88,
        "safety_rating": 3.5
      }
    }
  ]
}

Execute

cURL
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-fleet-001-demo-001" \
  --data @auto-fleet-001-execute.json

Decision Service retrieves authoritative criteria, profiles, scenarios, and validation metadata from Decision Catalog, composes the engine-ready request, and executes the deterministic ranking.

Interpret the Result

Every successful response includes the deterministic decisionResult and a top-level explanation object. Use decisionResult.winner and decisionResult.ranking as the ranking; the explanation adds context but does not change it. Scores are useful within the same run, not across unrelated decisions or catalog versions.

Successful Response Shape
{
  "service": "decisioq",
  "version": "7.6.3",
  "requestId": "0HNE...",
  "operation": "Decide",
  "success": true,
  "timestampUtc": "2026-07-19T00:00:00Z",
  "requestContext": {
    "correlationId": "auto-fleet-001-demo-001",
    "decision": {
      "id": "AUTO-FLEET-001",
      "name": "Prioritize Fleet Vehicle Replacement",
      "catalogVersion": "13.9.3"
    }
  },
  "configurationUsed": {
    "weightStrategy": { "value": "Expert", "source": "ExplicitRequest" },
    "rankingAlgorithm": { "value": "TOPSIS", "source": "ExplicitRequest" },
    "profile": { "value": "balanced", "source": "ExplicitRequest" },
    "scenario": { "value": "standard", "source": "ExplicitRequest" },
    "sensitivity": { "value": false, "source": "PlatformDefault" }
  },
  "decisionResult": {
    "winner": "VEHICLE-001",
    "confidence": 72.4,
    "ranking": [
      {
        "optionId": "VEHICLE-001",
        "score": 0.8421,
        "breakdown": {
          "lifecycle_cost": 0.25,
          "utilization_criticality": 0.20
        },
        "normalizationBreakdown": {}
      }
    ],
    "excludedOptions": []
  },
  "explanation": {
      "summary": "The selected vehicle has the strongest overall replacement priority.",
      "whyRecommended": "It combined high utilization criticality with acceptable safety evidence and manageable lifecycle cost.",
      "keyDrivers": [],
      "tradeoffs": [],
      "competitors": [],
      "sensitivitySummary": "Sensitivity analysis was not included in this response.",
      "scenarioSummary": "The standard operating scenario was selected.",
      "risks": [],
      "nextSteps": [],
      "assumptions": []
  },
  "constraintSummary": {
    "definedConstraintCount": 0,
    "activeConstraintCount": 0,
    "eligibleOptionCount": 3,
    "excludedOptionCount": 0,
    "eligibleOptions": [
    "VEHICLE-001",
    "VEHICLE-002",
    "VEHICLE-003"
    ],
    "excludedOptions": []
  },
  "warnings": []
}
WinnerThe selected vehicle option ID in decisionResult.winner.
WarningsNon-fatal issues to review before relying on the recommendation.
Operational MetadataKeep request IDs, correlation IDs, selected profile, selected scenario, and catalog version for support.

Sensitivity Analysis

Use "runSensitivity": true when the client needs evidence about recommendation stability. DecisioQ varies criterion weights by controlled factors while keeping submitted options and values fixed.

Sensitivity Result Shape
{
  "runSensitivity": true,
  "sensitivityResult": {
    "stableWinner": true,
    "winner": "VEHICLE-001",
    "mostSensitiveCriterion": "lifecycle_cost",
    "confidence": 95,
    "criterionImpacts": {
      "lifecycle_cost": 0.1842
    },
    "winnerChangeCounts": {
      "lifecycle_cost": 0
    }
  }
}
Sensitivity Analysis does not replace the deterministic decision result. It provides evidence about how stable that result is under permitted changes.

Explanation of Decision Result

Every successful response includes a provider-neutral top-level explanation object. The Explanation Service receives the finalized deterministic result and a controlled evidence package; the object adds context but does not change the ranking.

Explanation Shape
{
  "explanation": {
      "summary": "The selected vehicle has the strongest overall replacement priority.",
      "whyRecommended": "It combined high utilization criticality with acceptable safety evidence and manageable lifecycle cost.",
      "keyDrivers": [],
      "tradeoffs": [],
      "competitors": [],
      "sensitivitySummary": "Sensitivity analysis was not included in this response.",
      "scenarioSummary": "The standard operating scenario was selected.",
      "risks": [],
      "nextSteps": [],
      "assumptions": []
  }
}

The Explanation of Decision Result must not receive raw private vehicle files or unrestricted notes. It explains the already-finalized result; it does not select, rerank, recalculate, or override it.

Tracing and Logs

Use request identifiers to connect client, Identity, Decision Catalog, and Decision Service activity. Authentication and identity-security activity belongs in IdentityAuditEvents. Catalog, mapping, decision execution, sensitivity, and explanation operations belong in decisioq_log.

X-Request-Id
Optional client-supplied request ID. If omitted, Decision Service or Decision Catalog generates one.
X-Correlation-Id
Optional client workflow ID propagated from Decision Service to Decision Catalog.
requestContext.correlationId
Payload value echoed by Decision Service and used for execution logging.
DecisionId
Recorded for decision-specific operations. General catalog and identity operations may not have a decision ID.
ServiceNameOperationRequestIdCorrelationIdDecisionIdStatusTimestamp
IdentityToken issuedidentity requestoptionalSuccessUTC
Decision CatalogDecisionCatalog.DecisionDefinitionDecision Service propagated requestauto-fleet-001-demo-001AUTO-FLEET-001SuccessUTC
Decision ServiceDecideDecision Service requestauto-fleet-001-demo-001AUTO-FLEET-001SuccessUTC
Never log API Consumer secrets, bearer tokens, raw authorization headers, or sensitive vehicle details.

Code Examples

These examples authenticate, retrieve AUTO-FLEET-001 metadata, validate profile and scenario selections, execute the decision, pass a correlation ID, and print the deterministic result.

Environment variables
DECISIOQ_CLIENT_ID
DECISIOQ_CLIENT_SECRET

Optional:
DECISIOQ_IDENTITY_URL=https://identity.vinquery.com/connect/token
DECISIOQ_DKS_URL=https://dks.vinquery.com
DECISIOQ_DDE_URL=https://dde.vinquery.com

Troubleshooting

SymptomLikely CauseHTTP Status or ErrorCorrective ActionWhere to Investigate
Token rejectedInvalid credentials or access code401 or 400Request a new server-side token; do not expose credentials in browser JavaScript.IdentityAuditEvents
Unknown decision IDDecision is absent from the active Decision Catalog404Verify AUTO-FLEET-001 in /decisioncatalog/decisions/AUTO-FLEET-001.Decision Catalog logs
Invalid profile or scenarioRequest value is not listed in decision metadata400Use one of the profile or scenario IDs returned by Decision Catalog.Decision Service validation logs
Missing criterionOption values omit a required canonical criterion400 validation errorSend all five required AUTO-FLEET-001 criteria for every vehicle.Decision Service validation response
Out-of-range valueScore outside 0-100 or negative currency value400 validation errorApply score_0_to_100 and non_negative_currency before submit.Client validation, Decision Service validation
Service unavailableDecision Catalog, Decision Service, or Identity unavailable5xx or non-JSON upstream errorCheck health endpoints and server logs.Hosting/IIS logs and DecisioQ logs
Explanation unavailableExplanation provider disabled or failed silentlySuccess with a top-level explanation objectUse deterministic decisionResult; inspect the returned explanation object for available context and warnings.Decision Service application logs
Download link failsStatic asset missing from website404Verify the file exists under examples/auto-fleet-001.Website static files

Production Checklist

Security

Keep API Consumer credentials server-side, use HTTPS, cache JWTs, renew before expiration, never log secrets, and ensure the API Consumer is linked to a DecisioQ account for usage accounting.

Knowledge and Versioning

Retrieve Decision Catalog metadata, preserve decision preparation model version 1.0.0, and monitor catalog version changes.

Execution Reliability

Use timeouts, cancellation tokens, structured error handling, and avoid unsafe automatic retries unless idempotency is established.

Observability

Propagate X-Correlation-Id, retain requestId, and distinguish Decision Catalog failures from Decision Service failures.

Explanation Safety

Persist deterministic results separately and isolate explanation failure from ranking success.

Testing

Use contract tests, validation tests, sensitivity tests, and privacy-safe vehicle samples.