Task Types Reference
Workflow Builder V2 provides a comprehensive set of task types organized into four categories: Control Flow, Actions, Operations, and Utilities. Each task type defines specific behavior, configuration options, and visual representation on the canvas.
Control Flow Tasks
Control flow tasks manage the execution path of your workflow, enabling conditional branching, waiting, variable operations, and defining entry/exit points.
start
The entry point for every workflow. Each workflow must have exactly one start task.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| - | - | - | No input required |
Output Schema
| Field | Type | Description |
|---|---|---|
| workflow_input | object | The input data passed when executing the workflow |
Configuration Options
The start task requires no configuration. It automatically receives the workflow input data when execution begins.
Example Use Case
Every workflow begins with a start task. When you execute a workflow with input data like {"borrower_id": "12345"}, this data becomes available as workflow_input for subsequent tasks.
end
The exit point for a workflow. Defines what data the workflow returns upon completion.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| output | any | No | The data to return as workflow output |
Output Schema
| Field | Type | Description |
|---|---|---|
| result | any | The final workflow output |
Configuration Options
| Option | Type | Description |
|---|---|---|
| outputMapping | object | Maps values from previous tasks to the final output |
| statusCode | number | HTTP status code to return (default: 200) |
Example Use Case
At the end of a credit evaluation workflow, use the end task to return a structured response containing the decision, score, and any relevant metadata.
conditional
Branch workflow execution based on conditions. Supports multiple branches with if/elif/else logic.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| expression_context | object | No | Variables available for condition evaluation |
Output Schema
| Field | Type | Description |
|---|---|---|
| matched_branch | string | ID of the branch that was taken |
Configuration Options
| Option | Type | Description |
|---|---|---|
| branches | array | List of branch definitions |
| branches[].id | string | Unique identifier for the branch |
| branches[].label | string | Display name for the branch |
| branches[].expression | string | Python expression that evaluates to boolean |
| branches[].isElse | boolean | Whether this is the default/else branch |
Branch expressions use Python syntax. Access variables using the input mapping system, e.g., score > 700 where score is mapped from a previous task's output.
Example Use Case
After calculating a credit score, use conditional branching to route high-score applicants to automatic approval, medium scores to manual review, and low scores to rejection.
wait
Pause workflow execution for a specified duration.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| - | - | - | No input required |
Output Schema
| Field | Type | Description |
|---|---|---|
| waited_seconds | number | Actual time waited in seconds |
Configuration Options
| Option | Type | Description |
|---|---|---|
| duration | number | Time to wait in seconds |
| durationUnit | string | Unit of time: "seconds", "minutes", "hours" |
Example Use Case
When integrating with rate-limited external APIs, use wait tasks to space out requests and avoid hitting rate limits.
set_variable
Create or update workflow variables during execution.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| variables | array | Yes | Array of variable definitions to set |
Output Schema
| Field | Type | Description |
|---|---|---|
| updated_variables | object | Map of variable names to their new values |
Configuration Options
| Option | Type | Description |
|---|---|---|
| variables | array | List of variables to create/update |
| variables[].name | string | Variable name (alphanumeric and underscores) |
| variables[].type | string | Type: "string", "number", "boolean", "object", "array" |
| variables[].value | any | The value to assign |
Example Use Case
Set a risk_tier variable based on calculated scores that can be referenced by subsequent conditional tasks and output mappings.
compute_variables
Compute multiple variables using expressions in a single task.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| input_values | object | No | Values available for computation |
Output Schema
| Field | Type | Description |
|---|---|---|
| computed | object | Map of computed variable names to values |
Configuration Options
| Option | Type | Description |
|---|---|---|
| computations | array | List of computation definitions |
| computations[].name | string | Name of the variable to create |
| computations[].expression | string | Python expression to evaluate |
| computations[].type | string | Expected output type |
Example Use Case
Calculate derived metrics like debt-to-income ratio, monthly payment amounts, or risk scores from raw input data.
variable_operation
This task type is deprecated. Use set_variable instead for new workflows.
Legacy task for operating on variables. Maintained for backward compatibility.
exception
Throw an error to stop workflow execution with a specific error message.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| condition | boolean | No | If provided, only throws when true |
Output Schema
This task does not produce output - it terminates the workflow.
Configuration Options
| Option | Type | Description |
|---|---|---|
| message | string | Error message to display |
| errorCode | string | Error code for programmatic handling |
| condition | string | Optional expression - only throws if evaluates to true |
Example Use Case
When required data is missing or validation fails, use exception to terminate the workflow early with a clear error message explaining the failure.
Action Tasks
Action tasks perform operations that interact with external systems or execute custom logic.
python
Execute custom Python code within the workflow.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| input | object | No | Data passed to the execute function |
| context | object | No | Workflow context and variables |
Output Schema
| Field | Type | Description |
|---|---|---|
| result | any | Return value from the execute function |
Configuration Options
| Option | Type | Description |
|---|---|---|
| code | string | Python code to execute |
| timeoutSeconds | number | Maximum execution time (default: 300) |
Your Python code must define an execute(input, context) function that returns a value or dictionary. The function receives mapped inputs and workflow context.
Code Structure
Example Use Case
Implement custom scoring logic, data transformations, or complex calculations that cannot be achieved with other task types.
http
Make HTTP requests to external APIs.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| url_params | object | No | Dynamic URL parameters |
| body_data | object | No | Request body data |
| header_values | object | No | Dynamic header values |
Output Schema
| Field | Type | Description |
|---|---|---|
| status_code | number | HTTP response status code |
| headers | object | Response headers |
| body | any | Response body (parsed JSON or text) |
Configuration Options
| Option | Type | Description |
|---|---|---|
| url | string | Target URL (supports template variables) |
| method | string | HTTP method: GET, POST, PUT, PATCH, DELETE |
| headers | object | Request headers as JSON |
| body | string | Request body (JSON string for POST/PUT/PATCH) |
| timeoutSeconds | number | Request timeout in seconds |
| authType | string | Authentication type: "none", "bearer", "basic", "oauth2" |
| authConfig | object | Authentication configuration |
Example Use Case
Query external credit bureaus, verify identity through third-party services, or send notifications via webhooks.
soap
Make SOAP web service calls.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| parameters | object | No | SOAP operation parameters |
Output Schema
| Field | Type | Description |
|---|---|---|
| response | object | Parsed SOAP response |
| raw_xml | string | Raw XML response |
Configuration Options
| Option | Type | Description |
|---|---|---|
| wsdlUrl | string | WSDL endpoint URL |
| operation | string | SOAP operation to call |
| parameters | object | Operation parameters |
| headers | object | SOAP headers |
Example Use Case
Integrate with legacy banking systems or government services that expose SOAP-based APIs.
altdata_enrichment
Query AltScore data sources for enrichment data.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| identifier | string | Yes | Primary identifier (e.g., national ID) |
| identifier_type | string | Yes | Type of identifier |
Output Schema
| Field | Type | Description |
|---|---|---|
| data | object | Enrichment data from the data source |
| source_id | string | Data source identifier |
| retrieved_at | string | Timestamp of data retrieval |
Configuration Options
| Option | Type | Description |
|---|---|---|
| dataSource | string | AltData source identifier |
| version | string | Data source version |
| inputMapping | object | Map workflow data to source inputs |
Example Use Case
Enrich borrower profiles with alternative data such as utility payment history, mobile phone behavior, or social media signals.
Operation Tasks
Operation tasks perform business logic operations within the AltScore platform.
create_borrower
Create a new borrower entity in the system.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_data | object | Yes | Borrower information |
Output Schema
| Field | Type | Description |
|---|---|---|
| borrower_id | string | ID of the created borrower |
| created_at | string | Creation timestamp |
Configuration Options
| Option | Type | Description |
|---|---|---|
| borrowerType | string | Type of borrower: "individual", "business" |
| fieldMappings | object | Map input data to borrower fields |
| category | string | Borrower category |
Example Use Case
As part of an onboarding workflow, create borrower records from application data submitted through your portal.
update_borrower
Update an existing borrower's information.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_id | string | Yes | ID of borrower to update |
| updates | object | Yes | Fields to update |
Output Schema
| Field | Type | Description |
|---|---|---|
| borrower_id | string | ID of the updated borrower |
| updated_fields | array | List of fields that were updated |
Configuration Options
| Option | Type | Description |
|---|---|---|
| fieldMappings | object | Map input data to borrower fields |
| merge_strategy | string | How to handle nested objects: "replace", "merge" |
Example Use Case
Update borrower contact information, employment details, or financial data as new information becomes available.
execute_evaluator
Run an evaluator (scorer) against borrower data.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_id | string | Yes | ID of the borrower to evaluate |
| additional_data | object | No | Extra data for evaluation |
Output Schema
| Field | Type | Description |
|---|---|---|
| score | number | Calculated score |
| decision | string | Evaluation decision |
| metrics | object | Individual metric values |
| rules_triggered | array | List of rules that were triggered |
Configuration Options
| Option | Type | Description |
|---|---|---|
| executorId | string | ID of the evaluator to run |
| alertActive | boolean | Whether to generate alerts from evaluation |
Evaluators combine scorecards, metrics, and rules to produce credit decisions. The input schema is automatically populated based on the selected evaluator's requirements.
Example Use Case
Execute a credit scoring model that evaluates borrower risk based on financial history, behavior patterns, and alternative data.
create_alert
Generate an alert based on workflow conditions.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_id | string | Yes | Associated borrower ID |
| alert_data | object | No | Additional alert context |
Output Schema
| Field | Type | Description |
|---|---|---|
| alert_id | string | ID of the created alert |
| severity | string | Alert severity level |
Configuration Options
| Option | Type | Description |
|---|---|---|
| alertType | string | Type of alert to create |
| severity | string | Severity: "low", "medium", "high", "critical" |
| message | string | Alert message (supports templates) |
| metadata | object | Additional alert metadata |
Example Use Case
When fraud indicators are detected during evaluation, create a high-severity alert for the compliance team to review.
evaluate_rules
Evaluate a set of business rules.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| rule_input | object | Yes | Data to evaluate against rules |
Output Schema
| Field | Type | Description |
|---|---|---|
| passed | boolean | Whether all required rules passed |
| results | array | Individual rule results |
| failed_rules | array | List of rules that failed |
Configuration Options
| Option | Type | Description |
|---|---|---|
| ruleSet | string | ID of the rule set to evaluate |
| stopOnFirstFailure | boolean | Stop evaluation on first rule failure |
Example Use Case
Validate that a loan application meets all policy requirements such as minimum income, maximum debt ratio, and age restrictions.
create_identity
Create an identity record for a borrower.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_id | string | Yes | Associated borrower ID |
| identity_data | object | Yes | Identity information |
Output Schema
| Field | Type | Description |
|---|---|---|
| identity_id | string | ID of the created identity |
| verification_status | string | Initial verification status |
Configuration Options
| Option | Type | Description |
|---|---|---|
| identityType | string | Type: "national_id", "passport", "drivers_license" |
| fieldMappings | object | Map input data to identity fields |
Example Use Case
Store verified identity documents during the KYC process, linking them to the borrower profile.
fetch_entity
Fetch a single entity from a borrower's collection.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_id | string | Yes | Borrower ID |
| entity_type | string | Yes | Type of entity to fetch |
| entity_id | string | No | Specific entity ID (optional) |
Output Schema
| Field | Type | Description |
|---|---|---|
| entity | object | The fetched entity data |
| found | boolean | Whether the entity was found |
Configuration Options
| Option | Type | Description |
|---|---|---|
| collectionType | string | Type of collection to query |
| filters | object | Filter criteria for entity selection |
| sortBy | string | Field to sort by when selecting |
Example Use Case
Retrieve the borrower's most recent bank statement or employment verification record.
fetch_entities
Fetch multiple entities from a borrower's collections.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| borrower_id | string | Yes | Borrower ID |
| entity_type | string | Yes | Type of entities to fetch |
Output Schema
| Field | Type | Description |
|---|---|---|
| entities | array | Array of fetched entities |
| count | number | Number of entities returned |
| total | number | Total matching entities |
Configuration Options
| Option | Type | Description |
|---|---|---|
| collectionType | string | Type of collection to query |
| filters | object | Filter criteria |
| limit | number | Maximum entities to return |
| offset | number | Pagination offset |
Example Use Case
Retrieve all active loans for a borrower to calculate total existing debt.
workflow_selector
Call another workflow as a sub-workflow.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| workflow_input | object | No | Input to pass to the sub-workflow |
Output Schema
| Field | Type | Description |
|---|---|---|
| output | any | Output from the sub-workflow |
| execution_id | string | ID of the sub-workflow execution |
Configuration Options
| Option | Type | Description |
|---|---|---|
| workflowId | string | ID of workflow to execute |
| workflowAlias | string | Alias of workflow (alternative to ID) |
| waitForCompletion | boolean | Whether to wait for sub-workflow to complete |
| inputMapping | object | Map current context to sub-workflow input |
Example Use Case
Decompose complex processes into reusable sub-workflows. Call a verification workflow from both new application and renewal workflows.
mapping_table
Look up a value in a mapping table.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| lookup_key | string | Yes | Key to look up in the table |
Output Schema
| Field | Type | Description |
|---|---|---|
| value | any | The mapped value |
| found | boolean | Whether a mapping was found |
| default_used | boolean | Whether the default value was used |
Configuration Options
| Option | Type | Description |
|---|---|---|
| tableId | string | ID of the mapping table |
| keyField | string | Field to use as lookup key |
| defaultValue | any | Value to return if no match found |
Example Use Case
Map country codes to risk tiers, or convert categorical values like employment types to numerical weights.
scorecard
Execute a scorecard evaluation.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| scorecard_input | object | Yes | Data for scorecard evaluation |
Output Schema
| Field | Type | Description |
|---|---|---|
| total_score | number | Aggregated scorecard score |
| category_scores | object | Scores by category |
| factor_details | array | Individual factor contributions |
Configuration Options
| Option | Type | Description |
|---|---|---|
| scorecardId | string | ID of the scorecard to execute |
| inputMapping | object | Map workflow data to scorecard inputs |
Example Use Case
Calculate a credit score using a points-based scorecard model that assigns weights to factors like payment history, credit utilization, and account age.
Business Logic Tasks
Business logic tasks implement decision-making structures for credit evaluation.
decision_tree
Execute decision tree logic for rule-based decisions.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| decision_input | object | Yes | Data for decision tree evaluation |
Output Schema
| Field | Type | Description |
|---|---|---|
| decision | string | Final decision from the tree |
| path | array | Nodes traversed to reach decision |
| confidence | number | Confidence score (if applicable) |
Configuration Options
| Option | Type | Description |
|---|---|---|
| treeId | string | ID of the decision tree |
| inputMapping | object | Map workflow data to tree inputs |
Example Use Case
Implement automated credit decisions based on a decision tree that evaluates income levels, employment status, and credit history.
rule_tree
Execute rule tree logic for complex conditional evaluation.
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| rule_input | object | Yes | Data for rule tree evaluation |
Output Schema
| Field | Type | Description |
|---|---|---|
| result | any | Result from rule tree evaluation |
| rules_evaluated | array | List of rules that were evaluated |
| final_rule | string | The terminal rule that produced the result |
Configuration Options
| Option | Type | Description |
|---|---|---|
| ruleTreeId | string | ID of the rule tree |
| inputMapping | object | Map workflow data to rule tree inputs |
Example Use Case
Apply complex policy logic with nested conditions to determine loan terms, interest rates, or required documentation.
Utility Tasks
Utility tasks provide helper functionality for workflow development.
comment
Add a documentation note to the workflow. This task does not execute any logic.
Input Schema
No input - this task is non-executing.
Output Schema
No output - this task is non-executing.
Configuration Options
| Option | Type | Description |
|---|---|---|
| text | string | Comment text |
| color | string | Visual color for the comment block |
Comment tasks are purely for documentation purposes. They appear on the canvas to help explain workflow logic but are skipped during execution.
Example Use Case
Add explanatory notes near complex conditional logic or integration points to help other team members understand the workflow design.
Best Practices
Task Selection
- Use the simplest task that meets your needs - If a mapping table can solve your problem, prefer it over Python code
- Leverage built-in operations - Tasks like
execute_evaluatorandscorecardare optimized for credit decisioning - Consider sub-workflows - Use
workflow_selectorto create reusable components
Error Handling
- Validate inputs early - Use conditional tasks to check for required data before making external calls
- Handle external failures - HTTP and SOAP tasks can fail; plan for retries and fallback logic
- Use exception tasks deliberately - Terminate workflows with clear error messages when unrecoverable conditions occur
Performance
- Minimize external calls - Batch data retrieval where possible
- Set appropriate timeouts - Configure timeouts based on expected response times
- Use async execution - For long-running workflows, execute asynchronously and poll for results