Number
Number metadata stores numeric values used for amounts, quantities, rates, scores, counters, durations, and sortable numeric fields.
Choose number handling when the value must be calculated, compared, sorted, summarized, or sent to an external API as a numeric value.
Value Shape
type NumberMetadataValue = number | null;
Normalize external payload values before writing records:
const amount = Number(payload.input.amount);
if (!Number.isFinite(amount)) {
throw new Error('ORDER_AMOUNT_INVALID');
}
Common Uses
| Use | Examples |
|---|---|
| Amount | Price, cost, budget |
| Quantity | Stock, item count |
| Measurement | Weight, duration, distance |
| Score | Rating, risk score |
| Ratio | Discount rate, completion percentage |