Send Notification Node in Pathways

From FojiSoft Docs

The Send Notification node in FojiSoft Pathways facilitates sending dynamic and automated notifications to configured recipients. It supports multiple communication channels and content customization options, making it a flexible tool for integrating messaging into workflows.


Node Properties

1. Name

  • Description: A unique identifier for the node within the workflow.
  • Usage: Provide a clear and descriptive name to reflect the purpose of the notification (e.g., "Alert on Claim Status Change" or "Notify Staff on Task Completion").
  • Example: "Notify Patient of Invoice Readiness"

2. Text

  • Description: Specifies the notification type and defines how the content will be generated.
  • Options:
    • Communication Type:
      • Email: Sends an email to designated recipients.
      • SMS: Sends a text message to configured phone numbers.
      • Push Notification: Sends a push notification to connected devices.
    • Content Creation:
      • Handlebar Template: Allows dynamic content generation using placeholders (e.g., {{variable_name}}).
      • Script: Enables advanced logic for generating notification content using a scripting language (e.g., Python or JavaScript).
  • Example:

Handlebar Template:

Dear {{PatientName}}, your claim status is {{ClaimStatus}}. Please contact us for further details.

Script:

if claim_status == "Approved":

   return f"Dear {patient_name}, your claim for {claim_amount} has been approved."

else:

   return f"Dear {patient_name}, your claim for {claim_amount} has been rejected."

  • Usage:
    • Choose Handlebar Template for simple, straightforward dynamic content.
    • Use Script for complex conditional logic or custom formatting.

3. Data Values

The Data Values section allows you to define the variables used to populate the notification content dynamically.

  1. Name
    • Description: Assigns a name to each data value that will be injected into the notification content.
    • Usage: Use clear names, such as PatientName, ClaimStatus, or InvoiceAmount, to clarify their roles in the notification.
  2. Expression
    • Type: Handlebar Template or Script
    • Options:
      • Handlebar Template: Define the value of the variable using placeholders or simple text.

Example:

{{PatientName}}

  • Script: Write logic to define or calculate the value dynamically.

Example (Script):

return f"{patient_name} - Claim Status: {claim_status}"

  1. Expression Field:
    • Description: The actual value or logic that determines the variable's value.
    • Status: Required.
    • Example:

Handlebars:

Your invoice for {{InvoiceAmount}} is ready to be downloaded.

Script:

if invoice_ready:

   return f"Dear {patient_name}, your invoice for {invoice_amount} is ready for download."


How It Works

  1. Select Notification Type:
    • Choose the communication method (e.g., Email, SMS, or Push Notification).
  2. Define Content:
    • Use Handlebar Template for simple placeholders or Script for complex logic to generate dynamic content.
  3. Map Data Values:
    • Add necessary variables and their definitions (using templates or scripts) to populate the notification dynamically.
  4. Send Notification:
    • When the workflow reaches this node, the notification is sent to the recipients with the dynamically generated content.

Use Case Examples

1. Claim Status Notification

  • Name: Notify Patient of Claim Status
  • Text:
    • Type: Email

Content: Handlebar Template

Dear {{PatientName}}, your claim for {{ClaimAmount}} is {{ClaimStatus}}.

  • Data Values:
    • Name: PatientName
    • Expression: {{patient_name}}
    • Name: ClaimStatus
    • Expression: {{claim_status}}
  • Outcome: Sends an email to patients updating them on their claim status.

2. Task Completion Notification

  • Name: Notify Staff of Task Completion
  • Text:
    • Type: Push Notification

Content: Script

return f"The task '{task_name}' was completed successfully at {completion_time}."

  • Data Values:
    • Name: TaskName
    • Expression: {{task_name}}
  • Outcome: Sends a push notification to the team about task completion.

Best Practices

  1. Select the Right Content Type:
    • Use Handlebar Templates for quick, dynamic notifications.
    • Use Scripts for notifications requiring conditional logic or data manipulation.
  2. Test Notifications:
    • Validate notification content and delivery settings before deploying.
  3. Be Concise:
    • Keep notifications short and actionable for better user understanding.
  4. Dynamic Content:
    • Leverage data values effectively to make notifications personalized and relevant.

The Send Notification node is a versatile tool in Pathways, capable of sending real-time alerts with customizable content through dynamic templates or scripts. Its flexibility ensures effective communication in any automated workflow.