Third Party Integrations
OneSignal is a SaaS tool that allows app owners to create targeted cloud messaging (web/mobile) campaigns and send custom notifications to their users.
By creating a ready to use integration between Appmate and OneSignal, we allow Appmate users enrich their cloud messaging targeting options with in-app purchase statuses of their users.
e.g. if a user has started a new subscription using Appmate SDK, app owner may send a delayed push message (24 hours later) to the user to inform them about some new feature they can now access.
This can be achieved by passing some attributes to OneSignal via API implementation.
For every subscription event in Appmate, the following event tags get added or updated on the user in OneSignal.
|appmateUserId||User ID of the app registered in Appmate|
|inTrialPeriod||Whether user is in trial period|
|purchaseStatus||Current status of the purchase (i.e. purchaseType)|
|purchaseTime||Epoch time in seconds of the latest subscription purchase or renewal|
|expireTime||Epoch time in seconds of the latest subscription expiration date|
|graceExpireTime||Epoch time in seconds of the latest subscription grace expiration date|
|platform||Huawei-Google-Apple (Check DB)|
|productId||The latest subscription product identifier that the user has purchased or renewed|
|activeSubscription||The value will be set to true on any purchase/renewal event, and false on EXPIRATION|
|country||Country which the user made the purchase|
|currency||Currency of the purchase|
|autoRenew||Whether auto-renew is enabled for subscriptions|
|renewTime||Number of times a subscription was renewed|
|consumed||Whether a product was consumed|
💡 The OneSignal integration is available on the Grow and Super plans.
#Passing OneSignal Id Using IOS The SDK
[[PurchaseClient shared] setOneSignalId:@"<ONESIGNAL_ID>"];
#How OneSignal Integration Is Created ?
You can create OneSignal integration by defining an app id, api key and event tags.
- Navigate to the Integrations section on Appmate console, select OneSignal.
- Get your OneSignal App ID and API Key following this documentation. Fill the relative fields.
- Enter the event tag names that Appmate should use. Default event names are used when event names are not entered.
- Click save button.
#Integration status values:
|Waiting for first event||After a successful integration, if event tags are not sent yet|
|Active||After a successful integration, if there is no error|
|Error||If Onesignal API returns any other value than HTTP 200 (e.g. HTTP 400 - Bad Request)|