OneSignal
Learn about sending Deepwall events to OneSignal
Last updated
Learn about sending Deepwall events to OneSignal
Last updated
Deepwall automatically updates user tags in OneSignal with their latest subscription status. Having the instant and up-to-date subscription data in OneSignal enables you to create targeted campaigns for different user segments.
Typically this can be used to engage your freemium users to subscribe or to win back churned subscribers with special offer notifications
SDK update is not required, you can use this feature with any Deepwall SDK version.
Deepwall sends the following events to OneSignal.
Event Name
Description
purchased
User has purchased a non-subscription product (consumable, non-consumable, non-renewing subscription)
trialSubscribed
User has started a free trial
trialToPaidSubscribed
User is converted to a paid subscription at the end of the free trial
subscribed
Users has started a paid subscription without a free trial
renewed
User has renewed a paid subscription
refunded
User has received a refund for a subscription or non-subscription payment
autoRenewDisabled
User has disabled auto renewal on his/her subscription
autoRenewEnabled
User has enabled auto renewal on his/her subscription
Each event in Deepwall will be sent to OneSignal with the tag names you decide. The following tags can be sent to OneSignal. If you wish, you can choose not to send certain tags to OneSignal (except uuid
and event
) by leaving the tag name blank in the Deepwall management console.
Tag
Description
uuid
Unique user identifier in Deepwall. This tag is mandatorily sent.
event
Name of the event. This tag is mandatorily sent.
store
APP_STORE , PLAY_STORE, HUAWEI or ZOTLO
environment
Sandbox or Production
lastEventTime
Last event time
productCode
Purchased product code
purchaseDate
Date of purchase, the time store has charged the user's account.
originalPurchaseDate
Date of the first order of user, it will be trial start date if there is free trial.
expiresDate
End date of current subscription period
quantity
Purchase quantity
isActive
1 if automatic renewal is enabled, otherwise 0
inGracePeriod
1 if user is in grace period, otherwise 0
inTrialPeriod
1 if user is in trial period, otherwise 0
isRefunded
1 if purchase has been refunded and 0 if not
isSubscription
1 if purchase is a subscription and 0 if it is non-subscription
OneSignal integration requires that the unique device/user identifier sent to Deepwall is also sent to OneSignal as the External User ID
.
Learn how to add custom User Ids within OneSignal here :
If you are using External User Id
on OneSignal for different purposes, this will cause a conflict. Deepwall will only update users in OneSignal if the External User Id
has been sent to OneSignal, is the same uuid
in Deepwall.
IMPORTANT
Deepwall will only update users in OneSignal if the External User Id
is the same unique user id in Deepwall.
Navigate to App Settings in Deepwall management console and open OneSignal tab. Enter your OneSignal App Id and OneSignal API key. After you have entered App Id and API key, activate OneSignal integration using the activation switch to start sending of events by Deepwall.
OneSignal App Id and API key can be found in OneSignal dashboard. Go to Settings and Keys&ID of your app in OneSignal dashboard, you will find the necessary keys under the OneSignal Keys.
You can enter the tag names that Deepwall should use, or you can choose to use the default tag names by clicking Use Default Names. You can leave the tag name blank not to send a tag to OneSignal.
IMPORTANT
OneSignal has limitation on tag count can be sent. If you are using One Signal free plan, you can choose maximum 8 tags. If you select more, none of the tags will be received by OneSignal!
You can use following filters on tags to segment your users according to their subscription status :
Subscription Status
Filter
Freemium User (No purchase yet)
uuid
does not exist
Active Subscriber
isSubscription
= 1 AND expiresDate
>= Today() AND inTrial
= 0
Active Trial
isSubscription
= 1 AND expiresDate
>= Today() AND inTrial
= 1
Churned Subscriber (Expired)
isSubscription
= 1 AND isActive
= 0 AND expiresDate
< Today() AND inTrial
= 0
Churned Trial (Expired)
isSubscription
= 1 AND isActive
= 0 AND expiresDate
< Today() AND inTrial
= 1
Cancelled Subscriber (Not expired yet)
isSubscription
= 1 AND isActive
= 0 AND expiresDate
>= Today() AND inTrial
= 0
Cancelled Trial (Not expired yet)
isSubscription
= 1 AND isActive
= 0 AND expiresDate
>= Today() AND inTrial
= 1
In billing retry or grace period
isSubscription
= 1 AND isActive
= 1 AND expiresDate
< Today()
Refunded subscribers
isSubscription
= 1 AND isRefunded
= 1
IMPORTANT
Deepwall sends time variables e.g. expire date, purchase date etc. in Unix time and OneSignal also requires using Unix time for date variables when filtering user segments.
For more information about time operators in OneSignal :
If you want to display special content or price to your users coming from OneSignal campaigns follow the steps below :
1- Create a new in-app action key specific for OneSignal notifications
2- Design special offer paywall(s)
3- Set the default display for the new in-app action with special offer paywalls and run
4- Create campaign in OneSignal for your selected user segment and send notification
5- In your app, request a paywall with that new in-app action for your users coming from OneSignal notifications
6- If you want, you can setup an A/B test for your OneSignal special offers like you do for other paywalls