Documentation Index

Fetch the complete documentation index at: https://docs.staedean.com/llms.txt

Use this file to discover all available pages before exploring further.

Sales return order

Prev Next

This walkthrough provides an overview of how to send a notification for a sales return order.

You typically create a sales return order to compensate a customer who is dissatisfied with an item you sold them, for example, due to a quality issue or delivery of the wrong item.

Prerequisites

Template

Description

Default report

NM_SALES.RET.ORD

Notification Management Template: Sales Return Order Confirmation

Return Order Confirmation (6631)

Story

This connection uses the following pipeline elements:

  • The Record Change Event triggers on Modify and links to the internal document NM_RETURNORDERTRIGG, which contains two fields: the No. and Status fields from the Sales Header (Document Type = Return) table. When a return order releases, 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 sales return order.

  • 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 Microsoft Dynamics 365 Business Central report functionality.

  • The Email Writer endpoint sends the email.

  • The internal document NM_SALESRETURNORD 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.

RO User Event

Setup

  1. Import the NM_SALES.RET.ORD.zip configuration package, or use the Business Integration Solutions template if available.

    RO Import

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

    Email Account

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

    Settings

Process

  1. Create a sales return order with some details and release it.

  2. Open notification NM_SALES.RET.ORD and observe that the released return header is captured by the Record Change Event activity.

  3. Process the notification.

Result

RO 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 Return Order Confirmation report.

Note

For a brief guide, see Papercut SMTP setup.