BeyondERP.Newsletter
Menu

Job page · Retail and Commerce

Delete expired discounts

A periodic job that deletes discounts that have expired.

Read the guide Back to Retail and Commerce

Used by
Retail merchandising manager, Retail service
Business process
Manage sales channels
Menu item
RetailDiscountsCleanupScheduler
Setup steps
1 on this page

How this guide was checked

Checked in Dynamics 365
Version 10.0.49: the menu item, form, table and security, the page.
Recommended values
Based on Microsoft's documentation. A sound starting point to adjust to your own business requirements.
Tests
A ready-to-run test, “Expired discount is deleted”, to confirm this setup in your own test environment.
Show what matters for
PAGE GUIDEWhat the page does and how to use it8 sections. Choose a role to highlight what matters to you.
Everyone

1What it is and why

What it isA periodic job that deletes discounts that have expired.
What you do hereRun this job to remove expired discounts from the system.
ExampleFor example, BEAT runs about 400 promotions a year. With a retention period of 90 days, a summer discount that ended on 31 August is deleted from 29 November.
Delete expired discounts page in Dynamics 365
The page in Dynamics 365. page title tab to open what to set or check
Functional consultant · Solution architect

2Where it fits

Business processDevelop sales policies › Manage sales channels
Menu pathRetail and Commerce › Retail and Commerce IT › Clean up › Delete expired discounts
Set up firstCommerce parameters (Retention period in days) Microsoft Learn
Used next byAll discounts Microsoft Learn
Related pagesProcess commerce discounts Microsoft Learn
End user · Functional consultant

3How to do it

About the examples: Examples and screenshots in this guide use BEAT, a demo company in a Dynamics 365 test environment. Use your own company's codes and values instead of copying them.

When to run it

When to run itAfter discounts pass Retention period in days since they expired or were disabled
How oftenAs a recurring batch job
What the output showsDiscounts past the retention period are deleted, with their statistics.

Source: Microsoft Learn

Setup steps on this page

Delete expired discounts

Delete discounts that expired or were disabled more than the retention period ago.

How to use it

  1. Go to Retail and Commerce > Retail and Commerce IT > Clean up > Delete expired discounts.
  2. Expand Run in the background to set Batch processing, the Task description, Batch group, Private, Critical Job and Monitoring category.
  3. Select Recurrence to repeat the job, or Alerts to be told when it ends.
  4. Select OK to run, or Cancel to close without running.

Source: Checked in Dynamics 365

Common errors and fixes

MessageWhat to do
Expired discounts are never deletedRetention period in days is 0, which turns automatic deletion off. Set a number of days. Microsoft Learn
Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Delete expired discountsSet Retention period in days in the company pricing settings and schedule this job, so expired discounts don't pile up.Microsoft advises expiring discounts that are no longer valid, so the pricing engine considers fewer discounts.How long should expired discounts be kept?Setting the retention period to 0 and expecting discounts to be deleted: 0 means no deletion.Test: Expired discount is deleted

Feature management and licence

Licence or add-inIn this system 2 roles can open this page, among them Retail service and Retail merchandising manager.

Checked in Dynamics 365

Solution architect

5Design impact

If you change it laterDeleting a discount removes its statistical information too. Microsoft Learn
Technical architect

6Technical

Menu itemRetailDiscountsCleanupScheduler Checked in Dynamics 365
FormDialog Checked in Dynamics 365
Who can open it

2 security roles. Select a role to see its duties and privileges.

  • RoleRetail merchandising managerRetailMerchandisingManager
    • DutyMaintain retail campaign discountsRetailDiscountOfferMaintain
      • PrivilegeMaintain retail discountsRetailDiscountsMaintain
  • RoleRetail serviceRetailService
    • DutyMaintain retail campaign discountsRetailDiscountOfferMaintain
      • PrivilegeMaintain retail discountsRetailDiscountsMaintain
Roles worked out from Microsoft's standard security setup and checked in a working Dynamics 365 system (version 10.0.49)
Roles to set it up and use itTo use itRetail service RetailServiceRetail merchandising manager RetailMerchandisingManagerGive people one of these roles. On this system, 2 roles can run this page.Checked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=RetailDiscountsCleanupScheduler
Data migrationLoad order: Delete expired discounts has no data entity in Data management, so it can't be loaded from a file or a configuration template. It works on data that is already in the system, so there is nothing to load.Checked in Dynamics 365
Everyone

8Sources