About Data Extension Schemas

Every Wix API has a Wix object with predefined fields. Depending on your use case, you might want to add custom fields to an object. Data extension schemas let you define the structure of custom fields and add them to Wix objects for a specific site.

For example, if you run a furniture store, you might offer extended warranties. Using a data extension schema, you can define and add a warranty field to the product object.

Supported IDEs

You can work with data extension schemas in:

  • The editor (Wix Studio and Wix Editor)
  • The Wix IDE (Wix Studio)
  • Your local IDE (Wix Studio and Wix Editor)

Supported objects

You can only extend objects that support data extension schemas. For the list of supported objects, see the Data Extension Schema API.

How extended fields work

Supported objects contain an extendedFields property. When you create a data extension schema, you define extended fields that are stored in extendedFields. Extended fields can exist at the following levels:

  • Root level: Extended fields appear directly in the object's extendedFields property.
  • Nested in an existing field: Extended fields appear in the extendedFields property of items in an array. For example, each line item in an order has its own extendedFields property.

Data extension schema management

You can manage extended fields for a site in the following ways:

  • Data Extension Schema API: define and manage the schema of extended fields.
  • Site dashboard: create and manage extended fields through the site dashboard. For example, Wix users can add extended fields to the checkout flow under Settings > Checkout > Checkout form.

Schemas added using these methods are stored in the _user_fields namespace.

Extended fields structure

The structure of extended fields is defined using a subset of JSON Schema. This schema acts as a blueprint that defines the data types and constraints for your extended fields.

Use cases

The following are possible use cases for data extension schemas:

Root-level extensions

  • Add accessories, such as sports equipment, in the Booking object.
  • Add a warranty field to the eCommerce Order object.
  • Add a field to the Checkout object giving users the option to send products as a gift.

Nested field extensions

  • Add customization options (color, size, personalization) to individual line items in an Order.
  • Include rental duration or condition tracking for each line item in a Booking's equipment list at Checkout.
  • Add delivery preferences or special handling instructions to specific line items at Checkout.

See also

Did this help?