Create vouchers in Magento and Business Central
This guide provides step-by-step instructions for creating a new voucher using a Magento 2 demo account and Business Central.
Gift vouchers need to be set up in Business Central before they can be set up in Magento Webadmin.
Prerequisites in Business Central
Before setting up a voucher in Magento, complete the following steps in Business Central:
- Make sure the Gift Voucher Enabled option in Magento Setup is disabled for Magento 2 projects.
- Make sure the external_voucher_services exists in the Web Services administrative section. If it does not exist, create it.
- (Optional) Test the webservice:
- Log into your Business Central account
- Click the
button, enter Web Services, and choose the related link.
- Search for ”external_voucher_services”
- Click the link in the SOAP URL tab.
You are redirected to a new page, and prompted for credentials. - If needed, retrieve your username and password from Magento Admin > NaviPartner > NaviConnect > Integration > Service Setup, then log in.
If an XML schema service definition file appears, the service is working. If an error appears instead, you will not be able to proceed.
Prerequisites in Magento Webadmin
- Make sure the Use NaviConnect Credentials option is set to yes in NaviPartner > Settings > Voucher.
Procedure in Magento
- Log into Magento Webadmin.
- Click NaviPartner > Settings > Voucher.
- Confirm that Use NaviConnect Credentials is set to Yes in Service Setup.
- Set Is Active to Yes in the Setup panel.
- Ensure that Creation Type Code matches the retail voucher type in Business Central.
If you don’t have access, contact the retail consultant who set up that particular voucher in Business Central to check. - Click Save Config in the top-right corner.
- Clear the cache in System > Cache Management.
- Navigate to Catalog > Products.
- Click the Add Product dropdown, and select Gift Voucher.
- Fill out the product details, including product name, SKU, quantity, and stock status.
- Under Quantity, click Advanced Inventory and enable Allow Qty below 0 in Backorders.
Ensure the Use Config Settings checkbox is unchecked to make this option editable. - Select In Stock for Stock Status.
- In the Content panel, click Edit with page builder.
- Finalize the design, preview if necessary, and click Save.
Next steps
Add the voucher in the main menu
Once you’ve created a new voucher, you may want to place it in a main menu via a smart menu. To do so, follow the provided steps.
- From Magento admin click NaviPartner > Extensions > Smart Menu.
- Click Default Category in the left-hand list and select Add Menu Under Selection.
- Complete the required details in the Smart Menu.
- Click Save.
Set the voucher amount
- From Magento admin click NaviPartner > Settings > Voucher.
- Scroll down to the Setup section.
- Check the currency, type, and value of the voucher in Price Configuration.
The values shown do not include VAT.
Configure taxes for the voucher
- Navigate to Catalog > Products.
- Locate the voucher you just created.
- Under the Action tab, click Select, then Edit.
- Find the Tax Class option and ensure Taxable Goods is selected.
- Click Save.
Purchase the voucher
To add the voucher to the cart and complete the checkout process, follow this guide.