Notification Workflow Tasks
Notification tasks are used to create in-app notifications and deliver them to specific users or roles within an organization.
Create Notification
Creates an in-app notification and delivers it to a target user or set of roles.
task: "Notification/Create@1"
name: createNotification
inputs:
organizationId: "{{ organizationId }}"
notification:
title: "Shipment Arrived"
message: "Order #{{ orderId }} has arrived at the destination warehouse."
type: "OrderUpdate"
priority: "Normal"
targetUserId: "{{ assignedUserId }}"
entityType: "Order"
entityId: "{{ orderId }}"
outputs:
- name: notification
mapping: "notification"
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
organizationId | int | Yes | - | Organization ID |
notification | object | Yes | - | Notification values (see below) |
Notification Object
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | Yes | - | Notification title displayed to the recipient |
message | string | No | - | Notification body text |
type | NotificationType | Yes | - | Notification type classification |
priority | NotificationPriority | No | Normal | Delivery priority |
targetUserId | string | No | - | ID of the specific user to notify. Mutually exclusive with targetRoles |
targetRoles | List<string> | No | - | List of role names to notify. Mutually exclusive with targetUserId |
entityType | string | No | - | Type of the related entity (e.g. "Order", "Contact") |
entityId | int | No | - | ID of the related entity |
expiresAt | DateTime | No | - | When the notification expires and is no longer shown |
Notification Type
| Value | Description |
|---|---|
System | System-level notification |
OrderUpdate | Update related to an order |
TaskAssignment | A task has been assigned to the user |
Alert | Alert requiring attention |
Info | General informational message |
Notification Priority
| Value | Description |
|---|---|
Low | Low-priority, non-urgent notification |
Normal | Standard priority (default) |
High | High-priority notification |
Urgent | Urgent notification requiring immediate attention |
Output
| Name | Type | Description |
|---|---|---|
notification | object | The created notification entity |
Example: Notify a Role on Order Status Change
workflow:
name: "Notify Operations Team on Order Update"
version: "1.0"
executionMode: "Async"
activities:
- name: "notifyOperationsActivity"
description: "Send notification to operations role"
steps:
- task: "Notification/Create@1"
name: createNotification
inputs:
organizationId: "{{ organizationId }}"
notification:
title: "Order Status Updated"
message: "Order #{{ orderId }} status changed to {{ newStatus }}."
type: "OrderUpdate"
priority: "High"
targetRoles:
- "Operations"
entityType: "Order"
entityId: "{{ orderId }}"
outputs:
- name: notification
mapping: "notification"
Example: Notify a Specific User with Expiry
- task: "Notification/Create@1"
name: notifyAssignee
inputs:
organizationId: "{{ organizationId }}"
notification:
title: "Task Assigned to You"
message: "You have been assigned to handle order {{ orderId }}."
type: "TaskAssignment"
priority: "Normal"
targetUserId: "{{ assignedUserId }}"
entityType: "Order"
entityId: "{{ orderId }}"
expiresAt: "{{ expiryDate }}"
outputs:
- name: notification
mapping: "notification"