Skip to content

BriefPrice (PredictionRequest)

BriefPrice contains pricing and prediction data for a brief. This entity is also known as “PredictionRequest” in the database. It stores the results of AI-powered pricing calculations including total price, cost breakdowns, production time estimates, and manufacturing process sequences. The entity provides comprehensive pricing analysis and supports quote versioning.

  • Store AI-generated pricing predictions
  • Provide detailed cost breakdowns by category
  • Track manufacturing process sequences
  • Support price adjustments and deltas
  • Enable quote versioning and optimization
  • Link to machines and providers for manufacturing
PropertyTypeDescription
idUUIDUnique identifier
codenumberSequential code (auto-generated)
briefIdUUIDParent brief reference
userIdUUIDCreator user
PropertyTypeDescription
totalPricenumberTotal price (€)
productCostnumberProduct manufacturing cost (€)
toolingCostnumberTooling cost (€)
toolingCostDeltanumberManual tooling adjustment (€)
deliveryCostnumberDelivery cost (€)
deliveryCostDeltanumberManual delivery adjustment (€)
additionalCostsPartialExtra costs
PropertyTypeDescription
quantitynumberProduction quantity
productionTimenumberEstimated production time (hours)
processCountnumberNumber of manufacturing processes
PropertyTypeDescription
versionstringQuote version (format: “XX”)
parentIdUUIDParent quote (for iterations)
rootIdUUIDRoot quote (first version)
lockedbooleanQuote locked for editing
RelationshipEntityTypeDescription
briefBriefOne-to-OneParent brief
userUserMany-to-OneCreator
machinesMachine[]Many-to-ManySelected machines
providersProvider[]Many-to-ManyExternal service providers
priceSequenceBriefPriceSequence[]One-to-ManyMetadata to manage the semi-supervised edition
predictionRequestComputedPredictionRequestComputed[]One-to-ManyManufacturing process
{
// Materials
materialsCost: number;
materialsDetails: {
paper: number;
cardboard: number;
corrugated: number;
other: number;
};
// Production
printingCost: number;
dieCuttingCost: number;
finishingCost: number;
assemblyCost: number;
// Overhead
toolingOverhead: number;
productionOverhead: number;
deliveryOverhead: number;
// Margin
marginPercentage: number;
marginAmount: number;
// Totals
subtotal: number;
taxes: number;
grandTotal: number;
}

Total Product Cost:

const totalCost = briefPrice.productCost
+ briefPrice.toolingCost
+ briefPrice.toolingCostDelta
+ briefPrice.deliveryCost
+ briefPrice.deliveryCostDelta;
  1. Quote Generation: Access totalPrice for customer quotes
  2. Cost Analysis: Use costBreakdown for detailed analysis
  3. Manufacturing Planning: Reference priceSequence for process details
  4. Price Adjustments: Apply deltas for manual corrections
  5. Quote Versioning: Track iterations via parentId and rootId
  6. ERP Integration: Map costs to ERP pricing modules

BriefPrice data is included when fetching brief details:

Terminal window
GET /briefs/:id/details

Returns brief with nested predictionRequest object.

For value analysis with optimization:

Terminal window
GET /briefs/:id/value-analysis

Returns BriefPrice with detailed cost breakdown and optimization opportunities.

  • The entity is stored as prediction_requests table but exposed as BriefPrice in API
  • Always has a 1:1 relationship with Brief
  • aliciaResponse contains the raw AI prediction data (not loaded by default)
  • processCount determines number of manufacturing sequences
  • Deltas (toolingCostDelta, deliveryCostDelta) allow manual price adjustments