To handle the gift campaign requirements, we need to do the following:
- Define the Gift Campaign table. This table must be able to store data as follows:
Customer Category |
Item |
Start Date |
End Date |
Minimum Quantity Ordered |
Gift Quantity |
GOLD |
ITEM1 |
01/01/2019 |
30/03/2019 |
5 |
1 |
GOLD |
ITEM2 |
01/01/2019 |
30/03/2019 |
10 |
2 |
SILVER |
ITEM1 |
01/01/2019 |
30/03/2019 |
7 |
1 |
- Create the page (user interface) for handling the gift campaign data (a list page).
- Handling the business logic for assigning gifts to a sales order is based on Customer Category and the active campaign for this category. This will be done in an external codeunit.
- Add a new function to the Sales Order page interface in order to permit the sales operator to automatically insert a gift line when the sales order is finished.
- When the sales operator inserts the Quantity in a sales order line, we want to check the active campaigns and alert the user if the ordered quantity is near to an active promotion.