Computed quantities for nested items
What's new
Nested items accept an optional quantity_expression, extending the computed quantities added to items themselves on 2026.08.17. It uses the same MathExpression shape — a name plus a list of tokens — so the amount of a child item inside a bundle can be a formula instead of a fixed count.
A new PublicNestedItem schema carries the same fields as NestedItem without quantity_expression, and now backs nested_items on the player-facing read schemas: PublicItemRead, PublicSubscriptionRead, PublicSubscriptionPlan, and LootboxNestedItemRead. The formula stays on the configuration side and is never serialized to players.
Impact
A bundle can scale what each of its children grants. A starter pack that hands out "coins equal to 10% of the player's balance" alongside a fixed set of items no longer needs a separate bundle per player segment — the child item carries the formula and the platform evaluates it when the bundle is granted.
Changes
| Resource | Change |
|---|---|
| create_item, update_item, bulk_create_or_update_items, bulk_update_items | Optional quantity_expression accepted on each nested_items entry |
| get_items, get_item, translate_item | quantity_expression returned on each nested_items entry, including the nested items of subscription plans |
| get_all_store_items, get_store_items, create_store_item, update_store_item, bulk_update_store_items | Same field on nested_items of the embedded item |
| get_coupons, get_coupon, get_user_coupons, create_coupon, update_coupon, bulk_update_coupon | Same field on nested_items of each granted item |
| create_daily_reward, update_daily_reward | Optional quantity_expression accepted on each day's items and on extra_reward_items |
| get_daily_rewards, get_daily_reward, copy_daily_reward | Field returned on the same reward items; the nested_items_read entries are player-facing and omit it |
| get_loyalty_tiers, update_loyalty_tiers | Same field on nested_items of each tier item |
| Components | Added the PublicNestedItem schema and pointed nested_items on PublicItemRead, PublicSubscriptionRead, PublicSubscriptionPlan, and LootboxNestedItemRead at it instead of NestedItem |
Upgrade
- No action required on the write side.
quantity_expressionis optional, and a nested item that sets onlycountbehaves exactly as before. - If you read nested item counts to decide what to grant in game, handle the case where
quantity_expressionis present — the effective amount comes from the expression, not fromcount. - If your client is generated from the spec, the
nested_itemstype on player-facing item, subscription, and lootbox responses is nowPublicNestedItem. The fields are unchanged, so only the generated type name moves.
需要技术支持?
联系我们的集成技术团队: integration@aghanim.com