An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
prebuilt-payStub.us already defines YearToDateTaxes, so read that field directly; when it is absent or the YTD value is assigned to CurrentPeriodTaxes, treat the result as an extraction error and reject or review it rather than accepting the mislabeled value.
Schema and version
The 2024-11-30 payStub schema includes these distinct numeric fields:
-
CurrentPeriodTaxes -
YearToDateTaxes -
CurrentPeriodNetPay -
YearToDateNetPay
Therefore, query fields are not required merely to obtain YTD taxes. The documented GA combination is:
- Model:
prebuilt-payStub.us - API:
2024-11-30 - Locale:
en-us
The official page points to the corresponding 2024-11-30-ga/pay-stub.md schema and does not document a newer GA payStub version.^1^
For your examples:
- A value printed beside YTD Taxes should be returned as
YearToDateTaxes, notCurrentPeriodTaxes. - If the document has no consolidated current-period tax value,
CurrentPeriodTaxesshould not be trusted merely because the model populated it. -
YearToDateNetPayis also a native schema field. The returned629.97versus the printed3,855.14is another field-level extraction mismatch, not evidence that the field is unsupported.
Query-fields fallback
As a mitigation, submit explicit query fields such as YearToDateTaxes, CurrentPeriodTaxes, and YearToDateNetPay. Query fields can extend a prebuilt schema or request fields under explicit names. They are a priced add-on, support at most 20 fields per request, and should be validated against your document formats.^2^
For REST:
curl -i -X POST \
"{endpoint}/documentintelligence/documentModels/prebuilt-payStub.us:analyze?api-version=2024-11-30&features=queryFields&queryFields=YearToDateTaxes,CurrentPeriodTaxes,YearToDateNetPay" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: {key}" \
--data-ascii '{"urlSource":"{document-url}"}'
The POST returns 202 with an Operation-Location; retrieve the completed JSON using the result URL or the Get Analyze Result operation.^3^
Keep query-field results separate from native-schema results during evaluation. If both are returned, compare:
- Native
YearToDateTaxes - Queried
YearToDateTaxes - Native
CurrentPeriodTaxes - Queried
CurrentPeriodTaxes - Their source text, confidence, and location
Query fields are an extraction fallback, not a guarantee that visually adjacent current/YTD columns will always be classified correctly.
Recommended validation
Validate semantic placement in addition to confidence:
- Inspect
content
Confirm the text associated with each field contains the expected amount. - Inspect
boundingRegions
Verify thatCurrentPeriodTaxespoints to the current-period column andYearToDateTaxespoints to the YTD column. Reject the field if its polygon falls under the wrong heading. - Check field presence rules
If the source contains no aggregate current-tax field, returnnullor flag the model-generated value for review rather than treating it as authoritative. - Apply cross-field checks
Where the pay-stub layout supports them, compare gross pay, deductions, taxes, and net pay. Use these checks to flag discrepancies, not to overwrite printed values automatically, because payroll layouts differ. - Route ambiguous results for review
Trigger review when a field is missing, has low confidence, overlaps the wrong column, duplicates another field’s amount, or fails your payroll arithmetic tolerances.
Known-issue and escalation status
The current Document Intelligence known-issues page does not list a payStub-specific issue for CurrentPeriodTaxes, YearToDateTaxes, or YearToDateNetPay.^4^ That does not make the observed mapping correct; it means there is no published service-confirmed issue or documented upgrade that can currently be cited as resolving it.
If query fields and post-validation do not produce acceptable results, open an Azure support request and include:
- Synthetic sample files
- Complete analyze JSON responses
- Resource region
- Model ID and API version
- Expected field-to-value mappings
- The relevant field
content, confidence, andboundingRegions - Reproduction results from Document Intelligence Studio and REST/SDK
This gives the product team enough evidence to assess the samples as a payStub model-quality defect.
References