Invoices
Field mapping

SoftOne field mapping and templates

The mapping decides how a reviewed invoice becomes a SoftOne purchase document. When an invoice is sent, the document is built from the invoice data as reviewed and saved:

  1. The first active template that matches is used, otherwise the default mapping. The send dialog shows it under Mapping template.
  2. Header fields: one value per invoice (SERIES, TRDR, PAYMENT, TRNDATE, CMPFINCODE, COMMENTS).
  3. Lines fields: one set per line (LINENUM, SRCHCODE, QTY1, PRICE, DISC1PRC, COMMENTS1). Each line goes to item lines (ITELINES) or service lines (SRVLINES), never both.
  4. If a required value is missing or a lookup finds nothing, nothing is sent.

The preview on the Field Mapping tab runs the same code as sending.

Sources

Each row is a SoftOne field, a source and a value. Add rows with Add SoftOne field.

SourceWhere the value comes fromExample
Invoice fieldsText with invoice fields in curly braces{buyerCustomerCode} / {vendorInvoiceNumber}
LookupThe Suppliers table (header) or Item Codes table (lines)TRDR from {supplierVatNumber}
SettingA value from the Connection tabSERIES from the invoice series
Fixed valueThe same text on every document1

Rules: SERIES, TRDR, TRNDATE (header) and LINENUM, SRCHCODE, QTY1, PRICE (lines) are required. Only one Lookup per section. Each field appears once per section.

Formats

Add a format after a bar and chain several: {line.discountPercent|default:0}.

FormatDoes
|date:DD.MM.YYYYDate in that pattern (YYYY, YY, MM, DD)
|upper / |lower / |trimChange case, trim spaces
|before:: / |after:-Text before a colon / after a dash
|number:2Number with 2 decimals
|default:00 when the field is empty

Click a field in the sidebar to insert it. Line fields are written as line. plus the name.

Default mapping

Header: SERIES (Setting: invoice series), TRDR (Lookup {supplierVatNumber}), PAYMENT (Setting: default payment code), TRNDATE ({vendorInvoiceDate|date:YYYY-MM-DD}), CMPFINCODE ({vendorInvoiceNumber}), COMMENTS (empty).

Lines: LINENUM ({line.position}), SRCHCODE (Lookup {line.code|before::}), QTY1 ({line.quantity}), PRICE ({line.unitPrice}), DISC1PRC ({line.discountPercent|default:0}), COMMENTS1 (empty).

Preview

The right side shows What would be sent for the sample invoice (the latest read invoice). Red values are missing. Switch to Preview JSON for the raw document.

Templates

Use a template when some suppliers, or credit notes, need a different mapping.

  1. Click New template. The Default chip is the mapping for all other invoices.
  2. Set Template name, Document type (Any, Invoice or Credit note) and Suppliers (VAT numbers; empty means Any supplier). It needs at least a supplier or a document type, or it never matches.
  3. Edit its fields, keep In use on, save, then use Confirm Mapping again.

Templates are checked in list order and the first active match wins. A template that is off is skipped.