Create vouchers in Magento and Business Central
This topic describes the process of creating a new voucher by 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
- 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 not, it should be created.
- (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 to provide your credentials. - If needed, retrieve your username and password from Magento Admin > NaviPartner > NaviConnect > Integration > Service Setup, then log in.
An XML schema service definition file is displayed. If you see an error instead of an XML schema, you will not be able to proceed with the process
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.
- Make sure that the option Use NaviConnect Credentials is set to Yes in Service Setup.
- Set the Is Active option to Yes in the Setup panel.
- Make sure the Creation Type Code matches the retail voucher type in Business Central.
If you don’t have access, you can contact the retail consultant who set up that particular voucher in Business Central to check. - Once you’re done with the setup, click Save Config in the top right corner.
- Make sure you’ve cleared the cache in System > Cache Management.
- Navigate to Catalog > Products in Magento admin.
- Open the Add Product dropdown, and click Gift Voucher.
- Fill out the details on the product page such as product name, SKU, quantity, and stock status.
- Click Advanced Inventory option under Quantity and enable Allow Qty below 0 in Backorders.
Make sure the Use Config Settings checkbox isn’t checked, as it makes the previous option non-editable. - Select In Stock for the Stock Status.
- Scroll down to the Content panel, and click Edit with page builder.
- Once you’ve finalized the design and provided the necessary details, you can either preview the design or simply Save.
Next steps
Place 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 list on the left, and click Add Menu Under Selection.
- Fill out the rest of the details inside the Smart Menu.
- Click Save.
Determine voucher amount
- From Magento admin click NaviPartner > Settings > Voucher.
- Scroll down to the Setup section, and look the currency, type, and value of the voucher in Price Configuration.
Bear in mind that the values are prices without VAT included.
Set up taxes for the voucher
- Click Catalog > Products in the main menu of Magento Webadmin.
- On the list of products find the voucher that you’ve just created.
- Click Select under the Action tab, and then click Edit.
- Look for the Tax Class option in the new window, and make sure you’ve selected taxable goods within Tax Class option.
- Click Save.
Purchase the voucher
To add the voucher to the cart from the web store, and perform the checkout, follow this guide.