Overview
AUTO-UCD-008, Determine Trade-In Value, compares candidate trade-in appraisal options using vehicle fit, market demand, gross margin potential, reconditioning cost, compliance risk, and customer value.
- Decision ID
AUTO-UCD-008- Decision Name
- Determine Trade-In Value
- Decision Preparation Model
used-car-dealership-determine-trade-in-value-auto-ucd-008version1.0.0- Default Profile
balanced- Runnable Scenario
standard_retail- Catalog
DKR-AUTO-RUNTIME-001, version13.9.3- API Compatibility
7.4.0or later Prepared Criteria Mode execution flow
Understanding This Decision
Determine Trade-In Value helps a used-car dealership compare ways to handle a trade-in appraisal before committing to a valuation path. The decision is useful when an appraisal team needs a repeatable recommendation that balances retail fit, market demand, expected margin, reconditioning burden, compliance exposure, and customer value.
Business question
Which option should be recommended for determine trade-in value in the selected Used Car Dealership context?
Expected outcome
A recommended option or ranked set of options with the criteria that most influenced the result.
Typical users
Used-car managers, appraisal teams, inventory planners, sales managers, and integration teams building trade-in workflows.
Decision boundary
Use this decision to rank submitted candidate options. It does not discover missing options and does not replace dealership approvals, compliance checks, or professional appraisal judgment.
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 |
|---|---|---|---|---|
determine_trade_in_value_vehicle_fit_score | Determine Trade In Value Fit Score | maximize | 20 | score_0_to_100 |
determine_trade_in_value_market_demand_score | Market Demand Score | maximize | 17 | score_0_to_100 |
determine_trade_in_value_gross_margin_potential | Gross Margin Potential | maximize | 17 | non_negative_currency |
determine_trade_in_value_reconditioning_or_process_cost | Reconditioning / Process Cost | minimize | 16 | non_negative_currency |
determine_trade_in_value_compliance_risk_score | Compliance Risk Score | minimize | 15 | score_0_to_100 |
determine_trade_in_value_customer_value_score | Customer Value Score | maximize | 15 | score_0_to_100 |
Data Preparation Guide
Constraint Processing
This decision currently has no catalog-defined hard constraints. All validated candidates proceed to criteria-based ranking.
| Verified Catalog Constraint | Status | Effect |
|---|---|---|
None returned by Decision Catalog for AUTO-UCD-008 | No hard constraints defined | Candidate eligibility is determined by request validation; all validated candidates are ranked by criteria. |
{
"constraintSummary": {
"definedConstraintCount": 0,
"activeConstraintCount": 0,
"eligibleOptionCount": 3,
"excludedOptionCount": 0,
"eligibleOptions": [
"OPTION-001",
"OPTION-002",
"OPTION-003"
],
"excludedOptions": []
}
}
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-UCD-008, no candidates are excluded by catalog-defined constraints because Decision Catalog currently defines none for this decision.
Decision Preparation Model
The published Decision Preparation Model validates and transforms illustrative Business Data into the canonical criteria required by AUTO-UCD-008 before Decision Service applies ranking.
- Profile ID
used-car-dealership-determine-trade-in-value-auto-ucd-008- Version
1.0.0- Options Path
$.salesOpportunities- Option ID Path
$.optionId- Display Name Path
$.name
| Client Business Data Path | Transformation | Canonical Criterion ID | Unit | Validation |
|---|---|---|---|---|
option.assessment.determineTradeInValueFitScore | direct value | determine_trade_in_value_vehicle_fit_score | Score | Input Contract |
option.assessment.marketDemandScore | direct value | determine_trade_in_value_market_demand_score | Score | Input Contract |
option.financial.grossMarginPotential | direct value | determine_trade_in_value_gross_margin_potential | Currency | Input Contract |
option.financial.reconditioningProcessCost | direct value | determine_trade_in_value_reconditioning_or_process_cost | Currency | Input Contract |
option.risk.complianceRiskScore | direct value | determine_trade_in_value_compliance_risk_score | Score | Input Contract |
option.assessment.customerValueScore | direct value | determine_trade_in_value_customer_value_score | Score | Input Contract |
{
"requestContext": {
"sourceSystem": "automotive-profile-factory",
"correlationId": "factory-auto-ucd-008"
},
"salesOpportunities": [
{
"optionId": "SALES-008-01",
"name": "Determine Trade-In Value Option 1",
"assessment": {
"determineTradeInValueFitScore": 4811.0,
"marketDemandScore": 76.0,
"customerValueScore": 2026.0
},
"financial": {
"grossMarginPotential": 16374.0,
"reconditioningProcessCost": 37407.0
},
"risk": {
"complianceRiskScore": 88.0
}
},
{
"optionId": "SALES-008-02",
"name": "Determine Trade-In Value Option 2",
"assessment": {
"determineTradeInValueFitScore": 12274.0,
"marketDemandScore": 84.0,
"customerValueScore": 7148.0
},
"financial": {
"grossMarginPotential": 24695.0,
"reconditioningProcessCost": 53110.0
},
"risk": {
"complianceRiskScore": 79.0
}
}
]
}
{
"optionId": "SALES-008-01",
"name": "Determine Trade-In Value Option 1",
"values": {
"determine_trade_in_value_vehicle_fit_score": 4811.0,
"determine_trade_in_value_market_demand_score": 76.0,
"determine_trade_in_value_gross_margin_potential": 16374.0,
"determine_trade_in_value_reconditioning_or_process_cost": 37407.0,
"determine_trade_in_value_compliance_risk_score": 88.0,
"determine_trade_in_value_customer_value_score": 2026.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 | Balances vehicle fit, market demand, profitability, cost, compliance risk, and customer value. |
profit_focused | Profit Focused | Places extra emphasis on gross margin potential and cost control. |
risk_control | Risk Control | Places extra emphasis on title, compliance, condition, and operational risk control. |
customer_value | Customer Value | Places extra emphasis on customer fit, customer value, and market demand. |
| Scenario ID | Name | Use When |
|---|---|---|
standard_retail | Standard Retail Case | Normal used-car dealership operating conditions for Determine Trade-In Value. |
margin_pressure | Margin Pressure | Competitive pricing, auction costs, reconditioning spend, or aged inventory creates pressure to protect gross margin. |
high_compliance_risk | High Compliance Risk | Title, disclosure, financing, warranty, certification, or customer-risk factors require stronger compliance controls. |
fast_turn_inventory | Fast-Turn Inventory | Faster inventory movement, shorter cycle time, or quicker customer conversion is prioritized. |
standard_retail in runnable examples because it is present in the active Decision Catalog scenario list for AUTO-UCD-008.Prepared Input
For Prepared Criteria Mode, send decisionId, selected profile/scenario IDs, and option values keyed by canonical criterion ID.
{
"decisionId": "AUTO-UCD-008",
"profileId": "balanced",
"scenarioId": "standard_retail",
"algorithm": "TOPSIS",
"weightStrategy": "Expert",
"runSensitivity": false,
"requestContext": {
"correlationId": "auto-ucd-008-demo-001"
},
"options": [
{
"optionId": "OPTION-001",
"name": "Retail Trade Option",
"values": {
"determine_trade_in_value_vehicle_fit_score": 86,
"determine_trade_in_value_market_demand_score": 92,
"determine_trade_in_value_gross_margin_potential": 3200,
"determine_trade_in_value_reconditioning_or_process_cost": 900,
"determine_trade_in_value_compliance_risk_score": 22,
"determine_trade_in_value_customer_value_score": 84
}
},
{
"optionId": "OPTION-002",
"name": "Wholesale Backup Option",
"values": {
"determine_trade_in_value_vehicle_fit_score": 78,
"determine_trade_in_value_market_demand_score": 73,
"determine_trade_in_value_gross_margin_potential": 4100,
"determine_trade_in_value_reconditioning_or_process_cost": 1600,
"determine_trade_in_value_compliance_risk_score": 35,
"determine_trade_in_value_customer_value_score": 76
}
},
{
"optionId": "OPTION-003",
"name": "Certified Retail Option",
"values": {
"determine_trade_in_value_vehicle_fit_score": 91,
"determine_trade_in_value_market_demand_score": 85,
"determine_trade_in_value_gross_margin_potential": 2300,
"determine_trade_in_value_reconditioning_or_process_cost": 650,
"determine_trade_in_value_compliance_risk_score": 18,
"determine_trade_in_value_customer_value_score": 88
}
}
]
}
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-ucd-008-demo-001" \
--data @auto-ucd-008-execute.json
The Decision Service validates the request, retrieves authoritative criteria, constraints, profiles, scenarios, and validation metadata from Decision Catalog, applies hard constraints, ranks eligible options, and returns the decision result plus execution metadata.
Interpret the Result
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.
{
"service": "decisioq",
"version": "7.6.3",
"requestId": "0HNE...",
"operation": "Decide",
"success": true,
"decisionType": "AUTO-UCD-008",
"decisionVersion": "13.9.3",
"timestampUtc": "2026-07-18T00:00:00Z",
"decisionResult": {
"winner": "OPTION-001",
"confidence": 72.4,
"ranking": [
{
"optionId": "OPTION-001",
"score": 0.8421,
"breakdown": {
"determine_trade_in_value_vehicle_fit_score": 0.20,
"determine_trade_in_value_market_demand_score": 0.17,
"determine_trade_in_value_gross_margin_potential": 0.17,
"determine_trade_in_value_reconditioning_or_process_cost": 0.16,
"determine_trade_in_value_compliance_risk_score": 0.15,
"determine_trade_in_value_customer_value_score": 0.15
},
"normalizationBreakdown": {}
}
],
"excludedOptions": []
},
"explanation": {
"summary": "The selected trade-in option provided the strongest overall trade-in valuation fit.",
"whyRecommended": "It combined strong vehicle fit and market demand with acceptable reconditioning cost, compliance risk, and customer value.",
"keyDrivers": [],
"tradeoffs": [],
"competitors": [],
"sensitivitySummary": "Sensitivity analysis was not included in this response.",
"scenarioSummary": "The standard retail scenario was selected.",
"risks": [],
"nextSteps": [],
"assumptions": []
},
"constraintSummary": {
"definedConstraintCount": 0,
"activeConstraintCount": 0,
"eligibleOptionCount": 3,
"excludedOptionCount": 0,
"eligibleOptions": [
"OPTION-001",
"OPTION-002",
"OPTION-003"
],
"excludedOptions": []
},
"warnings": [],
"requestContext": {
"correlationId": "auto-ucd-008-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-001",
"mostSensitiveCriterion": "determine_trade_in_value_market_demand_score",
"confidence": 95,
"criterionImpacts": {
"determine_trade_in_value_market_demand_score": 0.1842
},
"winnerChangeCounts": {
"determine_trade_in_value_market_demand_score": 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 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 trade-in option provided the strongest overall trade-in valuation fit.",
"whyRecommended": "It combined strong vehicle fit and market demand with acceptable reconditioning cost, compliance risk, and customer value.",
"keyDrivers": [],
"tradeoffs": [],
"competitors": [],
"sensitivitySummary": "Sensitivity analysis was not included in this response.",
"scenarioSummary": "The standard retail 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.
Code Examples
These examples demonstrate the current DecisioQ flow:
- Request
jwtTokenfromhttps://identity.vinquery.com/connect/token. - Load
AUTO-UCD-008metadata fromhttps://dks.vinquery.com/decisioncatalog/decisions/AUTO-UCD-008. - 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
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-UCD-008 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. |
| 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.
