1

I would like to send in-app and cloud messages to a group of users based on non-standard criteria. I decided to link firebase project with BigQuery and use imported segments to accomplish this task. The problem is that fcm message composer always target 0 users when i filter users based on the segment.

I added such entry to the SegmentMetadata table

{
    "segment_label": "test_segment_label",
    "display_name": "test_display_name_metadata"
  }

and such entry to the SegmentMemberships table

{
    "instance_id": my device fcm token,
    "segment_labels": [
      "test_segment_label"
    ],
    "update_time": null,
    "membership_name": "test"
  }

Now on the firebase console when i am trying to send cloud message and target users based on this segment i see that 0 users are matched, do you have any idea why? image snapshot from firebase console

(my device fcm token that i putted on the entry in the SegmentMemberships table should be valid because i see on android studio logs that it doesn't change)

saviola44
  • 73
  • 1
  • 7
  • The most obvious answer is that the imported segment has no members and I don't see that you've ruled that out here. Also check that you [enabled the import](https://firebase.google.com/docs/projects/import-segments#enable_bigquery_import) and that you've waited the required 12 hours for data to be imported. – Kato May 12 '21 at 15:15
  • Note that when imported segments have members they show up in the expanded dropdown as demonstrated in the screenshot [here](https://firebase.google.com/docs/projects/import-segments#use_imported_segments) – Kato May 12 '21 at 15:22
  • strange, now i think i waited more than 12 hours, i have firebase project connected with bigquery, also several times i manually clicked import segments button on firebase console to be sure that data is synced... – saviola44 May 12 '21 at 19:04

1 Answers1

2

instance_id is not your fcm token but the part before colon in your token. When you call getToken() in SDK the token returned is in this format: <instance_id>:<token>

esp10mm
  • 36
  • 3