Magento 2: order not exported due to country or state restrictions
When forwarding orders to Magento 2 (via their internal API), orders follow the same logic as if it was an order directly placed on your Magento 2 store. So if you only allow orders from The Netherlands and Belgium on your awesomestore.nl storeview, this will also mean that ChannelEngine orders from a German seller will be rejected by Magento.
As with all order exports to Magento 2, in case an error occurs this will automatically log a notification in ChannelEngine stating what the cause of the error was. Unfortunately, a lot of Magento error messages may be a bit cryptic and unclear what they mean right away.
Should you get an error concerning countries, state/regions, or addresses this will almost certainly be due to the enabled and selected options for your storeview.
By selection ' View order' the order in question will be opened. Please take note of the address (specifically the country code) on the order.
Magento's own documentation regarding " Country Options" can be found here.
- On the Admin sidebar, go to Stores, > Settings > Configuration.
- In the left panel under General, choose General.
- Expand the Country Options section.
- In the Allow Countries list, select each country from which you accept orders for that storeview. If you have only one store view you can leave the 'Use system value' enabled, but in that case you have to make sure that the system values also allow the countries you want to accept orders from.
- In the Zip/Postal Code is Optional for list, select each country where your fulfillment solution requires a ZIP or postal code to be included as part of the street address.
Please note: Zip / Postal codes are often included on orders coming from ChannelEngine, the Region / State however is not.
- When you selected all the countries you wish to enable sales from, click on 'Save Config' at the bottom of the page.
Note: This is a common recurring issue especially if you are selling on a French marketplace like Amazon.fr (but may also apply to other marketplaces and other countries). By default, many additional countries and regions are enabled for (Amazon) France which you will not have enabled by default in a French storeview. Some examples are small neighboring states such as Monaco and Andorra, the island of Corsica and the French overseas territories like Guadeloupe, Martinique, Mayotte, Saint-Martin.
Magento's own documentation regarding "State Options" can be found here.
- On the Admin sidebar, go to Stores > Settings > Configuration.
- Under General in the left panel, choose General.
- Expand the State Options section and do the following:
- In the State is required for list, select each country where Region/State is a required entry.
- Set the Allow to Choose State if It is Optional for Country field to one of the following:
Yes In countries where the state field is not required, includes the State field as an optional entry. No In countries where the state field is not required, omits the State field.
- When complete, click Save Config.
Note: If you are only selling in Europe and/or are using a storeview specifically for one or more European countries, we strongly recommend disabling the state requirement. Many marketplaces do NOT supply any state / region / province information so the order will be lacking that info, resulting in orders not being exported to Magento.
Magento's own documentation regarding "Shipping Methods" can be found here.
- On the Admin sidebar, go to Stores, Settings, Configuration, Sales, Shipping Methods.
- Depending on the type of shipping method you use (most sellers will use Flat Rate), choose the correct option from the menu.
- Expand the Shipping Method section.
- In the Ship to Applicable Countries section, make sure that 'All Allowed Countries' is selected if you have already verified these are correct. Otherwise, you can also uncheck 'Use system value' and select the countries you wish to allow orders from the Ship to Specific Countries section.
- When complete, click Save Config.