ChannelEngine: why are my orders not being imported?

About this document

This document describes some of the issues that may affect the import of orders within ChannelEngine, as well as potential solutions to solve them.

Table of contents

Introduction

Connections

Introduction

If your order is stuck on status New on ChannelEngine, it almost certainly means that your store-management software or order management system has not yet successfully retrieved the order from ChannelEngine. The reason for this can vary depending on your system/connection, but in almost all cases you should be able to find the root cause yourself.

If an order is acknowledged by your order management service, the status of the order switches to In progress and a Merchant order number is visible on ChannelEngine. This is the unique reference number on your own order management system. E.g.: the Magento or Prestashop orderId, or the unique order number your enterprise resource planning (ERP) uses. By looking up that number in your own system, you should be able to find the order in question.

ChannelEngine back-end: order details

The most common causes are:

  • One or more ordered products are unavailable or unknown
  • One or more of the order fields contain information that the system does not accept (e.g.: a house number addition that is too long)
  • The order connection is somehow disabled

Connections

A list of connection types and the most common order-related issues linked to them can be found below.

Magento 1

During the installation of Magento 1, three cronjobs are set up. One of these,  ce_import_orders, is responsible for calling ChannelEngine's API for new orders. 

If your orders are not being imported from Magento, first check if your cronjobs are enabled. You can manually trigger the script executed by the cronjob on ChannelEngine under System > ChannelEngine > Settings > Manually import orders.

You also have the option to manually call the two other cronjobs: Manually import returns, and Generate product feed.

Selecting  Manually imports orders results in a green button as feedback, indicating that the task has been successfully executed. This usually means that orders have been imported, however, it is purely a check if the task was successful – not if orders have been retrieved.

If the button turned red or the orders are still not imported, you can download the log to check the errors. This log contains the Magento exceptions, including the stack trace. It can look a bit intimidating if you have no previous experience with such errors. Scroll down to the bottom for the newest error. Note that Magento errors are very cryptic and short, so if it is unclear what a specific error means, get in touch with your contact point at ChannelEngine.

Below is an example of such an error message and its stack trace:

   --------------------
   2018-10-22T13:10:53+00:00 ERR (3): exception 'InvalidArgumentException' with message 'invalid length for $phone when calling MerchantOrderResponse., must be smaller than or equal to 20.' in /data/web/public/lib/ChannelEngine/vendor/channelengine/api-client-php/lib/Model/MerchantOrderResponse.php:509

   Stack trace:
   #0 /data/web/public/lib/ChannelEngine/vendor/channelengine/api-client-php/lib/ObjectSerializer.php(291): ChannelEngine\ApiClient\Model\MerchantOrderResponse->setPhone('\xE2\x80\xAD+44 7464 957...')
   #1 /data/web/public/lib/ChannelEngine/vendor/channelengine/api-client-php/lib/ObjectSerializer.php(236): ChannelEngine\ApiClient\ObjectSerializer::deserialize(Object(stdClass), '\\ChannelEngine\\...', NULL)
   #2 /data/web/public/lib/ChannelEngine/vendor/channelengine/api-client-php/lib/ObjectSerializer.php(291): ChannelEngine\ApiClient\ObjectSerializer::deserialize(Array, '\\ChannelEngine\\...', NULL)
   #3 /data/web/public/lib/ChannelEngine/vendor/channelengine/api-client-php/lib/Api/OrderApi.php(347): ChannelEngine\ApiClient\ObjectSerializer::deserialize(Object(stdClass), '\\ChannelEngine\\...', Array)
   #4 /data/web/public/lib/ChannelEngine/vendor/channelengine/api-client-php/lib/Api/OrderApi.php(294): ChannelEngine\ApiClient\Api\OrderApi->orderGetNewWithHttpInfo()
   #5 /data/web/public/app/code/community/Tritac/ChannelEngine/Model/Observer.php(147): ChannelEngine\ApiClient\Api\OrderApi->orderGetNew()
   #6 /data/web/public/app/code/community/Tritac/ChannelEngine/controllers/Adminhtml/CeController.php(23): Tritac_ChannelEngine_Model_Observer->fetchNewOrders()
   #7 /data/web/public/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Tritac_ChannelEngine_Adminhtml_CeController->ordersAction()
   #8 /data/web/public/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('orders')
   #9 /data/web/public/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
   #10 /data/web/public/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
   #11 /data/web/public/app/Mage.php(684): Mage_Core_Model_App->run(Array)
   #12 /data/web/public/index.php(83): Mage::run('en', 'store')
   #13 {main}
   --------------------

