Business Integration Solutions documentation
Walkthrough: Sales Order Confirmation
About this walkthrough
This walkthrough provides an overview of how to send a sales order confirmation notification.
A sales order confirmation is a seller-generated document that authorizes the sale of specified items, issued after receipt of a customer's purchase order. A sales order usually implies no additional labor or material cost for the sale, except where it starts a production process.
Prerequisites
| Template | Description | Default report |
|---|---|---|
| NM_SO.CONFIRM | Template: Sales Order Confirmation sent by Email Writer | Order Confirmation (1305) |
Story
This connection uses the following pipeline elements:
- A Code Event triggers the pipeline. On the Sales Order Card page (page 42), add a new button with a few lines of code: see Code Event Setup. When a user selects this button, the Code Event detects it.
- The XML Generator activity creates an XML file based on an internal document.
- The Splitter activity creates one message for each sales order.
- The XML Minifier activity cleans the message of empty nodes and blocks that are not mandatory.
- 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_SALESORDER 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 Notification-NM_SO.CONFIRM.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
- Open the Sales Order Card and choose an order for customer 20000 Selangorian Ltd.
- Check the data on the Sales Order Card.
- Select the Code Event button on the page (Send 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 Order Confirmation report.
For a brief guide, see Papercut SMTP setup.