question

Yusuf Demir avatar image
Yusuf Demir asked

Get Item That Added to Player Inventory and Send it to Cloud Script

Hi. I am listening items that adding to player inventories with "com.playfab.player_inventory_item_added" event. I want execute a cloud function with item that given when it's happening. But I don't know how to send item id to cloud function. I know I should use "Arguments (JSON)" field, but I don't know how to implement item id to this field. Can any body help me? (See screenshot)

capture.png (65.4 KiB)
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

·
Ivan Cai avatar image
Ivan Cai answered

You can see the item id in the context. So when you want to use the item id in cloud function, you can directly get it via context.playStreamEvent.ItemId. For more information, please refer to Can I pass properties from a Rule into the arguments of a ExecuteCloudScript Action? - Playfab Community.

3 comments
10 |1200

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

Yusuf Demir avatar image Yusuf Demir commented ·

So as I understand you, I don't need to use "Arguments (JSON)" field right?

0 Likes 0 ·
Ivan Cai avatar image Ivan Cai ♦ Yusuf Demir commented ·

Yes, you don't need it.

0 Likes 0 ·
Yusuf Demir avatar image Yusuf Demir Ivan Cai ♦ commented ·

Thank you so much

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.