Description
Currently, the query_fields parameter in the begin_analyze_document API allows us to specify high-level fields such as Address or InvoiceNumber.
For example:
poller = document_intelligence_client.begin_analyze_document(
"prebuilt-layout",
AnalyzeDocumentRequest(url_source=formUrl),
features=[DocumentAnalysisFeature.QUERY_FIELDS],
query_fields=["Address", "InvoiceNumber"],
)
This works well for document-level fields.
However, I would like to specify query fields for each line item (product) in an invoice. For instance, in the attached sample invoice, I need to extract IGST Rate and IGST Amount for each line item in the product table.
Problem
At the moment, query_fields seems to only work for top-level fields and does not allow targeting fields inside a repeating structure like invoice line items.
Request
-
Is there a way to define query fields at the line item (per product) level?
-
If not, can support for item-level query fields (e.g., tax percentages, amounts, discounts per line item) be added in a future release?
Example Use Case
For an invoice line item table:

I want to query and extract IGST Rate and IGST Amount along with other line item details.
Description
Currently, the
query_fieldsparameter in thebegin_analyze_documentAPI allows us to specify high-level fields such asAddressorInvoiceNumber.For example:
This works well for document-level fields.
However, I would like to specify query fields for each line item (product) in an invoice. For instance, in the attached sample invoice, I need to extract IGST Rate and IGST Amount for each line item in the product table.
Problem
At the moment,
query_fieldsseems to only work for top-level fields and does not allow targeting fields inside a repeating structure like invoice line items.Request
Is there a way to define query fields at the line item (per product) level?
If not, can support for item-level query fields (e.g., tax percentages, amounts, discounts per line item) be added in a future release?
Example Use Case
For an invoice line item table:
I want to query and extract
IGST RateandIGST Amountalong with other line item details.