question

tdg avatar image
tdg asked

How can i grant items to inventory with custom data?

How can i grant items to inventory with custom data?

Is it possible?

apis
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.

jital avatar image jital ♦ commented ·

Can you provide more information on what you're attempting to do? Why wouldn't you use GrantItemsToUser?

0 Likes 0 ·
madmojoman avatar image
madmojoman answered

You should actually use "GrantItemsToUsers" and be certain not to use "GrantItemsToUser" (singular), because the first targeting multiple users allows you to setup the CustomData for each item, while the second option targeting a single user only allows for a string list of the ItemIds to be granted to the user and not an option for CustomData to be set at the same time.

10 |1200

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

Hernando avatar image
Hernando answered

CustomData from catalog items does not automatically propagate to granted inventory items, so the recommendation is copying CustomData of the catalog item to the granted inventory item when you grant items to users via the execution in the CloudScipt.

More information please the API DOC GrantItemsToUser.

10 |1200

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

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.