Operations and CLI
Magento cron handles normal PunchOut cleanup, inbound-order retries and document delivery. The CLI commands are intended for monitoring, controlled recovery and deployments where an operator needs to process one document type explicitly.
Run all commands from the Magento project root.
Inspect the document queue
php bin/magento punchout:queue-status
The command groups queue entries by document type and status. It does not change any records.
Reconcile and send invoices
php bin/magento punchout:send-invoices --batch-size=100
Magento first recreates missing invoice queue entries for eligible PunchOut orders, then processes due invoice entries. Use a smaller batch during an investigation.
Reconcile and send ship notices
php bin/magento punchout:send-ship-notices --batch-size=100
This performs the same workflow for shipment-based ShipNoticeRequest documents.
Both send commands accept:
| Option | Effect |
|---|---|
--batch-size, -b |
Limits reconciliation and processing to a positive number of documents. The default is 100. |
--skip-reconcile |
Processes existing due queue entries without reconstructing missing entries. |
Understand the cron jobs
| Job | Schedule | Purpose |
|---|---|---|
punchout_cleanup_expired_contexts |
Every 15 minutes | Removes expired browser-session contexts. |
punchout_document_queue_process |
Every 5 minutes | Processes due confirmation, ship-notice and invoice entries. |
punchout_inbound_order_process |
Every 5 minutes | Retries eligible inbound orders. |
punchout_cleanup_retention |
Daily at 02:00 | Applies configured trace, replay, snapshot, inbound-order and queue retention. |
Do not run a send command repeatedly to bypass a delivery_unknown state. Check the receiving platform first, then use the protected Admin action when a deliberate retry is safe.