BattlePets can be placed in a Pet Cage for trading. All Pet Cages have the same itemId - 82800 - and have suffix & factor 0, so the normal storage algorithms using those characteristics would lump every BattlePet together - if they actually worked for BattlePets (in fact they currently just silently ignore BattlePets).
BattlePets have the following characteristics, which can be extracted from the link (once you know it is a BattlePet in the first place). speciesID : The specific pet. level : Level of the pet, 1-25. Also iLevel of the Pet Cage item from certain Blizzard API functions. breedQuality : Quality/Rarity of this specific pet. Also available from certain Blizzard API functions. maxHealth : Max health of this pet. Note that pets cannot be caged if they are injured, so current health = max health power : Attack power of this pet. speed : Attack speed of this pet.
speciesID is clearly important when valuing a BattlePet. This determines the appearance, subtype, abilities, and probably the base stats of the pet. Would serve as an equivalent to itemId when storing BattlePet info. However we must ensure that this cannot be confused if there happens to be an item with itemId equal to one of the pets' speciesID.
breedQuality is also important, as higher quality means the other stats will be better, at higher levels. Some species are available in different qualities, though there may be species that can only have one quality.
level is important as other stats increase per level. However a low level pet is not necessarily that much less valuable than a high level once, as the player can level the pet after buying it. Therefore less important than quality. On the other hand we should still cater for players who wish to try purchasing BattlePets, levelling them up, and then selling them on for a profit.
maxHealth, power, speed : although these have been observed to be slightly different between pets of the same species/quality/level, the differences were only slight (and often where one stat was lower, another was higher to compensate). Probably unimportant when pricing pets.
Initial proposal to categorize BattlePets for Stats modules: Ignore health, power, speed Compress level into bands, e.g. level 1-5 is Band 1, level 6-10 is Band 2 {effectively math.ceil(level/5)} Modify speciesID to differentiate it from itemId (either by storing in a separate table, or by adding a prefix to it, i.e. "P"..speciesID) Use quality & level band to subdivide the speciesID entry
Or make a store key by combining P marker, speciesID, quality, level band into a single string
I like the idea of ignoring certain values and grouping certain things in IDing. 8 slightly different variations of something shouldn't -ideally- have 8 totally separate IDs and price evaluations from Auctioneer's standpoint (imho), when the market itself likely won't give nearly as much weight to these slight differences and it hurts the seller by forcing them to do increased manual research of the market. The benefits of some 'lumping' together increasingly outweighs any benefit(s) from high levels of separation when calculating price.