Vendor Posting Templates
Vendor Posting Templates control how incoming e-document lines are posted to Business Central — which G/L account, item, dimension, job, and approval workflow applies to each line. The system uses a multi-level priority hierarchy to determine the most specific applicable template, falling back to less specific rules when no exact match is found.
You configure a template once and the system applies it automatically when invoices arrive. Every template can define:
- Which G/L account (or Item, Resource, Charge) to post the cost to
- Which dimensions (e.g. Department, Cost Centre) to apply
- Which Job/Project to allocate the cost against
- Whether the invoice should be automatically processed or held for approval
- Whether an approval workflow should be triggered
For the full Vendor Posting Setup system (primary key matching, line splitting, conditional rules), see Posting Setup.
When to use a template
| Scenario | Template helps? | Why |
|---|---|---|
| All invoices from a vendor always post to the same G/L account | Yes | Set the G/L account once on the template |
| Invoices carry Accounting Cost codes that map to cost centres | Yes | Use Advanced Templates with reference matching rules |
| Invoices should be automatically turned into a Purchase Invoice | Yes | Enable Automatically Process Invoice on the template |
| Invoices require a specific person’s approval | Yes | Set the Approval User on the template |
| Expenses should be spread across accounting periods | Yes | Assign a Deferral Code on the template |
| Invoices relate to a specific project/job | Yes | Set Job No. and Job Task No. on the template |
When you would NOT use a template
| Scenario | Why |
|---|---|
| Standard BC Posting Setup already handles G/L account assignment | The system falls back to the standard posting setup |
| Invoices always require manual review and account coding | Manual processing is the intention — no automation wanted |
| Vendor sends unpredictable invoices that don’t follow a pattern | A template would force a fixed posting that may be wrong |
| You use BC’s purchase order matching to receive invoices | The matched PO lines already carry the correct posting information |
If the Don’t use Posting Setup and Template on Inbound Lines flag is enabled in Purchases & Payables Setup, templates are bypassed entirely for all vendors.
How template selection works
When an e-document arrives, the system resolves which template applies in two stages:
Stage 1 — Select the template
The system looks up the template to use for the vendor:
- If a Vendor Accounting Cost Setup record exists for (Vendor No. + Accounting Cost from document header) → use the template assigned there
- Otherwise → use the Posting Template field on the Vendor card
Stage 2 — Select the posting setup within the template
Once a template is selected, the system finds the most specific posting setup for each document line using a cascading priority:
| Priority | Vendor No. | Item Sellers ID | Accounting Cost Line | Notes |
|---|---|---|---|---|
| 1 (highest) | Specific | Specific | Specific | Exact 3-way match |
| 2 | Specific | Specific | (blank) | Vendor + item, any cost |
| 3 | Specific | (blank) | Specific | Vendor + cost, any item |
| 4 (lowest) | Specific | (blank) | (blank) | Vendor-wide default |
Blank fields in a setup record act as wildcards — they match any incoming value. The system picks the first (most specific) match.
Full resolution flow
flowchart TD
A["E-document arrives"] --> B["Vendor identified"]
B --> C{"Vendor Accounting Cost Setup\nexists for Vendor + Accounting Cost?"}
C -- Yes --> D["Use template from\nVendor Accounting Cost Setup"]
C -- No --> E["Use template from\nVendor card"]
D --> F["Template assigned to document"]
E --> F
F --> G["For each document line:\nfind posting setup in cascade order"]
G --> H["1. Vendor + ItemID + CostLine\n2. Vendor + ItemID + (any)\n3. Vendor + (any) + CostLine\n4. Vendor + (any) + (any)"]
H --> I{"Advanced Template\nconditions match?"}
I -- Yes --> J["Apply advanced\ntemplate values"]
I -- No match --> K["Apply base\nsetup values"]
J --> L["Post with destination, dimensions,\njob, deferral, approval settings"]
K --> L
What a template controls
Each template (base or advanced) defines the following for matched lines:
Posting destination
| Field | Description |
|---|---|
| Type | G/L Account, Item, Resource, Charge (Item), Allocation Account, Fixed Asset |
| No. | The specific account/item/resource number |
| Posting Description | Description written to ledger entries |
Dimensions
| Field | Description |
|---|---|
| Shortcut Dimension 1 Code | Global dimension 1 value |
| Shortcut Dimension 2 Code | Global dimension 2 value |
| Dimension Set ID | Full dimension combination |
Project posting
| Field | Description |
|---|---|
| Job No. | Project number to post against |
| Job Task No. | Specific project task |
| Deferral Code | Deferral template for spreading costs across periods |
Approval and workflow
| Field | Description |
|---|---|
| Require Approval | Forces approval before posting |
| Approval User | Specific user assigned as approver |
| Use Approval User Manager | Route to the user’s manager instead |
| Workflow User Group Code | Assign to a workflow group |
| Require Four Eyes | Requires a second approver |
| Four Eyes Limit (LCY) | Amount above which four-eyes kicks in |
| Four Eyes Approver | The second approver |
| 4Eyes Workflow User Group Code | Workflow group for second approval |
Cost spread
| Field | Description |
|---|---|
| Percent Spread | Percentage used to spread costs across accounting periods. When documents are sent to Wise Approvals, this value is included to give approvers context for cost validation. |
Automation
| Field | Description |
|---|---|
| Automatically Process Invoice | Auto-processes when received |
| Automatic Appr. Post of Inv. | Auto-approves and posts |
| Automatic Posting of Invoices | Auto-posts after approval |
| Receive E-Document To | Target document type: None, Purchase Order, or Purchase Invoice |
Line behaviour
| Field | Description |
|---|---|
| Map Values Instead Post Setup | Replaces specific field values rather than the full posting setup (see Value mapping below) |
| Overwrite Line Values | Overwrites existing line values with template values |
| Only if VAT is same | Only apply if VAT rate matches |
| Approve Warning for all Lines | Shows warning on all lines during approval |
| Allowed Var from Last Invoice | Percentage variance allowed vs. last invoice before flagging |
Advanced Templates (conditional routing)
Within a posting setup, you can define Advanced Vendor Posting Templates — conditional overrides that activate only when specific line-level criteria are met.
Each advanced entry has a list of reference conditions. The system evaluates every condition:
- All conditions pass → the advanced template is used instead of the base setup
- Any condition fails → the system moves to the next advanced entry
- No advanced entry matches → the base setup applies
Available matching fields
| Reference Name | What It Matches |
|---|---|
| VendorNo | Vendor number |
| ItemSellersIdentification | Vendor’s item/product identifier |
| AccountingCostLine | Accounting cost on the line |
| AccountingCostHeader | Accounting cost on the document header |
| LineVatCategory | VAT category code on the line |
| LineVATPercentage | VAT percentage on the line |
| AdditionalItemProperty | Custom item property from the XML |
| CommodityClassification | Commodity/product classification code |
| ItemName | Item description/name |
| DocumentReference | Document reference field |
| OrderReference | Order reference from document |
| BuyerReference | Buyer reference from document |
| HeaderNote | Note on the document header |
| LineNote | Note on the document line |
Matching operators
Each condition supports two modes:
- Contains mode (
Contains = true) — the line value must contain the reference value as a substring. Case-insensitive. - Operand mode (
Contains = false) — comparison using:=,<>,>,>=,<,<=
If no conditions of a given reference type are defined, that reference type is ignored (passes automatically). All defined conditions across all reference types must pass simultaneously.
Example: Accounting Cost routing
You have a facilities vendor. Their invoices arrive with Accounting Cost codes on each line:
| Accounting Cost on invoice line | Posts to | Dimension |
|---|---|---|
FAC-CLEAN | G/L 6100 – Cleaning Services | Dept: Operations |
FAC-MAINT | G/L 6200 – Maintenance | Dept: Operations |
FAC-SECURITY | G/L 6300 – Security | Dept: Admin |
You create one base template for this vendor, then three Advanced Template entries — each with a reference rule matching the Accounting Cost value to its corresponding G/L account and dimension.
Value mapping
When Map Values Instead Post Setup is enabled on a template, the system uses Template References to replace specific field values on the line rather than redirecting the entire posting destination.
This is useful when you want to keep the vendor’s existing posting setup but override specific dimensions, types, or account numbers based on line content.
Each mapping rule specifies:
- Reference Name — which incoming line field to read
- Item Key — the specific key within that reference
- Value to Replace — which output field to set (Type, No., Dimension 1–8, etc.)
Common configuration scenarios
Single vendor, single account — Set the Posting Template on the Vendor card with one posting setup using blank Item ID and blank Accounting Cost. All lines from that vendor post to the same account.
Vendor with multiple product lines — Create posting setups with different Item Sellers Identification values. Lines from that vendor route to different accounts based on the product code in the XML.
Accounting cost routing — Use Vendor Accounting Cost Setup to assign different templates based on the accounting cost field in the document header. Useful when a single vendor sends invoices for different departments.
Conditional override by VAT rate — Create an advanced template entry with a LineVATPercentage reference condition. Lines at a specific VAT rate post to a different account than the base setup.
Commodity-based routing — Use CommodityClassification as a reference condition to route lines with specific product class codes to dedicated G/L accounts, without needing the vendor to send a structured item ID.
Four-eyes for high-value invoices — Enable Require Four Eyes on a template and set Four Eyes Limit (LCY). Invoices above the threshold automatically require a second approval from the designated four-eyes approver.
Best practices for high-volume environments
If you process a high volume of invoices daily from mostly the same vendors, the goal is to touch as few invoices as possible manually. Your setup effort is front-loaded — get the templates right once, and volume becomes irrelevant.
The system processes invoices every 5 minutes via a job queue. If your templates are set up correctly, the vast majority of invoices go from “arrived” to “purchase invoice created” (or “sent to approval”) without anyone touching them.
Tier your vendors by complexity
| Vendor type | Recommended setup |
|---|---|
| Simple, high-volume (e.g. one supplier, always same G/L) | Single Vendor Posting Template with Automatically Process Invoice = true |
| Same vendor, multiple cost centres (different Accounting Cost codes per invoice) | Vendor Account Cost Setup — one template per Accounting Cost code |
| Same vendor, mixed goods/costs (line-level variation) | One base template + Advanced Templates with reference rules matching the cost code or item |
| Infrequent or unpredictable vendors | No template — let them land in the inbox for manual coding |
Template setup for repeat vendors
1. Enable Automatically Process Invoice
Invoices arrive, the job queue picks them up within 5 minutes, and a Purchase Invoice is created automatically. No one needs to open the document.
2. Use Advanced Templates for line variation
If the same vendor sends invoices with different Accounting Cost codes per line (e.g. DEPT-IT, DEPT-HR), set up an Advanced Template entry per code. Each entry maps to its own G/L account and dimension. The system evaluates them top-to-bottom and applies the first match.
3. Set dimensions on the template, not per invoice
For each vendor/cost combination, define the dimensions (Department, Cost Centre, etc.) once on the template. With Overwrite Line Values = true, the template dimensions will win even if the incoming document has something different — good for vendors whose PEPPOL files don’t carry reliable dimension data.
4. Use Deferral Codes for subscriptions and maintenance
Any recurring service invoices (SaaS, maintenance contracts, insurance) — assign a Deferral Code on the template. The expense splits automatically across the relevant periods without manual journals.
Approval strategy
At high volume you cannot approve every invoice individually. Think in tiers:
| Tier | Configuration | Result |
|---|---|---|
| Trusted vendors under a threshold | Automatic Posting of Invoices = true, no approval required | Invoice posts straight to G/L |
| New vendors or over threshold | Assign an Approval User or Workflow User Group on the template | Invoice goes to approval automatically, posting is still hands-off |
| High-value or sensitive costs | Require Four Eyes on the template | Two approvers required before posting |
Approval routing is configured on the template, not decided invoice by invoice. The person approving sees a clean purchase invoice already coded correctly — they just approve or reject.
When NOT to template
| Situation | Why |
|---|---|
| Vendor sends only occasional, ad-hoc invoices with no consistent coding pattern | A fixed template would apply the wrong G/L account. Let it land in the inbox for manual review. |
| You receive a purchase-order-backed invoice | The PO lines already carry the G/L account and dimensions. Forcing a template over them with Overwrite Line Values would corrupt the matching. Leave without a template, or ensure Overwrite Line Values is off. |
| Vendor’s invoice structure is unreliable (missing cost codes, inconsistent VAT) | Template matching may fail or produce wrong results. Keep manual until the vendor cleans up their data. |
Monitoring at scale
Check the Error queue first. Any invoice that failed auto-processing lands in Error status with an error description. These are usually caused by a missing template, an unrecognised cost code, or a validation field not matching. Fix the root cause (add the missing Advanced Template entry, or correct the vendor setup) — not the individual invoice.
Use bulk updates when you fix a template. When you change a template that is already assigned to pending invoices, the system will offer to re-apply the updated template to all inbound documents in New status for that template. Accept this — it prevents a mix of old and new coding on the same day’s invoices.
If the same error repeats across multiple invoices, that is a setup gap. A new Accounting Cost code is showing up that has no Advanced Template entry. Add the entry once and it resolves all matching invoices immediately.
Setup checklist for a repeat vendor
- Create a Vendor Posting Template — set G/L account, dimensions, Job if applicable
- Enable Automatically Process Invoice
- Set approval routing (user, group, or none) based on risk/value
- Add Advanced Template entries for each Accounting Cost variant the vendor sends
- If multiple cost codes can arrive on the same vendor, add Vendor Account Cost Setup rows linking each cost code to the right template
- Enable Deferral Code for any recurring expense vendors
- Leave Overwrite Line Values off for PO-matched vendors, on for non-PO vendors
Related pages
- Posting Setup — Vendor Posting Setup primary key matching and line splitting
- Approval Setup — approval workflow configuration
- Four-Eyes Principle — dual authorisation setup
- Auto Processing — the auto-processing pipeline
- Purchases & Payables Setup — master switches including template bypass