AlgorithmX
Integrations4 min read

Integrations

Start here: what the AlgorithmX SDK does in your app, what to prepare, and which guide to follow for Android, iOS, Flutter, or React Native.

The AlgorithmX SDK connects your mobile app to AlgorithmX. Once it is in your app, your marketing team can send push notifications and in-app campaigns to your customers, and see how customers respond.

You add the SDK to the app you already have. You keep your login, your push notification setup, and your navigation. You only add a few lines of code in places your app already has.

What the SDK does

  • Knows who the customer is. You tell it when a customer logs in or out.
  • Records what customers do. You send events such as "product viewed" or "purchase".
  • Shows push notifications that your team creates in AlgorithmX, with images and buttons.
  • Shows in-app campaigns: a full-screen message that appears the next time the customer opens the app.
  • Opens the right screen when a customer taps a notification or a campaign button.
  • Reports results: deliveries, views, clicks, and closes.

Words used in these guides

WordMeaning
Customer IDThe ID your own backend uses for a customer, for example customer_123. AlgorithmX uses the same ID.
EventSomething the customer did, such as add_to_cart or purchase, with optional details.
Push tokenThe address of one phone for push notifications. Firebase gives it on Android; Apple gives it on iOS.
In-app campaignA message that appears inside your app, over the current screen.
Deep linkA link that opens a screen in your app, for example myapp://open/product?id=SKU-123.
Custom actionA named action your app knows, for example view_cart, that a campaign can trigger.
API base URLThe address of the AlgorithmX server for your company. AlgorithmX gives it to you.

The steps, on every platform

Every platform guide follows the same steps. Most take only a few lines of code.

  1. Install the SDK from your platform's package manager.
  2. Start the SDK when your app starts.
  3. Tell AlgorithmX who the customer is at login and logout.
  4. Send events when customers do important things.
  5. Connect push notifications: pass the push token and AlgorithmX notifications to the SDK.
  6. Open the right screen when a customer taps a notification.
  7. Check in-app campaigns: they need no code, only a few checks.
  8. Test on real phones before you release.

Choose your platform

Your app is built withPackage to installGuide
Android (Kotlin or Java)cloud.algorithmx:android-sdk from Maven CentralAndroid guide
iOS (Swift)AlgorithmXSDK with Swift Package Manager or CocoaPodsiOS guide
Flutteralgorithmx_flutter from pub.devFlutter guide
React Native@algorithmxcloud/react-native-sdk from npmReact Native guide

All packages are public and free to install. The iOS SDK source is at github.com/algorithmx-cloud/algorithmx-ios-sdk.

Before you start

What AlgorithmX gives you

  • The API base URL for each environment, for example one for testing and one for production.

What you give AlgorithmX

AlgorithmX sends push notifications to your app on your behalf, so it needs a few details:

  • Android: your app's application ID, your Firebase project, and permission to send messages through it.
  • iOS: your app's bundle ID, your Apple Team ID, and an APNs key from your Apple Developer account.

Each platform guide explains where to find these.

What to agree on with your AlgorithmX contact

Write these down before you start coding. Your developers and your campaign team both need them.

  • Customer ID: which ID you send. Use the same one your backend uses.
  • Events: the list of event names and their details, for example purchase with order_id and total.
  • Deep links: the links your app can already open, for example myapp://open/cart.
  • Custom actions: the action names your app supports, for example view_cart, and their details.

Campaigns can only use links and actions that your released app supports. Your campaign team uses this list when they create campaigns.

After the integration

Run one full test with a test customer on a real phone:

  1. Log in, so the SDK knows the customer.
  2. Do something that sends an event.
  3. Ask your campaign team to send a test notification and a test in-app campaign.
  4. Tap the notification and its buttons, and check that the right screen opens.
  5. Check that your existing notifications and screens still work as before.

Then continue with In-App Push Campaigns and In-App View Campaigns to create your first campaigns.