question

Irina Fikhgendler avatar image
Irina Fikhgendler asked

Have I any way to receive reports by segments in PF ?

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

·
Sarah Zhang avatar image
Sarah Zhang answered

Do you mean to catch the EventHistory of segments? If so, Webhooks can help achieve that additional event handling on the custom servers. Whenever a new event is emitted, it can be forwarded to your server by making a POST request to your custom web endpoint. The event data is then passed as the JSON body of the request. Please navigate to the doc Webhooks for more details.

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.

Irina Fikhgendler avatar image Irina Fikhgendler commented ·

@Sarah, thanks, but which events contains info about segments ?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Irina Fikhgendler commented ·

We checked the API references, currently, there are no default events for players entered segments and players left segments. So, using custom events is a workaround. You can refer to the following steps.

  1. Write the CloudScript function (A) that can write the custom event (B) via server API WriteTitleEvent.
  2. Navigate to [GameManager]->[Segments] tab, click the [Add action].
  3. Choose the action type to [Execute Cloud Script], choose the Cloud Script function to (A).

Then you can through catching (B) to catching the segment events, you need to add the “report” in the function by yourself.

0 Likes 0 ·
Irina Fikhgendler avatar image Irina Fikhgendler commented ·

@Sarah Zhang, thank you very 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.