Skip to content

Creating Kits

This document will outline the steps for creating a kit, along with other general kit principles and troubleshooting.

  1. Create a new item with product category ‘Goods > Kits’.
  2. On the Store Items tab, click the button to ‘Add in WarmlyYours-US store’.
  3. On the next page, fill in any appropriate catalog pricing or you can delete all catalog items if you don’t know the pricing at the moment. Click Save.
  4. Repeat the process for the WarmlyYours-CA store.
  5. On the Kits/Related Items tab, click ‘Edit Target Items’.
  6. Add in the items the kit is made up of, along with the quantities, selecting ‘Kit Component’ as the relation type. Click save when you’re done.
  7. The kit is now set up and ready to use.

When you add or remove a component from a kit the following attributes on the item are calculated based on the component parts:

  • base_weight (sum of all component base_weight)
  • shipping_weight (sum of all component shipping_weight)
  • shipping_length (shipping_length of component with biggest shipping_volume)
  • shipping_width (shipping_width of component with biggest shipping_volume)
  • shipping_height (shipping_height of component with biggest shipping_volume)

When you add or remove a component, or when a kit or one of it’s component’s store items is committed, uncommitted, invoiced (or anything else that would affect qty_on_hand or qty_committed), then a method is activated which ‘consolidates’ the availability of the kit.

The availability of the kit is evaluated on a per store_item basis. There is usually a store item for the US and Canada and each gets evaluated individually.

The fields which get automatically calculated on the store item and how they are calculated are as follows:

  • qty_on_hand (lowest qty_on_hand from the component part store_items)
  • qty_committed (lowest qty_on_hand minus lowest qty_available from the component part store_items)

So if the components for a kit had the following quantities:

SKUqty_on_handqty_committedqty_available
TRT120-1.5x48501040
TH114-AF-GA1002080
SS-0160519

We would set the kit qty_on_hand to 50 and the kit qty_committed to 50 - 9 = 41

In addition to qty_on_hand and qty_committed, unit_cogs is also automatically set on all the kit store items. unit_cogs is calculated as follows:

  • unit_cogs (sum of all component store item unit_cogs)

If you want to convert a regular item into a kit, then follow these steps:

  1. Reclassify any remaining store items into their component parts using the Item Reclassification tool on the Accounting menu. All store items should have qty_on_hand of 0 otherwise the next step will fail.
  2. Change the item’s product category to ‘Goods > Kits’.
  3. Add kit components on the Kits/Related Items tab (see steps 5-6 on Creating a new kit)
  4. The kit is now set up and ready to use

If any of the automatically calculated quantities, weights or cogs get out of sync for a kit, you can force Heatwave to do a recalculation using the ‘Consolidate Kit’ button on the item page.

If you need to do a mass kit consolidation then you can run this command from the rails console:

Item::KitConsolidator.consolidate_all_kits