Scrape orders
AI-generatedSummary
Scrapes DMS sale orders and their line details by opening the order list, optionally filtering by date, and visiting each order. Returns results on the Success output and sends failures to the Error output.
Inputs
- Max Orders Per Run — Maximum number of orders to scrape; defaults to 5. Set to 0 to continue across pages until no next page is available, subject to the scraper’s internal page and run limits.
- Order Date From — Optional start date filter for DMS orders, such as 22/05/2026. Empty keeps the DMS default; ISO dates are converted to day/month/year for the Vietnamese locale.
- Order Date To — Optional end date filter for DMS orders, such as 22/05/2026. Empty keeps the DMS default; ISO dates are converted to day/month/year for the Vietnamese locale.
- Storage State File — Host/container path for loading and saving the browser session state, including cookies. Defaults to /home/node/.n8n/dms-import/storage-state.json.
- Progress File — Path for a JSON progress snapshot written during the run. Defaults to /home/node/.n8n/dms-import/dms-progress.json.
- Log File — Path for an append-only JSONL diagnostic log. Defaults to /home/node/.n8n/dms-import/dms-run.jsonl.
Output shape
Two outputs: Success returns one n8n item containing a SaleOrders array and an _dmsProgress object; Error returns one item with an error object when scraping fails.
Each SaleOrders entry contains available order header fields (Code, OrderDate, CustomerCode, CustomerName, RouteCode, RouteName, TaxCode, Address, Saleman) and, when extracted, OrderDetails with item, quantity, price, discount, and tax fields. An empty order list returns SaleOrders: []. Orders that fail individually are logged and skipped; a run can still return the orders extracted successfully. A date-filtered empty result is raised as an error. Credentials for DMS login are required.