Skip to content

Record a quote

Structured price breaks and terms from a supplied factory reply.

All action kinds · Project workflow

  • Kind: quote_record
  • Availability: available
  • Registry cost category: one_call
  • Lifecycle stage IDs: rfq_and_quote

The cost category describes model work in the registry; it is not a manufacturing price or a monetary quote. Read maglev actions kinds --json for current availability and schemas.

Structures a reply you supply. Preserve the original quote text and verify currency, validity, tooling, lead time and exclusions against it.

Send these fields inside the request’s input object. Use only facts you have, and keep unresolved requirements explicit. Optional fields with defaults can be omitted.

Field Type Required Details
factoryId string No Min length 1. Max length 120
factoryName string No Min length 1. Max length 200
quoteText string Yes The factory’s reply pasted verbatim, in any language. Min length 1. Max length 12000
currency string No Only if the caller knows the currency and the text does not state it. One of: USD, CNY
receivedOn string No Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$. Format: date
Input JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"factoryId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"factoryName": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"quoteText": {
"type": "string",
"minLength": 1,
"maxLength": 12000,
"description": "The factory's reply pasted verbatim, in any language"
},
"currency": {
"description": "Only if the caller knows the currency and the text does not state it",
"type": "string",
"enum": [
"USD",
"CNY"
]
},
"receivedOn": {
"type": "string",
"format": "date",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
}
},
"required": [
"quoteText"
]
}

Prepare action.json with kind: "quote_record" and an input object matching the schema above.

Replace PROJECT_ID with your saved project ID. Use a new idempotency key for new work and retain it for an identical retry.

Terminal window
maglev actions request PROJECT_ID --input action.json \
--idempotency-key example-quote-record-001 --json

Read action.status, action.output, deliveries and any task in the response. Model actions can take several minutes. After a timeout, check saved actions before retrying. See request and recovery behavior.

The schema below describes action.output.result. The saved action.output envelope also contains draft: true and a note. It can be null while an action is running or after a failure; check the status before reading the result. Null or missing facts are unknown; preserve source references and open questions.

