User Inventory Search
-
Currently, BrainCloud does not provide a way to retrieve a list of users who possess a specific item.
We need to fetch inventory data for users who own the item based on itsdefId.
This is similar to theFIND_USERS_BY_USER_SUMMARYfunction.
We need the ability to search based on inventory fields and recent login activity (while avoiding a full database scan).
I believe this is a feature the system itself should support.
I want to avoid the redundant approach of storing data in "custom entries" every time a purchase is made. -
You're correct: there's currently no API to query users by owned item (defId). All UserItems read operations are scoped to a single user. We've noted this as a feature request. In the meantime, rather than adding storage logic to every purchase flow, you can attach a Post API Hook to the item award/purchase/drop operations. The hook script maintains an index for you (e.g. flags in summary friend data searchable via
FindUsersByUserSummary).
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login