Skip to main content

Outbound Messages

Outbound messages are messages that originate from Business Central to an external system. The messages get triggered by pre-defined business events or background processes.

Outbound Integration Handlers

Outbound integration handlers are created for every outbound message you wish to send to an external system. The integration handler is used to define:

  • The outbound event used to trigger the message
  • Message Type, EDI Partner, etc.
  • The main table that the message is based on
  • The Data Exchange Definition or Codeunit used to generate the message.
  • The API Endpoint
  • Additional subscribers (e.g. when you send the same message to multiple partners)
  • If you want a delay in the messages. For example, suppose you are posting a large warehouse shipment. In that case, you should delay sending a posted invoice until you are sure everything on the warehouse shipment has been posted to prevent you from sending a message while posting a transaction and later having that transaction rollback.

Outbound Events

You can view a list of available outbound events from the outbound events page. You can also add additional events with an extension.

The following events are more generic:

Synchronise in the background using ModifiedAt date/time (per record)

This outbound event gets triggered by running the Outbound Synchronisation Runner code unit. You can use this event for all tables in Business Central.

An event has been triggered for a generic record by a custom extension

This event is intended to be used by an extension to trigger an outbound message for a specific table. Your extension can fire this event and pass any record to process the outbound message.

Additional Subscribers on Outbound Messages

Occasionally, you must send the same message to multiple locations. You can specify this in the Additional Subscribers section on the outbound integration message handler card. When a message is sent as an additional subscriber, it uses the original message that is exported. This approach simplifies the configuration and reduces the amount of reads to handle this.

Update Values after Export

If you want to update a record immediately after it has been sent, you can specify values to be updated on the integration handler on the After Export Tab. You can optionally choose to run the modify trigger.

caution

When you run the trigger, there is a possibility for recursion if you do not have filters that exclude this. The program will error if it detects recursion.

Outbound Job Queue Processing

The app supports delayed messages and synchronisation of records in the background. The messages processed in the background will create Queued Integration Messages. The following job queue entries are available to process these queued messages.

ObjectPurposeParameter String
Codeunit ProcessOutIntJQEntry_IF_TSLThis job will process delayed outbound messages. Delayed messages get created when you specify a delay on the integration handler.You can leave this empty or provide a filter on the integration handler code.
Codeunit OutIntSyncRunner_IF_TSLThis job will process the outbound synchronisation for handlers that are configured to synchronise using the last modified at date.You can leave this empty or provide a filter on the integration handler code.

The app assists you in configuring the job queue as soon you specify that you want to delay a message or if you select an outbound event that requires you to configure a job queue. The app also checks when you open the Outbound Integration Handlers page or the Queued Integration Messages page.

Testing Outbound Integration Handlers

Choose "Export Message". The following applies:

  • A filter page opens where you can specify filters for the record.
  • You will receive a confirmation message if multiple records exist within the filters specified, and you can choose to cancel or continue
  • Each record (within the filters specified) is then published using the integration handler.
info

This process does not run the outbound event - it behaves as if the outbound event had been triggered.

See Also