This article explains how to use the coding editor to handle invoice coding with many lines or many line splits.

While certain invoices are small, simple, and are processed manually without effort, you may have to code invoices involving a large number of line splits or a large number of lines to code, that require time-consuming manual processing. Use the coding editor in the following cases:

  • You have received a large invoice (500 lines), and you have to assign different codes to the lines (e.g. different cost centers).
  • You have received an invoice with one line, which needs to be split into 60 lines (e.g. different cost centers).

The coding editor allows you to code your invoice directly in the coding editor table grid or copy your coding data from a spreadsheet and paste it into the table grid. When you apply the coding data from the coding editor to the invoice, the data is validated before applied to the invoice, combining the flexibility of the spreadsheet for your coding task with an extra validation on the Tradeshift platform, in order to remove potential errors.


Splitting a line on an invoice

The flow below describes the scenario in which you split a line on an invoice, using the coding editor. How you do it:

  1. In Task Manager, open the invoice assigned for coding.
  2. On your working spreadsheet, fill in the cells with the appropriate data for the line splits. The coding editor supports pasting data from excel files and Google spreadsheets. Make sure to copy only the coding data, not the column headers, as they are already available in the coding editor. Line splits are created by adding the specific line ID from the invoice to the lines that you want to split. You always have to add the line ID from the invoice, when using the coding editor.
  3. On the open invoice, navigate to the Coding Editor Table tab.
  4. Paste the data from the spreadsheet to the Coding Editor Table tab. You can paste all the data or you can paste specific rows and/or columns, as needed.


Note: Make sure you click Apply before switching between the Coding Editor Table tab and the Document tab when working with data added to the coding editor. Otherwise, your data will be lost when you return to the Coding Editor Table tab.

  1. Click Apply. When you click Apply, the coding editor validates the data against your coding configuration. If the data are correct, you are redirected to the Document tab of the invoice viewer, where you can view the line on the invoice split according to the data processed in the spreadsheet.

    If no errors or warnings are detected in the coding editor, you are redirected to the invoice and the platform displays a message informing you that the coding was applied successfully.



CSV download







The coding data in the editor, including the document line coding and splits, can be downloaded in CSV file format for manipulation in spreadsheets.



You can access this option from the Coding editor table, under Document Options, and then selecting Download as from the drop-down.



You can then amend and upload the file, to save time.



Note that the CSV will contain a Line description and Line name to enable you to identify items. These cannot be copied into the coding editor, because they are read-only.



Handling an invoice with errors and warnings

When you try to apply coding to an invoice with errors, you will receive an error notification. Coding is saved but you cannot assign the invoice for approval before the errors are corrected.

If an error occurs and the data require corrections, the coding editor will highlight the cells that require changes, and it will display details on the type of error, at the top of the table.

The coding validation creates an error when the Line ID, Quantity Split, and Amount Split columns fail validation. An example of an error could be that the line id in the table does not match with the line id on the document or that the table line amount is larger than the invoice line amount.

In case you try to apply coding where the coding entries do not match the coding lists or the coding entries are not compatible with the coding list configuration, a warning message will be displayed for the affected coding entries.

You can review the warning messages to correct the coding entries in the table or go to the document. The difference between a warning and an error is that you can assign an invoice for approval if it includes a warning, but you cannot assign it if includes errors. Thus, you have the flexibility to handle exceptions in coding tasks and to carry on with workflow, without being blocked by coding list restrictions.

When the coding validation process reveals an issue with the coding configuration and coding entries, a message is displayed on the status board and the affected cells are highlighted in yellow.


The coding validation takes several variables into consideration, in order to trigger a warning. The warning is triggered when:

  • A coding entry is not part of the coding list;
  • A coding entry is missing from a mandatory coding list;
  • A coding entry is missing from a coding list group;
  • Multiple coding entries have been added to a coding list group;
  • A coding entry does not match the filter from another coding list.

The number of coding lines that can be uploaded to a document with the coding editor is limited to 3,000 lines of coding.


Feature limitations:

  • The coding editor only works for invoice coding, it does not work for purchase requests or credit notes.
  • The coding editor is not compatible with mobile phones or tablets.
  • Currently, header line level coding is not supported.
  • The coding editor is not supported by the legacy invoice viewer - it is only supported by Tradeshift.Invoice