Use this reference to process customer orders created in YBM Connect. Each export contains the customer and delivery details followed by the ordered products, so your system can validate and process the order. YBM Connect creates the file and places it on your SFTP server after an order is submitted.
Processing workflow
- Receive the exported file from the configured SFTP destination.
- Wait until the file is completely available before reading it.
- Parse the order header and its single data row.
- Use the separator row to identify the start of the product section.
- Process one product row for each ordered product.
- Use
Vessel counttogether with the bundle fields when quantities are delivered in bundles.
Use a standards-compliant CSV parser. Do not split the file by newline alone: quoted values, including the delivery message, may contain commas and line breaks.
Sections
Our CSV order file format consists of two sections:
- Customer order information
- Ordered products
Both sections have the same number of columns, so that the file can always be opened manually for human inspection. The two sections are separated by a line consisting only by column separators.
The default export contains 14 columns in each section. This is export version
0. YourBarMate can also configure export version 1. The exact version is
agreed during the SFTP setup. Always process the header that is included in the
file rather than relying only on a fixed column count.
Make sure to split the file and process the order information separate from the product information.
YourBarMate generates this file after a customer submits an order and uploads it to the SFTP destination configured for your account. The file is an outbound order notification; do not upload it back to YourBarMate as a catalog or price file.
File format
- Encoding:
utf-8orlatin1(ISO 8859-1) - Newline:
\n - Delimiter:
,(comma) - Quoting: Cells with special characters like
,and\nare quoted with" - Escapes: The
"sign is escaped as a double""and the cell is quoted
Example: abc " def will become "abc "" def"
The user supplied message on the delivery in the first section is likely to contain newlines, while the message on the ordered products is a single line string.
If the file encoding is
utf-8(the default setting), the file contains a byte order mark.
The downloadable example shows the complete two-section structure, including the headers, separator and sample ordered products.
Row types
Each of the two sections has a header row. The first section has exactly one data row and the second section has one data row per ordered product.
- Order header row
- Order data row
separator- Products header row
- Product data row 1
- Product data row 2
- Product data row 3
Order header and data row columns
Delivery ID: The order identifierType: One of"DELIVERY"or"RETURN". A return uses the same file structure as a delivery.Customer ID: The customer IDCompany: The requesting company nameCost Center: The cost centerAddress: The delivery addressZip: The ZIP codeCity: The city nameCountry: The ISO country codeUser name: The name of the user who sent the orderUser email: The email address of the user who sent the orderScheduled date: The desired schedule date in the formatYYYY-MM-DDScheduled time: The optional desired schedule time in the formatHH:mmMessage: An optional message for the delivery provided by the user
In export version 1, the order section has the following 14 columns:
Delivery IDTypeCustomer IDCompanyAddressZipCityCountryUser nameUser emailScheduled date: The desired schedule date in the formatYYYY-MM-DDDelivery from: The start of the configured delivery windowDelivery until: The end of the configured delivery windowMessage: An optional message for the delivery provided by the user
Compared with export version 0, Cost Center is removed. The product section
remains unchanged.
Product header and data row columns
YBM Connect generates these order-file headers. Keep their exact names when
processing the export, including Item ID, Item name and Item count.
Delivery ID: The order identifier – this is the same as theDelivery IDin the header and is repeated on each product rowItem ID: The product identifierItem name: The product nameVessel size: The size of the product vessel in the specified unitVessel unit: One of"l","dl","cl","ml","kg","g"or"quantity"Order by: One of"vessel"or"kg"Item count: The count of bundles, vessels or kilos ordered. It is a whole number for vessel-based products. For products ordered by weight, it may be a fractional kilogram value.Bundle ID: The bundle identifier, if availableBundle type: See vessel and bundle typesBundle size: The number of vessels in the bundleVessel count: The total count of vessels (Item count * Bundle size)Price: The expected unit price, e.g.1234.56Price per: One of"vessel","l","kg"or"100g"Message: An optional message for the product provided by the user
For example, an order for two cartons containing six bottles each has
Item count = 2, Bundle size = 6 and Vessel count = 12. If no bundle is
used, Item count is the number of individual vessels and Vessel count is
the same quantity.
For a return, use the Type value from the file to identify the transaction.
Do not infer a return from a negative quantity: quantities are exported using
the normal count fields.
File names
The SFTP setup defines the destination path and file name pattern. The pattern may contain these placeholders:
${type}:deliveryorreturn${id}: the order ID${date}: the creation date inYYYY-MM-DDformat${time}: the creation time inHHmmssformat
Use the generated file name and Delivery ID to identify an order. The file is
an export from YBM Connect and does not require a response file.