Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support Teams Worldwide

Sending email notifications for Retail orders [AX 2012 R2 and R3]

Microsoft Dynamics AX 2012 R2 had introduced a new feature to automatically generate email messages to recipients based on specific events for Online Orders such as order created, picked, packed, shipped, etc.  With the addition of Call Center in AX 2012 R3, this feature was expanded to encapsulate other Retail orders.  This feature was designed to only work for Retail Sales Orders as AX queries orders in the SalesTable joined with the RetailSalesTable (see the class information at the bottom of this bog).

This feature is only applicable to orders created in the following instances:
AX 2012 R2 for Retail – Online Store
AX 2012 R3 for Retail – Online Store, Brick-and-Mortar Stores, and Call Center

BASIC OVERVIEW

1. Setup pre-requisite: The existing Microsoft Dynamics AX email notification infrastructure has been leveraged for this feature.  For additional information on configuring the email functionality in AX, see the following TechNet article: Configure email functionality in Microsoft Dynamics AX  https://technet.microsoft.com/en-us/library/aa834374.aspx

2. Configure how the email messages will look when sending to customers.  Go to: Organization administration >> Setup >> E-mail templates
You will notice that out of the box Microsoft has included default email templates as samples to get you started.  Modify these or create new ones to meet your business requirements.  Keep in mind that not all AX fields are available to simply be added into the template.  The fields used for e-mail templates are hardcoded throughout the code in \Classes\RetailOENInfo.  If you would like additional fields, you will need to look into customizing the code and possibly related tables.

    

     Example e-mail:
    

3. Configure the E-mail templates to their related sales order actions.  Go to: Retail >> Setup >> Parameters >> Retail Email notification profile
You can create multiple email notification profiles but only one can be set as the default in the Retail Parameters.  When configuring the profile, you will have the option to select and activate several email notification types.  The Email notification types are hardcoded specific events AX.  Each will generate their unique email message by using the assigned email template (defined as the E-mail ID on this form).

Customers can be notified for the following activities:
     a. Order created: An email notification can be sent when a new order is created for a customer.
     b. Order confirmed: An email notification can be sent when an order is confirmed.
     c. Picking completed: An email notification can be sent when the order items are picked for packing at a store or a distribution location.
     d. Packing completed: An email notification can be sent when the packing is complete and order items are ready to be shipped.
     e. Order shipped: An email notification can be sent when the order is shipped, advising the customer of the delivery date and tracking information based on the shipping method selected.
     f. Payment failed: Email notification can be sent advising the customer regarding payment failure for the order.
     g. Customer created: Email notification can be sent for new customers.
     h. Password reset: Email notifications can be sent to advise customers when their account password is reset.

    

4. Set the default Email notification profile. Go to: Retail >> Setup >> Parameters >> Retail Parameters >> General >> Email notification profile
Select the email notification profile that will be used to automatically generate email messages to recipients based on users configured parameters.

    

5. Optional: You can also set an Email notification profile on the store – Retail >> Common >> Retail channels >> Retail stores >> Edit a store >> General >> Email notification profile
If this field is left blank, then the profile set in the Retail parameters is used.

    

6. To process the email notifications, go to: Retail >> Periodic >> Send email notifications
     a. It is recommended to set this up as with Batching processing to use the SMTP Server.  Set up the Recurrence to ensure timely emails are being sent.
     b. If you select to process this outside of batch, it will attempt to send emails from the local clients default email client. 

    

6. Once an order has been processed either Online, at the Store, or through Call Center along with any of the AX events of order created, confirmed, picked, packed, etc., the Send email notification batch processing will recognize the need to send the corresponding events email.  If you would like to modify or view how these events are recognized and tracked, view the following Class in the AOT:  RetailEventNotificationProcessor.

    

If you have any setup or configuration issues, please open a case with the support team.  Otherwise please share your general comments, ideas, or brief experiences below.

If you would like information on sending email receipts for POS transactions, click on the blog link below:
http://blogs.msdn.com/b/axsupport/archive/2015/03/06/sending-email-receipts-from-pos-transactions.aspx