Create a Category
This article explains how to view, edit and create a (sub) category in CommerceTools.
A category in CT has various purposes, it is used for marketing, product grouping on the various pages of the website, as well as to determine numerous types of discounts and campaigns that should include or exclude products. The Category feature is for instance used to configure tier discounts for products. Before creating a new category, it may be a good idea to review existing categories and subcategories in the category list.
Contents
- Category List
- Category Information
- Creating a category
- Synchronization to Hygraph
- Category order
- Adding Products
- Related articles
Category List
The category section of CT is accessed via the left menu pane.
In the ‘Category list’ you can view all existing categories and information such as: the category names, their ‘External ID’s’, the number of products and subcategories that are contained within it.
By selecting the > icon on a category a pane will open displaying any subcategories contained within it.
Subcategories can contain other subcategories, which can be navigated to using the > icons to go deeper, or on the top left of the screen shown above, using the < icon to go up a level.
Category Information
You can select a category or subcategory from the category list by clicking on it, information pertaining to the selected category will then be displayed on the screen.
General
In the General tab there are three sections
General information
Contains the name, description, key, external ID and order.
It can happen that an existing category may need the order value adjusted, this is where you would do this. Assigning an order number to categories will allow you to more easily use sorting to order your categories.
Category order values can be a value between 0 and 1. For example:
Category A has a Rank value: 0.05
Category B has a Rank value: 0.07
When you sort from low to high (ascending), category A is shown before category B because 0.05 is closer to 0 than 0.07.
Custom fields
Specifies the store's product categorization, first select Category custom type in the top bar next to the custom fields sub header. A secondary
searchable drop-down field will appear
- 'Purpose' is for usage sorting.
- Some Examples:
Mental Health
Beauty & Anti-Aging
- ‘Type’ is for type-based listings.
- Some Examples:
Vitamin C
Magnesium
- ‘Audience' is for demographic targeting.
- Some Examples:
Woman
Children's health
- 'Other' is for various website logic and optimizing product discovery.
- Some Examples: Categories used for campaign or events.
Category Branch
Displays the family tree of the category: which (sub)category it falls under and which subcategories fall under it.
You can use this to quickly navigate between categories and subcategories, without returning to the category list page.
Move Category
You can move any category to any sub-category position by clicking the Move category button.
Important
- You cannot move a subcategory to a main category position.
- You cannot convert a category moved to a subcategory position back to the main category in the branch.
Once you are happy with the new position of the category, press the move category button to save the change.
Products
In the Products tab you can view and search for all products that have been added to the category, or rather products that have had the category added
to it. There is no way to add products to the category from this page. The relationship is the other way around, namely, you add a category to a product, via the product page.
The Products tab on a category page is intended to give insight into which products are contained within that category.
Ext. Search
This tab is NOT used. The URL slug is a required field by CT, that's the only reason it's filled. The actual field we use to determine a webpage's URL is the field "URL Identifier" in Hygraph. For search purposes within CT, it's convenient to fill CT's URL slug with the same value as the "URL Identifier" in Hygraph.
For more information about SEO please review the following
documentation: SEO
URL slug
The URL slug is a user-friendly way to generate the category page URL. Slugs substitute system generated category IDs in the website page URL.
This URL slug must be unique and may only contain between 2 and 256
alphanumeric characters, underscores, or hyphens. They can not include white spaces or special characters like ñ, ü, #, %.
Meta title & Meta description
These fields cannot be removed from CT. Please do not fill them: instead, fill them in the SEO component in Hygraph.
Saving
If you have made any changes or additions to a selected category, then you must save them by clicking the save button on the bottom bar of the screen.
Not happy with the pending change or addition? Press cancel to revert it.
Creating a category
To create a new category, if an appropriate category or subcategory does already exist. You can either select the ‘Add category’ from the side menu.
Or by clicking the ‘Add category’ button on the top left section of the category list page.
You will be redirected to category creation flow pages.
Step 1 - Add basic category information
Category name
Give the category a descriptive but concise name. This field is mandatory, and must also always have an English name, for the sync to Hygraph to work. By clicking ‘Show all languages’, the available locale fields will be displayed, and can be filled in. There is no duplicate detection on this field, be careful that you don’t choose a name that is already in use by an existing category. The system will not recognize a duplicate category.
Category description
This is an optional field, and just like the name field, by clicking ‘Show all languages’, the available locale fields will be displayed, and can be filled in. It is only for internal use to make clear to different VHC users what the category is for. This field will not be displayed on the website.
Category key
Must be left empty, it is set upon saving the category.
External ID
Must be left empty, it is set upon saving the category. Refers to the category ID used in Hygraph.
Category order
Assigning an order number to Categories determines the order of the (sub)category in menus and pages on the website. This field can be filled in after the creation of the category.
Category order values can be a value between 0 and 1. For example:
Category A has a Rank value: 0.05
Category B has a Rank value: 0.07
When we sort from low to high (ascending), Category A is shown before Category B because 0.05 is closer to 0 than 0.07.
Category Reorder
It is much more user friendly to change the category order via the drag- and-drop reorder functionality which can be accessed via the category list view.
Changing the order using this drag-and-drop functionality automatically changes the value of the category order field of the category to reflect the position relative to the other categories.
Custom fields
This is an important field and must be filled in, it determines specific behaviors within the website. It specifies the store's product categorization, first select Category custom type in the top bar next to the custom fields sub header. A secondary
searchable drop-down field will appear
- 'Purpose' is for usage sorting – bones and joints, weight management, liver, anything that is a health need or goal.
- ‘type’ is for type-based listings – super foods, vitamins, minerals, etc.
- ‘Audience' is for demographic targeting – female, male, kids, 50+, any group of people.
- 'Other' is for various website logic and optimizing product discovery.
Once all required fields and additional optional information has been entered continue in the flow by clicking the next button on the bottom navigation bar. Need to go back? There is a button for that! The back button! Next to the Next button.
Step 2 - Category location
Determine which existing category the new category should fall under, essentially making it a subcategory. If you do not make a selection, the category you are creating will become a ‘main category’. Use the search bar to quickly find a category or subcategory
By clicking on the select button of a category, the category that is being created will then become sub-category of the selected category.
To navigate through categories and subcategories click on the > arrows, and to go up a level click on the < arrow.
After clicking ‘next’ we go to the third and final step.
Step 3 - Add external search information
Configure the SEO settings for the category being created in the final step.
URL slug
The URL slug in CT is a mandatory field and must be filled in when creating a category. However, it will not be used in the website, this is configured in Hygraph. A URL slug is a user-friendly way to generate the category page URL. Slugs substitute system generated category IDs in the website page URL.
This URL slug must be unique and may only contain between 2 and 256
alphanumeric characters, underscores, or hyphens. They can not include white spaces or special characters like ñ, ü, #, %.
Meta title
Again, the meta title is configured in Hygraph graph and does not need to be filled in in CT. A meta title is the clickable headline that appears in search engine results pages (SERPs). It’s also shown in browser tabs and when your page is shared on social media.
By toggling the checkbox, the category name will be used.
Meta description
Again, the meta Description is configured in Hygraph graph and does not need to be filled in in CT. It is a short summary of a webpage’s content that appears below the meta title in SERPs and in social media previews.
By toggling the checkbox, the category description will be used. Press ‘Save’ to create the category, or back to return to a previous step.
Synchronization to Hygraph
Once the category is created the sync will create a category in HyGraph, however the category is at this point incomplete in HyGraph. The only information that is synced to HyGraph is the Tenant, URL Identifier and Title.
The URL Identifier is the key off the category, you can change the URL Identifier in HyGraph. The sync from CT to HyGraph will NOT update existing categories in HyGraph, the sync only creates a category. Further configurations of the category must be done in HyGraph.
Category order
The order of a category or subcategory is determined by the Category Order field on each category page. This is for instance used in the ‘Category list’ in HyGraph, where a number of categories are displayed, the order of which is taken from the Category order field.
There are two ways to change the order of a category or subcategory.
Drag & Drop
From the Category List page, by clicking the Reorder button
Click and hold a category and drag it to a position. Repeat until the desired order has been achieved and the press save.
The screenshot above is from the main overview page, drag and drop reordering is done the same way for subcategories.
Value
You may also manually configure the specific value of a category using the
Category order field
Changing the value of this field overwrites drag and drop positions and vice
versa
Adding Products
All categories must be added individually to a product; they cannot be added from the category. Instead, you must navigate to the product and add the category there.
Adding Products
Alternatively, if you want to add a number of products to a category all at once. Navigate to the product list in CT, search for / filter, and select the products and using the action dropdown, select the ‘Bulk edit categories’ option.
There you have two options, as well as being able to add categories to the selected group of products. You may also remove them.
When the categories to be added or removed have been filled in, press the next button and a pop-up confirmation prompt will be displayed informing
you that this process cannot be stopped, press 'Start updates’
After doing so you will proceed to an Update summary page where the changes made will be displayed.
Related articles
- Create a Product
- Categories
- Dataflow between systems: https://support.visionhealthcare.eu/support/solutions/articles/27000072622