question

dan-2 avatar image
dan-2 asked

Putting players into a segment based on tag

Hello!

This is in reference to title A508. I wrote some cloudscript that assigns a tag to a player when they login, it's in the function called VersionCheck(). We then have some segments set up that respond to that tag to give the player an inventory item. The player is successfully getting a tag but not getting assigned to a segment. I assume there is a delay? Anyway to prime the pump? Is there another solution to add players to segments on login like this?

For reference, player id C67282331E26E2F4 currently has the tag "funnel_first_time_player", but is not in the FirstTimePlayer segment.

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

No - all PlayStream functionality, including segmentation, occurs immediately when the event arrives. When you specify a tag, the complete tag (which you need to use in the Segmentation filter) is "title.{Title ID}.{tag text}". I've updated your title to correct the two segments: https://developer.playfab.com/en-US/A508/segments

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

dan-2 avatar image dan-2 commented ·

Thank you for your help Brendan! This change does appear to have worked :). The only thing is - I don't see the inventory change for the players that are now in the segment.

0 Likes 0 ·
brendan avatar image brendan dan-2 commented ·

Can you give me an example? The player you called out above has been granted the item: https://developer.playfab.com/en-US/A508/players/C67282331E26E2F4/inventory

0 Likes 0 ·
dan-2 avatar image dan-2 brendan commented ·

This person for example: A7988015E4F343A8. It does appear some have been added though.

0 Likes 0 ·
Show more comments
Cliff Cawley avatar image Cliff Cawley commented ·

@Brendan I was redirected here from my own question at 29231. For my tag I was just using the tag "MyTag", but looks like I need to update that to be "title.9E588.MyTag". Although that doesn't work?

I can't quite follow what you did to fix this previously so I can fix it myself, any tips?

0 Likes 0 ·
Cliff Cawley avatar image Cliff Cawley commented ·

@Brendan ah nevermind. The problem was that after saving and returning to the list of segments I needed to refresh the entire page to see the updated counts :)

0 Likes 0 ·
brendan avatar image brendan Cliff Cawley commented ·

No worries - glad you're unblocked on this!

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.