SVS Digital

Ecommerce and accounting integrations

From ecommerce order to accounting invoice: define the integration first

Sending every new webshop order straight to accounting sounds simple until an order changes, payment fails, delivery is partial or the same event arrives twice. The useful first step is not choosing a connector. It is defining which business event creates which accounting record, what data must be complete and how employees resolve exceptions.

By SVS Digital · Published

Start here

Choose one authoritative order identifier and one explicit invoicing trigger, such as confirmed payment, confirmed order or completed delivery. Map customer, currency, tax treatment, discounts, shipping and line items to the destination’s controlled records. Create a draft for review where accounting policy requires it, store the destination ID, and make retries idempotent. Define cancellations, refunds, partial fulfilment and changed orders before launch, then reconcile webshop orders against accounting records on a schedule instead of trusting events alone.

1. Decide which document to create and when

An order, payment, delivery and invoice are different records. Write down whether the integration creates a sales order, a draft invoice or another approved record. Then name the exact trigger: order confirmation, payment capture, shipment, completed delivery or manual approval. Do not let several triggers create the same invoice independently.

The rule depends on the business. Odoo documents separate policies for invoicing ordered quantities and delivered quantities, and notes that the timing changes the workflow. That is a useful reminder that the connector must implement your approved invoicing policy; it should not invent one from whichever ecommerce event is easiest to receive.

  • Destination document type and initial status.
  • Single business event that permits creation.
  • Treatment of unpaid, partially paid and cash-on-delivery orders.
  • Owner who approves the policy and its exceptions.
Odoo: Invoicing policies

2. Build a field and identity contract

Map the ecommerce order ID to a dedicated external reference in the accounting system and keep the destination record ID in the integration log. Define matching for customers, products, units, currencies, tax codes, payment terms, discounts, shipping and rounding. A product title or customer name alone is not a stable key. Unknown codes should enter a review queue rather than silently create a near-duplicate master record.

Business Central’s sales-invoice resource exposes customer, currency, payment term and invoice-line relationships, while its API provides a specific operation for creating a sales invoice. The available fields vary by system, so prepare a mapping table from actual sample orders and destination records rather than assuming that two similarly named fields mean the same thing.

  • Stable webshop order and line identifiers.
  • Customer-matching rule and duplicate threshold.
  • Product, tax, currency, discount and shipping mappings.
  • Required fields and a visible path for unknown values.
Microsoft Learn: salesInvoice resource typeMicrosoft Learn: Create salesInvoices in Business Central

3. Separate technical transfer from accounting approval

A successful API response proves that a record was created; it does not prove that its accounting treatment is correct. Decide whether transferred records remain drafts until an employee checks the customer, tax treatment, totals and supporting order. Define which low-risk cases may proceed and which always require review.

Odoo creates customer invoices from source documents such as sales and ecommerce orders as drafts, then confirmation changes the invoice to posted and creates the accounting entry. Your destination may use different terms, but preserve the distinction between importing data and approving a financial record. Record who can approve, what they see and how a rejected draft returns to the exception queue.

  • Draft or review status after transfer.
  • Required control totals and source link.
  • Role allowed to approve or post.
  • Reason and recovery path for a rejected record.
Odoo: Customer invoices

4. Make retries safe and events reconcilable

Use the external order ID plus the chosen document type as an idempotency key in your own integration state. Before creating anything, check whether that business document already has a destination ID. If a request times out, read the destination state before retrying; a timeout does not prove that creation failed.

Shopify states that webhook ordering is not guaranteed, provides a webhook ID for detecting duplicate deliveries and recommends periodic reconciliation because deliveries can be missed or mishandled. Apply those principles even when another platform is used: validate the sender, persist event IDs and timestamps, process asynchronously, and compare recently changed source orders with destination records on a schedule.

  • Stable idempotency key and stored destination ID.
  • Duplicate and out-of-order event handling.
  • Retry rule after timeout or partial failure.
  • Scheduled reconciliation and a named exception owner.
Shopify: About webhooks

5. Define changes after the first transfer

List the events that can follow creation: address correction, quantity change, discount, partial shipment, cancellation, refund, return or payment dispute. For each one, decide whether the integration updates an editable draft, creates an adjustment for review or stops for an employee. Never overwrite a posted amount merely to make it match the latest webshop total.

Keep the original order, transferred record and later adjustment linked by identifiers. A useful exception shows the old value, new value, event time and required action. Ask the responsible accountant to define credit-note, tax-period and document-numbering rules for the relevant jurisdiction and software. This guide describes the technical workflow, not accounting or tax advice.

  • Allowed changes while a record is still a draft.
  • Cancellation, refund and return paths.
  • Treatment of partial fulfilment and split invoicing.
  • Specialist-approved rules for posted records and tax periods.

6. Pilot with reconciliation before expanding

Start with one store, one legal entity, a limited set of tax and payment scenarios, and recognisable test orders. Include a normal order, guest and existing customer, discount, shipping fee, tax exemption if applicable, partial payment, cancellation, refund, duplicate event, delayed event and destination outage. Compare line values and totals with a manually approved result.

No integration removes the need for clear accounting policy, maintained master data and exception ownership. Interfaces, permissions and fields differ between ecommerce and accounting products. Release only when the business owner and accountant accept the trigger, mappings, review steps, reconciliation report and fallback; add more channels or automatic posting only after the first flow remains explainable in daily use.

  • Representative test matrix and expected records.
  • Reconciliation with no unexplained missing or duplicate document.
  • Named owners for technical and accounting exceptions.
  • Rollback or manual procedure during an outage.

Sources and further reading

More guides

AI voice agents

Appointment booking rules for an AI voice agent

Define booking states, services, availability, required details, confirmations, duplicate protection and fallbacks before an AI voice agent writes to your calendar.

What would you like to build for your business?

Tell us where you need a hand. We’ll email you a brief and follow up about the next step.

Uroš Jovanović

Founder · SVS Digital

Hi, I’m Uroš.

I founded SVS Digital. We design and build custom digital solutions for businesses.

What kind of solution do you need?

Your reply