Skip to main content

Picker API

Requires an admin UI block, action, or print extension.

The Picker API lets merchants search for and select items from your app-specific data, such as product reviews, email templates, or subscription options. Use this API to build custom selection dialogs with your own data structure, badges, and thumbnails. The picker returns the IDs of selected items.

Tip

If you need to pick Shopify products, variants, or collections, use the Resource Picker API instead.

  • Resource selection: Enable resource picker dialogs for selecting products, customers, or other resources.
  • Multi-select: Build interfaces that allow selecting multiple resources at once.
  • Filtered selection: Provide filtered resource selection with search and filtering capabilities.
  • Workflow integration: Integrate resource pickers into configuration workflows.

The picker function opens a custom selection dialog with your app-specific data. It accepts configuration options to define the picker's heading, items, headers, and selection behavior. It returns a Promise that resolves to a Picker object with a selected property for accessing the merchant's selection.

Anchor to options
options
required

Promise<>

  • Handle undefined return on cancellation: When merchants cancel or close the picker, it returns undefined rather than an empty array. Check for undefined explicitly to distinguish cancellation from empty selection.
  • Disable items to prevent modification: Use the disabled property on items combined with initialSelectionIds to create preselected items that merchants can't deselect.

  • The Picker API only supports app-specific data. It can't display Shopify resources like products or variants. Use Resource Picker API for Shopify resources.
  • Picker items don't support hierarchical or nested structures. All items appear in a flat list.
  • The picker can't be customized with additional filters, search operators, or sorting beyond what merchants type in the search field.

Was this page helpful?