Skip to content

Commands reference

Commands perform app-owned actions and are available through api.commands and the ready host API.

CommandResultPurpose
navigate(to)Promise<void>Push a supported public route location.
replace(to)Promise<void>Replace the current public route location.
openSearchByVehicle()voidOpen vehicle search.
openSearchBySize()voidOpen size search.
openBrands()Promise<void>Open the brand directory.
openWheelSpecSheet(query)Promise<void>Open a model-level wheel spec sheet.
openWheelDetail(query)Promise<void>Open exact wheel details.
openVisualizer(query)Promise<void>Open a fitment-aware visualizer configuration.
closeModal(name)voidClose an app-owned search, navigation, or RFQ modal.
setTheme(theme)voidSet light or dark theme.
setLanguage(lang)voidSelect a configured language code.
refreshPricing()voidRerun registered price resolvers after plugin cache changes.

Valid closeModal() names are searchByVehicle, searchBySize, wheelSearchNavigation, and rfq.

Prefer semantic open commands over private route names. Query values depend on the selected public workflow and should come from a tested customer configuration.

Route locations

navigate() and replace() accept a string or a public route-location object:

ts
type PluginRouteLocation =
  | string
  | {
      name?: string
      path?: string
      params?: Record<string, string | number | boolean | null | undefined>
      query?: Record<string, unknown>
      hash?: string
    }

Prefer named semantic commands when one exists. Route names and paths used with the generic methods must be part of a documented and tested integration contract.

Product workflow queries

The three product commands use separate public query schemas. Required fields are validated before navigation. Use identifiers obtained from supported product events, outlet contexts, vehicle-search submissions, or reviewed customer configuration.

Wheel spec sheet

ts
type PluginWheelSpecSheetQuery = {
  wheelImageId: string | number
  diameter?: string | number
  width?: string | number
  boltPattern?: string
  offset?: string | number
  offsetMin?: string | number
  offsetMax?: string | number
  finish?: string
  searchSource?: 'by-size' | 'by-brand'
  searchBrandId?: string | number
}

wheelImageId selects the wheel model and finish. Optional size fields narrow the specifications shown. Search fields preserve attribution when opening a wheel from a supported search workflow.

Exact wheel detail

ts
type PluginWheelDetailQuery = {
  wheelImageId: string | number
  partNumber: string | number
  diameter?: string | number
  width?: string | number
  boltPattern?: string
  searchSource?: 'by-size' | 'by-brand'
  searchBrandId?: string | number
}

Both wheelImageId and partNumber are required. The part number selects one exact specification from the wheel model.

Visualizer

ts
type PluginVisualizerFitmentCategory =
  | 'OE'
  | 'LIFTED'
  | 'STAGGERED'
  | 'DRW_LIFTED'
  | 'DRW_STAGGERED'

type PluginVisualizerQuery = {
  fmk: string | number
  bodyType: string | number
  sizeCategory: PluginVisualizerFitmentCategory
  suspension?: string
  stag?: string
  wheel?: string | number
  wheelDiameter?: string | number
  partNumber?: string | number
  rearPartNumber?: string | number
  vehicleStance?: string | number
  vehicleColor?: string
  brand?: string | number
  finish?: string
  filterDiameters?: string | number
  filterWidths?: string | number
  filterOffsets?: string | number
  page?: string | number
}

fmk, bodyType, and sizeCategory are always required. Additional fitment requirements are:

CategoryAdditional required fields
OENone
LIFTEDsuspension
STAGGEREDstag
DRW_LIFTEDsuspension and stag
DRW_STAGGEREDstag

Preserve suspension and serialized axle-pair stag values received from a supported vehicle search rather than constructing them from display text. The remaining fields preselect a wheel, appearance, exact front or rear specification, or result filter.

ts
await api.commands.openVisualizer({
  fmk: 'VEHICLE_FMK',
  bodyType: 'BODY_TYPE_ID',
  sizeCategory: 'OE',
  wheel: 'WHEEL_IMAGE_ID',
  wheelDiameter: 'WHEEL_DIAMETER',
})

Fields outside these schemas are not part of the public command contract. A structurally valid query can still refer to a product or fitment unavailable in the configured customer catalog.

Host-page use

The host API returned by window.iConfigurator.ready() exposes the same command set:

js
const configurator = await window.iConfigurator.ready()
await configurator.commands.openBrands()

Icon Visualizer developer documentation