Info about SubmitBatchOrder()/SubmitBatchOrder2() functions:
- A batch needs to contain at least one order, 1000 maximum per batch.
- An order needs to contain at least one line.
- SubmitBatchOrder() rejects the whole batch if one of the order has error.
- SubmitBatchOrder2() accepts the batch even if some orders have error. Analyze the status returned by the function to find out which order has problem (see sample code).
Mandatory fields in batch header:
- Location ("FR" or "LA").
Mandatory fields in order header:
- Order Number
- Account Number
- ShipTo
- ShipTo.Attention or ShipTo.Company
- ShipTo.Address1
- ShipTo.City
- ShipTo.Country
- ShipTo.StateProvince (only if county is "US" or "CA")
- ShipTo.PostalCode (only if county is "US" or "CA")
- BillTo not required. If present, same mandatory fields as ShipTo.
- FreightAccount
- ConsigneeNumber only if FreightAccount = "00000", otherwise leave blank.
- ShippingCarrier
- ShippingService
Mandatory fields in order detail:
- ItemNumber
- Quantity (>= 1)
There are different validations also, like size of fields or content:
- The AccountNumber must belong to the user that logs in.
- Country ISO code
- ShipVia & ShipService as set up on our system
- OrderNumber must be never used before
- PartNumber as set up on our system
- DoNotShipBefore (when specified) must be today or future date (default today)
- ShipBy (when specified) must be tomorrow or future date (default tomorrow)