Integrations

How to integrate your management system, e-commerce and invoicing with APIs

A guide to API integrations between management systems, e-commerce, invoicing and couriers: what they are, when you need them and how to do them well.

Fabio Folgori6 min read

Aerial view of a bridge
Photo by David Martin on Unsplash

An order arrives on the online shop. Someone copies it into the management system, then into the invoicing program, then prepares the courier label, and finally notifies the warehouse. Four steps, three programs, and each time the chance of mistyping an address or forgetting an order.

If this sounds familiar, the problem is not the people: it is programs that do not talk to each other. API integrations exist for exactly this.

What an API is, without jargon

An API is the way a program lets others talk to it. Think of it as a service counter: you send a request in the expected format ("give me today's orders", "create this invoice") and receive an answer.

When two programs have an API, a link can be built that makes data travel from one to the other without anyone copying it by hand.

Two other useful words:

  • Webhook: a notice one program sends to another when something happens, for example "a new order has arrived" or "the payment went through".
  • Synchronisation: the work of keeping the same data aligned across different programs, such as stock, records or prices.

Signs you need integrations

  • you copy the same data into two or more programs;
  • stock on the site does not match the warehouse;
  • invoices are prepared by hand from orders;
  • some information arrives late, because someone has to "remember" to send it;
  • when you change a price or a record you have to remember to change it in several places.

The most common connections

E-commerce and management system

Shop orders flow into the management system; stock and prices in the management system update the shop. Double handling disappears, and with it products sold but not available.

E-commerce and invoicing

The order automatically generates the invoice (or the right document), also in electronic format, and sends it to the customer or the exchange system. Less administrative work and fewer data errors.

Couriers and shipping

The label is created from the order and the tracking code comes back, on the site and in the email to the customer. Buyers know where the parcel is without asking.

Payments

The site connects to services such as Stripe or PayPal; successful payments update the order status and refunds are managed from one place.

CRM and newsletter

Contacts collected from the site enter the CRM and the mailing lists, respecting consent. The sales team works on data that is always up to date.

How to design an integration well

The technical part matters, but quality depends above all on preparation.

  1. Map the flows. Which data passes from one system to another? When? Who is the "source of truth" for each piece of data?
  2. Check the available APIs. What the services involved allow, what the request limits and costs are.
  3. Decide the rules. What happens if a customer already exists? If a product has no code? If a record is incomplete?
  4. Develop and test on real data. Tests with made-up data hide the odd cases that actually turn up every week.
  5. Plan for errors. An integration sooner or later meets a problem: the service does not respond, a record is wrong.
  6. Monitor. Alerts and readable logs let you step in immediately, not when a customer notices.

What makes an integration reliable

  • Handling of errors and failed attempts. The system retries on its own and loses no data.
  • Idempotency, a hard word for a simple idea: if the same order arrives twice, it is not created twice.
  • Readable logs. You can tell what happened and when, without guessing.
  • Security. Credentials are stored well and personal data does not travel more than necessary.
  • Documentation. Whoever comes after must be able to understand how the link works.

Ready-made tool or custom integration?

There are tools that connect common services with a few rules, without writing code. They are excellent for simple flows and for trying out an idea. They do have limits: they cost in proportion to volume, offer little freedom for particular rules and are hard to control when flows become critical.

A custom integration makes sense when:

  • volumes are high or growing;
  • business rules are specific;
  • the flow is critical to the business;
  • you need clear control, logs and responsibility.

Often the best solution is mixed: a ready-made tool where it is enough, custom code where it is needed.

And if the data is in an Excel sheet?

Many businesses start there. Before connecting, it is sometimes useful to move the data to a sturdier system. If that is your case, read Custom management system or Excel?.

An example: the journey of an order

To understand what an integration does, follow an order from start to finish in a connected system.

  1. The customer completes payment on the shop. The payment service notifies the site with a webhook.
  2. The site records the order and sends it to the management system, which reduces stock.
  3. The management system prepares the invoice (or the right document) and sends it to the customer or the exchange system.
  4. The courier receives the pickup request, generates the label and returns the tracking code.
  5. The site updates the order status and sends the customer an email with tracking.

Every step is automatic. If one fails, the system reports it, retries and does not lose the data of the others.

Security and permissions

An integration has access to important data, so it must be protected.

  • Credentials stored securely, never written into the code or shared by email.
  • Minimum permissions: the integration can do only what it needs, no more.
  • Encrypted communication between the systems.
  • Personal data only when necessary, in compliance with the GDPR.
  • A way to revoke access quickly, if something goes wrong.

Maintaining an integration over time

Integrations are not "build and forget". The connected services change: they update their APIs, change their limits and sometimes suspend features. That is why it is worth:

  • keeping active monitoring with alerts for errors;
  • reading suppliers' announcements about changes to their APIs;
  • checking logs periodically to spot recurring anomalies;
  • keeping up-to-date documentation of how each flow works.

Whoever looks after the integration should know in advance when a service introduces a change, and be able to tell you what it means.

Why entrust it to me

I have been programming since 1999, have delivered more than 300 projects and have worked as an external developer with about 30 agencies. I work with the main types of API and webhooks, and I connect management systems, e-commerce, CRM, invoicing, payments and couriers with tests on real data, error handling and monitoring. I work from Rome and remotely.

I always start from a map of the flows: where time is lost, which data must travel and when. Then you receive a clear proposal and a written, free quote. To talk about it, write to me: a chat of about 20 minutes, no strings attached. You will find the service in API integrations and automation.

Frequently asked questions

It is a way a program offers others to exchange data with it in an orderly manner. It is like a service counter: you send a request in the expected format and receive an answer.

Alternatives are assessed: scheduled automatic exports, integration tools or, if it makes sense, a small program acting as a bridge. Sometimes it is worth considering replacing that program too.

A well-made integration reports the error, retries automatically and keeps the data, so no information is lost. You also need readable logs to understand what happened.

For simple connections between common services, a ready-made tool may be enough. If the flows are specific, with particular rules or high volumes, a custom integration is more reliable and controllable.

  • #api
  • #integrations
  • #management system
  • #e-commerce
  • #electronic invoicing
  • #automation

More articles

Shall we talk about your project?

A 20-minute chat, no strings attached: we'll figure out together where to start.