Skip to main content

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​

UseExamples
AmountPrice, cost, budget
QuantityStock, item count
MeasurementWeight, duration, distance
ScoreRating, risk score
RatioDiscount rate, completion percentage