[OneSignal Plugin] Where is the OneSignal/OutSystems integration documentation?
Forge component by OutSystems R&D
Published on 09 Dec 2020

I am trying to use OneSignal with my mobile application and frankly, it seems that we have to work everything out by trial and error. Correct me if I am wrong, but I cannot find any documentation that is going beyond some initial documentation, like this.

It would be really helpful to get documentation with a description of:

- What happens when we use the client actions part of the client plugin.

- What happens when we use the server actions part of the API plugin.

For example, it seems that if I register with a user with a client action, then a registration is created in OneSignal. Let's say the PlayerID is 'xyz'. However, if I register with a different user on the same device, no new user is created in OneSignal. The second user is now linked to the same PlayerID 'xyz'.

What is the point of having a client action called 'RegisterWithUser' if it really doesn't matter which user is logged in? Again, correct me if I am having this wrong?

The basic thing that I would like to understand is: What is the OneSignal user linked to? Is it linked to the device or is it linked to the user? It seems it is 'device' as the PlayerId is the same for any user.

Unregistering a user via the client or server actions provided does not make any difference either. After unregistering, indeed causes the PlayerId not being able to be retrieved (via server action 'GetByDeviceID_PushToken_PlayerID'), but once registering again (with whatever user) the same PlayerId is back.

What I want to accomplish is the following:

- A device can be used by different users. When a user logs on, this user will receive the push notifications sent to that user only (via 'SendPushNotificationToUserId'). If the user logs out, no push notifications will be sent to that device for that user (presumably, using the 'unregister' client action). When another user logs in, the push notifications for that other user are received on the device.

- A user can be logged on into multiple devices. Again, the push notification sent with 'SendPushNotificationToUserId' will be routed to all the devices that user is logged into.

How do I do this?