ACC AEP SDK Logon-Logoff
Description description
Environment
- Campaign Classic
- Campaign
Issue/Symptoms
In general, we integrate the AEP or Neolane SDK to execute the setPushIdenfitier
or registerDevice
method to register the token in the campaign and reconcile it to a recipient using a clientId.
If a user only wants to send push notifications to subscribers linked to a profile. In that case, it should be easily achievable by using profiles as filtering dimensions in their workflows. But there is a use case.
A user could log off, and then it should stop receiving notifications. And later, they could log in with a different account on the same mobile. We believe the registrationToken
(in Android at least) is valid from the installation of the app.
We haven’t found any API reference in the AEP SDK to delete or invalidate the registrationToken
, so how can we achieve this use case? Not sure if we can emulate it by invoking the setPushIdentifier
or registerDevice
again or if this has to be handled with the AuthenticationState
within the mobileApp code.
How should it be done?
Resolution resolution
This scenario is common to a certain extent. During the logoff, they should send the same API used to register the Customer Id, but emptying it, the field userKey
will be empty, and the link to the recipient will be cut. That can be done in the login with a userKey
populated with a Customer ID linked to Recipient/Profile. After logout, the Userkey
will be emptied.
The Mobile app needs to make a call to ACC on User logout/login to update this info on ACC. We can have a custom boolean field that we use as a flag to identify if an app subscriber is logged in or logged out.