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:
- The first active template that matches is used, otherwise the default mapping. The send dialog shows it under Mapping template.
- Header fields: one value per invoice (
SERIES,TRDR,PAYMENT,TRNDATE,CMPFINCODE,COMMENTS). - 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. - 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.
| Source | Where the value comes from | Example |
|---|---|---|
| Invoice fields | Text with invoice fields in curly braces | {buyerCustomerCode} / {vendorInvoiceNumber} |
| Lookup | The Suppliers table (header) or Item Codes table (lines) | TRDR from {supplierVatNumber} |
| Setting | A value from the Connection tab | SERIES from the invoice series |
| Fixed value | The same text on every document | 1 |
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}.
| Format | Does |
|---|---|
|date:DD.MM.YYYY | Date in that pattern (YYYY, YY, MM, DD) |
|upper / |lower / |trim | Change case, trim spaces |
|before:: / |after:- | Text before a colon / after a dash |
|number:2 | Number with 2 decimals |
|default:0 | 0 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.
- Click New template. The Default chip is the mapping for all other invoices.
- 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.
- 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.