This article will show you how to synchronise your products and orders between Rezolve and Magento.
When you go through the wizard in the RXP for setting up ecommerce, you will get to a point where you select an eCommerce platform to connect to. When you select Magento, you will see the following screen:
This screen contains the following fields:
Name: The Store name
Magento Store URL: The url of your existing Magento website. This must be a secure SSL url.
Base URL: The url of your existing Magento website. This must be a secure SSL url.
API Version: This will always be V1 unless any custom work has been carried out. Please refer to your developer if this is the case.
Root Category ID: Your Magento store root category ID. Normally this is 2 but please check in your install.
API Authentication Method: This is the Authentication Mechanism that will be used to communicate with the your Magento instance. There are two options:
- Partial OAuth (No Handshake) : RECOMMENDED. Partial OAuth, there is no handshake that takes place i.e. verification that the 3rd party application (RCE) has authorization to access data from the clients Magento.
- Bearer Token Authentication (Magento <= 2.4.3): Bearer token authentication just uses the access token and sends it as a bearer token. This authentication mechanism is not considered secure as the access token never expires and there is no authorization handshake with the 3rd party application. The authentication method is only supported out of the box in Magento versions less than or equal to 2.4.3. In version 2.4.4 and above, the client will have to manually override to allow this method.
The next four values can be obtained by following the ‘Partial OAuth Authentication Setup’ section below
Access Token: The access token that is generated when merchant creates the integration in their magento store, merchant will need to provide this.
Access Token Secret: The access token secret that is generated when merchant creates the integration in their Magento store, merchant will need to provide this.
Consumer Key: The consumer key that is generated when merchant creates the integration in their Magento store, merchant will need to provide this.
Consumer Secret: The consumer secret that is generated when merchant creates the integration in their Magento store, merchant will need to provide this.
The next five values are auto-filled with some common values. If you or your developer has changed any of these please update with the correct values.
Payment Method: This can be found in Stores -> Configuration -> Sales -> Payment Methods
Shipping Method: This can be found in Stores -> Configuration -> Sales -> Delivery Methods
Order Complete State: This can be found in Stores -> Order Status
Order Cancelled State: This can be found in Stores -> Order Status
Order Closed State: This can be found in Stores -> Order Status
Partial OAuth Authentication Setup
Your Rezolve Merchant Portal must authenticate with your Magento store to have the authorization to import and export data.
In order to support his, you will need to create and activate an Integration in your Magento store.
Here’s what you need to do.
Log in to your Admin and click System > Extensions > Integrations to display the Integrations page.
Click Add New Integration to display the New Integration page.
Step 1: Create a New Integration
You are now in the New Integration creation page.
Name: In this field provide a unique name for the integration.
Email: In this field provide an email address.
Your Password: In this field provide your admin password.
You do not need to fill in Callback URL or Identity link URL
Click on the API tab.
Select the Magento resources the integration can access. You can select All resources, or we recommend to select a Custom list and include:
- Sales->Operations->Orders->Actions->Create (and all sub-items)
- Catalog->Inventory->Products (and all sub-items)
- Catalog->Inventory->Categories (and all sub-items)
- Stores->Attributes->Product (and all sub-items)
- Stores->Attributes->Attribute Set (and all sub-items)
- Stores->Inventory->Sources (if available)
- Stores->Inventory->Stocks (if available)
Click Save to save your changes and return to the Integrations page.
Step 2: Activate your New Integration
You are now back to the Integrations list page.
You should now be able to see the new integration in the list with a status of Inactive.
Click the Activate link that corresponds to the newly-created integration.
Note that once you start Activation you must complete the Activation of the integration within 5 minutes or else it will fail and you will have to repeat step 1 again. You can increase this time in your Magento configuration as explained further below in this wiki in ‘Useful OAuth Consumer Settings’.
You will now get a list of the permissions the new integration will be permitted to access for your confirmation.
You are redirected back to the Integrations list page.
If everything went successfully you will see that the status of the new integration is now Active.
If for any reason the communication between the two systems failed you will see the status of the new integration is still Inactive. In this case you can try again, if all fails there is most likely an issue with connectivity (i.e. firewall, wrong credentials, etc).
Step 3: Confirm Integration Details
Once the integration is active you can click on the Edit icon for the integration.
You should now see a value for Consumer Key, Consumer Secret, Access Token and Access Token Secret which you can copy and paste into the RXP.
Appendix: Useful OAuth Consumer Settings
Magento comes with some default OAuth settings that will be useful to know as in some cases may need to adjust the default settings in your Magento instance to get the connection working with RCE.
Log in to Admin and go into Stores > Configuration > Services > OAuth > Consumer Settings :
Expiration Period: The time in seconds you must Activate your newly created integrations after creating them for the OAuth 1.0 integration.
OAuth consumer credentials HTTP Post timeout: The time in seconds Magento will wait when sending credentials to the RCE instance.
Allow OAuth Access Tokens to be used as standalone Bearer tokens: When a Merchant wants to restore Bearer Token-based authentication for their Magento version 2.4.4 and above this needs to be changed to Yes. We recommend this to be No.