In this case, a customer submitted a phone number that contained more than 20 characters (usually a phone number containing spaces) – which Magento could not handle. This can be resolved by selecting the pencil icon in the order information on ChannelEngine and removing the unnecessary spaces.

The most common order-related issues with Magento 1 are listed below, along with possible solutions:
  • Cronjobs are disabled - enable cronjobs or run the task manually.
  • The product sold is now unavailable/out of stock - cancel the order and verify the stock/availability on ChannelEngine.
  • The address information cannot be parsed properly (usually fields containing data which is longer than the restriction in Magento) - some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.
  • The region/state requirement is enabled for specific countries - disable this requirement. Instructions on how to disable it can be found on How to Disable Province Field in Magento. Almost no marketplace submits this information, therefore this field is almost always empty.
  • The product is sold in a country that is disabled within Magento either enable these countries on Magento or make sure that the countries you sell in are correctly configured for each marketplace. This can happen if you, for example, have not excluded countries from your Amazon shipping templates.
NB: in some rare cases, orders can retain the In progress status while not showing up in Magento's order grid. This is usually due to a different plugin interfering with the webhook used by ChannelEngine to submit orders, resulting in a semi-random Merchant order number. If this happens, please contact ChannelEngine's Support to verify.

Magento 2

By using Magento's API, ChannelEngine ensures that updates from Magento usually do not cause problems that require a lot of changes to ChannelEngine's plugin – though it does limit the available options in terms of what can be submitted to or retrieved from Magento.

By default, ChannelEngine calls Magento's API every five minutes to create a guest cart and submit the order. If this fails, ChannelEngine gets a response through the API which is stored on ChannelEngine's end, and can be seen in the notifications on ChannelEngine.

ChannelEngine back-end: notifications

In the example above, the product ordered is no longer available on Magento. This is either due to the product being disabled or to the stock being equal to zero, with backorders also disabled.

The most common order-related issues with Magento 2 are listed below, along with possible solutions:

  • The task for calling the Magento API is disabled or failing - this can be checked on ChannelEngine under Settings > Scheduled tasks. If you need further assistance, please contact ChannelEngine's Support.
  • The product sold is now unavailable/out of stock - cancel the order and verify the stock/availability on ChannelEngine.
  • The address information cannot be parsed properly (usually fields containing data longer than allowed within Magento) - some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.
  • The region/state requirement is enabled for specific countries - disable this requirement. Instructions on how to disable it can be found on How to Disable Province Field in Magento. Almost no marketplace submits this information, therefore this field is almost always empty.
  • The product is sold in a country disabled within Magento either enable these countries on Magento or make sure that the countries you sell in are correctly configured for each marketplace. This can happen if you, for example, have not excluded countries from your Amazon shipping templates.

WooCommerce

When connected to WooCommerce, ChannelEngine makes use of webhooks which call ChannelEngine's order API. This is why it is very important that the correct callback URL, as described in the WooCommerce guide, is configured on ChannelEngine. Without a proper callback URL, ChannelEngine is unable to notify WooCommerce and orders are not retrieved.

There is currently no built-in logging for WooCommerce errors, so there is no easy way to discover the root cause of issues. The most common order-related issues with WooCommerce are listed below, along with possible solutions:

  • The task that calls the WooCommerce callback URL is successful, but no orders are retrieved - this is usually caused by caching, such as Varnish, being applied to the callback and generating a response – but not activating the webhook. Exclude all relevant endpoints/directories related to ChannelEngine from your caching service.
  • The product sold is now unavailable/out of stock - cancel the order and verify the stock/availability on ChannelEngine.
  • The address information cannot be parsed properly (usually fields containing data longer than allowed within WordPress) - some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.

Prestashop 1.6

