Skip to main content

Picker API

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 enable 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 heading
heading
string
required

The heading displayed at the top of the picker modal. Use a clear, descriptive title that tells merchants what they're selecting.

Anchor to items
items
[]
required

The list of items that merchants can select from. Each item appears as a row in the picker table.

Anchor to headers
headers
[]

The column headers for the picker table. Define headers to label and organize the data columns displayed for each item. The header order determines the column layout.

Anchor to multiple
multiple
boolean | number

The selection mode for the picker. Pass true to allow unlimited selections, false for single-item selection only, or a number to set a maximum selection limit (for example, 3 allows up to three items).


  • 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 supports only 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?