Hello group, a question, how can I start developing this exercise?
Create a User Event Script to automate the discount for customers who have made previous purchases.
• The script will be activated when creating or editing a sales order.
• It will verify if the customer is consistent through a custom field in their record.
• Depending on the number of purchases the customer has made in the last 3 months, different discount levels will be applied (15%, 18%, 25%).
• Discounts will only be applied to order items with an amount greater than $700.
• In addition to recording an audit log, the script should also send an email notification to the customer with the details of the applied discount.
If the order is updated, the script should recalculate the discount and update the audit log and the email notification accordingly.