question

madmojoman avatar image
madmojoman asked

Multiple Inventory Item Instances CustomData Updates Simultaneously?

Is there a good / preferred way to update the CustomData for multiple Inventory Item Instances at the same time? Generally, I use this to give the same information to a bunch of different items in different situations. For example, updating the last time that item was used, or giving that item a parent it would be attached to and/or removing the parent from all of the items at the same.

I don't want to have to do a call for every single item, when they are all receiving the same information. And that could add up to hundreds of calls all at once, instead of a single call. I'd rather just store an array of the InstanceIds and give them all the same updated CustomData in a single call.

I thought I had seen this somewhere once, but I can't seem to locate a way to do that at the moment. Maybe I'm searching with the wrong keywords or something.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

For cases where you're storing a large amount of information like this, you may want to simply have it be stored in a key/value pair in the user (read only or internal data), rather than on the inventory items directly - you can use the inventory item instance IDs if necessary for clarity. Making tons of distinct calls to update the inventory item custom data for many items in a short period isn't really going to work, as you would hit the API call limits. We'll be making updates to both inventory and data systems later this year, which will provide you with more options, though.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

madmojoman avatar image madmojoman commented ·

Okay. Thank you.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.