> For the complete documentation index, see [llms.txt](https://ezom.gitbook.io/ezom-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ezom.gitbook.io/ezom-docs/our-features/sku-mapping/sku-mapping-sequence.md).

# SKU Mapping Sequence

There are seven attributes of a SKU mapping:

| store    | store SKU              | store product ID       | store product name | warehouse SKU | qty      | warehouse |
| -------- | ---------------------- | ---------------------- | ------------------ | ------------- | -------- | --------- |
| optional | conditionally required | conditionally required | optional           | required      | required | optional  |

`warehouse SKU` and `qty` are always required.

One of `store SKU` and `store product ID` must be provided.

`store product name` is purely optional and only for reference purposes.

Example order:

| store    | store SKU     | product ID     | quantity |
| -------- | ------------- | -------------- | -------- |
| store\_A | store\_sku\_1 | product\_id\_1 | 2        |

Assume `store_A` is bound with the warehouse `W_A`. EzOM adopts the following flow to determine which warehouse SKU.

1. Look for SKU mapping using store SKU, store and warehouse, i.e. `store=store_A, store SKU = store_sku_1, warehouse=W_A`
2. If not found, EzOM will continue to search using store product ID, i.e.

   `store=store_A, store product ID = product_id_1, warehouse=W_A`
3. If still not found, EzOM relaxes the condition on store, i.e.

   `store SKU = store_sku_1, warehouse=W_A` or `store product ID = product_id_1, warehouse=W_A`
4. If still not found, EzOM relaxes the condition on warehouse but keep the condition on store, i.e.

   `store=store_A, store SKU = store_sku_1` or `store product ID = product_id_1`
5. If still not found, EzOM further relaxes the conditions on both warehouse and store, i.e.

   `store SKU = store_sku_1` or `store product ID = product_id_1`
6. If any SKU mapping(s) were found in the these steps, the matching warehouse SKU and quantity will be used to decide what needs to be sent from the warehouse. In this example, if the following SKU mapping is found

   | warehouse SKU | qty |
   | ------------- | --- |
   | w\_sku\_A     | 3   |

   Then EzOM will add 2\*3 = 6 items of `w_sku_A` to the outbound consignment

For combo orders, all matching SKU mappings found using the same criteria will be used. For example, if the following SKU mappings are found

| warehouse SKU | qty |
| ------------- | --- |
| w\_sku\_A     | 3   |
| w\_sku\_B     | 1   |

Then EzOM will add 6 items of `w_sku_A` and 2 items of `w_sku_B` to the outbound consignment.
