CreatePurchaseOrdersFromRestockSuggestionsCommandResponse
Creates purchase orders from restock suggestions in one transaction, all of them or none: one purchase order per supplier and warehouse of the request lines, with their lines in the order of the request. Every order is created as ‘CreatePurchaseOrder’ creates an order to a warehouse: company, requested delivery date, prices, tax rates and the discount, freight and minimum quantity surcharge lines follow the supplier’s conditions. At most 1000 lines; an item may appear only once per supplier and warehouse. The lines are not checked against a calculation, and the purchase list is not touched. A command over several purchase orders, so that the orders of one decision are created together or not at all. Raises the workflow event ‘created’ of every new order; an order that starts released also raises ‘changed’ and ‘released’. A line that cannot be ordered refuses the whole call with RESTOCK_SUGGESTION_LINES_NOT_ORDERABLE; ‘extensions.blockers’ then has one entry per refused line with its reason as ‘code’, the line’s position in the request (from 0) as ‘lineIndex’ and its ‘clientId’. Available in GraphQL only. Errors arrive as GraphQL errors with the code in ‘extensions.code’; a refusal because of the current state also lists every reason in ‘extensions.blockers’. Codes: RESTOCK_SUGGESTION_LINES_REQUIRED, RESTOCK_SUGGESTION_LINE_LIMIT_EXCEEDED, RESTOCK_SUGGESTION_LINE_DUPLICATE, CLIENT_ID_NOT_UNIQUE or VALIDATION_FAILED (no line, more than 1000 lines, an item twice for one supplier and warehouse, a client identifier twice, or the request is invalid otherwise, for example a quantity of 0 or less); RESTOCK_SUGGESTION_LINES_NOT_ORDERABLE (at least one line cannot be ordered; its blocker names the reason: SUPPLIER_NOT_FOUND, WAREHOUSE_NOT_FOUND, ITEM_NOT_FOUND, SUPPLIER_INACTIVE, SUPPLIER_CURRENCY_NOT_RESOLVABLE, SUPPLIER_LANGUAGE_NOT_RESOLVABLE, WAREHOUSE_NOT_USABLE (inactive or a drop shipping target), ITEM_INACTIVE, ITEM_IS_VARIATION_PARENT, ITEM_IS_BILL_OF_MATERIALS or ITEM_NOT_ASSIGNED_TO_SUPPLIER). - Response
CreatePurchaseOrdersFromRestockSuggestionsCommandResponseFields
The new purchase orders, in the order of their first request line.
Was this page helpful?