question

Tomasz Rzeznik avatar image
Tomasz Rzeznik asked

Rule Condition is not working

Hi team,

I was trying to implement default custom data on item purchase, and I made it, thanks to Citrus Yan's answer from this question https://community.playfab.com/answers/38910/view.html.

The thing is, I don't want to set it up for all items only for one type. So I added the condition to filter the right items. And this is the problem, for some mysterious reason the condition doesn't work. Please check the settings on images below. Please note that without condition, everything is working fine.
rule-condition.png(43.1 kB)


item.png (20.0 KiB)
rule-condition.png (42.1 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

·
Citrus Yan avatar image
Citrus Yan answered

Would you please share you title id? And how do you mean that the condition doesn't work? Does it mean that with the condition the Rule won't act on any events, or the condition is not filtering other items, or something else?

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

Tomasz Rzeznik avatar image Tomasz Rzeznik commented ·

The title id - C2C9B

So the problem with the rule is that it is not firing up the cloud script function. Therefore the new Item in the inventory is created without metadata.

When I remove the condition, then the cloud script is triggered, and the new Item is created with metadata.

I've also discovered that when I use DisplayName in the condition, then the cloud script function is also triggered.

So, this condition is working:

DisplayName | string value | is | Peralta

but this is not:

ItemId | string value | is | Peralta1

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan Tomasz Rzeznik commented ·

Took a look at your title, looks everything is ok, would you please try reproducing it again, however, this time, open up the PlayStream Monitor:

https://developer.playfab.com/en-US/your_title id/dashboard/monitoring/playstream

to see whether the player_triggered_action_executed_cloudscript event is triggered or not, and if it does - which means that the Rule did trigger the CloudScript function, then what does that say, does it encounter some kind of a error or something else.

0 Likes 0 ·
Tomasz Rzeznik avatar image Tomasz Rzeznik Citrus Yan commented ·

Hey @Citrus Yan I've reproduced the issue on Thursday (4 days ago).

However, when I go back to this today, the issue no longer exists. Please check the image below.

Is it possible that the rule update needs some time to propagate?

0 Likes 0 ·
items-history.png (68.9 KiB)
Show more comments

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.