Skip to main content

Understanding Your Inventory

Every time you open a case and win an item, it’s automatically added to your inventory. Your inventory is stored in the user_items table in the database.

Inventory Data Structure

Each item in your inventory contains:
id
uuid
required
Unique identifier for this inventory entry
user_id
uuid
required
Your user ID (links to your profile)
item_id
uuid
required
The item’s ID (links to items table)
status
string
default:"in_inventory"
Current status of the item:
  • in_inventory - Available in your collection
  • sold - Sold for balance
  • withdrawn - Shipped to your address
created_at
timestamp
required
When you won this item

Item Properties

Each item has these attributes (from items table):
  • Name - Item display name
  • Image URL - Product image
  • Price - Value in ARS
  • Created At - When added to platform

Accessing Your Inventory

Currently, inventory viewing is integrated into the profile and case opening flows.

Future Inventory Page

A dedicated inventory page will be located at /inventory with features:
1

Navigate to Inventory

Access via:
  • Direct URL: /inventory
  • Profile dropdown menu
  • Sidebar navigation (when implemented)
2

View Your Collection

See all items with status in_inventory displayed as cards showing:
  • Item image
  • Item name
  • Rarity badge
  • Current value
  • Date won
3

Filter and Sort

Organize your inventory by:
  • Rarity level
  • Date acquired
  • Item value
  • Status (active/sold/withdrawn)
4

Select Actions

Each item card will have action buttons:
  • Sell - Convert to balance
  • Withdraw - Ship to your address
  • Details - View full item information

Selling Items

Convert your won items into balance to open more cases.

Sell Flow

1

Select Item to Sell

From your inventory, identify the item you want to sell.Consider:
  • Do you want the physical item?
  • Is the sell value good?
  • Do you need balance for more cases?
2

Click Sell Button

On the winner modal after opening a case, you can immediately sell via:“Vender por buttonOr from the inventory page (when implemented), click the sell action on any item card.
3

Confirm Sale

A confirmation dialog appears:
¿Estás seguro que quieres vender este artículo?

Nombre: [Item Name]
Valor: [Item Price] ARS

Esta acción no se puede deshacer.
Click “Confirmar Venta” to proceed.
4

Transaction Processing

The system:
  1. Updates item status to sold
  2. Creates transaction record (type: item_sell)
  3. Adds item value to your balance
  4. Refreshes your balance display
  5. Shows success notification
5

Balance Updated

Your new balance appears immediately in:
  • Navbar balance display
  • Wallet page
  • Transaction history
Selling is permanent! Once you sell an item:
  • It cannot be unsold
  • You cannot withdraw it as a physical item
  • It’s removed from your active inventory
Only sell items you’re certain you don’t want to keep.

Bulk Selling

Currently, items must be sold individually through the sell button on each item card. To sell multiple items efficiently:
  1. Navigate to your inventory page
  2. Sort items by value or rarity to group similar items
  3. Sell items one at a time by clicking the “Vender” button on each card
  4. Confirm each sale in the modal
Filter by “Common” rarity to quickly find and sell lower-value items.

Withdrawing Physical Items

For high-value items, you can request physical shipment to your address.

Withdrawal Eligibility

Physical withdrawal is typically available for:
  • Epic and Legendary rarity items
  • Items valued over a certain threshold (e.g., $50,000 ARS)
  • Items marked as “shippable” in the database
Check the item details to see if withdrawal is available.

Withdrawal Process

1

Update Shipping Address

Before requesting withdrawal:
  1. Navigate to /profile
  2. Fill in “Dirección de envío” completely:
    • Street and number
    • City
    • Province
    • Postal code
  3. Add your Phone Number
  4. Save changes
Withdrawal requests cannot be processed without a complete shipping address.
2

Request Withdrawal

From your inventory:
  1. Find the item you want to withdraw
  2. Click “Solicitar Envío” (Request Shipment)
  3. Review item details and shipping address
  4. Confirm the request
