41dots

Integrating software without an API

Choose between file exchange and UI automation, then test whether an interrupted transfer can resume without creating duplicates.

An accounting package exports invoices once a day. The receiving system needs them by the next morning. If it can import that file and report which rows failed, a scheduled transfer may be enough. Automating the accounting screen would add a dependency on its layout without making the data arrive any sooner.

Start by naming the operation and its deadline: “copy finalized invoices by 7 a.m.” is a requirement you can test. “Connect the systems” leaves open whether you need to read records, create them, or keep edits synchronized in both directions. Microsoft’s integration requirements use volume, frequency, direction, and system capabilities to frame that choice.

Find an interface that covers the whole operation

Check the vendor’s import/export functions and supported connectors before building a bridge. A connector that reads customers may still be unable to create invoices. For a file import, try a small batch containing one invalid row: can you identify the accepted records, correct the rejection, and rerun it without importing the accepted records twice? An “import complete” message is insufficient if it hides partial failure.

Approved read-only database access can help extract data when exports omit required fields. It does not solve the receiving side. Writing directly to application tables can skip the checks performed by the application; prefer a supported import or write interface.

If the required operation exists only on screen, browser or desktop automation becomes a candidate. Test it with the actual account permissions and approval steps it will need. A person may still need to renew a session or approve a sign-in; the schedule must allow for that interruption. An internal endpoint observed in network traffic also needs explicit permission and a maintenance plan: its existence does not make it a supported API.

Our legacy accounting integration case study describes a project that used session persistence and internal network calls. That route depended on the platform’s constraints. For another system, a supported file exchange may remove the need for those components entirely.

Make a saved record recognizable after a timeout

Consider a nightly transfer of finalized invoices into an operations system. Assume the source has stable invoice IDs and the destination can store and search an external reference. Limit the first version to creating records in one direction; corrections to transferred invoices go to a person until an update rule is defined.

Use the source system, company, and invoice ID together as the transfer key. Invoice 1842 from company A must remain distinct from invoice 1842 from company B. The destination’s own record ID can be different. Keep both IDs in a transfer ledger, alongside the outcome of each attempt.

Follow accounts:A:1842 through a lost confirmation:

  1. The worker records an attempt and submits the invoice with that external reference.
  2. The destination saves it, but the connection drops before the worker receives confirmation. The ledger now says the outcome is unknown.
  3. On restart, the worker searches the destination for accounts:A:1842 before submitting anything else.
  4. One matching record with the expected amount and currency lets the worker record its destination ID and confirm the transfer. A mismatch or multiple matches requires review.
  5. No match permits a retry only when the lookup is authoritative. If search results lag behind writes, wait for reconciliation or ask a person to check; an immediate empty result cannot establish that the save failed.

The ledger alone cannot prevent two workers from creating the same invoice simultaneously. Use one worker per transfer key and, where supported, enforce a unique external reference at the destination. Without that destination constraint, a lookup followed by a write still has a race window. Do not promise duplicate-free concurrent writes on that design.

Test the interruption before increasing volume

Run that sequence on approved test records: interrupt the connection after submission, restart the worker, and inspect both the ledger and destination. After restart, the destination should contain one confirmed invoice, or the worker should hold the transfer for review without submitting it again. Check a rejected record separately so a failed row does not cause the entire batch to be repeated.

For UI automation, identify the saved record as well as the control that submits it. Playwright recommends locators based on roles and labels; its single-element actions reject ambiguous matches. That helps detect a changed screen, but locating a Save button still does not establish whether a previous save succeeded.

Before expanding the workflow, give the person handling failures a view of unresolved transfer keys, attempted values, and destination IDs when known. They need to decide whether to reconcile, correct, or retry a specific record. If the destination offers no dependable way to find an uncertain write, reduce the automated scope to preparing records for manual submission until that gap is resolved.

All engineering guides

Have a project in mind?hello@41dots.com ↗