Sync in-app purchase and subscription data from RevenueCat to OneSignal for personalized messaging.
Set the External ID in OneSignal
login
method.Get the OneSignal ID
Pass the OneSignal ID to RevenueCat
$onesignalUserId
setOneSignalUserID()
(recommended)Make a sandbox purchase
Check that the required device data is collected
Check that the OneSignal event delivered successfully
Check that the OneSignal tags are updated
Tag | Description |
---|---|
app_user_id | The RevenueCat App User Id that triggered the event |
period_type | The latest period type for the purchase or renewal. Either: TRIAL (for free trials), INTRO (or introductory pricing), NORMAL (standard subscription) |
purchased_at | Epoch time in seconds of the latest subscription purchase or renewal |
expiration_at | Epoch time in seconds of the latest subscription expiration date |
store | Either APP_STORE , PLAY_STORE , or STRIPE |
environment | Either SANDBOX or PRODUCTION |
last_event_type | The latest event type from the user. Either: INITIAL_PURCHASE , TRIAL_STARTED , TRIAL_CONVERTED , TRIAL_CANCELLED , RENEWAL , CANCELLATION |
product_id | The latest subscription product identifier that the user has purchased or renewed |
entitlement_ids | Comma separated string of RevenueCat Entitlement identifiers that the user unlocked |
active_subscription | The value will be set to true on any purchase/renewal event, and false on EXPIRATION |
subscription_status | See Subscription Status Attribute below |
grace_period_expiration_at | If a billing issue occurs, we will send the date of the grace period expiration. |
last_event_type
tag.
subscription_status
tagsubscription_status
tag is added or updated with any applicable changes, using one of the following values:
Status | Description |
---|---|
active | The customer has an active, paid subscription which is set to renew at their next renewal date. |
intro | The customer has an active, paid subscription through a paid introductory offer. |
cancelled | The customer has a paid subscription which is set to expire at their next renewal date. |
grace_period | The customer has a paid subscription which has entered a grace period after failing to renew successfully. |
trial | The customer is in a trial period which is set to convert to paid at the end of their trial period. |
cancelled_trial | The customer is in a trial period which is set to expire at the end of their trial period. |
grace_period_trial | The customer was in a trial period and has now entered a grace period after failing to renew successfully. |
expired | The customer’s subscription has expired. |
promotional | The customer has access to an entitlement through a RevenueCat |
expired_promotional | The customer previously had access to an entitlement through a RevenueCat Granted Entitlement that has since expired. |
paused | The customer has a paid subscription which has been paused and is set to resume at some future date. |