Note: Are you using Magento 2.0 or newer? Check out this article!
This article consists of 3 parts
- Filling in your basic Magento data
- Connecting your product feed through the REST API
- Optional: Connect your store data through the SOAP USER
1. Filling in your basic Magento data
We need you to fill in 3 values:
- URL: This is the URL of your webshop. Example: "https://mywebshopURL.com"
- Version: Here you can select whether you are using "version 1.9 and below" or "2.0 and higher". Since you are following the 1.9 guide, select this option.
- Admin URL: Here you fill in the admin URL of your webshop. Example: "https://mywebshopURL.com/example"
Make sure you do not add "/" to the end of the admin URL. This often causes the connection to fail.
2. Connecting your product feed through the REST API
Note: Magento 1.9's connection method consists of a good amount of steps. It is very important to follow the steps accurately as there is a lot of room for errors to occur.
2.1 Create REST Application
In Magento's administration panel, go to System > Web Services > REST - OAuth Consumers. Click on "add new".
After clicking on "add new" the following menu opens up. The following steps need to be taken here:
- Fill in a name. We recommend using something easy to recognize like "Datatrics".
- Copy and paste the Key / Secret into the channel connect fields in Datatrics (screenshot below)
- Fill in the current Admin Password to be able to continue
- You can leave the callback fields blank. We do not need them to be filled in.
Save the consumer and you are done with this step.
2.2 Create and assign a REST Role
Head over to System > Web Services > Rest - Roles.
The first tab (role info) simply requires you to fill in a name for this role. Once again, we recommend using a simple name like "Datatrics".
In the second tab (the screenshot displayed above) you need to select what resources this role is allowed to access.
The basic requirements are read persmission to: Customers, Orders, Products, Stock and Categories. You can however give us access to as many things as you want. It is possible to select "all" in the dropdown menu at the top.
Note: Even though there is the option to select "Delete" and "Update", we will never do more with this access than simply retrieve data.
Now save the role and you are done with this step.
2.3 Check the REST Attributes
Head over to System > Web Services > Rest - Attributes.
After navigating to this page, see if the "admin" Attribute is present. If this is not the case, create a new Attribute "admin".
Click on the Attribute "admin" and grant it access to all resources by clicking on the dropdown menu and selecting "all".
Save the Attribute and you are done with this step.
2.4 Creating a REST User
Select permissions from the System menu and head over to Users. Head over to REST Role and assign the just created Role to the User.
Save the User and you are done with this step
2.5 Connecting Magento
Head back to your Datatrics channel connection page and make sure the following information is filled in:
- Admin URL
- Order Status
If you are not using multiple stores or simply do not care about them being seperated, you are now done. If you do want to load seperate store data, follow the steps in part 3.
3. Optional: Connect your store data through the SOAP USER
3.1 Create SOAP Role
Head to System > Web Services > Soap/XML-RPC-Roles.
Select "add new role"
Head over to "role resources" and give us permission to access at least read rights to Customers, Orders, Products, Stock and Categories.
Save the role and you are done with this step
3.2 Create SOAP User
Head to System > Web Services > Soap/XML-RPC-Users
Select "Add new User"
The following window will open up:
- User name: Fill in a username of your choice. You will need to fill this in later
- First Name: Simply fill in the first name of the user
- Last Name: Simply fill in the last name of the user
- Email: Fill in your email adress
- Current Admin Password: Fill in your admin password to be able to proceed
- New API Key: Fill in an API Key of your choice. This serves as a password to access this User.
- API Key confirmation: Repeat the API Key
- This account is: Needs to be set to "active" (default)
Next, head over to the tab "User Role" and assign the role you created in the previous step to this new User.
Save the User and you are done with the Magento side of things. Now head back to the Datatrics channel connect page.
- Fill in the just created User Name in the "Username" field
- Fill in your just created API Key in the "Password" field.
The connection will now be established. It may take several hours to load the data (especially if you have a lot of products to be synched).
Having issues even though you followed every step in this article? Check out this article for common issues and their solutions!