Question

OneSignal Integration - OriginalAppId, OneSignalId, PlayerId, externalUserId?

  • 12 August 2022
  • 1 reply
  • 160 views

Badge +4

We want to integrate RC with OneSignal and are facing some questions we do not find clear answers in the documentation.(https://docs.revenuecat.com/docs/onesignal)

The main issue is that OneSignal does not have a combined “User”. They only have “PlayerIds” targeting specific devices and channels.

Our Users use the app on multiple devices and platforms. (iPhone, iPad, Mac)
We use anonymous user ids for RC and when a user restores their purchases, RC is creating aliases to link the data together.

When we set the $onesignalId with the SDK, it is a PlayerId, meant to target push notifications to one specific device. So RC Subscription Events are only set to this PlayerId with the API Integration.

If a user is using multiple devices, he has multiple PlayerIds. But RC is only adding tags to the one set as $onesignalId.

To use OneSignal Journeys, we need to set the externalUserId.
We can use the originalAppId from RevenueCat here.

Sadly there is no detailed documentation on how to use Journeys and Push Notifications if an externalUserId has multiple PlayerIds for Push.

e.g.
When a user is cancelling a free trial on his iPhone, we want to send the push notification there and not to his Mac/iPad/2nd Phone, because the $onesignalId is for only one PlayerId/Device.

Anybody mastered the integration with OneSignal?

Best regards,
Jan André


1 reply

Badge +3

Did you ever figure this out? Our webhooks to Onesignal keep 404ing with 

{"errors":["No user with this id found"]}

Reply