question

andrearossini avatar image
andrearossini asked

Automation - Rules

Hi,

I need to reset some user data when a player validate a receipt (using PlayFabClientAPI.ValidateGooglePlayPurchase).

I tried to define a rule using "com.playfab.player_receipt_validation" as Event Type.

As Condition I have set "Valid boolean is True".

As Action Execute Cloud Script --> MyFunction --> Arguments: "null".

Is this correct? It seems not working... In my function I can assume that currentPlayerId variable is set to the id of the player that has triggered the validation?

Thank you.

Best Regards,

Andrea

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

Yes, that would create a rule for that event, which only fires if Valid is true. Can you give me the Title ID and name of the Rule, so that I can have a look?

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

andrearossini avatar image andrearossini commented ·

Title ID is: 1CE2
Rule ID: E84A6B8624FC7101

Rule Name: Reset_PlayerData_After_Purchase

Thank you!

0 Likes 0 ·
brendan avatar image brendan andrearossini commented ·

As far as I can tell, it's set up right. What makes you think it doesn't work? Looking at your event history, I see no receipt validation events in the last week. How are you testing? Also, I'd recommend turning on "Publish results as PlayStream Event" in the Rule for while you're testing.

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.