Run Automation Manually
Automation
Run Automation Manually
Execute automated clinical pathways for patient records
POST
Run Automation Manually
Overview
Trigger automated or semi-automated clinical pathway execution for a patient record. This endpoint initiates the processing workflow that evaluates pathway conditions, executes actions, and manages the patient journey through the configured pathway.Endpoint
https://app.arahealth.io
Path: /api/v1/records/automation
Method: POST
Authentication
This endpoint requires Bearer token authentication.Headers
Authorization(required) - Bearer token for authenticationContent-Type(required) - Must beapplication/json
Contact Alto Health to obtain your authentication token. The token contains your organization, team, and user credentials.
Request Parameters
Request Body
The request body should be a JSON object with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
recordId | string | Yes | Unique identifier for the patient record |
pathwayType | string | Yes | Type of pathway execution: auto or semiAutomatic |
pathwayName | string | Conditional | Name of the pathway to execute (required for semiAutomatic type) |
Pathway Types
auto - Fully Automated
auto - Fully Automated
The pathway runs automatically from start to finish without manual intervention. The system will:
- Execute all pathway nodes sequentially
- Evaluate conditions automatically
- Complete actions without user input
- Progress through the entire pathway flow
semiAutomatic - Semi-Automated
semiAutomatic - Semi-Automated
The pathway executes with manual checkpoints where user review or intervention is required. The system will:
- Pause at designated review points
- Wait for user approval or input
- Allow manual override of automated decisions
- Resume execution after user action
When using
semiAutomatic, you must provide the pathwayName parameter to specify which pathway to execute.Code Examples
Response
Success Response
A successful automation trigger returns:Response Fields
| Field | Type | Description |
|---|---|---|
status_code | number | HTTP status code (200 for success) |
message | string | High-level status message |
sub_message | string | Additional status details |
Error Responses
Invalid Request (400)
- Missing required fields (
recordId,pathwayType) - Invalid
recordIdformat - Missing
pathwayNamewhen usingsemiAutomatictype - Invalid
pathwayTypevalue
Unauthorized (401)
- Missing Authorization header
- Invalid Bearer token
- Expired authentication token
Record Not Found (404)
- Invalid
recordId - Record belongs to a different organization/team
- Record has been archived or deleted
Use Cases
Automatic Triage
Trigger automatic pathway execution after document upload to classify and route referrals based on urgency and specialty.
Approval Workflows
Use semi-automatic pathways for cases requiring clinical review before proceeding with automated actions.
Batch Processing
Process multiple records through the same pathway by calling this endpoint for each record in a batch.
Integration Triggers
Integrate with external systems to automatically trigger pathways when new records are created.
Example Workflow
Upload Document
Use the Document Upload endpoint to upload a patient referral document. Save the returned
recordId.Trigger Automation
Call the Run Automation Manually endpoint with the
recordId to execute the clinical pathway. The pathway will automatically handle data extraction:Pathway Execution
What Happens When You Trigger Automation?
When you call this endpoint, Alto Health:- Validates the Request - Checks that the record exists and you have permission to access it
- Loads the Pathway - Retrieves the configured pathway based on the type and name provided
- Initializes Execution - Creates a run history record to track the pathway execution
- Processes Nodes - Executes pathway nodes sequentially:
- Evaluates conditions based on extracted data
- Performs actions (notifications, status updates, etc.)
- Makes routing decisions based on business rules
- Handles Wait Points - For semi-automatic pathways, pauses at designated review nodes
- Completes or Pauses - Either completes the pathway or waits for manual intervention
Pathway Node Types
During execution, the pathway may include various node types:- Condition Nodes - Evaluate rules based on extracted data
- Action Nodes - Perform operations like sending emails or updating status
- Decision Nodes - Route the record based on evaluation results
- Wait Nodes - Pause execution for manual review (semi-automatic only)
Best Practices
Validate Data Before Automation
Validate Data Before Automation
Ensure that all required entity extraction is complete before triggering automation. Missing data may cause pathway execution to fail or make incorrect routing decisions.
Handle Asynchronous Execution
Handle Asynchronous Execution
Pathway execution happens asynchronously. Don’t expect immediate results. Use webhooks or implement polling to track completion.
Use Semi-Automatic for Critical Cases
Use Semi-Automatic for Critical Cases
For high-stakes clinical decisions, use
semiAutomatic pathways to include human oversight at critical decision points.Verify Pathway Names
Verify Pathway Names
When using semi-automatic execution, ensure the pathway name exactly matches a configured pathway in your organization. Mismatched names will cause the request to fail.
Implement Error Handling
Implement Error Handling
Always implement proper error handling for automation requests:
Related Endpoints
Document Upload
Upload patient referral documents before triggering automation
Get Job Status
Check the status of processing jobs
Webhooks
Set up webhooks to receive automation completion notifications
Need Help?
Contact Support
Email: support@altohealth.ioInclude in your message:
- Record ID
- Pathway name (if applicable)
- Error message and status code
- Expected vs actual behavior
Authorizations
Bearer token authentication using your Alto Health API key
Body
application/json
Automation execution request
Unique identifier for the patient record
Example:
"6924b6882ccfec0e13b8e4b9"
Type of pathway execution
Available options:
auto, semiAutomatic Example:
"semiAutomatic"
Name of the pathway to execute (required for semiAutomatic type)
Example:
"Achilles tendon pathology and rupture"
