Business Integration Solutions Documentation
Walkthrough: Sales Quote
About this walkthrough
This walkthrough provides an overview on how to send a sales quote notifictaion.
A sales quote allows a prospective buyer to see what costs would be involved for the work they would like to have done. Many businesses provide services that cannot have an upfront price, as the costs involved can vary. This can be due to the materials that would be used (which can differ depending on the individual needs of the customer), and the manpower that would be necessary. Therefore, it is common practice for these companies to provide the potential customer with a quote (or estimate) of how much it should cost. This quotation will be made by the company using the information that the potential customer provides, regarding the relevant elements that may affect the price. A quote can help the prospective buyer when deciding which company to use, and which services they are looking for.
Prerequisites
Template | Description | Default Report |
---|---|---|
NM_SALES.QUOTE | NM Template - Sales Quote | Sales - Quote (1304) |
Story
- This connection uses a Code Event to trigger the pipeline.
- On the Sales Quote page (page no. 41) 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 Quote.
- The XML Minifier Activity is used to clean the message of empty nodes/blocks that are not mandatory.
- The message is taken through the XMLSchemaValidator which makes sure the XML-message respects the internal document structure (ex. all the mandatory nodes are in the structure).
- 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_SALESQUOTE 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.
Task
Setup
- Import NM_SALES.QUOTE.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 Papercut SMTP server.
- On the notification page edit the EMAILWRITER and add the Account ID which is created in above step run the configuration once.
Process
- Open the Sales Quotes page.
- Create a new Sales Quote, say for the customer 20000 Selangorian Ltd.
- Click the Code Event button on the page (Send Notification).
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 Sales - Quote report.
For a brief guide, see Papercut SMTP setup