Introduction

 

Developer Preview
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.

 

The Extended Fields API provides functionality for creating and managing extended field definitions. Extended fields enable you to retrieve and store specific information relevant to your site. Basic fields, such as name, email, and phone, are stored in the contact's default properties. Additional custom contact properties are stored in extended fields.

With the Extended Fields API, you can:

  • Create a new extended field.
  • Delete an extended field.
  • Update an extended field by renaming its display name.
  • Query extended fields.

Before you begin

It is important to note the following points before you begin to code:

  • When you create a new extended field, it becomes available to use for all contacts. The field is blank by default.
  • Possible data types of extended fields include:
    • text
    • number
    • date
    • url
  • Extended fields are represented as key-value pairs in the contact's object in info.extendedfields. To manage the extended fields of an individual contact, use the Contacts API.

To use the Labels API, import { extendedFields } from the wix-crm.v2 module.

Copy

Permissions information

Functions in the Extended Fields API are restricted and only run if you elevate permissions using the wix-auth elevate() function.

Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.

Terminology

  • Extended field: A customized field that can store additional information for a contact. A contact’s extended field data is available in the contact object under info.extendedFields. There are 2 types of extended fields:
    • System field: An extended field added by Wix apps. System fields often enrich contacts with data from Wix apps, such as Wix Stores or Wix Members. System fields cannot be renamed and are typically read-only.
    • Custom field: An extended field added by site admins or 3rd-party apps. Custom fields can be renamed, and their data can be written by any site admin or 3rd-party app.
Did this help?