Create item categories
Overview
This article walks you through how to create item categories for your store.
You can use item categories to help you organize items from your stores into groups based on certain attributes.
You can create item categories in the AGS Admin Portal or with the AGS CLI.
Prerequisites
- You have access to the AGS Admin Portal.
- You have a game or a publisher namespace.
- You have an existing draft store.
- To follow the AGS CLI steps, you have installed the AGS CLI and signed in with an account that has access to these features. See Install and sign in. The examples use a Bash shell.
Create an item category
- Admin Portal
- AGS CLI
-
On the Admin Portal sidebar, go to Online > Store & Catalog > Stores. The Stores page appears.
-
Click on the View button of the draft store.
-
In the Categories tab, click on the + Create Category button. The Create Store Category form appears.
-
Fill in the required information on the form.
- Name: type in a name for the category that also serves as the item path. Add a forward slash symbol (/) before the name to follow the format requirement. For example, /coins.
- Parent Category: skip this option if you want to make the category it's own main category. If you want to create a sub-category, select a parent category from the dropdown.
- Localization: if the draft store supports multiple languages, you can add translations of the store name in each supported language.
-
Click Create. The category is added to the Categories list.
-
Find the ID of your draft store. In the output, it's the
storeIdof the store withpublishedset tofalse. Note itsdefaultLanguagetoo.ags platform stores list --namespace <YourNamespace> --format json -
Create the category. Replace
<StoreId>with your draft store ID,<CategoryPath>with the category path, such as/coins,<DefaultLanguage>with the store'sdefaultLanguage, and<DisplayName>with the category's display name:ags platform categories create --namespace <YourNamespace> --store-id <StoreId> \
--json '{"categoryPath": "<CategoryPath>", "localizationDisplayNames": {"<DefaultLanguage>": "<DisplayName>"}}'categoryPath: the Name, starting with a forward slash (/). It can contain letters, numbers, and hyphens. To create a sub-category, put the path of an existing parent category in front of it, such as/coins/gold.localizationDisplayNames: the display name of the category in each language, keyed by language tag. It must include the store's default language. To add translations for the store's other languages, add a key for each one.
If a display name contains an apostrophe (
'), put the JSON in a file and pass it with--json @<FileName>.jsoninstead. -
To see the categories in the draft store, run:
ags platform categories list --namespace <YourNamespace> --store-id <StoreId> --format json
What's next?
After creating categories, you can now proceed to creating items to sell in your store. Follow the steps in the Create store items article.