Map invoice lines from the buyer's goods receipt
apply_goods_receiptChanges data: reads the buyer's own goods receipt on a shipment (a document that list_documents shows with goods_receipt true: the pre-albaran the buyer keyed into its ERP from the supplier's invoice), pairs each of its rows with the invoice line it came from, and gives the line the article the buyer keyed, as the person who connected this app, recording it in the organization's audit log. That replaces the article the line had matched on its own and is learned: the supplier's code for that part is mapped to the article from then on. A line a person already confirmed with another article is left alone, a code already confirmed for another article is reported as a conflict and not replaced, and rows that pair with no line are skipped. The buyer's shipment number becomes the shipment's ERP reference when it has none. Use it only when the user asks to map a goods receipt, and say which document first. Only for an organization that keeps a product catalogue. Applying it again maps nothing more. Nothing is sent and no AI is called. Answers with how many rows paired, how many lines were mapped and how many conflicts. Get the document_id from list_documents.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_id": "<document_id>"
},
"name": "apply_goods_receipt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | A document id such as "doc_45", as returned by list_documents. |