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

ScenarioTemplate helps?Why
All invoices from a vendor always post to the same G/L accountYesSet the G/L account once on the template
Invoices carry Accounting Cost codes that map to cost centresYesUse Advanced Templates with reference matching rules
Invoices should be automatically turned into a Purchase InvoiceYesEnable Automatically Process Invoice on the template
Invoices require a specific person’s approvalYesSet the Approval User on the template
Expenses should be spread across accounting periodsYesAssign a Deferral Code on the template
Invoices relate to a specific project/jobYesSet Job No. and Job Task No. on the template

When you would NOT use a template

ScenarioWhy
Standard BC Posting Setup already handles G/L account assignmentThe system falls back to the standard posting setup
Invoices always require manual review and account codingManual processing is the intention — no automation wanted
Vendor sends unpredictable invoices that don’t follow a patternA template would force a fixed posting that may be wrong
You use BC’s purchase order matching to receive invoicesThe 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:

  1. If a Vendor Accounting Cost Setup record exists for (Vendor No. + Accounting Cost from document header) → use the template assigned there
  2. 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:

PriorityVendor No.Item Sellers IDAccounting Cost LineNotes
1 (highest)SpecificSpecificSpecificExact 3-way match
2SpecificSpecific(blank)Vendor + item, any cost
3Specific(blank)SpecificVendor + 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

FieldDescription
TypeG/L Account, Item, Resource, Charge (Item), Allocation Account, Fixed Asset
No.The specific account/item/resource number
Posting DescriptionDescription written to ledger entries

Dimensions

FieldDescription
Shortcut Dimension 1 CodeGlobal dimension 1 value
Shortcut Dimension 2 CodeGlobal dimension 2 value
Dimension Set IDFull dimension combination

Project posting

FieldDescription
Job No.Project number to post against
Job Task No.Specific project task
Deferral CodeDeferral template for spreading costs across periods

Approval and workflow

FieldDescription
Require ApprovalForces approval before posting
Approval UserSpecific user assigned as approver
Use Approval User ManagerRoute to the user’s manager instead
Workflow User Group CodeAssign to a workflow group
Require Four EyesRequires a second approver
Four Eyes Limit (LCY)Amount above which four-eyes kicks in
Four Eyes ApproverThe second approver
4Eyes Workflow User Group CodeWorkflow group for second approval

Cost spread

FieldDescription
Percent SpreadPercentage 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

FieldDescription
Automatically Process InvoiceAuto-processes when received
Automatic Appr. Post of Inv.Auto-approves and posts
Automatic Posting of InvoicesAuto-posts after approval
Receive E-Document ToTarget document type: None, Purchase Order, or Purchase Invoice

Line behaviour

FieldDescription
Map Values Instead Post SetupReplaces specific field values rather than the full posting setup (see Value mapping below)
Overwrite Line ValuesOverwrites existing line values with template values
Only if VAT is sameOnly apply if VAT rate matches
Approve Warning for all LinesShows warning on all lines during approval
Allowed Var from Last InvoicePercentage 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 NameWhat It Matches
VendorNoVendor number
ItemSellersIdentificationVendor’s item/product identifier
AccountingCostLineAccounting cost on the line
AccountingCostHeaderAccounting cost on the document header
LineVatCategoryVAT category code on the line
LineVATPercentageVAT percentage on the line
AdditionalItemPropertyCustom item property from the XML
CommodityClassificationCommodity/product classification code
ItemNameItem description/name
DocumentReferenceDocument reference field
OrderReferenceOrder reference from document
BuyerReferenceBuyer reference from document
HeaderNoteNote on the document header
LineNoteNote 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 linePosts toDimension
FAC-CLEANG/L 6100 – Cleaning ServicesDept: Operations
FAC-MAINTG/L 6200 – MaintenanceDept: Operations
FAC-SECURITYG/L 6300 – SecurityDept: 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 typeRecommended 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 vendorsNo 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:

TierConfigurationResult
Trusted vendors under a thresholdAutomatic Posting of Invoices = true, no approval requiredInvoice posts straight to G/L
New vendors or over thresholdAssign an Approval User or Workflow User Group on the templateInvoice goes to approval automatically, posting is still hands-off
High-value or sensitive costsRequire Four Eyes on the templateTwo 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

SituationWhy
Vendor sends only occasional, ad-hoc invoices with no consistent coding patternA fixed template would apply the wrong G/L account. Let it land in the inbox for manual review.
You receive a purchase-order-backed invoiceThe 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

  1. Create a Vendor Posting Template — set G/L account, dimensions, Job if applicable
  2. Enable Automatically Process Invoice
  3. Set approval routing (user, group, or none) based on risk/value
  4. Add Advanced Template entries for each Accounting Cost variant the vendor sends
  5. If multiple cost codes can arrive on the same vendor, add Vendor Account Cost Setup rows linking each cost code to the right template
  6. Enable Deferral Code for any recurring expense vendors
  7. Leave Overwrite Line Values off for PO-matched vendors, on for non-PO vendors