Setting up Output Type B2Brouter
The B2Brouter output type sends electronic invoice documents from Document Dispatch to B2Brouter. It is intended for processes where invoices must be transferred as electronic documents, for example as Peppol/BIS Billing 3 invoice files.
When the B2Brouter output type is used, Document Dispatch prepares the required invoice attachment, validates it when configured, sends it to B2Brouter, and stores the response information on the queue entry. The dispatch status can then be followed from the Document Dispatch queue.
Info
The B2Brouter output type is only available when the B2Brouter feature is enabled. If the feature is not enabled, the output type is not shown or cannot be selected.
Prerequisites
Before you create a Dispatch Profile for B2Brouter, make sure the following setup is available:
- The Document Dispatch module is activated and licensed.
- The B2Brouter feature is enabled.
- The B2Brouter account information is maintained in the B2Brouter Setup section of the module setup.
- The invoice attachment is configured so that Document Dispatch can create the required electronic invoice file.
- The required document and validation setup is complete for the electronic invoice format used in your process.
Create a B2Brouter Dispatch Profile
Follow these steps to create a Dispatch Profile for B2Brouter:
- Start in the Document Dispatch - Administrator role.
- Open Dispatch Profiles from the Setup menu.
- Select New to create a new Dispatch Profile.
- Enter a clear value in the Code field.
- Select B2Brouter as the Output Type.
- Select the table from which the invoice documents should be sent.
- Activate the required sending options, such as FactBox sending, automatic sending, or processing via the job queue.
- Configure the required attachments for the Dispatch Profile.
B2Brouter Output Settings
The B2Brouter group on the output settings page controls how the B2Brouter dispatch behaves.
| Option | Description |
|---|---|
| Automatic validation on Dialog | Validates the selected invoice attachment automatically when the B2Brouter dialog is opened or closed. This option is enabled by default. |
| Automatic deletion if error occurs | If B2Brouter returns an error during sending, Document Dispatch can automatically delete the created B2Brouter document when possible. This option is enabled by default. |
Document Central Archiving
The Document Central Archiving group is available for B2Brouter profiles. It is used to archive the invoice generated by B2Brouter from JSON data after a successful send.
| Option | Description |
|---|---|
| B2B DI Inbound List | Selects the Document Inbound list to which the generated B2Brouter invoice is transferred. |
| B2B DI Content Type | Selects the Document Central content type used for the transferred invoice. The selection must be valid for the source table of the profile. |
| Archive B2Brouter Invoice | Enables retrieval and transfer of the generated B2Brouter invoice after it has been sent successfully. This option is available only when Use JSON Schema is enabled. |
Archiving requires active Document Central and Document Dispatch setup, the B2Brouter output type, JSON schema usage, and a valid inbound list, content type, document library, and metadata configuration. The generated invoice is transferred to Document Inbound for the normal Document Central archiving process.
B2Brouter Dialog
When documents are sent with the B2Brouter output type, the Document Dispatch - B2Brouter Dialog can be used to review the selected attachment and its validation result before sending.
The dialog shows:
- the selected invoice attachment
- a preview of the attachment
- the validation result returned for the attachment
- actions for selecting or opening the source attachment
If Automatic validation on Dialog is enabled, the attachment is validated during the dialog process. If the attachment does not meet the B2Brouter requirements, sending is blocked and the following message is shown:
The attached document does not meet the B2Brouter requirements and will not be sent. Please validate the document and attach a compliant file before sending.
The dialog can also show validation messages when no file is selected, when validation fails, or when no validation result is received.
| Message | Meaning |
|---|---|
| Please select a file first. | No attachment was selected for validation or sending. |
| Validation failed. Please check your settings and try again. | The validation could not be completed with the current setup. |
| No validation result received. | The validation process did not return a result that can be shown in the dialog. |
Queue Processing
B2Brouter dispatches are processed through the Document Dispatch queue.
- A queue entry is created with the status Created.
- If the entry is delayed, it is processed by the Document Dispatch job queue.
- Before sending starts, the entry is set to Error so that unsuccessful preparation or sending attempts remain visible.
- When the invoice is successfully submitted to B2Brouter, the entry is set to Processing Sending, unless it has already reached Sent.
- The B2Brouter response is stored on the queue entry.
The queue entry contains the fields B2Brouter ID and B2Brouter Json Response. These fields help administrators identify the document in B2Brouter and review the returned response information.
When B2Brouter invoice archiving is enabled, the queue entry also shows:
- B2Brouter Invoice Transferred: indicates that the generated invoice was transferred to Document Inbound.
- B2Brouter Archiving Error: shows the last error that occurred while retrieving or transferring the invoice.
After a successful transfer, B2Brouter Invoice Transferred is set to Yes and the archiving error is cleared. If the inbound list, content type, document library, metadata, or generated invoice is missing or invalid, the transfer is not completed and the error is recorded on the queue entry.
Queue Actions
The Document Dispatch queue provides actions for B2Brouter entries:
| Action | Description |
|---|---|
| B2Brouter Information | Opens the stored B2Brouter response information for the selected queue entry. |
| Update B2Brouter Status | Updates the queue entry with the current B2Brouter status when response information and a B2Brouter document ID are available. |
The manual status update can refresh B2Brouter statuses such as sent, delivered, failed, and rejected.
Error Handling
If B2Brouter returns an error, the queue entry is set to Error and the response information is stored on the entry. If automatic deletion is enabled, Document Dispatch also attempts to delete the created B2Brouter document when this is possible.
Missing attachment definitions, missing document-generation setup, or missing validation setup now create visible queue errors instead of being skipped silently. More errors are also logged and shown in the queue, which helps administrators identify and correct incomplete configurations more quickly.