Field Type Required Details
factory object or null Yes
factoryResolved boolean Yes
receivedOn string,null Yes
originalText string Yes
originalLanguage string Yes One of: zh, en
translatedText string,null Yes
quote object Yes
quote.priceBreaks object[] If parent supplied
quote.priceBreaks[].quantity integer If parent supplied Maximum 9007199254740991. Greater than 0
quote.priceBreaks[].unitPrice number If parent supplied Minimum 0
quote.priceBreaks[].currency string If parent supplied The currency the factory wrote. unknown when the text names none.. One of: USD, CNY, unknown
quote.toolingCost number or null If parent supplied
quote.toolingCurrency string or null If parent supplied
quote.toolingType string,null If parent supplied What the factory called the tool, in its words: 718H rapid tool, aluminium bridge tool, steel production tool, stencil, fixture
quote.moldOwnership string If parent supplied One of: customer, factory, unknown
quote.sampleCost number or null If parent supplied
quote.sampleLeadDays integer or null If parent supplied
quote.toolingLeadDays integer or null If parent supplied
quote.productionLeadDays integer or null If parent supplied
quote.moq integer or null If parent supplied
quote.paymentTerms string,null If parent supplied
quote.validUntil string,null If parent supplied
quote.incoterm string,null If parent supplied
quote.quoteUnit string If parent supplied One of: piece, set, unknown
quote.taxIncluded string If parent supplied One of: included, excluded, unknown
quote.exclusions string[] If parent supplied What the factory said the price does not include
quote.dfmNotes string,null If parent supplied
quote.regulatoryClaims string[] If parent supplied Anything the factory said about certification, customs or law, recorded as its claim and not as fact
quote.evidence object[] If parent supplied Verbatim substrings of the quote text that support each recorded field
quote.evidence[].field string If parent supplied
quote.evidence[].quote string If parent supplied
comparisonFlags string[] Yes
evidenceDropped integer Yes Evidence items the model offered that were not verbatim substrings of the quote text, removed. Minimum -9007199254740991. Maximum 9007199254740991
feeLine string Yes
Output JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"factory": {
"anyOf": [
{
"type": "object",
"properties": {
"factoryId": {
"type": [
"string",
"null"
]
},
"directoryId": {
"type": [
"string",
"null"
]
},
"nameEn": {
"type": "string"
},
"nameZh": {
"type": [
"string",
"null"
]
}
},
"required": [
"factoryId",
"directoryId",
"nameEn",
"nameZh"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"factoryResolved": {
"type": "boolean"
},
"receivedOn": {
"type": [
"string",
"null"
]
},
"originalText": {
"type": "string"
},
"originalLanguage": {
"type": "string",
"enum": [
"zh",
"en"
]
},
"translatedText": {
"type": [
"string",
"null"
]
},
"quote": {
"type": "object",
"properties": {
"priceBreaks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"quantity": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"unitPrice": {
"type": "number",
"minimum": 0
},
"currency": {
"type": "string",
"enum": [
"USD",
"CNY",
"unknown"
],
"description": "The currency the factory wrote. unknown when the text names none."
}
},
"required": [
"quantity",
"unitPrice",
"currency"
],
"additionalProperties": false
}
},
"toolingCost": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"toolingCurrency": {
"anyOf": [
{
"type": "string",
"enum": [
"USD",
"CNY",
"unknown"
]
},
{
"type": "null"
}
]
},
"toolingType": {
"description": "What the factory called the tool, in its words: 718H rapid tool, aluminium bridge tool, steel production tool, stencil, fixture",
"type": [
"string",
"null"
]
},
"moldOwnership": {
"type": "string",
"enum": [
"customer",
"factory",
"unknown"
]
},
"sampleCost": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"sampleLeadDays": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"toolingLeadDays": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"productionLeadDays": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"moq": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"paymentTerms": {
"type": [
"string",
"null"
]
},
"validUntil": {
"type": [
"string",
"null"
]
},
"incoterm": {
"type": [
"string",
"null"
]
},
"quoteUnit": {
"type": "string",
"enum": [
"piece",
"set",
"unknown"
]
},
"taxIncluded": {
"type": "string",
"enum": [
"included",
"excluded",
"unknown"
]
},
"exclusions": {
"type": "array",
"items": {
"type": "string"
},
"description": "What the factory said the price does not include"
},
"dfmNotes": {
"type": [
"string",
"null"
]
},
"regulatoryClaims": {
"type": "array",
"items": {
"type": "string"
},
"description": "Anything the factory said about certification, customs or law, recorded as its claim and not as fact"
},
"evidence": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"quote": {
"type": "string"
}
},
"required": [
"field",
"quote"
],
"additionalProperties": false
},
"description": "Verbatim substrings of the quote text that support each recorded field"
}
},
"required": [
"priceBreaks",
"toolingCost",
"toolingCurrency",
"toolingType",
"moldOwnership",
"sampleCost",
"sampleLeadDays",
"toolingLeadDays",
"productionLeadDays",
"moq",
"paymentTerms",
"validUntil",
"incoterm",
"quoteUnit",
"taxIncluded",
"exclusions",
"dfmNotes",
"regulatoryClaims",
"evidence"
],
"additionalProperties": false
},
"comparisonFlags": {
"type": "array",
"items": {
"type": "string"
}
},
"evidenceDropped": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Evidence items the model offered that were not verbatim substrings of the quote text, removed"
},
"feeLine": {
"type": "string"
}
},
"required": [
"factory",
"factoryResolved",
"receivedOn",
"originalText",
"originalLanguage",
"translatedText",
"quote",
"comparisonFlags",
"evidenceDropped",
"feeLine"
],
"additionalProperties": false
}