Create Advanced Automations
Overview
Automations instantly trigger predefined actions based on specific conditions within Welkin. While many automations handle simple scenarios (such as sending a notification when an Assessment is completed), complex situations may require advanced automations with multiple triggers, conditions, and actions. This guide covers examples of advanced automation patterns and explains how to implement them effectively.
Core Concepts
Automation Components
Every automation requires three elements:
Trigger Event – The action that initiates the automation (e.g., Assessment completed, data field updated, date milestone reached)
Conditions – Logical rules that must be satisfied for the automation to execute
Actions – The response triggered when conditions are met (send notification, send message, create task, update data)
Advanced automations combine multiple conditions with AND/OR logic and may include time-based delays.
Example: BMI Change Follow-up Automation
This automation monitors BMI changes and sends a follow-up message when no improvement is detected after three weeks.
Trigger
Event Type: "Data Type Updated"
Data Type Name: "cdt-bmi" (system-calculated BMI field)
Conditions
The automation includes the following conditions (all must be true for execution):
Patient in Program/Phase: Patient is enrolled in the "Physical Therapy-Education" program
Initial Check: On data update, record the BMI value and timestamp
Delayed Check: 3 weeks (21 days) after the original BMI update, check if:
The patient is still in the Physical Therapy-Education program
The BMI has not improved (current BMI ≥ original BMI from 3 weeks ago)
The patient remains enrolled in the care program
Actions
If all conditions are met:
Send Message to the care team: "Patient's BMI has not improved after 3 weeks. Consider adjusting the care plan."
Create Task for the assigned care team member to review the patient's exercise and nutrition plan
Send Notification to supervisory role alerting them of the patient requiring intervention
Implementation Steps
Log into Designer and create a new Automation
Set the trigger to "Data Type Updated" and select "cdt-bmi"
Add conditions using the condition builder:
Add program/phase enrollment condition
Set time-based condition for 21-day delay
Add BMI comparison condition
Configure actions:
Select "Send Message" and compose the follow-up notification
Select "Create Task" and define the task details
Add "Send Notification" and select recipient roles
Save and publish the automation
Example: Conditional Assessment Escalation
This automation escalates patients to a higher level of care based on assessment scores.
Trigger
Event Type: "Assessment Completed"
Assessment Name: "Depression Screening"
Conditions
Score Threshold: Assessment score is ≥ 15 (indicating moderate-to-severe depression)
Not Yet Escalated: Patient is still in "Standard Care" program (not already escalated)
Consent Status: Patient has consented to behavioral health referrals
Actions
Move patient to "Intensive Behavioral Health" program automatically
Send notification to behavioral health team that new patient was escalated
Create task for care coordinator to schedule behavioral health appointment
Send message to patient with behavioral health resources
Example: Encounter-Based Follow-up Automation
This automation schedules a follow-up assessment after an encounter is completed.
Trigger
Event Type: "Encounter Completed"
Encounter Type: "Initial Assessment"
Conditions
Patient is enrolled in "Chronic Disease Management" program
Encounter was marked as "completed" (not cancelled)
30 days have not already passed since encounter completion
Actions
Schedule follow-up assessment to be sent 14 days post-encounter
Send message to patient asking them to complete the follow-up assessment
Create task for care team member to monitor completion
Advanced Condition Patterns
Time-Based Conditions
Absolute Dates: "After January 1, 2026"
Relative Dates: "30 days from today"
Field-Based Dates: "21 days from when field X was last updated"
Periodic Checks: "Check every Monday"
Complex Logic
AND Conditions: All must be true (e.g., "in program AND score > 10 AND not completed")
OR Conditions: Any can be true (e.g., "high risk OR overdue assessment")
Nested Logic: Combine AND/OR for sophisticated rules
Field Comparisons
Field vs. Value: "BMI > 30"
Field vs. Field: "Current value > Previous value"
Field vs. Range: "Score between 10 and 20"
Best Practices for Advanced Automations
Clear Naming – Use descriptive names that indicate the trigger and purpose (e.g., "BMI-Monitor-21DayNoImprovement")
Test Before Publishing – Create test patients and verify automation behavior before enabling for production
Avoid Recursive Triggers – Ensure automations don't trigger themselves indefinitely
Example: Don't set an automation that updates a field to trigger another automation that updates the same field
Consider Performance – Complex automations with many conditions may impact system performance
Test with realistic data volumes
Limit the number of daily-running automations
Monitor Execution – Regularly review automation logs to ensure they're working as intended
Document Logic – Maintain clear documentation of complex automations for team knowledge
Use Drafts for Development – Always work in Designer drafts before publishing to production
Limitations
Automations cannot reference fields from different CDTs in cross-type comparisons
Circular trigger patterns (A triggers B, B triggers A) will be blocked
Maximum execution time limits apply to prevent infinite loops
Some real-time actions may have latency depending on system load
Related Topics
Designer: How to Create Automations – Basic automation setup guide
Automated Notifications – Sending notifications via automations
Automations that Trigger Outbound Communications – Message and SMS automations
Programs and Phases – Managing care pathways that automations reference
How to Add Conditionality to Assessments – Assessment-based conditional logic
Last updated
Was this helpful?