OneSignal

OneSignal is a multi-channel messaging platform for push notifications, in-app messages, email, and SMS, popular for high-volume consumer apps and web.

⚠️

This integration is currently in alpha. Configuration and behaviour may change.

Prerequisites

Complete these steps in OneSignal before configuring Signal.

Access your OneSignal dashboard

Log in to onesignal.com/login.

Find your App ID

Navigate to Settings > Keys & IDs for your app. Copy the OneSignal App ID (UUID format).

Create a REST API Key

On the same Keys & IDs page, copy the REST API Key. Treat this as a secret — it grants full server-side access to your app.

⚠️

The REST API Key is distinct from the (public) App ID. Never expose the REST API Key in browser code.

Configuration

FieldTypeRequiredDescription
app_idstringYesYour OneSignal App ID (UUID).
rest_api_keysecretYesOneSignal REST API Key. Found in Settings > Keys & IDs.

Signal Setup

Quick Setup

  1. Navigate to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find OneSignal under the Marketing Automation category.
  4. Click Install, and fill in the required fields.
  5. Click Install Integration.

API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/onesignal/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "OneSignal",
    "variant": "default",
    "config": {
      "app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "rest_api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "delivery_mode": "server_side"
  }'

Event Mapping

Datafly EventOneSignal ConceptNotes
pageUser property updateRecent page URL/title written to user properties.
Product ViewedUser property update + tagRecent product ID set as a tag for segment targeting.
Order CompletedOutcome event with revenueSent via the Outcomes API with weight set to revenue.
identifyExternal ID assignmentSets the user’s external_id and updates tags/properties.

Identity

OneSignal uses an External User ID to link subscriptions across browsers and devices.

FieldSourceNotes
external_iduser_id from datafly.identify()Stable customer ID. All channels (push, email, SMS) for the user are aliased to this.
email (alias)traits.emailUsed to add an email subscription to the user.
phone_number (alias)traits.phoneE.164 format. Used to add an SMS subscription.
tagsselected traits.* and properties.*Mapped to OneSignal tags for segmentation.

Call datafly.identify() when the user logs in or signs up:

datafly.identify("user-123", {
  email: "jane@example.com",
  phone: "+447700900123"
});

OneSignal events should be sent under the marketing consent category. OneSignal manages its own per-subscription opt-in records — Signal forwards CMP consent state so server-side workflows can suppress notifications for visitors who declined.

Verify it’s working

  1. Trigger a test event from your website.
  2. In OneSignal, navigate to Audience > Users and look up the test user by external ID or email.
  3. View the user’s Activity and Tags to confirm Signal-delivered updates.
  4. In Signal, check Live Events to confirm delivery with a 200 response status.

Troubleshooting

SymptomPossible CauseResolution
401 UnauthorizedInvalid REST API keyRegenerate or verify the key in Settings > Keys & IDs.
User not foundexternal_id mismatchOneSignal creates a new alias on first sight; check the external_id matches between identify and subsequent calls.
Tags not updatingTag name conflictOneSignal tags are case-sensitive. Confirm the tag name matches existing segment rules.
Outcomes not appearing in reportsOutcome name not registeredCreate the outcome in Settings > Outcomes before sending events.

Visit OneSignal REST API documentation for full reference.

See also

  • Airship — push notification alternative
  • Braze — multi-channel engagement
  • Iterable — cross-channel marketing