Pathways Trigger: Difference between revisions
(Triggers Doc) |
m (Mitchell.Hirsche moved page FojiSoft Pathways Trigger Documentation to Pathways Trigger) |
Latest revision as of 23:12, 5 March 2025
Triggers in Pathways allow workflows to start automatically based on specific conditions or time intervals. They are essential for automating processes by responding to data changes, events, or scheduled timings. This documentation explains the types of triggers available and how to configure them.
Types of Triggers
- Relational Data Query
- Executes a pathway whenever there is a change in the underlying relational database.
- Event
- Triggers a pathway when a specific event occurs within the system or connected external applications.
- Interval
- Executes the pathway at predefined time intervals (e.g., every hour, day, or week).
1. Relational Data Query Trigger
Purpose
This trigger is used to monitor changes in a relational database table. When a change is detected (e.g., row updates, new entries), it executes the corresponding pathway.
Configuration Options
- Name: Provide a unique name for the trigger to identify it easily in the workflow.
- Query: Define the SQL query or criteria to monitor specific changes in the table.
- Input Mapping: Specify how the data from the relational query maps to the inputs of the pathway.
Use Case Example
Automatically initiate an inventory update workflow when stock levels in a database drop below a certain threshold.
2. Event Trigger
Purpose
The Event Trigger activates a pathway when a predefined event occurs in the system or connected applications.
Configuration Options
- Name: Assign a clear and descriptive name to the trigger.
- Event Name: Specify the name of the event that will activate the pathway.
- Filter: Choose a filter mode to refine which events trigger the pathway:
- None (All Events): Respond to all occurrences of the specified event.
- Specific Conditions: Define additional criteria for triggering.
- Inputs: Map the event data to pathway inputs, such as an email address or a record ID.
Use Case Example
Trigger a customer notification workflow when an order status changes to "shipped."
3. Interval Trigger
Purpose
The Interval Trigger ensures a pathway runs automatically at regular intervals (e.g., hourly, daily, or weekly).
Configuration Options
- Name: Provide a name that reflects the trigger’s schedule or purpose.
- Interval: Set the time interval for execution (e.g., every 1 hour, 24 hours).
- Inputs: Optionally pass static or dynamic input values to the pathway.
Use Case Example
Run a daily workflow to generate and send sales performance reports.
How to Configure Triggers
- Access Trigger Creation Panel
- Navigate to the Pathways interface and click on "New Trigger."
- Select Trigger Type
- Choose one of the three trigger types: Relational Data Query, Event, or Interval.
- Define Trigger Properties
- Fill in all required fields such as name, query, event name, interval, and input mapping.
- Use the toggle switch to enable or disable the trigger.
- Save and Link to Pathway
- Save the trigger and associate it with the corresponding pathway.
Best Practices
- Descriptive Names: Use meaningful names for triggers to make it easier to manage and debug workflows.
- Efficient Queries: For relational data triggers, ensure the query is optimized to avoid unnecessary execution.
- Use Filters Wisely: For event triggers, apply filters to narrow down the activation conditions and prevent unwanted executions.
- Monitor Intervals: Set intervals thoughtfully to balance workflow execution frequency and resource usage.
Documentation: Input Options for AI Agent Workflow in Pathways
Pathways allow users to define input options for AI agent workflows with high configurability. Here are the available configurations for inputs based on the provided interface:
Input Fields
Name
- Represents the name of the input variable.
- Each input must have a unique name to avoid conflicts in the workflow.
Type
Defines the data type for the input. The following types are available:
- String: Text-based data, such as names or sentences.
- Bool: A Boolean value (True/False).
- Date: Date values formatted as per the system's standards.
- Number: Numerical data, such as integers or decimals.
- Object: Complex data structures or JSON-like objects.
Modes
Specifies whether the input is required or optional in the workflow:
- Required: The input must be provided for the workflow to execute.
- Optional: The input is not mandatory. If missing, default configurations are used (if set).
Default Value Type
Specifies the fallback value for the input when not provided:
- None: No default value.
- Defined: The user sets a specific fallback value.
Default Value
- Available when the Default Value Type is set to Defined.
- Allows the user to specify a static value or placeholder for the input field.
- Example: Setting a default string like "[object Object]" or a numerical value like 42.
Workflow Application
These configurations are essential for creating flexible and robust workflows. For instance:
- A "String" input could accept names or user messages.
- An "Optional" "Date" input might allow AI workflows to handle events based on a specific schedule, or default to the current date if no input is provided.
- A "Number" input could be used for pricing, probabilities, or numerical thresholds.
Benefits
- Flexibility: Users can adapt workflows to different use cases with optional or required inputs.
- Error Handling: Default values provide safety nets, ensuring workflows function even when inputs are missing.
- Dynamic Usability: Support for multiple data types allows workflows to handle diverse scenarios.
Pathways' input configuration ensures robust, adaptable workflows, enhancing the power of AI agents in business and operational processes.