Open the Promote section.
Click Create promotion.
Enter a name. This is for your reference.
Enter the code, specify the period during which the promotion code is valid, and click Create.
The promotion code can be used an unlimited number of times. If you want to end the promotion, simply disable or delete it.
Next, you need to link this promotion to a resource. To do this, go to the resource configuration and create a Pricing component.
Enter the title. This will appear on the order invoice.
Specify the formula for the discount. For example, enter -20 and select percentage. Then click the Add condition button.
Select Promotion from the list of conditions. Then choose the promotion you created and save it.
If you have multiple resources, you can apply these settings to all of them. For more details, please see
here.
You can see the result in action. Create an order and enter the code to receive the discount: 12345.