Set Up In‑App Messaging (SDK) in Customer.io

Customer.io partner logo

Table of Contents

Summarize this documentation using AI

This banner was added using fs-inject

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Overview

If you want in‑app messages to actually move revenue (not just look nice in a product tour), the work starts with clean SDK tracking and identity stitching in Customer.io. If you’re trying to tighten up event quality, reduce duplicate profiles, or orchestrate in‑app + email/SMS together, book a strategy call and we’ll pressure-test your tracking plan like an operator would.

In-app messaging is most effective when it’s triggered off real shopper intent inside your app/site—product views, add-to-cart, checkout started, subscription portal opened—not off generic “user opened app” logic. The SDK is what makes those triggers reliable and what lets you stitch anonymous browsing into known customer profiles when they log in or check out.

How It Works

In practice, in‑app messaging breaks when teams treat it like a creative problem instead of a data problem. Customer.io’s in‑app channel depends on your app (mobile or web) sending the right identities, device context, and events so Customer.io can decide who should see a message, when, and which message variant.

  • SDK initializes in your app so Customer.io can associate sessions/devices with a person profile and evaluate eligibility for in‑app campaigns.
  • Identify calls stitch identity by tying an internal user ID (and optionally email/phone) to the current device/session. This is the moment anonymous behavior becomes usable for retention targeting.
  • Event tracking drives triggers and suppression (e.g., product_viewed, added_to_cart, checkout_started, order_completed). These events are what you’ll use to start journeys, branch logic, and prevent bad experiences like showing a cart nudge after purchase.
  • In‑app message delivery is evaluated client-side based on the user’s identity and the campaign rules you set in Customer.io. That means event timing and identify timing matter—late identity = missed impressions.

Real D2C scenario: A shopper opens your app from a paid retargeting ad, views two products, adds one to cart, then bounces. If your SDK fires added_to_cart but you don’t call identify until account creation, Customer.io can’t consistently connect that cart intent to the same person later. You end up with duplicate profiles and weaker cart recovery (in‑app and off‑app).

Step-by-Step Setup

Before you build any in‑app creative, lock the plumbing. Your goal is simple: every meaningful commerce action generates a consistent event, and every session is tied to the right customer profile as early as possible.

  1. Install the appropriate Customer.io SDK for your platform (iOS/Android/React Native/Flutter/Web). Use your workspace credentials and confirm the SDK initializes on app start/page load.
  2. Define your identity model and standardize on a single, immutable customer_id (or equivalent) that you will always pass to Customer.io. Avoid using email as the primary key—emails change; IDs shouldn’t.
  3. Call identify as soon as you can (login, account creation, or known checkout step). Include stable identifiers and high-signal attributes you’ll segment on (e.g., email, phone, first_order_date, subscription_status, loyalty_tier).
  4. Track a minimal commerce event schema that you can reuse across journeys:
    • product_viewed (product_id, category, price)
    • added_to_cart (cart_id, product_ids, cart_value)
    • checkout_started (cart_id, checkout_value)
    • order_completed (order_id, revenue, items, discount_code)
  5. Send events with consistent naming + types (don’t mix cart_add, add_to_cart, and addedToCart). In most retention programs, naming drift is the silent killer that makes segments “randomly” miss people.
  6. Verify identity stitching and deduping by testing the full flow: anonymous session → browse → add to cart → login → purchase. Confirm events end up on the same person profile in Customer.io.
  7. Build the first in‑app message trigger off a real event (e.g., checkout_started but no order_completed within 30 minutes) and add suppression rules so purchasers never see it.

When Should You Use This Feature

In‑app messaging shines when the user is already in a buying mindset and you can remove friction fast. It’s less effective for cold persuasion and more effective for “finish the job” moments—especially when paired with clean SDK events.

  • Cart recovery inside the app when a shopper returns after abandoning checkout (trigger on session start + has checkout_started in last 24h but no purchase).
  • Second purchase acceleration for replenishable products (trigger when days_since_last_order hits your typical reorder window and the customer opens the app).
  • Subscription save flows (trigger when someone opens “Manage Subscription” and their subscription_status indicates at-risk behavior like skip/pause attempts).
  • Post-purchase cross-sell only when you have strong item-level events (trigger after order_completed with a delay and show complementary products on next app open).
  • Reactivation moments when an inactive customer finally returns (trigger on app open with inactivity attribute, then route to offer vs. new arrivals based on prior category affinity).

