Sending and Receiving Documents Automatically

Prev Next

Feature Overview

Once two companies are set up as Intercompany (IC) partners, Intercompany takes over the job of moving orders, confirmations, and status updates between them — so nobody has to open the partner's company and re-key a document by hand. When a sales order is released for an IC partner, it is automatically packaged into an outbound transaction and sent to the partner company. On the receiving side, the same transaction arrives as an inbound item and is turned into the matching purchase (or sales) document without a user having to do anything, unless the partner setup calls for manual review.

Sending and receiving both happen in the background, driven by Business Central's Job Queue. Outgoing documents are picked up and sent automatically as soon as they are released and marked for IC transfer. Incoming documents are queued for handling the moment they arrive, and if handling fails — for example because the partner's connection is briefly unavailable — the system automatically retries with an increasing delay, up to five attempts, before flagging the document as needing attention. Documents can travel between companies either through a direct web-service connection between the two Business Central environments, or by exchanging them through a shared inbox/outbox area within the same database (for partners connected as companies in one environment).

Key Facts

Aspect Details
Where to configure IC Partner Card ("Send/Receive" and "Connection" areas)
Outbound trigger Released order/return order marked "Send IC Document" for an active IC partner
Inbound trigger Arrival of a new IC Inbox Transaction; processed automatically via Job Queue
Transfer methods Job Queue database transfer, or direct Web Service connection to the partner
Retry behaviour Automatic retry with increasing delay, up to 5 attempts, before the document is flagged as failed
Integration points Feeds "Automatic Order Creation Between Companies"; failures surface in "Monitoring & Resolving Exceptions"; connection details configured in "Setting Up a Partner Company"

Getting Started

  1. Open the IC Partner Card for the partner company you want to exchange documents with.
  2. Decide how inbound documents from this partner should be picked up: set Inbox Type Web Service if the partner is a separate Business Central environment reachable by web service, or leave it unset to use the shared database inbox (both companies in the same environment).
  3. If using a web-service connection, fill in the Web Service Endpoint, Web Service Port, Web Service Company, Web Service User, and Web Service Password fields so Intercompany can reach the partner's environment.
  4. Set Auto Create Purchase Orders (and/or Auto Create Sales Orders, depending on which side you are) so incoming documents are converted automatically rather than waiting for manual review.
  5. On the sales order (or purchase return order) you want to send, confirm the Send IC Document and IC Direction fields are set, then release the document — this queues it for automatic sending.
  6. If you want the connection tested asynchronously rather than making the sender wait for a response, enable Web Service ASync and set a Web Service Timeout.
  7. Watch the IC Outbox Transactions and IC Inbox Transactions lists after your first test document to confirm it moved automatically; if it doesn't, see Monitoring & Resolving Exceptions.

Related Features

Sending and receiving documents is the delivery mechanism underneath several other features: it is what makes Automatic Order Creation Between Companies and Handling Returns Between Companies actually reach the partner company, and it is the channel Keeping Item & Stock Data in Sync and Cross-Company Invoicing use to exchange their information. Every send/receive attempt — successful or not — is recorded for Monitoring & Resolving Exceptions, which is where you go when a document appears stuck. The connection details used here (web-service endpoint, credentials, timeouts) are configured as part of Setting Up a Partner Company.

User Stories

Automatically sending a released sales order to the partner

As a sales administrator
I want to have a released sales order sent to the partner company automatically
So that I don't have to manually re-create the matching purchase order myself

Setup:

  1. On the IC Partner Card, ensure the partner is active and Send IC Document is available on relevant order lines.
  2. Release the sales order (or return order) intended for the IC partner.
  3. Intercompany automatically creates an outbox transaction and sends it — no manual "Send" action is required.

Note: Only released documents with a non-blank IC partner and "Send IC Document" set are picked up automatically.

Automatically receiving and creating a purchase order from an incoming document

As a purchasing clerk at the partner company
I want to have an incoming sales order automatically become a purchase order in my company
So that I don't have to type in the order myself

Setup:

  1. On the IC Partner Card, set Auto Create Purchase Orders for the partner.
  2. Ensure the partner is configured to hand off inbound documents via Job Queue or Web Service (see "Inbox Type Web Service").
  3. When a document arrives, it is queued in the IC Inbox and processed automatically in the background.

