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

AUTO-AUCT-006 End-to-End Example

Select Auction House using Identity, the secured Knowledge Catalog, DKS token propagation, and Prepared Decision Input execution.

Automotive Auto Auctions Vehicle Acquisition TOPSIS
IdentityIssue bearer token
CatalogDiscover decision metadata
ProfileSelect weights and scenario
ExecuteRun deterministic ranking
ExplainReview result context

Overview

AUTO-AUCT-006, Select Auction House, ranks candidate auction houses by acquisition fit, cost control, vehicle quality, logistics, reputation, and title handling.

Decision ID
AUTO-AUCT-006
Decision Name
Select Auction House
Industry Profile
auto-auctions-select-auction-house-auto-auct-006 version 1.0.0
Default Profile
balanced
Default Scenario
standard
Catalog
DKR-AUTO-RUNTIME-001, version 13.9.3
The deterministic Decision Engine ranks the options. AI explanation text, when returned, is explanatory only and must not choose, rerank, or override the deterministic result.

Understanding This Decision

Select Auction House helps a buyer choose the auction source that best balances inventory access, fee discipline, expected vehicle quality, logistics, auction reputation, and title-processing reliability.

Business question

Which auction house should be used for the current acquisition need?

Expected outcome

A ranked list of candidate auction houses with a recommended winner and criterion-level score evidence.

Typical users

Vehicle acquisition managers, dealership buyers, inventory planners, and integration teams building acquisition workflows.

Decision boundary

Use this decision to compare auction sources. It does not replace legal, compliance, title, or vendor-contract review.

Architecture

  1. Request a token from the Identity service.
  2. Use the returned jwtToken as the bearer token.
  3. Load the catalog and decision detail from DKS.
  4. Build a Prepared Decision Input using canonical criterion IDs.
  5. Execute the decision through DDE.
  6. Use X-Request-Id and X-Correlation-Id for tracing across DDE and DKS.
Token propagation: when DDE needs authoritative decision metadata during execution, it forwards the caller's bearer token to DKS with the request identifiers. This lets the catalog and execution records share the same security and tracing context.

Authentication

Request a secure session token from Identity. The current token response field is jwtToken.

Token request
POST https://identity.vinquery.com/connect/token
Content-Type: application/json

{
  "clientId": "{clientId}",
  "clientSecret": "{clientSecret}",
  "audience": "vinquery:api:decisioq"
}

Catalog Discovery

Use DKS to discover the catalog and then load complete metadata for AUTO-AUCT-006.

Catalog
GET https://dks.vinquery.com/decisioncatalog
Authorization: Bearer {jwtToken}
Decision Detail
GET https://dks.vinquery.com/decisioncatalog/decisions/AUTO-AUCT-006
Authorization: Bearer {jwtToken}

Criteria

Criterion IDs are intentionally stable machine identifiers. Display labels are for users; request values should be keyed by canonical criterionId.

Criterion IDNameDirectionWeightValidation
vehicle_availability_scoreVehicle Availability Scoremaximize25score_0_to_100
buyer_fee_levelBuyer Fee Levelminimize20non_negative_currency
average_vehicle_qualityAverage Vehicle Qualitymaximize20score_0_to_100
distance_to_facilityDistance to Facilityminimize15non_negative_integer
auction_reputation_scoreAuction Reputation Scoremaximize15score_0_to_100
title_processing_speedTitle Processing Speedmaximize5score_0_to_100

Constraint Processing

This decision includes a catalog-defined hard constraint. DKS returns the constraint with the decision detail, and DDE evaluates it before criteria-based ranking.

