Skip to main content

Item Master

Item Master is the product database behind Mimeeq's CPQ (Configure, Price, Quote) system. Each record maps a product or component code to its physical characteristics, delivery lead times, and external commerce identifiers. When a customer configures a product, the pricing observer returns the matching Item Master records alongside the price, giving you access to dimensions, weight, stock data, and delivery estimates directly in the browser.

How Item Master Data Reaches Your Code

Item Master records are available through the pricing.prices observer as part of the PriceData payload. Every time the configuration or quantity changes, the observer emits updated price data that includes an itemMasters array with all matching records for the current configuration.

window.mimeeqApp.observers.pricing.prices.subscribe(({ newValue }) => {
if (!newValue?.itemMasters) return;

for (const item of newValue.itemMasters) {
console.log(item.code); // e.g. "CHAIR-OAK-STD"
console.log(item.deliveryTime); // e.g. 14 (days)
console.log(item.dimensions.width); // e.g. 60 (cm)
console.log(item.m3); // e.g. 0.37 (cubic meters)
console.log(item.quantity); // stock or order quantity
}
});

A configured product may have multiple Item Master records — one per component or price code that resolved during configuration. For example, a chair with separate frame and upholstery codes will return two records.

note

Item Master data is linked to the pricing system through price codes. If a price code doesn't have a matching entry in the Item Master, no record is returned for that component. See Code Input Reference for how price codes are constructed.

Data Structure

Each ItemMaster record contains:

PropertyTypeDescription
codestringSKU or product/component code matching the price code system
deliveryTimenumberLead time in days from order to ready-for-shipping
dimensions.widthnumberWidth in centimeters
dimensions.heightnumberHeight in centimeters
dimensions.depthnumberDepth in centimeters
dimensions.weightnumberWeight in kilograms
m3numberVolume in cubic meters (shipping/storage calculations)
quantitynumberStock or order quantity
weightnumberTotal weight in kilograms (may include packaging)

Delivery Time

The configurator calculates delivery time from two possible sources, controlled by a per-product useItemMaster flag:

  • Item Master delivery — taken from the deliveryTime field on the Item Master record, available in the price data
  • Product-level override — a fixed value set on the product's pricing configuration

When Item Master is used and a configuration resolves to multiple components, the standard UI aggregates the longest lead time across all items.

The delivery time from Item Master is available on the price observer payload:

window.mimeeqApp.observers.pricing.prices.subscribe(({ newValue }) => {
if (newValue?.deliveryTime) {
// deliveryTime on PriceData is the aggregated value (string)
console.log(`Estimated delivery: ${newValue.deliveryTime} days`);
}
});

For the raw per-component delivery times, iterate the itemMasters array:

// Find the longest lead time across all components
const maxDelivery = newValue.itemMasters?.reduce(
(max, item) => Math.max(max, item.deliveryTime || 0),
0,
);

You can also check which source the product uses through the mainProductData observer:

window.mimeeqApp.observers.product.mainProductData.subscribe(({ newValue }) => {
const useItemMaster = newValue?.pricing?.useItemMaster;
const deliveryOverride = newValue?.pricing?.deliveryTime;

// useItemMaster: true → delivery comes from Item Master records
// useItemMaster: false → delivery comes from deliveryOverride
});

Real-World Example: SKU, Delivery & Stock Display

This example shows a common integration pattern — displaying SKU, delivery time, and stock availability to authenticated users. It subscribes to pricing and product observers to keep the display in sync with configuration changes.

document.addEventListener('mimeeq-app-loaded', () => {
const wrapper = createInfoPanel();
if (!wrapper) return;

// Only show for logged-in users
window.mimeeqAuth.authorization
.getUserData()
.then((user) => {
if (user && wrapper) {
renderSkuDisplay(wrapper);
renderStockDisplay(wrapper);
renderDeliveryDisplay(wrapper);
}
})
.catch(console.error);
});

SKU Display

Subscribe to the product.sku observer to show the current configuration's SKU code:

function renderSkuDisplay(wrapper) {
const section = document.createElement('div');
section.innerHTML =
'<span style="font-weight:700">SKU:</span> <span class="data"></span>';
wrapper.appendChild(section);

window.mimeeqApp.observers.product.sku.subscribe(({ newValue }) => {
if (typeof newValue === 'string') {
section.querySelector('.data').textContent = newValue;
}
});
}

Stock Availability (Creative Field Repurposing)

Item Master fields can be repurposed for use cases beyond their original intent. In this example, the m3 field (normally cubic meters for shipping volume) carries total available stock, and quantity carries units per allocation. The ratio gives available stock per component, with the minimum across components being the bottleneck.

This is not the standard meaning of these fields — it's a pattern some customers use to surface stock data through the existing Item Master infrastructure. You could use any numeric field for this, depending on what your admin data setup looks like.

