Manage player inventories from the Admin Portal
The Inventory service is available but not yet recommended for production use. You are welcome to explore and try it, but please be aware that future updates may introduce breaking changes. For alternatives, consider the following:
- Entitlement: Recommended as the primary option for managing player items.
- Extend: If Entitlement does not fully cover your needs, consider Extend to build a custom solution.
Overview
This article walks you through how to grant, update, and delete the inventories of your players using the AccelByte Gaming Services (AGS) Admin Portal.
You can also do each task with the AGS CLI.
Prerequisites
- Access to the AGS Admin Portal.
- A publisher or a game namespace.
- You have reviewed the key concepts of the Inventory service and the Inventory service API documentation.
- To follow the AGS CLI steps, you have installed the AGS CLI and signed in with an account that has the permissions to manage player inventories. See Install and sign in. The examples use a Bash shell.
Browse player inventories
To browse the list of players that have been granted inventories, follow these steps:
- Admin Portal
- AGS CLI
- On the AGS Admin Portal sidebar, go to Online > Inventory > Lookup Inventory. The Lookup Inventory page appears.
- From the inventories list, find the inventory you want to view. You can search for an inventory using the player's ID. Click on the user ID of the inventory to open to its details page.
-
List a player's inventories. Replace
<YourNamespace>with your namespace and<UserId>with the player's user ID. To list every inventory in the namespace, leave out--user-id.ags inventory inventories list --namespace <YourNamespace> --user-id <UserId> -
To view one inventory, pass its
idfrom the list:ags inventory inventories get --namespace <YourNamespace> --inventory-id <InventoryId>
Grant inventory to a player
- Admin Portal
- AGS CLI
-
From the inventories list on the Lookup Inventory page, click on the + Grant Inventory button. The Grant Inventory form appears.
-
On the form, search for the user you want to grant an inventory to. Use their user ID in the search. Then, click Add.
-
In the Inventory dropdown, select the inventory you want to grant to the player.
-
Click on Grant. The inventory is granted to the player.
Grant the inventory. Replace <UserId> with the player's user ID and <InventoryCode> with the code of the inventory configuration. To find the code, run ags inventory inventory-definitions list --namespace <YourNamespace>.
ags inventory inventories create --namespace <YourNamespace> \
--json '{"userId": "<UserId>", "inventoryConfigurationCode": "<InventoryCode>"}'
Update player inventory slot limit
To update the slot limit of a player's inventory, follow these steps:
- Admin Portal
- AGS CLI
-
From the inventories list on the Lookup Inventory page, find the player with the inventory slot limit you want to update and click on their user ID to go to their details page.
-
On the player's details page, click on the edit (pencil) icon of the Inventory Slot field to edit its value. You can edit the value as follows:
- You can increase or decrease the player's slot limit within the limit set in the inventory configuration they are granted with. If for example, the player's inventory configuration has a maximum slots upgrade limit of 25, you can only use a value of up to 25, as any number above 25 will not be valid. For more information about setting the maximum slots upgrade limit of an inventory configuration, see Create and manage inventory configuration.
- If the inventory configuration granted to the player has unlimited maximum slot upgrades limit, then it cannot be edited.
-
Click on the check button to save your changes.
-
Check the inventory's current slot limit, shown as
maxSlots:ags inventory inventories get --namespace <YourNamespace> --inventory-id <InventoryId> -
Change the slot limit.
incMaxSlotsis the number of slots to add, not the new limit. Use a negative number to remove slots. For example, to go from 10 to 15 slots, use5. The new limit can't exceed the configuration's maximum slots upgrade limit, and an inventory with unlimited slot upgrades can't be edited.ags inventory inventories update --namespace <YourNamespace> --inventory-id <InventoryId> \
--json '{"incMaxSlots": 5}'
Delete player inventory
Player inventories can only be deleted if they're empty. Ensure that you first remove all the items from a player's inventory before deleting it.
To delete a player's inventory, follow these steps:
- Admin Portal
- AGS CLI
- From the inventories list on the Lookup Inventory page, find the player with the inventory you want to delete and click on their user ID to go to their details page.
- On the player's details page, at the bottom of the Basic Information table, click on the Delete inventory button and click OK on the pop-up. The player's inventory is deleted.
Delete the inventory. message is a required note that AGS records with the deletion, such as the reason for deleting the inventory.
ags inventory inventories delete --namespace <YourNamespace> --inventory-id <InventoryId> \
--json '{"message": "<DeletionReason>"}'