Skip to main content

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

ParameterTypeRequiredDefaultDescription
organizationIdintYes-Organization ID
notificationobjectYes-Notification values (see below)

Notification Object

PropertyTypeRequiredDefaultDescription
titlestringYes-Notification title displayed to the recipient
messagestringNo-Notification body text
typeNotificationTypeYes-Notification type classification
priorityNotificationPriorityNoNormalDelivery priority
targetUserIdstringNo-ID of the specific user to notify. Mutually exclusive with targetRoles
targetRolesList<string>No-List of role names to notify. Mutually exclusive with targetUserId
entityTypestringNo-Type of the related entity (e.g. "Order", "Contact")
entityIdintNo-ID of the related entity
expiresAtDateTimeNo-When the notification expires and is no longer shown

Notification Type

ValueDescription
SystemSystem-level notification
OrderUpdateUpdate related to an order
TaskAssignmentA task has been assigned to the user
AlertAlert requiring attention
InfoGeneral informational message

Notification Priority

ValueDescription
LowLow-priority, non-urgent notification
NormalStandard priority (default)
HighHigh-priority notification
UrgentUrgent notification requiring immediate attention

Output

NameTypeDescription
notificationobjectThe 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"