I'm trying to use CustomTags in Rules but it never works.
My client code:
var result = await PlayFabClientAPI.PurchaseItemAsync(new PurchaseItemRequest() { CatalogVersion = shopname, ItemId = itemid, Price = itemprice, VirtualCurrency = itemcurrency, CustomTags = new Dictionary<string, string>() { {"Playertag", "0"} } });
I want to execute a Cloud Script function after the purchased item is added to the player's inventory. But the Cloud Script function should only be executed if the item's "Playertag" is "0". For example, if it is "3", then the Cloud Script function should not be executed.
I get the following PlayStream event:
{ "EventName": "player_inventory_item_added", "BundleContents": null, "EventNamespace": "com.playfab", "EntityType": "player", "Source": "PlayFab", "TitleId": "E5E2C", "EntityId": "4BA00A0BDD80CDE6", "EventId": "c939d09768be437d9551ae5fe7caad66", "SourceType": "BackEnd", "Timestamp": "2021-03-29T12:25:14.4675159Z", "History": null, "CustomTags": { "Playertag": "0" }, "Reserved": null, "PlayFabEnvironment": { "Vertical": "master", "Cloud": "main", "Application": "mainserverlinux", "Commit": "fd683bf" } }
And I have this rule:
But the rule is never executing my Cloud Script function, even if the item's "Playertag" is "0". What am I doing wrong?
Is something wrong with the rule's condition?