Verso API supports two execution modes for payroll calculations: Real Mode and Forecast Mode. Understanding when to use each mode is essential for effective payroll management.
Mode Comparison
| Aspect | Real Mode | Forecast Mode |
|---|---|---|
| Purpose | Official payroll records | Simulations and previews |
| Data Persistence | Permanent record | Stored separately |
| Affects History | Yes | No |
| Use Case | Final payroll run | What-if scenarios |
| Identifier | No forecast field | Requires forecast field |
Real Mode
Real mode creates official payroll records that become part of the employee's permanent history.
When to Use
- Monthly payroll processing
- Final salary calculations
- Year-end reconciliation
- Official pay slip generation
Example
POST /payrolls/{payrollId}/cases (Real Mode)
Forecast Mode
Forecast mode runs simulations that are stored separately from official records, ideal for previews and what-if scenarios.
When to Use
- Employee net pay previews
- Bonus impact simulations
- Salary increase projections
- Benefits change calculations
- Testing before production
Example
POST /payrolls/{payrollId}/cases (Forecast Mode)
Forecast Identifier Strategies
Historized Forecasts
Create unique identifiers to keep multiple simulation versions:
Code
Use this approach when you need to:
- Compare multiple scenarios
- Track simulation history
- Audit forecast decisions
Ephemeral Forecasts
Reuse the same identifier to overwrite previous results:
Code
Use this approach when you need to:
- Show real-time updates
- Minimize storage usage
- Display latest projection only
Workflow Example
Step 1: Simulate with Forecast
Forecast Payrun
Step 2: Review Results
Check the simulation results and validate calculations.
Step 3: Run Real Payroll
Once validated, run the same calculation without the forecast field:
Real Payrun
Data Isolation
Forecast and Real data are completely isolated:
Code
Use Case: Employee Self-Service
Use Forecast mode to let employees preview their expected net pay before the official payroll run. This reduces payroll queries and improves transparency.
Code
Next Steps
- Quickstart - Complete payroll workflow
- Case Fields Reference - Available input fields
- Error Handling - Handling API errors