Basics

Prerequisites


Only for campaigns served by push notifications: Configure push notifications.

Overview


Synerise campaigns are served in two ways:

  • By Push Notifications, which means that the campaigns are delivered as a push notification:

    • Simple push
    • Silent push
    • Banner
    • Mandatory upgrade
    • First run message
  • By Synerise backend, which means that the campaign is retrieved by SDK through API:

    • In-app messages
    • Walkthrough
Note: You can create each campaign type in the Synerise app. Full documentation is available at this link.

Synerise push notification structure


Each notification follows this basic structure corresponding to the operating system:

{
  "data": {
    "issuer": "Synerise",
    "message-type": "static-content",
    "content-type": "simple-push",
    "content": {
      <<campaign content>>
    }
  }
}
  • issuer - in Synerise notifications, the issuer is always Synerise. If you want to handle notifications with your own methods, remember to change the issuer field. If issuer is set to Synerise, the payload is always handled by the Synerise SDK.
  • message-type - specifies if the content is static or dynamic.
  • content-type - specifies the type of content in the payload.
  • content - the content of the message.

You can also react to Synerise push notifications in your own way, using the payloads presented earlier in this article.

Checking push campaign type


You may need to know whether an incoming push notification comes from Synerise.

Method Description
Injector.isSynerisePush Returns ’true’ if the notification comes from Synerise.
It is validated by checking if the issuer of the push is Synerise.
Injector.isSyneriseSimplePush Checks if the notification payload contains a Simple Push campaign.
Injector.isSyneriseBanner Checks if the notification payload contains a Banner campaign.
Injector.isSyneriseSilentCommand Checks if the notification payload contains a Silent Command campaign.
Injector.isSilentSdkCommand Checks if the notification payload contains a Silent SDK Command campaign.

Blocking campaigns


Note: This feature is available only for iOS SDK.

If you don’t want to show any of the Synerise campaigns somewhere in your application or if there are View Controllers that should never be covered by Synerise activity (for example, banners), you can block the Synerise elements.

To do this, add the SyneriseActivityNotAllowed protocol in your View Controller declaration.

For example:

class SampleViewController: UIViewController, SyneriseActivityNotAllowed {

}

When View Controller implements that protocol and Synerise tries to run an activity, the activity is skipped.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker