The Item Selector API lets you open item selection modals in the Wix dashboard, so Wix users can select items from a Wix service without leaving your extension. Use it to build flows where Wix users need to pick resources from their site data, such as choosing products to feature, blog posts to display, or contacts to target.
Important: This API is only available in the dashboard. It requires the workspace host to be initialized and an updated version of the host initialization package to be installed.
A provider determines which Wix service populates the item selector modal. You specify the provider using a providerKey string when calling openItemSelector(). Each provider corresponds to a specific type of site data, such as products, contacts, or site pages.
Some providers require a specific Wix business solution to be installed on a site. For example, the Products provider requires Wix Stores. Others are available on all Wix sites by default.
For the full list of supported providers and their requirements, see Available providers.
When calling openItemSelector(), you can pass options to tailor the modal to your use case:
maxSelected to set how many items a Wix user can select. Defaults to 1.title and primaryButtonText to replace the default modal header and action button label with text that fits your context.initialSelect to pass an array of item IDs that appear as already selected when the modal opens. This is useful when editing an existing selection.It's important to note the following points before starting to code:
providerKey string.