Here’s a comprehensive solution covering all three focus areas:
Forecast Entity Structure Changes in 10.0.43:
The DemandForecastEntity underwent significant restructuring to support the new planning optimization engine. Here’s the complete field mapping from 10.0.41 to 10.0.43:
Field Renames:
- ForecastDate → ForecastDateValue
- ForecastQty → ForecastQuantity
- ItemNo → ItemNumber
- SiteId → InventSiteId
- WarehouseId → InventWarehouseId
- UnitOfMeasure → UnitSymbol
New Mandatory Fields (were optional or didn’t exist):
- ForecastModelId (required - must reference active forecast model)
- AllocationKeyId (required - use “NONE” if not using allocation keys)
- PlanningOptimizationEnabled (boolean - must be true for new engine)
New Optional Fields:
- CustomerAccountNumber
- CustomerGroupId
- ForecastReductionPrinciple
- MinimumQuantity
API Payload Schema Update:
Old format (10.0.41):
{
"ItemNo": "D0001",
"ForecastDate": "2025-05-15",
"ForecastQty": 1000,
"SiteId": "1"
}
New format (10.0.43):
{
"ItemNumber": "D0001",
"ForecastDateValue": "2025-05-15T00:00:00Z",
"ForecastQuantity": 1000,
"InventSiteId": "1",
"ForecastModelId": "FORECAST2025",
"AllocationKeyId": "NONE",
"PlanningOptimizationEnabled": true,
"UnitSymbol": "EA"
}
Addressing API Payload Schema Mismatch:
- Update your payload builder to use new field names
- Add mandatory fields with appropriate defaults
- Implement ISO 8601 date formatting with UTC timezone
- Reduce batch size from 1000 to 500 records maximum
- Add validation for forecast model existence before upload
Recent Release Entity Updates:
The 10.0.43 release notes (often overlooked) document these changes under “Planning Optimization Integration”. Key updates:
- Entity validation moved from async (during planning run) to sync (at upload time)
- New composite key structure: ItemNumber + ForecastDateValue + ForecastModelId + InventSiteId
- Response payload now includes PlanningOptimizationStatus field
- Error messages are more descriptive but follow different format
Migration Strategy:
// Pseudocode for payload transformation:
1. Load legacy forecast data with old field names
2. Map each field to new schema (see mapping above)
3. Validate ForecastModelId exists in D365 master data
4. Convert dates to ISO 8601 with UTC offset
5. Add mandatory fields: AllocationKeyId="NONE", PlanningOptimizationEnabled=true
6. Batch into groups of 500 records maximum
7. POST to /api/data/v9.2/DemandForecastEntity
8. Parse new response structure for confirmation
Testing Checklist:
- Verify metadata retrieval: GET /data/$metadata?$filter=contains(name,‘DemandForecast’)
- Test single record upload with all mandatory fields
- Validate date format handling (try various timezones)
- Test batch upload with 500 records
- Verify forecast model validation (try invalid model ID)
- Check planning optimization integration in D365 UI
Important Notes:
- No backward compatibility - you must update immediately
- Old API endpoint (/data/DemandForecastEntity) still works but expects new schema
- Consider using /api/data/v9.2/ endpoint for better error handling
- Monitor the response payload - it now includes optimization metadata that can be useful for troubleshooting
This comprehensive update addresses the entity structure changes, payload schema requirements, and recent release modifications needed for successful forecast uploads in 10.0.43.