How to create CMS Collection in code using WIX CLI

Hi, all!

I’m developing an application—a plugin to enhance the functionality of Wix Stores using the Wix CLI. This is my first experience, so I apologize in advance if my question seems trivial, but unfortunately, I haven’t found a clear answer.

My application needs its own collection to store settings and product relationships. When I create such a collection through Wix CMS and access it via @wix/data, everything works fine.

The problem is that when installing the application on a new site, this collection isn’t created automatically; the user has to create it manually.

Is there a way to have it created automatically upon application installation? Perhaps there’s another method to implement these relationships.

In this case, I need: ProductId → Array of connected products → Active/Inactive

Thank you in advance for your assistance!

Hello! There is this for creating data collections from code Create Data Collection | SDK

For more questions about app development, there is a dedicated channel on discord where you will be likely to get more ideas and help. Wix Studio Community

1 Like