Business Integration Solutions Documentation

Walkthrough: Sales Order Confirmation

About this walkthrough

This walkthrough provides an overview on how to send a notifictaion for sales order confirmation.

A seller-generated document that authorizes sale of the specified item(s), issued after receipt of a customer's purchase order. A sales order usually implies that there will be no additional labor or material cost incurred for the sale, except where it is used to initiate a production process.

Prerequisites

Template Description Default Report
NM_SO.CONFIRM Template - Sales Order Confirmation Send by Email Writer. Order Confirmation - (1305)

Story

  • This connection uses a Code Event to trigger the pipeline.
  • On the Sales Order Card page (page no. 42) you can add, with a few simple lines of code, a new button, for reference see Code Event Setup
  • When a user presses this button, it will be detected by the Code Event.
  • Once the Pipeline is triggered, the XML Generator Activity will create an XML-file, based on an internal document.
  • It is recommended to add the Splitter Activity, which results in one message for each Sales Order.
  • The XML Minifier Activity is used to clean the message of empty nodes/blocks that are not mandatory.
  • The Header Mapper Activity is adding the headers to the message body, so the recipients and the E-mail subject are filled in.
  • The XML to HTML Translator Activity allows you to create an HTML E-mail message, based on your branding templates, but it is also possible to configure an HTML body manually.
  • Based on the standard Microsoft Business Central reports functionality, the Attachment Generator Activity is adding attachments to the E-mail message.
  • The E-mail is send via the Email Writer Endpoint.
  • The internal document NM_SALESORDER contains all the information you need 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 allows you to define a personal E-mail message.

Notification Management

Task

Setup

  1. Import Notification-NM_SO.CONFIRM.zip configuration package or use the BIS template if available.

SO Confirm Import

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

Email Account

  1. On the notification page edit the EMAILWRITER and add the Account ID which is created in above step run the configuration once.

REM Settings

Process

  1. Open the Sales Order Card, and choose an order for customer 20000 Selangorian Ltd.
  2. Check the data on the Sales Order Card.
  3. Click the Code Event button on the page (Send Notifictaion).

Result

SO Confirm Result

The result is that the mail is sent to all receipients. By using papercut, instead of sending it to receipients, we've captured the mail on our demo environment, with a preview of the HTML mail body and a PDF attachment of the Order Confirmation report.

For a brief guide, see Papercut SMTP setup