3

Verification

The support team may contact you to:
  • Verify your identity (DNI check)
  • Confirm shipping address
  • Provide shipment timeline
  • Request additional information
4

Item Status Update

Once withdrawal is approved:
  • Item status changes to withdrawn
  • Item is removed from active inventory
  • You receive a tracking number
  • Shipment is processed
5

Delivery

Typical delivery times:
  • Local (Buenos Aires): 3-5 business days
  • National (Argentina): 5-10 business days
  • International: 15-30 business days (if available)
Shipping costs may apply based on:
  • Item size and weight
  • Delivery location
  • Shipping method (standard vs express)
Fees are deducted from your balance before shipment. You’ll see the exact cost during the withdrawal request.

Inventory Organization

Viewing Options

Customize how you view your collection:
Default view showing items as cards:
  • 3-4 columns on desktop
  • Large item images
  • Quick action buttons
  • Rarity borders

Filtering Options

Narrow down your inventory view:

By Status

  • Active Items Only
  • Sold Items
  • Withdrawn Items
  • All Items

By Rarity

  • Legendary
  • Epic
  • Rare
  • Common
  • All Rarities

By Value

  • High to Low
  • Low to High
  • Above threshold
  • Below threshold

By Date

  • Newest First
  • Oldest First
  • Last 7 Days
  • Last 30 Days
  • All Time

Search Functionality

Find specific items quickly:
Search inventory by:
- Item name
- Case name (where you won it)
- Rarity
- Value range

Inventory Statistics

Track your collection’s performance:
Dashboard showing:
  • Total items won
  • Total value (active inventory)
  • Items sold (count and value)
  • Items withdrawn (count)

Database Queries

For developers, here are the key queries for inventory management:

Fetch User Inventory

SELECT 
  ui.id,
  ui.status,
  ui.created_at,
  i.name,
  i.image_url,
  i.rarity,
  i.price
FROM user_items ui
JOIN items i ON ui.item_id = i.id
WHERE ui.user_id = $1
  AND ui.status = 'in_inventory'
ORDER BY ui.created_at DESC;

Sell Item Transaction

BEGIN;

-- Update item status
UPDATE user_items
SET status = 'sold'
WHERE id = $1 AND user_id = $2;

-- Add balance
UPDATE users
SET balance = balance + $3
WHERE id = $2;

-- Record transaction
INSERT INTO transactions (user_id, amount, type, reference_id)
VALUES ($2, $3, 'item_sell', $1);

COMMIT;

Inventory Statistics

SELECT 
  COUNT(*) as total_items,
  SUM(CASE WHEN status = 'in_inventory' THEN 1 ELSE 0 END) as active_items,
  SUM(CASE WHEN status = 'sold' THEN 1 ELSE 0 END) as sold_items,
  SUM(CASE WHEN status = 'in_inventory' THEN i.price ELSE 0 END) as total_value
FROM user_items ui
JOIN items i ON ui.item_id = i.id
WHERE ui.user_id = $1;

Best Practices

Regular Review

Check your inventory regularly to:
  • Sell items you don’t want
  • Track valuable items
  • Plan withdrawals
  • Monitor collection growth

Strategic Selling

Optimize your selling strategy:
  • Keep rare items for withdrawal
  • Sell common items for more cases
  • Build balance for high-value cases
  • Track profit/loss trends

Address Accuracy

Keep your shipping address updated:
  • Verify before each withdrawal
  • Include phone number
  • Use clear, complete format
  • Update if you move

Item Protection

Protect your valuable items:
  • Don’t sell rare items impulsively
  • Consider withdrawal for very valuable items
  • Keep proof of ownership
  • Contact support if issues arise
Set a personal rule: Keep items above a certain value (e.g., $100,000 ARS) for withdrawal, and sell everything below that threshold to maximize your case-opening budget.

Build docs developers (and LLMs) love