System integration for companies The costly part of two systems is the gap between them

In a company that runs a spreadsheet, an accounting system and a website, the real cost often sits with one person retyping an invoice from one screen to another.

Published Naqrah Tech, Muscat7 min read

Two brass rings linking two glass plates across a gap

In short

Before anyone writes the link, ask three things: who owns each piece of data, when it moves, and what happens when the other side is down. Instant notifications carry each event as it happens, while scheduled syncs carry the full picture at set times. The choice between them should follow what your team needs from the numbers, and when it needs them. Because accounting holds the official financial figures, make it the source of truth for money, and let everything else read from it.

  • Write an ownership table: each piece of data is written by one system, and every other system only reads it.
  • Make every write safe to retry, with a unique identifier for each request.
  • Log every attempt and every failure with its response code and time, and show the team what failed and what is waiting.

Follow one invoice from the moment it is created

Take one invoice and follow it from the moment it is created to the moment it enters the books. Before the code begins, write down the answer to each question:

  1. The clerk creates the invoice in the sales system. Does the final figure match the one the accountant will calculate? And who calculates the tax?
  2. The system sends the event to accounting. If accounting is down at that moment, what happens? Is the attempt repeated, how many times, and for how long?
  3. The invoice is saved in accounting, and a confirmation reaches the sales system. Can you guarantee the invoice was written once, even if the message arrives twice?
  4. The accountant edits the invoice or issues a credit note. Does sales learn of the change? And who decides which figure is correct?
  5. The other side renames a field in its API. Does the link stop silently, or does the team learn of the fault within the first hour?

Each of these questions has a technical decision behind it, and if nobody writes that decision down before the code, it appears at the worst possible time. A good integration starts with written decisions, then code. If the gap between your systems is wide, start with our software platform development service.

Write down who owns each piece of data

A simple rule settles many disputes: the system that creates a record is the only one that writes it, and everything else reads from it. A customer is created in one system, a product is priced in one system, and tax is calculated in one system. Writing the same data in two places is what most often makes two sets of numbers drift apart.

Tax is a clear example. A 5% rate appears in Odoo's Oman localization settings, and PwC describes it as the standard VAT rate. Read the rate from the accounting system that knows it, and keep it out of your code. If the rate ever changes, the calculation changes in one place. To decide what stays in a ready-made system and what should be built for you, our guide on custom software or a ready-made system separates the two with examples.

Accounting usually holds the official financial figures. When a number on your website disagrees with the accounting figure, accounting is the reference, and the link should say so in writing.

Instant notifications or scheduled sync

With instant notifications, the system sends an event as it happens. Stripe's documentation says it pushes events to an endpoint you own, and retries delivery for up to three days in live mode, with growing gaps between attempts. The same documentation warns that events can arrive twice, and they can arrive out of order. So your endpoint has to track the event identifiers it has already processed.

Scheduled sync, every five minutes for example, keeps things simple and gives you a full picture at each run. It also lags behind the event and multiplies the number of requests. This is where the limits appear. Zoho Books' documentation sets a limit of 100 requests per minute per organization, and returns HTTP status 429 when that limit is exceeded. Its documentation also sets daily caps by plan, from 1,000 requests a day on the free plan up to 10,000 on the highest plans. A sync that reads thousands of records every five minutes can hit the limit in the first busy week.

Use instant notifications for financial events that must arrive quickly. Use scheduled sync for reports and balances that can wait. Build a rate limit and a waiting plan for each.

A safe retry needs an identifier

When a reply never arrives, the sender cannot know whether the operation succeeded. The fix is for each write request to carry a unique identifier. Stripe explains that such a key lets you repeat a request without carrying out the operation twice. In its API v1, a retry with the same key returns the saved response from the first attempt. Stripe suggests random values such as UUIDs, advises against personal data in the key, and notes that keys can be removed once they are at least 24 hours old.

The same rule applies to repeated messages. An invoice created twice means a line in the books written twice, and an accountant finds it at the end of the month. Stripe also recommends logging the event IDs you have processed, then skipping any event you have already handled.

The log is part of the fix, so design it in from day one. Record every attempt with its identifier, response code and time, and show the team what failed and what is waiting to be retried. A log that keeps messages without their status is of little use in a crisis, because nobody can tell which messages arrived and which ones were lost.

When the other side goes down

An accounting system goes down for maintenance, for load, or for an upgrade, and that tends to happen at the worst moment. The question is where the event waits until the other side returns. Stripe advises that the receiving endpoint respond quickly with a 2xx status before any heavy logic that might time out, and that processing run through an asynchronous queue. The queue is where an event stays saved until it is processed, and a small panel shows the team how many are waiting.

Silent failure is the real danger. A system that breaks quietly, and is discovered only when a customer asks about a missing invoice, has failed without anyone knowing. Set a clear alert for any event that stays in the queue past an agreed age, and decide in advance who receives that alert.

Ask your provider one question before signing: when two systems disagree on an invoice total, which figure wins, and where is that rule written down? A written answer means the disagreement has a rule. A spoken answer means someone will settle it by hand every month.

Sources

  1. Stripe Docs: Receive events in your webhook endpoint
  2. Stripe Docs: Idempotent requests
  3. Zoho Books API v4: Introduction and rate limits
  4. Odoo documentation: Oman fiscal localization
  5. PwC Tax Summaries: Oman, other taxes (VAT)

This post is general planning information as of its publication date. API limits and plan prices change, so check them in your provider's documentation before you build the link.

Send us the systems you want to connect

We map with you who owns each piece of data, and what happens when the other side goes down, before anyone writes a line of integration code.

Or call us on +968 7119 0707, Muscat, Sultanate of Oman