Skip to content

~/services/automation/systems-integration

Systems integration through APIs and webhooks that doesn't lose data when the other end fails

For when the same data is typed into two places, or someone exports from one system to import into another. The systems start talking to each other on their own.

5 min read

Deals board with Lead, Qualification, Proposal, Negotiation and Won columns, each with total and weighted value
Real screenshot from the Rah CRM case

What You Get

  • A map of which data goes from where to where
  • Integration through API, webhook or file
  • A queue that retries when the other end fails
  • A log of every send and every error
  • An alert when something stops working
  • Documentation so another developer can maintain it

Systems integration is about getting your company's software to exchange data on its own: the online store order goes into the ERP, the CRM customer shows up in finance, the payment confirmed by the gateway marks the invoice as paid, the spreadsheet another team uses updates itself. Nobody exporting, copying and importing.

The easy part is making it work on delivery day. The part that takes effort, and that I deal with from the start, is what happens when the other end goes down, changes its format or sends the same notification twice.

Two plugs of different shapes joined by an adapter, with pulses of data along the cable
The adapter stands for the bridge that lets different systems exchange data.

What Usually Gets Integrated

  • ERP with an online store or marketplace: orders, stock and invoices.
  • CRM with finance: a closed deal becomes a contract and a bill.
  • Payment gateway: instant payments, bank slips and cards marked as paid automatically. It is the core of automated billing.
  • Google and Microsoft: calendar, email, spreadsheets, Analytics.
  • A shared spreadsheet, when it is what another team uses and they won't stop using it.
  • Supplier portals, which have the data you need and an API (sometimes a bad one) to fetch it.

A Real Example: Solar Plant Generation Through APIs

For a solar energy client, I built collectors that fetch the daily generation of each plant from the portals of three inverter manufacturers. Each manufacturer has its own API, with its own format, authentication and limits. Where there was no API, the data is collected by an automated browser, which is the topic of the web scraping page.

Three manufacturers’ portals feed solar data collection, duplicate-free records and the operations portal, with weekly reconciliation.
Collection can run again without duplicates; weekly checks look for missing data.

Some decisions from that project apply to almost any integration:

  • Idempotent collection. Data is written so that running the same day again corrects it instead of duplicating it. You can reprocess a whole week without worry.
  • Respecting the other end's limits. When the API says it received too many requests, the collector waits as long as it asks instead of insisting and getting blocked.
  • Weekly reconciliation. A job checks what should have arrived and didn't, tries again and reports why anything is still missing: an inverter offline, a portal down, an expired credential.

That data feeds the generation versus target screen in the AYA plant operations portal, which used to be a spreadsheet put together by hand.

Webhooks, Queues And Reprocessing

Webhook: The Other End Tells You

When the source system can send notifications ("payment confirmed", "order created"), a webhook is the fastest path. The precautions: verify the notification's signature, so nobody can fake a payment, and store each notification with a unique key, because the same one often arrives more than once. In Rah CRM, the WhatsApp webhook arrives signed with HMAC, and a repeated message hits a unique key and doesn't get duplicated.

A signed webhook with a unique key, a queue with growing retry intervals, an error list and reprocessing of the affected period after a fix.
The queue retains pending data, logs failures and allows reprocessing after the fix.

Scheduled Polling: I Go And Fetch It

When the other end doesn't send notifications, a job checks every so often and brings back what changed. It is slower, but it works with almost any API.

Queue: Nothing Gets Lost

Every send goes through a queue. If the other end is down, the send waits and is retried later, with a growing interval. If it keeps failing, it goes to an error list someone checks, instead of disappearing. In Rah CRM the queue lives in Postgres itself, with no extra service to maintain, and no task is lost if the server restarts.

Reprocessing

Security In Integrations

  • Credentials out of the code, stored encrypted and with the least access possible. If the integration only reads, the key can only read.
  • External addresses checked. When users can register an integration URL, the system stops it from pointing to the server's internal network.
  • Everything logged. Every send and every response is recorded, so you can quickly find which side the problem is on.

When Integration Isn't The Answer

If the source system has no API at all and the data is public, a web scraping bot may solve it. If the problem is that none of the systems does what you need, the way forward may be a custom web application that replaces two of them. And if the end goal is a monthly report, integration is only half of it: the other half is report automation.

Tell me which systems need to talk to each other and what is being done by hand between them today.

Frequently Asked Questions

How much does systems integration cost?

It depends on how many systems are involved, the quality of each one's API and whether data flows one way or both. A well documented API is much simpler than a system with no API. The price comes in the proposal, after a conversation.

What if my system has no API?

There are alternatives: automatic file exports, direct database access when the vendor allows it, or a bot that uses the system's screens. I evaluate case by case, including whether your contract with the vendor allows it.

What happens if the other end changes its API?

The integration stops working at that point and the error is logged, with an alert. The data stays in the queue and is reprocessed after the fix, without losing the period.

Do you provide maintenance afterward?

Yes, I can monitor the integration on a monthly basis, handling API changes and errors. I also leave documentation so another developer can maintain it.

Where This Is Already Live

Related Services

Next step

Didn't Find Your Case in the List?

Tell me about the problem through the form. If I'm not the right person, I'll say so and point you to someone who is.