API Mapping
The table below maps SAP Emarsys SDK methods to their SAP Engagement Cloud SDK equivalents.
- Android
- Kotlin Multiplatform
- iOS
- Web
| Feature | Method for SAP Emarsys SDK | Method for SAP Engagement Cloud SDK |
|---|---|---|
| Initialize / Enable | Emarsys.setup(config) | EngagementCloud.initialize() (automatic), then EngagementCloud.setup.enable(config, onContactLinkingFailed) |
| Disable Tracking | previous workaround was calling changeApplicationCode(null) | EngagementCloud.setup.disable() |
| Set Contact Linking Callback | (not available) | EngagementCloud.setup.setOnContactLinkingFailedCallback(callback) |
| Link Contact | Emarsys.setContact(id, value) | EngagementCloud.contact.link(value) |
| Authenticate Contact | Emarsys.setAuthenticatedContact(id, token) | EngagementCloud.contact.linkAuthenticated(token) |
| Clear Contact | Emarsys.clearContact() | EngagementCloud.contact.unlink() |
| Register Push Token | Emarsys.setPushToken(token) | EngagementCloud.push.registerToken(token) |
| Clear Push Token | Emarsys.clearPushToken() | EngagementCloud.push.clearToken() |
| Get Push Token | Emarsys.getPushToken() | EngagementCloud.push.getToken() |
| Track Custom Event | Emarsys.trackCustomEvent(name, attrs) | EngagementCloud.event.track(CustomEvent(name, attrs)) |
| Pause In-App | Emarsys.inApp.pause() | EngagementCloud.inApp.pause() |
| Resume In-App | Emarsys.inApp.resume() | EngagementCloud.inApp.resume() |
| In-App State | Emarsys.inApp.isPaused() | EngagementCloud.inApp.isPaused |
| Track Deep Link | Emarsys.trackDeepLink(activity: Activity, intent: Intent) | EngagementCloud.deepLink.track(activity, intent) |
| Badge Count Events | Custom listener registration | EngagementCloud.events emits BadgeCountEvent |
| App Events | onEventAction handlers | EngagementCloud.events emits AppEvent |
| Message Inbox | Emarsys.messageInbox | (not supported) |
| Geofence | Emarsys.geofence | (not supported) |
| Predict | Emarsys.predict | (not supported) |
| Feature | Method for SAP Emarsys SDK | Method for SAP Engagement Cloud SDK |
|---|---|---|
| Initialize / Enable | Emarsys.setup(config) | EngagementCloud.initialize() (automatic on Android), then EngagementCloud.setup.enable(config, onContactLinkingFailed) |
| Disable Tracking | previous workaround was calling changeApplicationCode(null) | EngagementCloud.setup.disable() |
| Set Contact Linking Callback | (not available) | EngagementCloud.setup.setOnContactLinkingFailedCallback(callback) |
| Link Contact | Emarsys.setContact(id, value) | EngagementCloud.contact.link(value) |
| Authenticate Contact | Emarsys.setAuthenticatedContact(id, token) | EngagementCloud.contact.linkAuthenticated(token) |
| Clear Contact | Emarsys.clearContact() | EngagementCloud.contact.unlink() |
| Register Push Token | Emarsys.setPushToken(token) | EngagementCloud.push.registerToken(token) |
| Clear Push Token | Emarsys.clearPushToken() | EngagementCloud.push.clearToken() |
| Get Push Token | Emarsys.getPushToken() | EngagementCloud.push.getToken() |
| Track Custom Event | Emarsys.trackCustomEvent(name, attrs) | EngagementCloud.event.track(CustomEvent(name, attrs)) |
| Pause In-App | Emarsys.inApp.pause() | EngagementCloud.inApp.pause() |
| Resume In-App | Emarsys.inApp.resume() | EngagementCloud.inApp.resume() |
| In-App State | Emarsys.inApp.isPaused() | EngagementCloud.inApp.isPaused |
| Track Deep Link | Emarsys.trackDeepLink(activity: Activity, intent: Intent) | EngagementCloud.deepLink.track(url) |
| Badge Count Events | Custom listener registration | EngagementCloud.events emits BadgeCountEvent |
| App Events | onEventAction handlers | EngagementCloud.events emits AppEvent |
| Message Inbox | Emarsys.messageInbox | (not supported) |
| Geofence | Emarsys.geofence | (not supported) |
| Predict | Emarsys.predict | (not supported) |
| Feature | Method for SAP Emarsys SDK | Method for SAP Engagement Cloud SDK |
|---|---|---|
| Initialize / Enable | Emarsys.setup(config) | EngagementCloud.shared.initialize() then EngagementCloud.shared.setup.enable(config, onContactLinkingFailed) |
| Disable Tracking | previous workaround was calling changeApplicationCode(nil) | EngagementCloud.shared.setup.disable() |
| Set Contact Linking Callback | (not available) | EngagementCloud.shared.setup.setOnContactLinkingFailedCallback(callback) |
| Link Contact | Emarsys.setContact(id, value) | EngagementCloud.shared.contact.link(value) |
| Authenticate Contact | Emarsys.setAuthenticatedContact(id, token) | EngagementCloud.shared.contact.linkAuthenticated(token) |
| Clear Contact | Emarsys.clearContact() | EngagementCloud.shared.contact.unlink() |
| Register Push Token | Emarsys.setPushToken(token) | EngagementCloud.shared.push.registerToken(token: token) |
| Clear Push Token | Emarsys.clearPushToken() | EngagementCloud.shared.push.clearToken() |
| Get Push Token | Emarsys.pushToken | EngagementCloud.shared.push.getToken() |
| Track Custom Event | Emarsys.trackCustomEvent(name, attrs) | EngagementCloud.shared.event.track(CustomEvent(name, attrs)) |
| Pause In-App | Emarsys.inApp.pause() | EngagementCloud.shared.inApp.pause() |
| Resume In-App | Emarsys.inApp.resume() | EngagementCloud.shared.inApp.resume() |
| In-App State | Emarsys.inApp.isPaused() | EngagementCloud.shared.inApp.isPaused |
| Deep Link | Emarsys.trackDeepLink(userInfo, sourceHandler) | EngagementCloud.shared.deepLink.track(userActivity: userActivity) |
| Badge Count Events | custom listener registration | EngagementCloud.shared.events emits BadgeCountEvent |
| App Events | onEventAction handlers | EngagementCloud.shared.events emits AppEvent |
| Message Inbox | Emarsys.messageInbox | (not supported) |
| Geofence | Emarsys.geofence | (not supported) |
| Predict | Emarsys.predict | (not supported) |
| Feature | Method for Web-Push SDK | Method for SAP Engagement Cloud SDK |
|---|---|---|
| Initialize / Enable | WebEmarsysSdk({...}).init() (immediate tracking) | EngagementCloud.initialize() (automatic), then EngagementCloud.setup.enable(config, onContactLinkingFailed) |
| Disable Tracking | (not available) | EngagementCloud.setup.disable() |
| Set Contact Linking Callback | (not available) | EngagementCloud.setup.setOnContactLinkingFailedCallback(callback) |
| Link Contact | login(value) | EngagementCloud.contact.link(value) |
| Authenticate Contact | setOpenIdAuthenticatedContact(token) | EngagementCloud.contact.linkAuthenticated(token) |
| Clear Contact | logout() | EngagementCloud.contact.unlink() |
| Subscribe Push Token | subscribe() | Obtain browser subscription then EngagementCloud.push.registerToken(token) |
| Unsubscribe Push Token | unsubscribe() | EngagementCloud.push.clearToken() |
| Push Token State | isSubscribed() | !!EngagementCloud.push.getToken() |
| Track Custom Event | customEvent(name, attrs) | EngagementCloud.event.track(new CustomEvent(name, attrs)) |
| Track Deep Link | manual logic | EngagementCloud.deepLink.track(url) (Web: limited / N/A currently) |
| Subscription Events | onSubscribe, onUnsubscribe, permission callbacks | Use EngagementCloud.events stream |
| Inbox Items | getInboxItems() | (Unsupported) |
Notes & Differences
- Unified APIs have simplified names, for example
linkinstead ofsetContact. - Reactive events replace
eventHandlerregistrations. - Suspend/async methods return
Result/Promiseinstead of nullable error callbacks.
info
For more information about features that are not yet supported, refer to Known Limitations.