# Push Notification

Use the **Push Notification Task** to send messages from a Microflow or Process Flow to **mobile applications** running on **Android** and/or **iOS** platforms.

The Push Notification Task integrates ONEWEB with a **push‑notification hub**, enabling backend flows to trigger real‑time notifications on mobile devices.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F0uRPQfqorSE13bCBPgdd%2Fimage.png?alt=media&#x26;token=7922df20-0636-4c31-aaf2-3a28383ca88b" alt=""><figcaption></figcaption></figure>

***

### Purpose

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

* Send notifications to **Android and iOS mobile applications**
* Notify users about important events or state changes
* Enable real‑time communication from backend integration logic to mobile UI

Typical use cases include:

* Approval or workflow notifications
* Alerts from external system integrations
* Background process status updates
* User engagement messages

***

### Push Notification Task Configuration

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

***

#### General Tab

The **General** tab contains common task metadata:

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

These properties help identify and document the task within the flow.

***

#### Business Object Tab

The **Business Object** tab is used to configure and map:

* Input data sent to the push‑notification service
* Output data (if any) returned from the service

This defines the data contract between the Microflow and the Push Notification Task.

***

#### Push Notification Tab

This tab defines the connection and platform details for sending notifications.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FKp1SXB4DNRNlx4D5dsZ1%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 **Android** and **iOS** platforms can be enabled within the **same Push Notification Task**.

***

### Android Platform Configuration

When **Android Platform** is enabled, additional configuration is required 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%2FdCRm8AVkuvc98MGtjda9%2F2?alt=media" alt=""><figcaption></figcaption></figure>

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

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

***

### iOS Platform Configuration

When **iOS Platform** is enabled, configuration is provided 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%2FgKnFuPYOZLZfr82xrNIA%2F3?alt=media" alt=""><figcaption></figcaption></figure>

| Property                  | Mandatory | Description                                    |
| ------------------------- | --------- | ---------------------------------------------- |
| **Package Name**          | Yes       | iOS application bundle identifier              |
| **Production Cert File**  | Yes       | Production certificate file                    |
| **Production Key File**   | Yes       | Production private key                         |
| **Password (Production)** | Yes       | Password for production cert and key           |
| **Dev Cert File**         | Yes       | Development certificate file                   |
| **Dev Key File**          | Yes       | Development private key                        |
| **Password (Dev)**        | Yes       | Password for development cert and key          |
| **Is Production?**        | Yes       | Choose **Yes** or **No** to select environment |

The **Upload** button is used to upload certificate and private‑key files.

***

### Parameter Mapping

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

Using this button, users can:

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

This allows dynamic and data‑driven notification content.

***

### Best Practices

* Use **environment variables** for Node URL and sensitive values
* Avoid hardcoding credentials or keys
* Send concise notification payloads
* Separate business logic from notification logic using Sub Flows
* Handle failures using **Error Events**

***

### Summary

The **Push Notification Task** enables ONEWEB integration flows to send real‑time messages to mobile applications on **Android and iOS**.

Using Push Notification Task, applications can:

* Notify mobile users from backend processes
* Integrate workflow and approval alerts with mobile UI
* Support both platforms in a unified configuration
* Dynamically map notification payloads

Push Notification Task is a key component for building **event‑driven, mobile‑enabled integrations** within 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/oneweb-platform-th/designer-reference/microflow-designer/activity-nodes/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.
