The Generic EDI Invoice Import supports delimited text files (CSV, TSV, pipe-delimited, etc.) that are interpreted according to a JSON configuration. A full sample configuration can be found at the bottom of this page.
This allows almost any vendor invoice export to be imported without modifying code. The JSON configuration tells the importer:
- Whether the file contains a header row
- Which delimiter is used
- Which columns contain each field
- Whether columns are identified by index or column name
- How dates are formatted
- Whether prices require normalization
- How expense lines are detected
- Each row represents one invoice line item.
- Multiple rows with the same Invoice Identifier are combined into a single invoice.
- Name mapping allows columns to appear in any order.
- Index mapping requires columns to exactly match the configured positions.
- All required fields must be present for every line item.
- Optional fields may be omitted.
- Expense detection is evaluated using configured keywords, item identifiers, or explicit expense mappings before the line is imported as inventory.
- Any unused optional columns should be omitted from the configuration
- All number columns support up to 8 decimal places
- Bool columns support "true", "false", 0 and 1
- Returns should be provided with a negative quantity
- Any text field that will include special characters must be wrapped in double quotes and the text fields double quote duplicated to escape it appropriately for the parser
Example:
| InvoiceNumber | InvoiceDate | Item | Quantity | Price | Description | Size | PackSize | Store |
|---|---|---|---|---|---|---|---|---|
| 10001 | 2026-01-01 | ABC123 | 2 | 5.00 | Item 1 | CASE | "12x 1oz" | 9875 |
| 10001 | 2026-01-01 | XYZ200 | 1 | 10.50 | Item 2 | EA | 9875 | |
| 10002 | 2026-01-02 | AAA500 | 4 | 2.25 | Item 3 | EA | 9875 |
The importer supports any standard delimited text format. But this character must not be included in any field unless wrapped in double quotes.
Common delimiters include:
| Delimiter | Configuration Value |
|---|---|
| Comma | , |
| Tab | \t |
| Pipe | | |
| Semicolon | ; |
Example configuration:
{
"ColumnDelimiter": ","
}InvoiceNumber,InvoiceDate,Item,Quantity,Price,Description
10001,2026-01-01,ABC123,2,5.00,Item 1Configuration:
{
"HasHeader": true
}10001,2026-01-01,ABC123,2,5.00,Item 1Configuration:
{
"HasHeader": false
}The importer supports two mapping methods. Only one is supported at a time.
When the file contains column headers, enable name mapping. The below configuration includes the defaults that should be followed if possible. The right hand value should be updated to match the column names from your file.
{
"UseNameMapping": true
}Example:
{
"ColumnNameMapping": {
"InvoiceIdentifier": "InvoiceNumber",
"StoreIdentifier": "Store",
"AccountIdentifier": "Account",
"InvoiceDate": "InvoiceDate",
"InvoiceDueDate": "InvoiceDueDate",
"PurchaseOrderIdentifier": "PurchaseOrderNumber",
"InvoiceTotalAmount": "InvoiceTotalAmount",
"ItemQuantity": "Quantity",
"ItemPrice": "Price",
"ItemSizeIdentifier": "Size",
"ItemIdentifier": "Item",
"ItemDescription": "Description",
"ItemPackSize": "PackSize",
"AdditionalInformation": "AdditionalInformation",
"IsWeighted": "IsWeighted",
"ItemWeightedAmount": "ItemWeightedAmount",
"ItemUpc": "UPC",
"IsExpense": "IsExpense"
}
}With name mapping, the order of the columns does not matter.
When the file has no header row, map columns by their zero-based position. The right hand value should be updated to match the column index from your file.
{
"UseNameMapping": false
}Example file:
10001,Store1,2026-01-01,ABC123,Hamburger,2,5.00Configuration:
{
"ColumnIndexMapping": {
"InvoiceIdentifier": 0,
"StoreIdentifier": 1,
"AccountIdentifier": 2,
"InvoiceDate": 3,
"InvoiceDueDate": 4,
"PurchaseOrderIdentifier": 5,
"InvoiceTotalAmount": 6,
"ItemQuantity": 7,
"ItemPrice": 8,
"ItemSizeIdentifier": 9,
"ItemIdentifier": 10,
"ItemDescription": 11,
"ItemPackSize": 12,
"AdditionalInformation": 13,
"IsWeighted": 14,
"ItemWeightedAmount": 15,
"ItemUpc": 16,
"IsExpense": 17
}
}The following fields are required.
| Configuration Property | Description |
|---|---|
| InvoiceIdentifier | Unique invoice number |
| ItemIdentifier | Vendor item number or SKU |
| ItemDescription | Product description |
| ItemQuantity | Quantity purchased |
| ItemPrice | Unit Price for the item or line excluding any tax or fees |
| ItemSizeIdentifier | Item size such as each or case |
| ItemPackSize | Pack size such as "10 x 4lb rolls" this helps identify the unique item to the customer |
| StoreIdentifier | Store receiving the invoice |
The following fields may be included if available.
| Configuration Property | Description |
|---|---|
| AccountIdentifier | Vendor account number |
| InvoiceDate | Invoice date |
| InvoiceDueDate | Due date |
| PurchaseOrderIdentifier | Purchase order number |
| InvoiceTotalAmount | Invoice total |
| AdditionalInformation | Additional notes |
| ItemUpc | UPC barcode |
| IsWeighted | Indicates weighted item |
| ItemWeightedAmount | Weight of item. If IsWeighted is true, this will be used in place of Quantity |
| IsExpense | Explicitly identifies an expense line where the description is used as the expense name and quantity and price are multiplied to the get the total expense amount |
If dates are not in a standard format, specify the expected .NET date format.
Example:
{
"DateFormat": "MM/dd/yyyy"
}Examples:
| File Value | Format |
|---|---|
| 01/31/2026 | MM/dd/yyyy |
| 31-Jan-2026 | dd-MMM-yyyy |
| 2026-01-31 | yyyy-MM-dd |
If dates should be interpreted as UTC use the below configuration. If not Utc, a timezone id can be configured separately per site that is used to do the proper conversion for the site.
{
"IsUtc": true
}Otherwise:
{
"IsUtc": false
}Some invoice exports provide the extended line total rather than the unit price.
Example:
| Quantity | Price |
|---|---|
| 4 | 20.00 |
Enable automatic calculation of unit price:
{
"DividePriceByQuantity": true
}The importer calculates:
20.00 / 4 = 5.00If no size is supplied in the file:
{
"ItemSizeDefault": "EA"
}Every imported item will use:
EAInvoice rows can be imported as expenses instead of inventory items. It is highly recommended to supply a configuration for standard expense data to avoid the need for configuration for each implimentation.
Three methods are supported.
{
"ExpenseExactKeywords": {
"Freight": "Freight",
"Tax": "Sales Tax"
}
}If the description exactly matches one of the configured keys, the row is treated as an expense and the right hand value is used as the expense name.
Example:
Freight{
"ExpenseContainsKeywords": {
"fuel": "Fuel Surcharge",
"delivery": "Delivery Fee"
}
}If the description contains one of the configured keywords, it is imported as an expense and the right hand value is used as the expense name.
Example:
Fuel surcharge Julycontains:
fuel{
"ExpenseItemIdentifiers": {
"FRT": "Freight",
"TAX": "Sales Tax"
}
}If the item identifier matches one of the configured keys, the row is treated as an expense and the right hand value is used as the expense name.
Example:
FRTWhen using index column mapping, additional columns may be used as expense records while the item data is used as a standard line item. The left hand key identifies the index. The value of the column should be a decimal amount.
{
"ExpenseColumns": {
10: "Department",
11: "CostCenter"
}
}When using column name mapping.
{
"ExpenseColumns": {
"Department": "Department",
"CostCenter": "CostCenter"
}
}InvoiceNumber,Store,InvoiceDate,SKU,Description,Quantity,Price,UPC
10001,001,2026-01-01,ABC123,Hamburger Patty,2,12.50,123456789012
10001,001,2026-01-01,FRT,Freight,1,15.00,684615654165
10002,002,2026-01-02,XYZ500,French Fries,5,4.25,999888777666{
"HasHeader": true,
"UseNameMapping": true,
"ColumnDelimiter": ",",
"DateFormat": "yyyy-MM-dd",
"IsUtc": true,
"DividePriceByQuantity": false,
"ItemSizeDefault": "EA",
"ColumnNameMapping": {
"InvoiceIdentifier": "InvoiceNumber",
"StoreIdentifier": "Store",
"AccountIdentifier": "Account",
"InvoiceDate": "InvoiceDate",
"InvoiceDueDate": "InvoiceDueDate",
"PurchaseOrderIdentifier": "PurchaseOrderNumber",
"InvoiceTotalAmount": "InvoiceTotalAmount",
"ItemQuantity": "Quantity",
"ItemPrice": "Price",
"ItemSizeIdentifier": "Size",
"ItemIdentifier": "Item",
"ItemDescription": "Description",
"ItemPackSize": "PackSize",
"AdditionalInformation": "AdditionalInformation",
"IsWeighted": "IsWeighted",
"ItemWeightedAmount": "ItemWeightedAmount",
"ItemUpc": "UPC",
"IsExpense": "IsExpense",
},
"ExpenseItemIdentifiers": {
"FRT": "Freight"
}
}{
"HasHeader": false,
"UseNameMapping": false,
"ColumnDelimiter": ",",
"IsUtc": false,
"DividePriceByQuantity": false,
"ItemSizeDefault": "EA",
"ColumnIndexMapping": {
"InvoiceIdentifier": 0,
"StoreIdentifier": 1,
"AccountIdentifier": 2,
"InvoiceDate": 3,
"InvoiceDueDate": 4,
"PurchaseOrderIdentifier": 5,
"InvoiceTotalAmount": 6,
"ItemQuantity": 7,
"ItemPrice": 8,
"ItemSizeIdentifier": 9,
"ItemIdentifier": 10,
"ItemDescription": 11,
"ItemPackSize": 12,
"AdditionalInformation": 13,
"IsWeighted": 14,
"ItemWeightedAmount": 15,
"ItemUpc": 16,
"IsExpense": 17
},
"ExpenseItemIdentifiers": {
"FRT": "Freight"
}
}{
"Key": "{SUPPLIER NAME}-v1",
"Name": "{SUPPLIER NAME}",
"Version": 1,
"InvoiceConfiguration": {
"IsUtc": true,
"HasHeader": true,
"DateFormat": "yyyyMMdd",
"NameMapping": null,
"IndexMapping": {
"ItemUpc": 16,
"IsExpense": null,
"ItemPrice": 5,
"IsWeighted": 14,
"InvoiceDate": 7,
"ItemPackSize": 17,
"ItemQuantity": 4,
"ExpenseColumns": {
"8": "MISC",
"9": "MISC"
},
"InvoiceDueDate": null,
"ItemIdentifier": 2,
"ItemDescription": 3,
"StoreIdentifier": 1,
"AccountIdentifier": 1,
"InvoiceIdentifier": 6,
"InvoiceTotalAmount": 11,
"ItemSizeIdentifier": 18,
"ItemWeightedAmount": 15,
"AdditionalInformation": null,
"PurchaseOrderIdentifier": 10
},
"UseNameMapping": false,
"ColumnDelimiter": ",",
"ItemSizeDefault": null,
"ExpenseExactKeywords": {},
"DividePriceByQuantity": false,
"ExpenseItemIdentifiers": {
"FRT": "Freight"
},
"ExpenseContainsKeywords": {}
}
}The vendor should provide a sample export file as well as a json configuration following the above specifciation. Yellow Dog will validate and certify this export and configuration.