In the Promote section click Create gift card.
Enter a name and save.
Open the created gift card and click Open codes of the card.
Set the Quick access to codes from the dashboard checkbox if you want to open the list of codes directly from the dashboard.
In the code table, click Create code.
Enter a unique code.
It should not be the same as any other code used in the promotion tools.
If you leave this field blank it will be automatically generated when you save it.
Enter the dates when code is valid and comment.
If you want to limit the maximum number of reservations for this code, then specify it in the Reservations number field.
Specify the maximum total discount amount if needed.
If the field is left empty the discount amount will be limited only by the formula of the price component.
If you need to add multiple codes at once set the flag Create multiple.
Now you need to attach this code to the resource.
To do this, go to the resource configuration.
And create a Pricing component.
On the Parameters tab enter a name and price formula.
The name will be shown in the order invoice.
On the Constraints tab select the Gift card and choose created gift card from the list.
Make a test order and apply the code.
The discount was added, and the total amount became less.
In the code settings you can see the order where it was used and the code balance.