# Number value

Learn how to define numeric content.

This content type defines static or dynamic numeric values such as prices, quantities, and percentages for [number schemas](/reference/content/schema/types/number).

## Examples

Here are some examples of static and dynamic content:

**Static**

```pmsjson
{
  "type": "number",
  "value": {
    "type": "static",
    "value": 10
  }
}
```

**Dynamic**

```pmsjson
{
  "type": "number",
  "value": {
    "type": "dynamic",
    "expression": "cart's total",
    "default": 0
  }
}
```

**Nullable**

```pmsjson
{
  "type": "number",
  "value": {
    "type": "dynamic",
    "expression": "cart's total",
    "nullable": true,
    "default": null
  }
}
```

## Properties

These are the properties common to static and dynamic values:

- `type`: `string`

  The type of attribute. Always `number` for number values.

- `value`: `StaticValue|DynamicValue` (see [StaticValue](#static-properties), [DynamicValue](#dynamic-properties))

  The definition of the value.

### Static properties

The following properties are available for static values:

- `type`: `string`

  The type of the value. Always `static` for static values.

- `value`: `number`

  The value itself.

### Dynamic properties

The following properties are available for dynamic values:

- `type`: `string`

  The type of the value. Always `dynamic` for dynamic values.

- `expression`: `string`

  The [CQL expression](/reference/cql/expressions/basics) that evaluates to the value.

- `nullable`: `boolean` (default: )

  Whether the value can be `null`.

  This value must match the [`optional`](/reference/content/schema/types/structure#attribute-optional-prop) property of the associated attribute. In other words, if the attribute is optional, then the value is nullable.

- `default`: `number|null` (optional)

  The default value to use when the evaluation fails, results in `null`, or produces an incompatible type.