function renderStockDisplay(wrapper) {
const section = document.createElement('div');
section.innerHTML =
'<span style="font-weight:700">Available Stock:</span> <span class="data"></span>';
wrapper.appendChild(section);

let currentStock;

window.mimeeqApp.observers.pricing.prices.subscribe(({ newValue }) => {
const itemMasters = newValue?.itemMasters;
if (!itemMasters) return;

currentStock = undefined;

for (const item of itemMasters) {
// No stock data available for this component
if (!item?.m3) {
currentStock = null;
continue;
}

if (item.quantity === 0 || item.m3 === 0) {
currentStock = 0;
} else {
const componentStock = Math.floor(item.m3 / item.quantity);

if (currentStock === undefined) {
currentStock = componentStock;
} else if (currentStock !== null) {
// Take the minimum — bottleneck component limits availability
currentStock = Math.min(currentStock, componentStock);
}
}
}

// Update display
if (currentStock === null || currentStock === undefined) {
section.style.display = 'none';
} else if (currentStock === 0) {
section.querySelector('.data').textContent =
'Contact Sales for more information';
section.style.display = 'block';
} else {
section.querySelector('.data').textContent = currentStock;
section.style.display = 'block';
}
});
}
tip

This is just one example of repurposing Item Master fields. The m3, quantity, weight, and dimensions fields are numeric — you can assign them whatever meaning makes sense for your integration, as long as your admin data is set up accordingly. For their standard meanings (shipping volume, physical measurements, etc.), see the Data Structure table above.

Delivery Time Display

Combine data from both the product observer (for the useItemMaster flag and override value) and the pricing observer (for Item Master delivery times):

function renderDeliveryDisplay(wrapper) {
const section = document.createElement('div');
section.innerHTML =
'<span style="font-weight:700">Delivery Time:</span> <span class="data"></span>';
wrapper.appendChild(section);

let useItemMaster = false;
let deliveryOverride = 0;
let priceDeliveryTime = 0;

function updateDisplay() {
const days = useItemMaster
? parseInt(priceDeliveryTime || '0', 10) || 0
: deliveryOverride;
section.querySelector('.data').textContent = formatDeliveryTime(days);
}

window.mimeeqApp.observers.product.mainProductData.subscribe(({ newValue }) => {
const val = newValue?.newValue ?? newValue;
useItemMaster = val?.pricing?.useItemMaster ?? false;
deliveryOverride = val?.pricing?.deliveryTime ?? 0;
updateDisplay();
});

window.mimeeqApp.observers.pricing.prices.subscribe(({ newValue }) => {
const val = newValue?.newValue ?? newValue;
priceDeliveryTime = val?.deliveryTime ?? 0;
updateDisplay();
});
}

function formatDeliveryTime(days) {
if (typeof days !== 'number' || !days) return `${days} days`;

const weeks = Math.floor(days / 7);
const months = Math.floor(days / 30);
const years = Math.floor(days / 365);

if (years) return `${years} ${years === 1 ? 'year' : 'years'}`;
if (months) return `${months} ${months === 1 ? 'month' : 'months'}`;
if (weeks) return `${weeks} ${weeks === 1 ? 'week' : 'weeks'}`;
return `${days} ${days === 1 ? 'day' : 'days'}`;
}

Cleanup

Reset stock state when leaving a product or changing options to avoid stale data carrying over:

document.addEventListener('mimeeq-leave-product', () => {
currentStock = undefined;
});

document.addEventListener('mimeeq-select-option', () => {
currentStock = undefined;
});

Dimensions and Measurements

Mimeeq provides two separate sources of product dimensions, each serving a different purpose.

Item Master Dimensions (Logistics Data)

Item Master dimensions are product data entered in the admin panel — physical measurements for shipping, warehousing, and order fulfillment. These are static values tied to the product code, not derived from the 3D model.

window.mimeeqApp.observers.pricing.prices.subscribe(({ newValue }) => {
if (!newValue?.itemMasters?.length) return;

const item = newValue.itemMasters[0];
const { width, height, depth, weight } = item.dimensions;

document.getElementById('shipping-dimensions').textContent =
`${width} × ${depth} × ${height} cm`;
document.getElementById('weight').textContent =
`${weight || item.weight} kg`;
document.getElementById('volume').textContent =
`${item.m3}`;
});

For multi-component products, you may want to aggregate or display per-component dimensions depending on your use case.

3D Scene Dimensions (Visual Measurements)

The product.dimensions observer returns the actual physical dimensions of the configured 3D model, calculated from the scene. These values update whenever the configuration changes the model's geometry (for example, selecting a larger size variant). Values are expressed in millimeters.

window.mimeeqApp.observers.product.dimensions.subscribe(({ newValue }) => {
if (newValue) {
document.getElementById('dim-width').textContent = `${newValue.width} mm`;
document.getElementById('dim-height').textContent = `${newValue.height} mm`;
document.getElementById('dim-depth').textContent = `${newValue.depth} mm`;
}
});

This is the same data that powers the built-in dimensions overlay (toggled via the dimensions quick icon or mimeeqApp.actions.toggleDimensions()). Use it when you need to display product measurements in your own UI without relying on the 3D overlay.

When to Use Which
  • Item Master dimensions — logistics, shipping cost calculations, warehouse planning. These are admin-entered values that may include packaging.
  • 3D scene dimensions — product size display, space planning, spec sheets. These reflect the actual model geometry and update with configuration changes.
Admin Setup

For information on creating and importing Item Master records, Commerce IDs, and delivery time configuration, see Item Master on our help site. For CSV import templates and field specifications, see CSV Import Templates.