# OneSignal
> Customer engagement platform for delivering personalized, real-time messages across multiple channels based on user behavior. It integrates with MotherDuck for syncing modeled MotherDuck data into operational and customer engagement tools.
## How it works with MotherDuck

OneSignal can sync custom event data from MotherDuck into OneSignal so journeys and campaigns can use modeled behavior from your analytics database.

## Prerequisites

- A OneSignal plan that includes the required data integration and custom event features.
- A MotherDuck service token.
- A MotherDuck database with event tables or views.

## Setup

1. In MotherDuck, create a service token for OneSignal.
2. Prepare a table or view with event fields such as event name, user identifier, event timestamp, and event properties.
3. In OneSignal, go to **Data** > **Integrations** and select **Add Integration**.
4. Choose **MotherDuck**.
5. Enter the service token, database name, and connection string, for example `md:my_database`.
6. Select tables or write SQL queries that define which events to sync.
7. Map the MotherDuck result columns to OneSignal custom event fields.

## Authentication and configuration

- Use a dedicated MotherDuck service token for OneSignal.
- Keep event queries selective by filtering to the time range and columns needed for the sync.
- Create separate integrations if you need to sync from multiple MotherDuck databases.

## Important notes

- Query complexity and large result sets can affect sync performance.
- JSON event properties should use proper JSON typing in the MotherDuck query result.
- OneSignal supports table mode and SQL query mode. Use SQL query mode when you need to transform event data before syncing.

## Use cases

- Trigger OneSignal Journeys from behavior modeled in MotherDuck.
- Sync customer segments, lifecycle events, or product usage events into OneSignal.
- Personalize messaging campaigns from MotherDuck tables or views.

## Related content

- [View the full OneSignal MotherDuck setup guide](https://documentation.onesignal.com/docs/en/motherduck)
- [MotherDuck authentication](/key-tasks/authenticating-and-connecting-to-motherduck/authenticating-to-motherduck)


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `POST https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

Payload:

```json
{
  "page_path": "/integrations/reverse-etl/onesignal/",
  "page_title": "OneSignal",
  "text": "<the user's feedback, max 2000 characters>",
  "source": "<optional identifier for your interface, for example 'claude.ai' or 'chatgpt'>"
}
```

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed payloads, and `429` when rate-limited.
