Skip to main content

Set up: Magento 2 Integration

21 June 2021

How will orders be imported to eCommerce Hub 
You’ll mark the orders as “Ready to Import to An Post" by invoicing and shipping the orders in Magento. eCommerce Hub checks Magento 2 every 3 minutes for shipments that are ready to import. eCommerce Hub will import the shipments, check your shipment rules and allocate those shipments to your preferred carrier and service with no need for manual intervention. When you manifest at the end of the day, eCommerce Hub will update the orders in Magento to include their tracking information and mark them as shipped.
 

There are two parts to the eCommerce Hub integration with Magento 2 which you will need to do. The first part is a configuration within Magento, the second part is a configuration within eCommerce Hub.

Magento 2 setup

  1. Log in to Magento
  2. Click System, then User Roles
  3. Click Add New Role and then Name Role (we recommend naming it anpost”)
  4. Click Role Resources on the left and set the Role Permissions
    • The fastest option is to enable All permissions (eCommerce Hub will only read your Order and Product data and create new Shipments)
    • If you want to set more detailed permissions, ensure you activate the following:
      • In the Sales folder:
        • - Sales -> Operations -> Orders -> Actions -> View
        • - Sales -> Operations -> Orders -> Actions -> Comment
        • - Sales -> Operations -> Orders -> Shipments
      • In the Products folder:
        • - Product -> Inventory -> Catalog
        • - Product -> Inventory -> Categories
  5. Once the permissions are set, click Save Role Permissions
  6.  Click System > All Users
  7. Click Add New User and fill in the user details
    • Again, we recommend naming your user “anpost”. You will need to use a real email address. You will also need to create a password.
      • NB We will need to use this password later so keep note of it.
  8. Open User Roleassign the user role to “anpost” role and then click Save User
  9. Next, we need to set up Order Statuses. Go to Stores > Order Status
  10. Now click Create New Status and create the following 3 order statuses
    • N.B. these must be set up using the exact status codes below to match the defaults in eCommerce Hub. However, the status label can be different
Status Code Status Label
ready_to_import_scurri Ready to Import to An Post
imported_to_scurri Imported to An Post
shipped_scurri Shipped via An Post
If using Partial Shipments, you will also need to set up the following Order Statuses.
Status Code Status Label
partial_imported_scurri Partially Imported to An Post
partial_shipped_scurri Partially Shipped via An Post
  1. Once they are created, click Assign Status to State
  2. For the first three order statuses we created; choose the order status and assign the order state to Complete, then click Save Status Assignment
  3. Repeat this for all three statuses.
    • On the "Ready to Import to An Post" order status make sure to tick Use Order Status As Default
  4. If using the partial shipment order statuses; assign the order state to Processing.
  5. You will also need to assign the “Ready to Import to An Post” status to Processing, but make sure you do not tick the box to make this the default Status for Processing.
    • This status can be assigned to both Complete and Processing simultaneously
This concludes the Magento side of the integration - now we move to eCommerce Hub.
eCommerce Hub Setup
  1. Log in to eCommerce Hub
  2. Click Setup, then click Integrations
     
  3. Click Add New Integration and then click +Add button beside Magento 2
     
  4. Fill in the username and password created earlier in Magento
  5. The Magento hosting URL should look something along the lines of https://eCommerceHub.anpost.com/
  6. Click Save and you're done!
This concludes the setup of the eCommerce Hub-Magento 2 integration! Now when you invoice and ship your orders in Magento 2, eCommerce Hub will import your orders automatically.
Magento Status Page
You can view the Magento 2 integration status page from the menu bar on the left by clicking Setup, then Integrations, then, beside the Magento 2 integration, Status.
 

You've exceeded the maximum login attempts
Your account has been locked for 30 minutes to prevent fraudulent activity
Your session has timed out
Would you like to log in again to continue?
Marketing Preferences

We have updated our Marketing preferences to give a customised experience of when and how we can contact you.

Let's stay in touch

Get the latest offers and news from the An Post group of companies by:

We have updated our terms of service