Pushwoosh stores each contact method as a separate "device": a mobile or web push subscription (HWID), an email address, a phone number. To reach the same person across channels, register all of them under the same User ID. Pushwoosh links records that share a User ID automatically.
1. Set a custom User ID on the device
By default, the SDK sets the User ID to the device's HWID. When the user signs up or logs in, set your own User ID:
- iOS:
[[Pushwoosh sharedInstance] setUserId:@"user123"]; - Android:
Pushwoosh.getInstance().setUserId("user123"); - Web:
api.registerUser('user123');
From your backend, you can do the same with the registerUser API method or by passing userId to registerDevice.
2. Register the email address with the same User ID
-
From your backend: call registerEmail with
emailanduserIdset to the same value you used for the device. You can also passlanguage,tz_offset, andtags. - Email already registered: call registerEmailUser to attach a User ID to it. This method does not register new email addresses.
-
From the app: after
setUserId, call the SDK'ssetEmailmethod (for example,Pushwoosh.getInstance().setEmail(user.getEmail())on Android). See the Android SDK integration guide.
3. Check the link
Search for the User ID in User Explorer. The Devices and platforms tab should list both the mobile device and the email address.
4. Send emails in a Customer Journey
Once the email shares a User ID with the device, you can send welcome or confirmation emails with an Email element in a Customer Journey. For cross-channel journeys, turn on Send to all user devices so each message reaches the right channel of the same user.
Learn more: Set a custom User ID and Omnichannel campaigns.
Comments
0 comments
Please sign in to leave a comment.