Business Integration Solutions documentation
Walkthrough: Sales Shipment
About this walkthrough
This walkthrough provides an overview of how to send a shipment notification.
A shipment notice or advance shipping notice (ASN) is a notification of pending deliveries.
Prerequisites
| Template | Description | Default report |
|---|---|---|
| NM_SALES.SHIPMENT | NM Template: Sales Shipment | Sales - Shipment (208) |
Story
This connection uses the following pipeline elements:
- The Record Change Event triggers on Insert and links to the internal document NM_SALESSHIPMENTTRIG, which contains only one field: the No. field from the Sales Shipment Header table. When a new record inserts in the Sales Shipment Header table, the Record Change Event detects it.
- The XML Generator activity creates an XML file based on an internal document.
- The Splitter activity creates one message for each posted sales shipment.
- The XML Minifier activity cleans the message of empty nodes and blocks that are not mandatory.
- The message passes through the XMLSchemaValidator, which verifies that the XML message respects the internal document structure.
- The Header Mapper activity adds the headers to the message body, filling in the recipients and email subject.
- The XML to HTML Translator activity creates an HTML email message based on your branding templates. You can also configure an HTML body manually.
- The Attachment Generator activity adds attachments to the email message based on standard Microsoft Business Central report functionality.
- The Email Writer endpoint sends the email.
- The internal document NM_SALESSHIPMENT contains all the information needed to configure the XML Generator activity, the Splitter activity, the Header Mapper activity, and the XML to HTML Translator activity. Adding other fields to this document lets you define a personalized email message.

Task
Setup
Import the NM_SALES.SHIPMENT.zip configuration package, or use the BIS template if available.

Add a new email account in Email Accounts, then select SMTP Account to send notifications via the Papercut SMTP server.

On the notification page, edit the EMAILWRITER and add the Account ID created in the previous step. Run the configuration once.

Process
- Create a sales order with some details and ship it.
- Open notification NM_SALES.SHIPMENT and observe that the posted sales shipment header is captured by the Record Change Event activity.
- Process the notification.
Result

The mail sends to all recipients. Using Papercut, the mail is captured in the demo environment, showing a preview of the HTML mail body and a PDF attachment of the Sales - Shipment report.
For a brief guide, see Papercut SMTP setup.