Note: If the document can't be processed on the first attempt, it is retried automatically before it's flagged as an error.

Choosing a direct web-service connection instead of a shared database inbox

As a system administrator
I want to connect two separate Business Central environments directly
So that documents can be exchanged even though the companies don't share a database

Setup:

  1. On the IC Partner Card, enable Inbox Type Web Service.
  2. Enter Web Service Endpoint, Web Service Port, Web Service Company, Web Service User, and Web Service Password.
  3. Optionally set Allow Remote Web Services and Allow Remote Inbound Doc. if the partner also needs to call back into this company.

Note: Turning off "Inbox Type Web Service" switches the partner back to the shared database inbox/outbox model.

Sending documents asynchronously so the sender isn't held up

As a system administrator
I want to send documents without waiting for the partner's response
So that a slow or temporarily unreachable partner doesn't block my users

Setup:

  1. On the IC Partner Card, enable Web Service ASync.
  2. Set an appropriate Web Service Timeout (ms) so a stalled connection is abandoned rather than hanging.

Note: Asynchronous sending still relies on the same automatic retry mechanism if the partner doesn't respond in time.

Automatic retry after a temporary connection failure

As a system administrator
I want to have a failed inbound document retried automatically
So that a brief network or partner outage doesn't require manual intervention

Setup:

  1. No setup is required — retry is automatic for every inbound document handled via the Job Queue.
  2. Each failed attempt is retried with a growing delay; after 5 unsuccessful attempts the document is marked as an error.

Note: See Monitoring & Resolving Exceptions for how to review and act on documents that reach the error state.

Preventing an outdated document from overwriting a newer one

As a purchasing clerk
I want to be protected from an old, already-superseded version of a document being applied
So that my records always reflect the latest version the partner sent

Setup:

  1. No configuration needed — when a newer transaction for the same document already exists, the older one is automatically cancelled instead of processed.
  2. If a transaction has already been accepted and handled, attempting to process an older copy raises an error naming the transaction it was superseded by.
Blocking deletion of a purchase line that still has unhandled inbound documents

As a purchasing clerk
I want to be stopped from deleting a purchase line that a pending inbound document still refers to
So that I don't lose track of a document the partner is still expecting to be processed

Setup:

  1. No configuration needed — this check runs automatically when a purchase line linked to unhandled IC Inbox entries is deleted or modified.

Note: The error lists the specific transaction numbers that must be handled first.

Choosing whether a partner's documents require manual review before processing

As a system administrator
I want to decide whether incoming documents from a specific partner are handled automatically or reviewed manually first
So that I have more control over trusted vs. less trusted partner connections

Setup:

  1. On the IC Partner Card, set Auto Import IC Inbox to "No Handling", "Handle with Job Queue", or "Handle with Web Service" depending on the desired behaviour for that partner.

Note: "No Handling" leaves incoming documents in the inbox for a user to process manually.

Field Reference

Field name Where to find it What it does Default value
Inbox Type Web Service IC Partner Card Controls whether inbound documents from this partner are received via a direct web-service call or the shared database inbox Off
Auto Import IC Inbox IC Partner Card Chooses whether incoming documents are handled automatically (via Job Queue or Web Service) or left for manual handling No Handling
Auto Create Purchase Orders IC Partner Card Automatically creates a purchase order from an incoming sales document Off
Auto Create Sales Orders IC Partner Card Automatically creates a sales order from an incoming purchase document Off
Web Service Endpoint IC Partner Card The address of the partner's Business Central environment (blank)
Web Service Port IC Partner Card The port used to reach the partner's environment (blank)
Web Service Company IC Partner Card The company name to connect to at the partner's environment (blank)
Web Service User / Password IC Partner Card Credentials used to authenticate the connection to the partner (blank)
Web Service ASync IC Partner Card Sends documents without waiting for an immediate response Off
Web Service Timeout (ms) IC Partner Card How long to wait for a response before treating the call as failed (blank)
Allow Remote Web Services / Allow Remote Inbound Doc. IC Partner Card Allows the partner to call back into this company over web service Off