Much like WooCommerce, ChannelEngine communicates with Prestashop 1.6 via a webhook which calls the ChannelEngine order API. This is why it is very important that the correct callback URL, as described in the Prestashop guide, is configured on ChannelEngine. Without a proper callback URL, ChannelEngine is unable to notify Prestashop and orders are not retrieved.

Once orders are retrieved, each order is processed (by creating a guest cart) and submitted to all the default validation rules Prestashop uses – much like with Magento. If an order is not accepted by Prestashop, it is difficult to find out the exact reason. This is because by default Prestashop does not log these errors, returning a generic error 500. More information on how to enable logging can be found on What is the HTTP 500 error and how can I fix it in my PrestaShop online store?.

By running the export manually and logging the HTTP(S) calls, ChannelEngine's Support team can usually learn more about the cause of the issue.

The most common order-related issues with Prestashop 1.6 are listed below, along with possible solutions:

  • The task that calls the Prestashop webhook is disabled or failing - this can be checked on ChannelEngine under Settings > Scheduled tasks. Contact ChannelEngine's Support to check and resolve the issue.
  • The product sold is now unavailable/out of stock - cancel the order and verify the stock/availability on ChannelEngine.
  • The address information cannot be parsed properly (usually fields containing data longer than allowed within Prestashop) - some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.

Prestashop 1.7

Coming soon.

Shopify

If you are using the Shopify merchant integration, orders are exported via the Shopify API.

ChannelEngine back-end: connection settings

This is done by connecting to the shop uniform resource identifier (URI), as configured in the plugin settings. The most common order-related issues with Shopify are listed below, along with possible solutions:

  • The task that exports orders is disabled or failing - this can be checked on ChannelEngine under Settings > Scheduled tasks or under the Task section of the plugin itself. If you need further assistance, please contact ChannelEngine's Support.
  • The product sold is now unavailable/out of stock - this results in a notification on ChannelEngine, so make sure you have the relevant notifications enabled. Cancel the order and verify the stock/availability on ChannelEngine.
  • The address information cannot be parsed properly (usually fields containing invalid data, such as the phone number not being formatted according to the E.164 standard) - this results in a notification on ChannelEngine, so make sure you have the relevant notifications enabled. Some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.

ChannelEngine API

If the order connection is done via ChannelEngine's API, your order system makes a regular call to GET /v2/orders/new to retrieve all orders with the status New. The most common order-related issues with the ChannelEngine API are listed below, along with possible solutions:

  • The system which implemented ChannelEngine's API is not performing the call - contact your developer to check if this is the case, they can look for possible error messages.
  • The system using ChannelEngine's API retrieves the orders, but does not acknowledge them (via POST /v2/orders/acknowledge) with a Merchant order number. The order remains marked as New on ChannelEngine - this may cause orders to be continuously imported, which is undesired. Contact your developer to check if this is the case, they can look for possible error messages.
  • The address information cannot be parsed properly (usually fields containing data longer than the restriction in your order management system) - some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.

Because the implementation of ChannelEngine's API in your own system is completely outside ChannelEngine's influence, most issues must be solved by the person who implemented it. When API errors occur, ChannelEngine does log a short error message, though the system communicating with ChannelEngine's services through the API contains the original API call and errors to debug issues.

Custom plugin/connection

In case of a custom build plugin/connection (e.g.: Unit4 or Exact), orders are exported from ChannelEngine through a SOAP connection. Successfully submitting orders through such a system requires the inclusion of many details, such as a debit number. This can be configured on ChannelEngine.

The most common order-related issues with custom plugins/connections are listed below, along with possible solutions:

  • The task that submits orders is disabled or failing - this can be checked on ChannelEngine under Settings > Scheduled tasks. Contact ChannelEngine's Support to check and resolve the issue.
  • Specific settings for your plugin are missing or incorrect - while some verification is applied when initially setting up the plugin, information missing for a new channel can cause errors. Check the settings on ChannelEngine under Setup. If you need further assistance, please contact ChannelEngine's Support.
  • The address or customer information cannot be parsed properly (usually fields containing data which is longer than the restriction in your system) - some fields can be manually altered on ChannelEngine to fix this. Otherwise, please contact ChannelEngine's Support.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.