# Push Notification

Use the **Push Notification Task** to send messages from a Microflow or Process Flow to **mobile applications**.\
This task integrates ONEWEB with a **push‑notification hub**, enabling backend flows to deliver real‑time notifications to **Android** and **iOS** devices.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FhwzMv0duPr8yvEKMUemw%2F0?alt=media" alt=""><figcaption></figcaption></figure>

***

### Purpose

The **Push Notification Task** is used to:

* Trigger push notifications from backend logic
* Send alerts or updates to mobile users
* Integrate workflows and events with mobile UI

Common use cases include:

* Approval or workflow notifications
* Status updates from long‑running processes
* Alerts generated from external system integration

***

### Push Notification Task Configuration

The **Push Notification Task Configuration Panel** consists of **three tabs**.

***

#### General Tab

The **General** tab contains basic metadata:

* Task Name
* Task ID (system‑generated)
* Description

These fields help identify and document the task inside the flow.

***

#### Business Object Tab

The **Business Object** tab is used to:

* Define input payload sent to the notification hub
* Define output data returned (if applicable)

This establishes a clear data contract between the flow and the Push Notification Task.

***

#### Push Notification Tab

This tab defines the **connection and platform settings** for sending notifications.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fsmq4Reiw7rHEDS9hMyKt%2F1?alt=media" alt=""><figcaption></figcaption></figure>

| Property             | Mandatory   | Default   | Description                           |
| -------------------- | ----------- | --------- | ------------------------------------- |
| **Application Name** | Yes         | —         | Name of the target mobile application |
| **Use Environment**  | No          | Unchecked | Use environment variable for Node URL |
| **Node URL**         | Yes         | —         | URL of the push‑notification hub      |
| **Android Platform** | Conditional | Off       | Enable Android notifications          |
| **iOS Platform**     | Conditional | Off       | Enable iOS notifications              |

Both platforms can be enabled **within a single Push Notification Task**.

***

### Android Platform Configuration

When **Android Platform** is enabled, configuration is done in the **Android Platform** panel.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FQ7Gi3W52sBtnTpcSpZDc%2F2?alt=media" alt=""><figcaption></figcaption></figure>

| Property         | Mandatory | Description                                                          |
| ---------------- | --------- | -------------------------------------------------------------------- |
| **Collapse Key** | No        | Marks messages as collapsible (only the latest message is delivered) |
| **Package Name** | Yes       | Android application package identifier                               |
| **Priority**     | Yes       | Notification priority: **High** or **Normal**                        |
| **Server Key**   | Yes       | Firebase server key for authorization                                |

**Priority behavior**

* **High**: Wakes sleeping devices if required
* **Normal**: Delivery may be delayed in Doze mode

***

### iOS Platform Configuration

When **iOS Platform** is enabled, configuration is performed in the **iOS Platform** panel.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FMP7NA9uVM7tVKU8tE2qS%2F3?alt=media" alt=""><figcaption></figcaption></figure>

| Property                    | Mandatory | Default | Description                                      |
| --------------------------- | --------- | ------- | ------------------------------------------------ |
| **Package Name**            | Yes       | —       | iOS application bundle identifier                |
| **Production Cert File**    | Yes       | —       | Production certificate file                      |
| **Production Key File**     | Yes       | —       | Production private key file                      |
| **Password for Production** | Yes       | —       | Password for production certificate and key      |
| **Dev Cert File**           | Yes       | —       | Development certificate file                     |
| **Dev Key File**            | Yes       | —       | Development private key file                     |
| **Password for Dev**        | Yes       | —       | Password for development certificate and key     |
| **Is Production?**          | Yes       | Yes     | Specify whether production configuration is used |

🔘 The **Upload** button is used to upload certificate and private‑key files for each environment.

***

### Parameter Mapping

Both **Android** and **iOS** configuration panels provide an **Open Mapping Parameter** button.

Using this feature, users can:

* Map Microflow input parameters to notification payload fields
* Map output parameters (if returned) back to the flow

This enables **dynamic, data‑driven push notifications**.

***

### Best Practices

* Use **environment variables** for Node URL and credentials
* Never hard‑code server keys or certificates
* Keep notification payloads concise
* Use Push Notification as a downstream action, not core logic
* Combine with **Error** or **Timer** events to handle failures gracefully

***

### Summary

The **Push Notification Task** enables ONEWEB integrations to communicate with mobile users in real time.

With this task, developers can:

* Send push notifications to Android and iOS apps
* Configure platforms in a unified node
* Use Microflows or Processes to trigger notifications
* Manage credentials and configuration per environment

Push Notification is a key component for building **event‑driven, mobile‑enabled enterprise applications** in ONEWEB.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/building-apps/integrations/develop-integration-with-oneweb-microflow/push-notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
