Set up: Magento 2 Integration
21 June 2021
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
- Log in to Magento
- Click System, then User Roles
- Click Add New Role and then Name Role (we recommend naming it “anpost”)
- 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
- In the Sales folder:
- Once the permissions are set, click Save Role Permissions
- Click System > All Users
- 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.
- Again, we recommend naming your user “anpost”. You will need to use a real email address. You will also need to create a password.
- Open User Role, assign the user role to “anpost” role and then click Save User
- Next, we need to set up Order Statuses. Go to Stores > Order Status
- 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 |
Status Code | Status Label |
---|---|
partial_imported_scurri | Partially Imported to An Post |
partial_shipped_scurri | Partially Shipped via An Post |
- Once they are created, click Assign Status to State
- For the first three order statuses we created; choose the order status and assign the order state to Complete, then click Save Status Assignment
- 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
- If using the partial shipment order statuses; assign the order state to Processing.
- 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
eCommerce Hub Setup
- Log in to eCommerce Hub
- Click Setup, then click Integrations
- Click Add New Integration and then click +Add button beside Magento 2
- Fill in the username and password created earlier in Magento
- The Magento hosting URL should look something along the lines of https://eCommerceHub.anpost.com/
- Click Save and you're done!
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.