question

Alan avatar image
Alan asked Alan commented

Understanding how categories, items, and item groups are linked

I'm struggling to understand the logical link between categories and item groups/items.

I would have presumed categories and item groups would have been linked together, however categories and items are linked.

I'm looking to create an inventory list, similar to the following:

Category 1

  • ItemGroup1
  • ItemGroup2

Category 2

  • ItemGroup3
  • ItemGroup4

However, it looks like I need to query 'categories', to get the 'items', and then get the distinct 'item groups' from there. Not impossible, but I'm using a nosql structure, while trying to follow clover's api closely.

I just want to ensure there's no easier route before preceding. Thank you

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered Alan commented

Categories are used purely for visually organizing items in the grid view of Register app. For example all the appetizers at a restaurant can be put in the same category.

Item groups are used to make creating and modifying groups of related items easier. For example different sizes and colors of shoes may all be part of the same item group. Item groups show up as a single entry in list view of Register which then brings a pop up to choose the specific item.

Finally there are tags (aka labels) which are used for whatever identification purpose you desire. Currently they happen to allow associating items with a particular printer.

Eventually any of these should be available when generating reports.

You cannot put item groups into a category or vice versa. It's not exactly clear what your ultimate goal for the end user is, maybe if you describe that we can help you more.

4 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alan avatar image Alan commented ·

Hi Jacob, I appreciate you taking the time to answer. I'm currently trying to adapt our product to fit clover's API while we wait for the dev kit.

I believe I'm confused about the relationships. For example, say a cafe has a menu with a 'coffee' category, an item group 'Americano', and items: 'Large Americano', and 'Medium Americano'. I'm confused why the item group 'Americano' isn't whats associated with the 'coffee' category, rather than the two items/options. Are item groups not mandatory?

My aim is to display a merchants inventory in a similar fashion as you described above (cont..)

0 Likes 0 ·
Alan avatar image Alan commented ·

(cont) EG: Category> ItemGroup> Item However, from what I understand reading the API and your answer, to do so, I need to query the categories, then query that categories items (which is what seems counterintuitive to me), and then query/display the item groups that are attached to those items. (Categories> Items> ItemGroup)

I would have expected to do it like so: Categories> ItemGroups> Items

I want to display a menu, split into categories:

**Coffees**
 - *-Americano*
 - *-Latte*
**Sandwiches** 
 - *-Turkey*
 - *-Ham*

(Clicking sub items shows popup of available items) Thank you

0 Likes 0 ·
Alan avatar image Alan commented ·

Apologies for the comment formatting, that last example should be a vertical list of items, with the bold words as category headers. Thank you for your time.

0 Likes 0 ·
Alan avatar image Alan commented ·

On further investigation, adding items with and without variants in a sandbox environment and cross referencing the results from the api, I now understand how everything is related.

I had been presuming that an itemGroup was a requirement for an item, and was struggling to understand why the category was linked to the child items.

In reality: the item has the option to have an item group, but does not always require one. Therefore in order to do what I'm looking to do, I'd need to manually check and group itemGroups from the items contained in a category. Thank you for your help Jacob!

0 Likes 0 ·

Welcome to the
Clover Developer Community