Operational Considerations

Once the SDK is live, the real work is keeping the data usable for segmentation and orchestration. Customer.io will do what you tell it to do—so the operational risk is usually messy inputs, not the channel itself.

  • Segmentation depends on event hygiene: decide which events are “source of truth” for purchase, cart, and browse. If your app and backend both send order_completed, you’ll double-trigger unless you dedupe or pick one source.
  • Identity stitching timing matters: if you identify late, you’ll undercount high-intent behavior (cart/checkout) on known profiles, which weakens winback and cart recovery targeting.
  • Plan for anonymous-to-known merges: shoppers often browse anonymously and only authenticate at checkout. Make sure your flow merges anonymous activity into the known profile rather than creating a second person.
  • Orchestration reality: in-app shouldn’t compete with email/SMS. Use shared suppression rules (purchase, active cart resolved, discount already used) so you don’t stack messages across channels.
  • Frequency control inside the app: in-app can get spammy fast because sessions are frequent. Cap impressions per user and add cooldown windows tied to the same intent signal.

Implementation Checklist

If you want this to perform like a retention channel (not a one-off experiment), treat the checklist below as your “definition of done” before scaling campaigns.

  • SDK installed and initializing reliably on all supported app versions
  • Single immutable customer_id defined and used consistently
  • identify called immediately on authentication/known checkout step
  • Core commerce events implemented with consistent naming and properties
  • Anonymous browsing flow tested and merged into known profiles
  • Purchase event chosen as source of truth (and deduped if multi-source)
  • First in-app campaign uses event-based trigger + purchase suppression
  • Frequency caps and cooldown logic applied to prevent over-messaging
  • QA path documented (test user, test device, test cart, test purchase)

Expert Implementation Tips

The teams that win with in‑app usually do a few unsexy things early: they standardize schemas, they instrument “negative” events, and they build suppression like it’s part of the creative.

  • Track “resolved” states explicitly: don’t rely only on timeouts. Fire events like cart_emptied or checkout_abandoned (if you can infer it) to stop journeys cleanly.
  • Send item-level context with cart/checkout events so your in-app message can reference the category or top item (and so segmentation can split by intent).
  • Use attributes for durable state (e.g., last_order_date, lifetime_value, preferred_category) and events for moments in time. Mixing these is how segments become brittle.
  • Instrument login/signup as events too: it helps you debug stitching issues (“Did we identify?”) and build flows like “new account created but no purchase.”
  • Build a QA dashboard segment in Customer.io for internal testers so you can safely preview in-app messages without polluting production metrics.

Common Mistakes to Avoid

Most in‑app programs underperform because teams ship campaigns before they can trust the data. Fix these and you’ll avoid the usual retention potholes.

  • Using email as the primary identifier, then dealing with duplicates when customers change emails or check out with Shop Pay/Apple Hide My Email.
  • Calling identify too late, which strands high-intent events on anonymous profiles and weakens cart recovery and winback.
  • Event name drift across platforms (iOS vs Android vs web), causing segments to miss half your audience.
  • Double-sending purchase events (client + server) without a dedupe strategy, leading to premature exits and broken attribution.
  • No suppression logic, so purchasers still see discount nudges, creating margin leakage and support tickets.
  • Over-messaging active shoppers because you didn’t add frequency caps per session/day.

Summary

If you want in‑app to drive repeat purchase and cart recovery, treat SDK tracking as the product. Install the SDK, identify early, standardize commerce events, and build suppression/frequency rules before you scale.

Implement Set Up In App with Propel

If you’re already running retention in Customer.io, the fastest win is usually tightening identity stitching and event consistency so your in‑app triggers stop leaking intent. If you want a second set of eyes on your SDK plan (what to track, when to identify, how to dedupe purchases, and how to orchestrate in‑app with email/SMS), book a strategy call and we’ll map it to the retention outcomes you actually care about.

Contact us

Get in touch

Our friendly team is always here to chat.

Here’s what we’ll dig into:

Where your lifecycle flows are underperforming and the revenue you’re missing

How AI-driven personalisation can move the needle on retention and LTV

Quick wins your team can action this quarter

Whether Propel AI is the right fit for your brand, stage, and stack