We’ve configured custom validation rules for headcount forecasts in Workforce Planning (H1 2023) that work perfectly when users manually enter data through the UI. However, when importing bulk updates via CSV using the Data Import Framework, these validation rules are completely bypassed.
Our validation logic checks budget constraints and organizational hierarchy alignment. The CSV template includes all required fields, and the import completes successfully, but invalid data gets through:
ValidationRule: HC_BUDGET_CHECK
Trigger: onCreate, onUpdate
Context: WorkforcePlan.HeadcountForecast
Status: Active
I’ve verified the validation context mapping points to the correct entity. Is there a separate configuration needed for import validation versus UI validation? The asynchronous processing might be skipping validation checks entirely.
The problem is that your validation rule context is set for interactive sessions. For CSV imports, you need to add the import context to your validation rule definition. Go to Admin Center > Manage Business Configuration > Validation Rules and edit HC_BUDGET_CHECK. Under ‘Execution Context’, add ‘DATA_IMPORT’ alongside your existing contexts. Without this, the framework treats import operations as a separate workflow that doesn’t trigger UI-bound validations.
The synchronous versus asynchronous processing distinction is critical here. When you upload a CSV, the Data Import Framework defaults to asynchronous processing for performance reasons, especially with large files. This means validation rules configured for synchronous execution won’t fire. You have two options: either modify your validation rules to support async execution, or force the import job to run synchronously by setting the job parameter ‘processingMode=SYNCHRONOUS’ in the import configuration. Be warned though - synchronous imports are significantly slower for bulk data.
Thanks for the context suggestion. I checked the validation rule and the execution context only shows ‘UI_CREATE’ and ‘UI_UPDATE’. I don’t see a ‘DATA_IMPORT’ option in the dropdown though. Is this version-specific? We’re on H1 2023. Also, should the CSV template have any special headers or metadata to trigger validation, or is it purely backend configuration?
In H1 2023, the import validation framework requires both configuration changes and CSV template adjustments. First, your validation rules need the ‘IMPORT_VALIDATION’ flag enabled in the rule definition XML. Second, your CSV template must include a validation mode column. The template structure matters - if you’re using the standard template generator, it may not include validation triggers by default. I’d recommend regenerating your template from Admin Center with the ‘Enable Validation Checks’ option selected during template creation.
I encountered the same validation bypass issue during a workforce planning migration project. Here’s the complete solution that addresses all aspects:
1. Import Validation Configuration:
Navigate to Admin Center > Data Import Framework > Import Job Definitions. Edit your headcount forecast import job and enable ‘Run Validation Rules’ checkbox. Then add this configuration:
<validationConfig>
<mode>SYNCHRONOUS</mode>
<includeCustomRules>true</includeCustomRules>
</validationConfig>
2. Synchronous vs Asynchronous Processing:
For validation rules to trigger consistently, you need synchronous processing during the validation phase. Modify your import job to use a two-phase approach: synchronous validation followed by asynchronous data commit. This balances performance with data integrity.
3. Validation Context Mapping:
Your HC_BUDGET_CHECK rule needs proper context mapping. Edit the rule in Business Rules Engine and update the execution contexts:
Contexts: UI_CREATE, UI_UPDATE, IMPORT_CREATE, IMPORT_UPDATE
Scope: WorkforcePlan.HeadcountForecast
ValidationTiming: PRE_SAVE
The key is adding IMPORT_CREATE and IMPORT_UPDATE contexts, which aren’t visible in the UI dropdown but can be added via the Business Configuration XML editor.
4. CSV Template Requirements:
Regenerate your CSV template with validation enabled. Go to Workforce Planning > Import/Export > Generate Template. Check ‘Include Validation Metadata’ and ‘Enable Rule Execution’. Your CSV should now include these hidden columns:
- __VALIDATION_MODE (set to ‘STRICT’)
- __RULE_CONTEXT (set to ‘IMPORT_UPDATE’)
- __BYPASS_VALIDATION (set to ‘false’)
These columns don’t appear in the standard template but are required for import-time validation. You can add them manually to existing templates.
Additional Considerations:
-
Performance Impact: Synchronous validation increases import time by approximately 40-60% for large datasets. Consider breaking large imports into smaller batches.
-
Error Handling: Configure validation failure behavior in the import job. Set ‘validationFailureAction=REJECT_ROW’ to prevent invalid records from being imported while allowing valid records to proceed.
-
Audit Trail: Enable validation logging by setting ‘logValidationResults=true’ in the import configuration. This creates detailed logs showing which validation rules were evaluated and why records passed or failed.
-
Testing: After configuration changes, test with a small CSV containing both valid and invalid records to confirm validation rules fire correctly. Check the import job logs for validation execution confirmations.
This solution ensures your budget constraint and hierarchy alignment validations apply consistently across both UI and bulk import operations.
I’ve seen this exact issue before. The Data Import Framework uses a different validation pipeline than the UI. By default, bulk imports run in asynchronous mode which can bypass certain synchronous validation rules. Check your import job configuration - there should be a validation mode setting that needs to be explicitly enabled for custom rules.