0

I am using OneSignal to send notification and I was able to send a notification successfully but now I want to send them to a specific user or users I know I can create a segment to identify these users but let say I have a segment for company A and another for company B how can I add a new user to that segment.

so, in short, this is how the idea in my mind works in my DB I have users that belong to company A and another to company B they open the app and subscribe now how I give them a key to identify them do I send the key from my application or I store it in my DB?

Nouf
  • 733
  • 1
  • 11
  • 32
  • 1
    You will need to store playerId (Device id) in users tables and then send notification to specific device. https://documentation.onesignal.com/reference#section-send-to-specific-devices – Swapnil Patwa Aug 06 '17 at 14:56
  • but the playerId is just numbered how will I know which company the user belongs to? – Nouf Aug 07 '17 at 10:04

1 Answers1

1

The ability to set data tags is incredibly powerful. You can store data attributes on each user. Tags are available on all OneSignal accounts and are a very popular feature among our customers. Users are tagged with attributes such as types of messages they want to receive, content categories, cart abandonment info, subscription status and user-preferences.

Read more on data tags here.

We have more details in our blog post on data integration with OneSignal