Configuration for Bexio Shopware Integration
The configuration page
Open up the "My Extensions" page: and open the configuration page of the plugin:
General and API credentials
The plugin allows you to add two API keys. One for the production Bexio environment and one for the test environment. If you don't have two different Bexio environments, you can simply add the very same API key to both fields. With the selection "Operating mode" you can select which environment should be used. This is handy if you have a staging shopware environment which should send the invoices to the test environment of Bexio.
The API token can be generated in your Bexio account: Settings -> Apps & API -> API key -> Generate token.
Modules
In this section you can enable the different modules of the app. Right now it is only Orders to invoice sync. If enabled, our app generates a new invoice for each new order in your shop depending on the configuration of the payment method.
Orders
In this section you can configure the following things:
- Bexio User ID: This is the ID of the user to whom we assign all invoices.
Payment methods
The app adds three new custom fields to the Shopware payment methods. You can see them in the payment method detail page in your shopware administration:
There are three fields:
- Checkbox if orders with this payment methods should generate a Bexio invoice.
- Select the matching Bexio payment type.
- Select the matching Bexio bank account.
This is handy if you for example only want to generate invoices for orders with the payment method "Invoice" and not for orders with the payment method "Paypal". With these custom fields, you can configure it to your needs.
The Bexio payment type is used here in the invoice creation process:
The Bexio bank account is used here in the invoice creation process:
as well as for the bank account when marking orders as paid.
The Bexio bank account id is the id of the bank account in Bexio. You can find the bank account id in your bexio account in the URL bar if you click on a bank account in the bank account list: In this example the ID is 1.
Automatic sending of invoices through Bexio
The app adds a custom field to the payment methods to enable the automatic sending of invoices through Bexio. If this is enabled, the invoices in Bexio are not only created but will also be directly sent to the customer.
In Bexio there is a nice log of the sent invoices:
Unfortunately, the API of Bexio does require us to send a email subject and body and we can't use your default email template. Therefore, it is required to fill out the email subject and body in the payment method settings in shopware.
Tax mapping
The app adds a custom field to map your tax rates to the Bexio tax rates.
Please make sure that these ids are correct. Otherwise, the invoice creation will fail.
You can find the ids in your Bexio account here. The id is visible in the URL of the tax rate in the detail view in bexio. In this example the ID is 13:
Shipping method
By default, we write a custom position for the shipping costs in the invoice in Bexio and use the default tax ID 28. However this can be changed in the shipping method settings in shopware. Please have a look at the custom fields in the shipping method detail page:
Here you can add the Bexio product id to map the shipping method to a Bexio product and also the tax id.
Please remember that the bexio product id is the id of the product in Bexio. You can find the product id in your bexio account in the URL bar if you click on a product in the product list:
This allows you to map different shipping methods to different Bexio products.
Salutations
The app adds a custom field to salutations to map your salutations to the Bexio salutations. When the Bexio salutation id is filled out, the app will use this salutation id for the invoice creation.
In shopware, it is a new custom field in the salutation detail page:
In Bexio, you can find the salutation IDs in the setting You can find the salutation ID in your bexio account in the URL bar if you click on a salutation in the salutation list:
(Optional) Product ID
The app adds a custom field to products to map your products to the Bexio products. When the Bexio product id is filled out, the app will use this product id for the invoice creation. Otherwise, we just create a new custom position. The difference is shown below. In Bexio, it is marked with a different icon.
Product ID in Shopware
There is a new custom field in the product detail page:
Product ID is filled out
Product ID is not filled out
Also, if the product ID is set, the product name and description of Bexio is used for the invoice and the product name and description coming from Shopware are ignored.
Please make sure that the product id is correct if you decide to use this feature. Otherwise, the invoice creation will fail.
You can find the product ID in your bexio account in the URL bar if you click on a product in the product list:
In the future we might support the usage of the product number instead of the product id.