Add a Data Collections Extension in the App Dashboard

This feature is in Developer Preview and is subject to change.

This article describes how to add a data collections extension to your app using the app dashboard.

Add a data collections extension to your app

Add the extension by doing the following:

  1. In the Custom Apps page, select an app.

  2. In the left menu, select Develop > Extensions.

  3. Click + Create Extension and find the Data Collections extension.

  4. Click + Create.

  5. On the Data Collections extension configuration page, use the JSON editor to configure your collections. For the complete JSON schema, see the Data Collections Extension JSON Reference. The editor's linter indicates if there are any errors in your JSON configuration. The JSON schema documentation is also available in the JSON editor.

  6. Optionally, add initial data to populate the collections when they're created. To do this, include an initialData array in your configuration. Make sure the initial data you add is structured according to the schema you defined.

  7. Click Save.

  8. Release a new app version to apply the extension changes.

Your app now has a data collections extension. When your app is installed on a site, the collections are automatically created in the site's CMS with the schemas and initial data you specified.

Example configuration

Here's an example of a data collections extension configuration that creates a "Customer Feedback" collection with a schema and initial data:

Copy

This configuration:

  • Creates a collection with ID suffix customer-feedback. The full ID in the CMS becomes @company/app-name/customer-feedback.
  • Defines 4 fields: customer name, rating, comments, and feedback date.
  • Sets displayField to customerName, so the CMS displays this value when referencing items in this collection from other collections.
  • Sets permissions so CMS editors can manage data and anyone can read it.
  • Includes 2 sample feedback entries as initial data.

See also

Did this help?