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

AUTO-NCD-002 End-to-End Example

Recommend Vehicle Model

Try the interactive showcase

New Car DealershipBusiness Data + Prepared CriteriaAHP priorities

Decision Overview

Compare vehicle models using purchase readiness, customer fit, gross profit potential, inventory availability, and deal risk.

Compare models for the same customer after confirming budget, passenger, accessibility, and usage requirements. Keep purchase readiness constant when it is a customer-level assessment. Fit, readiness, availability, and risk use 1–5 ratings, not 0–100 scores. Gross profit is the dealership's projected margin, not the customer's purchase price. This comparison does not place an order or approve financing.

Catalog decision: AUTO-NCD-002. Sector: New Car Dealership. Samples are fictional, not operational advice or production observations.

5-Minute Quick Path

  1. Review the three candidates in the interactive showcase.
  2. Start with the first working Business Data request, or send Prepared Criteria when values are already calculated.
  3. Inspect the ranking and rerun with changed inputs or AHP priorities.

Criteria and Scales

Use raw values in the published units. The engine normalizes them. AHP changes importance, not the direction or scale of an input.

IDMeaningUnitValidationDirectionBalanced weight
customer_purchase_readinessCustomer Purchase ReadinessRatingrating_1_to_5maximize25%
vehicle_fit_scoreVehicle Fit ScoreRatingrating_1_to_5maximize25%
gross_profit_potentialGross Profit PotentialCurrencynon_negative_currencymaximize20%
inventory_availabilityInventory AvailabilityRatingrating_1_to_5maximize15%
deal_riskDeal RiskRatingrating_1_to_5minimize15%

Data Preparation Guide

Business records → input schema → mapping profile → canonical criteria → ranking.

Use mapping profile new-car-dealership-recommend-vehicle-model-auto-ncd-002 version 1.0.0. These records contain business assessments as well as measurements; this profile renames and reshapes them, but does not infer scores from free text. Govern rating and scoring rubrics before production use.

The showcase collects Prepared Criteria directly. Its sample values match both downloadable request modes below.

Mapping profile · Input schema

Business sourceCanonical criterionTransformation
option.vehicle.sales.customerPurchaseReadinesscustomer_purchase_readinessDirect value; no unit conversion
option.assessment.vehicleFitScorevehicle_fit_scoreDirect value; no unit conversion
option.financial.grossProfitPotentialgross_profit_potentialDirect value; no unit conversion
option.vehicle.sales.inventoryAvailabilityinventory_availabilityDirect value; no unit conversion
option.risk.dealRiskdeal_riskDirect value; no unit conversion

Business Data Mode

Complete illustrative request with three candidates and an explicit decisionVersion. Send it to the decision execute endpoint; do not add an options array to this envelope.

Response identifiers: the current published profile uses root-relative identity paths, so translation returns generated IDs option-1, option-2, and option-3 in input order, with fallback option names. Map these back to the source records by that order. Prepared Criteria retains the explicit source IDs and names. Preserving source identity in Business Data requires a reviewed profile update; this example does not modify the deployed profile.
{
  "decisionId": "AUTO-NCD-002",
  "decisionVersion": "1.0.0",
  "businessData": {
    "requestContext": {
      "sourceSystem": "automotive-profile-factory",
      "correlationId": "factory-auto-ncd-002"
    },
    "salesOpportunities": [
      {
        "optionId": "MODEL-A",
        "name": "Compact hybrid",
        "vehicle": {
          "sales": {
            "customerPurchaseReadiness": 4.2,
            "inventoryAvailability": 4.7
          }
        },
        "assessment": {
          "vehicleFitScore": 4.8
        },
        "financial": {
          "grossProfitPotential": 2400
        },
        "risk": {
          "dealRisk": 1.5
        }
      },
      {
        "optionId": "MODEL-B",
        "name": "Family crossover",
        "vehicle": {
          "sales": {
            "customerPurchaseReadiness": 4.2,
            "inventoryAvailability": 3.8
          }
        },
        "assessment": {
          "vehicleFitScore": 4.5
        },
        "financial": {
          "grossProfitPotential": 3800
        },
        "risk": {
          "dealRisk": 2.1
        }
      },
      {
        "optionId": "MODEL-C",
        "name": "Electric hatchback",
        "vehicle": {
          "sales": {
            "customerPurchaseReadiness": 4.2,
            "inventoryAvailability": 4.1
          }
        },
        "assessment": {
          "vehicleFitScore": 4.3
        },
        "financial": {
          "grossProfitPotential": 3100
        },
        "risk": {
          "dealRisk": 2.5
        }
      }
    ]
  }
}

Download Business Data request

Prepared Criteria Mode

The same candidates after direct mapping. This request uses the balanced profile with no named scenario. Do not add businessData to this envelope.

{
  "decisionId": "AUTO-NCD-002",
  "decisionName": "Recommend Vehicle Model",
  "profileId": "balanced",
  "scenarioId": null,
  "options": [
    {
      "optionId": "MODEL-A",
      "name": "Compact hybrid",
      "values": {
        "customer_purchase_readiness": 4.2,
        "vehicle_fit_score": 4.8,
        "gross_profit_potential": 2400,
        "inventory_availability": 4.7,
        "deal_risk": 1.5
      }
    },
    {
      "optionId": "MODEL-B",
      "name": "Family crossover",
      "values": {
        "customer_purchase_readiness": 4.2,
        "vehicle_fit_score": 4.5,
        "gross_profit_potential": 3800,
        "inventory_availability": 3.8,
        "deal_risk": 2.1
      }
    },
    {
      "optionId": "MODEL-C",
      "name": "Electric hatchback",
      "values": {
        "customer_purchase_readiness": 4.2,
        "vehicle_fit_score": 4.3,
        "gross_profit_potential": 3100,
        "inventory_availability": 4.1,
        "deal_risk": 2.5
      }
    }
  ]
}

Download Prepared Criteria request

Understanding the Result

Verified local computation, not a hosted API response. The repository TOPSIS engine ranked these exact samples in-process. TOPSIS scores are relative closeness coefficients, not probabilities or confidence percentages.

RankCandidateScore
1Compact hybrid0.621120
2Family crossover0.501172
3Electric hatchback0.256524

Winner: MODEL-A. Download computation and AHP verification.

Check candidate eligibility and input evidence before acting. Adding or removing candidates can change normalization and the ranking. The showcase displays the actual service response, which may differ when the deployed catalog or configuration differs.

AHP Weights and Sensitivity

Open the paired showcase, choose “Help me generate weights (AHP)”, complete every comparison, and generate consistent weights before running. Option scores describe performance; weights express importance. Read the explanation.

Change one judgment or one measured input at a time, regenerate weights if needed, and compare the winner and score gap. A single unchanged winner is not a formal stability guarantee.

Profiles and Scenarios

The baseline uses balanced and scenarioId: null. Retrieve the deployed decision definition before selecting another profile or named scenario; never assume that “standard” exists. AHP does not override eligibility or safety requirements.

Run the Request

Use either JSON download with your existing authenticated API client. Endpoint and authentication details are in the API Guide. This browser-origin example calls the portal proxy, whose service connection must be configured:

const request = await fetch('/examples/auto-ncd-002/business-data-request.json').then(r => r.json());
const response = await fetch('/decisioq-decision-api-proxy.ashx?operation=execute', {
  method: 'POST', headers: {'Content-Type': 'application/json'},
  body: JSON.stringify(request)
});
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));
console.log(result);

For validation errors, check canonical IDs, required values, units, and current catalog ranges. A transport error is not a decision rejection.

Try the showcase · All examples · Playground