question

Marian Stychuk avatar image
Marian Stychuk asked

Playstream with Entity event types (PlayStream V2) do not appear in Rules available Event types

I want to hook up an azure function to a playstream event and it doesn't work for the new entity events.

When regular playstream events are fired - after a short period of time (5-10 minutes) their types are available for Rule triggers (New Rule -> Event type dropdown) with the prefix title.{TitleId}. But this doesn't work for the new Entity playstream events. When I publish an entity event, its type does not appear in that Event Type dropdown, although I can see from the monitor page that the event is received.

Am I missing something?

entitiesPlayStream
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

·
Neils Shi avatar image
Neils Shi answered

As WriteEvents API said, The namespace of the Event must be 'custom' or start with 'custom.'. If you want to create custom entity event, you can set "EventNamespace" to "custom" as the following:

 {
   "Events": [
     {
       "EventNamespace": "custom",
       "Name": "test_event",
       "Payload": {
         "_TestEntityEvent":0
       }
     }
   ]
 }
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.

Marian Stychuk avatar image Marian Stychuk commented ·

Thanks for the quick answer!

So the tip was to set the "EventNamespace" to "custom". It would be nice to have this info somewhere in the documentation since when you try to change namespace to any other than ["com.playfab.events.*", "custom"] you get an error saying

"The requesting entity is not authorized to write events with namespace custom1. Allowed namespaces must begin with com.playfab.events.."

And it isn't obvious that the "custom" event namespace should be used.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Marian Stychuk commented ·

WriteEvents API has stated that "The namespace of the Event must be 'custom' or start with 'custom.'."

1 Like 1 ·

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.