Set Up an Email Notification Profile in Dynamics 365 Commerce
Email notifications in Dynamics 365 Commerce allow organizations to keep customers informed about key events in their sales transactions, such as order creation, packing, and invoicing. Setting up an email notification profile involves creating organizational email templates, defining notification profiles, enabling optimized processing, and scheduling recurring jobs.
1. Create Organizational Email Templates
Before setting up an email notification profile, create templates that define the content of your emails.
Steps:
- Navigate to: Organization administration > Setup > Organization email templates.
- On the Action pane, select New.
- Complete the following fields:
- Email ID: Enter a unique identifier for the template.
- Sender name: Enter the name that will appear as the sender.
- Email Description: Provide a meaningful description.
- Sender email: Enter the sender’s email address.
- In the General section, select a default language for the template. This will be used when a localized version does not exist.
- Expand Email message content, select New, and provide:
- The language for the email.
- The email subject line.
- Ensure the Has body checkbox is selected if the email includes a body.
- On the Action pane, select Email message to define the email body template.
Create an Email Notification Profile
An email notification profile determines which events trigger notifications to your customers.
Steps:
- Navigate to: Modules > Retail and Commerce > Headquarters setup > Commerce email notification profile.
- On the Action pane, select New.
- Enter the following information:
- Email notification profile: Name to identify the profile.
- Description: Relevant description of the profile.
- Set Active to Yes.
Define Email Events
To specify which sales events trigger notifications:
- Go to Modules > Retail and Commerce > Headquarters setup > Commerce email notification profile.
- Under Retail email notification settings, select New.
- Choose the appropriate Email notification type from the drop-down list. (These options are defined by the
RetailEventNotificationTypeenum. Extend the enum to add new options.) - Select the previously created Email template from the Email ID list.
- Check Active.
- On the Action pane, select Save
Enable Optimized Order Notifications Processing
Enabling this feature allows the email notification process to run in parallel, improving efficiency.
Steps:
- Navigate to: System administration > Workspaces > Feature management.
- On the Not enabled tab, locate and select Optimized order notifications processing.
- In the lower-right corner, select Enable now.
- After activation, the feature will appear in the All tab as Enabled.
Schedule a Recurring Email Notification Process
To ensure timely delivery of transactional emails, set up a recurring batch job.
Steps:
- Go to: Retail and Commerce > Retail and Commerce IT > Email and notifications > Send email notification.
- In the Process retail order email notification dialog, select Recurrence.
- In Define recurrence, select No end date.
- Under Recurrence pattern, select Minutes and set Count to 1 to process emails as quickly as possible.
- Select OK to return, then OK again to complete the job setup.
Schedule a Clean-Up Job for Email Notification Logs
Regular maintenance of email logs ensures optimal system performance.
Steps:
- Navigate to: Retail and Commerce > Retail and Commerce IT > Email and notifications > Clean up email notification logs.
- Configure the following parameters:
- Also delete unsent emails: Set to Yes to remove failed emails.
- Retention days: Specify the number of days to retain emails; only older emails will be deleted.
- To schedule recurring clean-up, select Recurrence and configure:
- Recurrence pattern: For example, select Months and set Count to 3 to clean logs every 3 months.
- No end date to keep the job running indefinitely.
- Select OK to return, then OK again to finalize the setup.