Skip to content

Build segments by User ID

Use the User ID filter to create a segment of known users by their Pushwoosh User ID, or switch it to HWID, Email, Phone, or Token to match by that device identifier instead. This works best when you already know which users or devices you want to include and those identifiers are registered in your project.

How to build a segment by User ID

Anchor link to

To create a User ID-based segment:

  1. Go to Audience → Segments.

  2. Click Create Segment to open the segment builder.

  3. In the segment builder, click User ID in Add filter by.

Create segment screen with User ID selected in Add filter by before entering user identifiers
  1. Choose which identifier to filter by: User ID, HWID, Email, Phone, or Token.
User ID condition field dropdown showing User ID, HWID, Email, Phone, and Token all enabled with Token selected
  1. Choose the operator for the condition. Learn more
User ID condition operator dropdown showing in, not in, starts with, contains, and ends with
  1. Add the values that should be included in the segment: User IDs, HWIDs, emails, phone numbers, or push tokens, depending on the field you chose in step 4. in and not in take a list of values. starts with, contains, and ends with take a single value. Enter phone numbers in E.164 format, for example +15551234567. Pushwoosh stores them this way, and starts with only matches from the very first character.
Create segment screen with User ID filter open showing the field to add Pushwoosh User IDs
  1. Add more filters if needed.

  2. To target a user across all their devices when the condition matches, use Include all of a user’s devices. Learn how this option works.

  3. Click Save.

Each field takes the same five operators, comparing the values you enter against that field’s value on each user or device.

Operator
Description
Example
inMatches any value in the listUserID in ["user1", "user2"]
not inDoes not match any value in the listHWID not in ["a1b2c3d4e5"]
starts withBegins with the specified stringPhone starts with "+1555"
containsContains the specified stringEmail contains "example.com"
ends withEnds with the specified stringToken ends with "9a2e2f"

Multi-device matching

Anchor link to

For HWID, Email, Phone, and Token, operators evaluate each device individually. A user matches if any one of their devices satisfies the condition.

not in matches any user with at least one device whose value is not in the list. If a user has several devices, one device outside the list is enough to match, even if another device of that user is on the list.

Turning on Include all of a user’s devices adds every device of a matching user to the segment, including devices whose values are on the excluded list.

Token matching

Anchor link to

Token matches the push token shown for a device in User Explorer. It doesn’t match Firebase Cloud Messaging (FCM) sender keys or web push keys, which aren’t indexed for this filter.

Unlike Email, Token values are case-sensitive. Pushwoosh compares them exactly as entered, without lowercasing.

Legacy segments

Anchor link to

Segments saved before these operators were introduced carry no operator value and are read as in. Nothing changes for existing segments.