Library flows
A Library flow is a reusable, non-standalone flow designed to encapsulate common logic that can be shared across multiple flows.
It cannot be executed independently and can only be invoked from within other flows. Library flows help reduce duplication by centralizing shared functionality, ensuring consistency, easier maintenance, and reuse across different flow types.
Add a library flow
-
Open the left sidebar and select Visual Identity Orchestrator from the menu.
-
This will display a list of flow categories, select Libraries.
-
Press ADD button.
-
Complete the configuration by following the steps described in the add flow section, starting from step 5.
When to use library flows
Library flows are ideal for:
Common validation logic
-
Email format validation
-
Phone number verification
-
Data format checks
-
Business rule validation
Shared processing steps
-
Data transformation routines
-
API call patterns
-
Error handling procedures
-
Logging and audit functions
Reusable UI components
-
Standard forms
-
Common information displays
-
Consistent error messages
-
Branded content blocks
Integration patterns
-
Third-party API wrappers
-
Database query patterns
-
External service calls
-
Data synchronization routines
Benefits of library flows
Consistency
-
Same logic across all flows
-
Uniform error handling
-
Consistent user experience
-
Standardized integrations
Maintainability
-
Update once, apply everywhere
-
Easier to fix bugs
-
Simplified testing
-
Centralized documentation
Development efficiency
-
Faster flow creation
-
Reduced code duplication
-
Reusable patterns
-
Team knowledge sharing
Quality assurance
-
Well-tested components
-
Known behavior
-
Reduced errors
-
Better reliability
Invoking library flows
To use a library flow within another flow:
-
Add a "Call Library Flow" node to your flow
-
Select the library flow to invoke
-
Map input variables to the library flow
-
Handle the output from the library flow
-
Continue with your main flow logic
Best practices
Design for reusability
-
Keep library flows focused on a single purpose
-
Use clear, descriptive names
-
Accept parameters for flexibility
-
Return consistent output structures
Documentation
-
Document purpose and use cases
-
Specify input requirements
-
Describe output format
-
Provide usage examples
-
Note any dependencies
Versioning
-
Plan for library flow evolution
-
Consider backward compatibility
-
Version library flows appropriately
-
Communicate changes to users
Testing
-
Test library flows independently
-
Test with various input scenarios
-
Validate error handling
-
Verify performance under load
Library flow structure
Inputs
Define clear input parameters:
-
Required vs optional inputs
-
Expected data types
-
Validation rules
-
Default values
Processing
Implement the core logic:
-
Process input data
-
Call external services if needed
-
Apply business rules
-
Handle errors gracefully
Outputs
Return structured results:
-
Success/failure indicators
-
Processed data
-
Error messages
-
Status information
Common library flow patterns
Validation library
Input: Data to validate
Process: Apply validation rules
Output: Valid/Invalid + error details
API wrapper library
Input: API parameters
Process: Call external API
Output: Response data + status
Data transformation library
Input: Raw data
Process: Transform and format
Output: Transformed data
Notification library
Input: Notification details
Process: Send via appropriate channel
Output: Delivery status
Managing library flows
Organization
-
Group related library flows
-
Use consistent naming conventions
-
Maintain a catalog or documentation
-
Tag for easy discovery
Lifecycle
-
Regular reviews and updates
-
Deprecation process for old versions
-
Migration support for changes
-
Archive unused library flows
Governance
-
Ownership and responsibility
-
Change approval process
-
Testing requirements
-
Documentation standards
Examples
Email validation library
Validates email format and optionally checks if domain exists.
Input: Email address
Output: Valid (true/false), Error message (if invalid)
SMS sender library
Sends SMS messages through configured provider.
Input: Phone number, Message text
Output: Success (true/false), Message ID, Error details
User lookup library
Retrieves user information from identity store.
Input: User identifier (email, username, ID)
Output: User object or error