Verified Catalog ConstraintStatusEffect
AUTO-AUCT-006-REPUTATION-MIN-80Hard, enabled, mandatoryRequires auction_reputation_score >= 80 before a candidate can participate in ranking.
Eligible and Excluded Candidates
{
  "constraintSummary": {
    "definedConstraintCount": 1,
    "activeConstraintCount": 1,
    "eligibleOptionCount": 2,
    "excludedOptionCount": 1,
    "eligibleOptions": [
      "option-1",
      "option-2"
    ],
    "excludedOptions": [
      {
        "optionId": "option-3",
        "reasons": [
          "Auction reputation score is below the minimum threshold of 80."
        ]
      }
    ]
  }
}
Constraint Handling Pattern
const constraints = decisionDetail.constraints || [];
if (constraints.length > 0) {
  // DDE 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-AUCT-006, option-3 is excluded from the showcase sample because its auction reputation score is below the catalog threshold.

Industry Profile

The active industry profile uses $.auctionLots as the options path, $.optionId as the option ID, and $.name as the option display name.

Business Data PathCriterion ID
option.assessment.vehicleAvailabilityScorevehicle_availability_score
option.financial.buyerFeeLevelbuyer_fee_level
option.assessment.averageVehicleQualityaverage_vehicle_quality
option.vehicle.acquisition.distanceToFacilitydistance_to_facility
option.assessment.auctionReputationScoreauction_reputation_score
option.vehicle.acquisition.titleProcessingSpeedtitle_processing_speed
Business Data Fragment
{
  "auctionLots": [
    {
      "optionId": "MANHEIM-TORONTO",
      "name": "Manheim Toronto",
      "assessment": {
        "vehicleAvailabilityScore": 88,
        "averageVehicleQuality": 88,
        "auctionReputationScore": 88
      },
      "financial": {
        "buyerFeeLevel": 1250
      },
      "vehicle": {
        "acquisition": {
          "distanceToFacility": 54,
          "titleProcessingSpeed": 88
        }
      }
    }
  ]
}
Prepared Option Values
{
  "optionId": "MANHEIM-TORONTO",
  "name": "Manheim Toronto",
  "values": {
    "vehicle_availability_score": 88,
    "buyer_fee_level": 1250,
    "average_vehicle_quality": 88,
    "distance_to_facility": 54,
    "auction_reputation_score": 88,
    "title_processing_speed": 88
  }
}

Profiles and Scenarios

A profile changes criterion weights. A scenario describes the operating context for the execution. The active DKS catalog exposes these choices with the decision detail response.

Profile IDNamePurpose
balancedBalancedPreserves the default DKS criterion weights.
cost_focusedCost FocusedPlaces stronger emphasis on minimized financial and operating cost criteria.
quality_focusedQuality FocusedPlaces stronger emphasis on quality, value, condition, inventory fit, and performance criteria.
risk_averseRisk AversePlaces stronger emphasis on risk reduction, certainty, condition, title, and operational exposure.
Scenario IDNameUse When
standardStandard Operating ScenarioRoutine auction decision execution.
limited_budgetLimited Budget ScenarioPurchasing capital is constrained and financial discipline is emphasized.
high_demandHigh Demand ScenarioInventory demand is high and speed or availability matters more than normal.
risk_controlRisk Control ScenarioTitle, condition, market, or operational uncertainty must be controlled more aggressively.

Prepared Input

For Prepared Decision Input, send decisionId, selected profile/scenario IDs, and option values keyed by canonical criterion ID.

Prepared Decision Input JSON
{
  "decisionId": "AUTO-AUCT-006",
  "profileId": "balanced",
  "scenarioId": "standard",
  "algorithm": "TOPSIS",
  "weightStrategy": "Manual",
  "runSensitivity": false,
  "requestContext": {
    "correlationId": "auto-auct-006-demo-001"
  },
  "options": [
    {
      "optionId": "MANHEIM-TORONTO",
      "name": "Manheim Toronto",
      "values": {
        "vehicle_availability_score": 88,
        "buyer_fee_level": 1250,
        "average_vehicle_quality": 88,
        "distance_to_facility": 54,
        "auction_reputation_score": 88,
        "title_processing_speed": 88
      }
    },
    {
      "optionId": "ADESA-TORONTO",
      "name": "ADESA Toronto",
      "values": {
        "vehicle_availability_score": 81,
        "buyer_fee_level": 1750,
        "average_vehicle_quality": 81,
        "distance_to_facility": 71,
        "auction_reputation_score": 81,
        "title_processing_speed": 81
      }
    }
  ]
}

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

The Decision Engine validates the request, retrieves authoritative criteria, constraints, profiles, scenarios, and validation metadata from DKS, applies hard constraints, ranks eligible options, and returns the decision result plus execution metadata.

Interpret the Result

The successful response is centered on decisionResult. The winner and ranking are deterministic outputs; optional explanation fields add context but do not change the ranking.

Successful Response Shape
{
  "service": "decisioq",
  "version": "7.6.3",
  "requestId": "0HNE...",
  "operation": "Decide",
  "success": true,
  "decisionType": "AUTO-AUCT-006",
  "decisionVersion": "13.9.3",
  "timestampUtc": "2026-07-18T00:00:00Z",
  "decisionResult": {
    "winner": "MANHEIM-TORONTO",
    "confidence": 72.4,
    "ranking": [
      {
        "optionId": "MANHEIM-TORONTO",
        "score": 0.8421,
        "breakdown": {
          "vehicle_availability_score": 0.25
        },
        "normalizationBreakdown": {}
      }
    ],
    "excludedOptions": [
      {
        "optionId": "IMPACT-AUTO-AUCTIONS",
        "reasons": [
          "Auction reputation score is below the minimum threshold of 80."
        ]
      }
    ],
    "explanation": {
      "summary": "Manheim Toronto ranked highest based on the submitted criteria.",
      "strengths": [],
      "weaknesses": [],
      "exclusions": [
        "IMPACT-AUTO-AUCTIONS: Auction reputation score is below the minimum threshold of 80."
      ]
    }
  },
  "constraintSummary": {
    "definedConstraintCount": 1,
    "activeConstraintCount": 1,
    "eligibleOptionCount": 2,
    "excludedOptionCount": 1,
    "eligibleOptions": [
    "MANHEIM-TORONTO",
    "ADESA-TORONTO"
    ],
    "excludedOptions": [
      {
        "optionId": "IMPACT-AUTO-AUCTIONS",
        "reasons": [
          "Auction reputation score is below the minimum threshold of 80."
        ]
      }
    ]
  },
  "warnings": [],
  "requestContext": {
    "correlationId": "auto-auct-006-demo-001"
  }
}
WinnerThe selected option ID in decisionResult.winner.
RankingAll eligible options ordered by score.
BreakdownCriterion-level evidence for the ranking.

Sensitivity Analysis

Set runSensitivity to true on catalog execution when the client wants recommendation-stability information in the same response. The sensitivity engine perturbs criterion weights by controlled factors and reports whether the winner remains stable.

Sensitivity Result Shape
{
  "sensitivityResult": {
    "stableWinner": true,
    "winner": "MANHEIM-TORONTO",
    "mostSensitiveCriterion": "buyer_fee_level",
    "confidence": 95,
    "criterionImpacts": {
      "buyer_fee_level": 0.1842
    },
    "winnerChangeCounts": {
      "buyer_fee_level": 0
    }
  }
}

Use sensitivity output to decide whether a recommendation is robust enough for automation or should be reviewed by a person.

Explanation of Decision Result

Every successful response can include deterministic explanation text under decisionResult.explanation and explanation. If the optional AI layer is enabled, the response may also include an ai block with structured business-language explanation fields.

AI Explanation Shape
{
  "ai": {
    "enabled": true,
    "generated": true,
    "schemaValidated": true,
    "explanation": {
      "summary": "The selected auction house provided the strongest overall fit.",
      "whyRecommended": "It combined strong availability and quality with acceptable cost.",
      "keyDrivers": [],
      "tradeoffs": [],
      "competitors": [],
      "sensitivitySummary": "Sensitivity analysis was not included in this response.",
      "scenarioSummary": "The standard scenario was selected.",
      "risks": [],
      "nextSteps": [],
      "assumptions": []
    }
  }
}
Explanation output is supporting context. Business-facing pages should render the explanation, warnings, assumptions, and limitations without provider branding.

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 DDE to DKS.
requestContext.correlationId
Optional payload value echoed in the response and used for tracing.
executionTrace
Advanced execution metadata including selected profile, selected scenario, effective weights, and applied constraints.

Code Examples

These examples demonstrate the current DecisioQ flow:

  1. Request jwtToken from https://identity.vinquery.com/connect/token.
  2. Load AUTO-AUCT-006 metadata from https://dks.vinquery.com/decisioncatalog/decisions/AUTO-AUCT-006.
  3. Execute a Prepared Decision Input at https://dde.vinquery.com/api/v1/decide.

Set these environment variables before running any companion example:

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

Download the source files directly:

Troubleshooting

SymptomLikely CauseWhat to Check
401 UnauthorizedMissing, expired, or invalid bearer token.Request a fresh jwtToken from Identity and send it as Authorization: Bearer ....
Decision not foundThe decision ID is not in the active catalog.Load /decisioncatalog/decisions/AUTO-AUCT-006 and confirm the ID is published.
Validation failedA required criterion value is missing or outside its rule.Use canonical criterion IDs and keep score values in the expected range.
HTML error responseAn upstream hosted service failed before returning JSON.Check service health and server logs for Identity, DKS, or DDE.

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 DKS 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 AI text override deterministic results.

User Experience

Show business labels to users and keep raw execution trace collapsed for advanced diagnostics.