Magento
Magento · Magento 2 · Adobe Commerce · Mage-OS · access token · System Integrations · standalone Bearer tokens · Azimea_Connector · setup:upgrade · stores.magento_token_format · stores.magento_token_rejected · stores.magento_permission_missing · stores.magento_api_not_found
What it brings
Section titled “What it brings”- Customers with an account and guest buyers (taken from their orders), as contacts.
- Orders of the last 12 months and products with price and stock, read through the Magento REST API.
- Carts as they happen, anonymous ones included, with the email typed at checkout, sent by the module.
- Newsletter consent with its proof.
Requirements
Section titled “Requirements”| What | Why |
|---|---|
| Magento 2.4.4 or later, Adobe Commerce, or Mage-OS 1.0+; PHP 8.1+ with the curl extension | The versions the module runs on. |
| Command-line access | To run bin/magento setup:upgrade, as for any module. |
| Magento’s cron running | For retries. Without it, events still go out; only the retries wait for the next visit. |
| The site on HTTPS | Keys are never sent unencrypted. |
| Admin access | To create the integration and configure the module. |
How it works
Section titled “How it works”- Reading: an integration with read-only API resources gives Azimea an access token for customers, orders, products and stores. It cannot change anything.
- Sending: the module sends every cart change, the email typed at checkout, orders and their status changes,
accounts and newsletter consent. Magento’s order states become the common statuses: new, pending payment, payment
review and on hold as
pending; processing aspaid; complete ascompleted; canceled ascancelled; closed asrefunded. - Events leave at the end of the request that produced them; Magento’s cron delivers the retries.
Install and connect
Section titled “Install and connect”1. Create the integration
Section titled “1. Create the integration”- In the admin, go to System › Integrations, press Add New Integration and name it
Azimea. - Under API, tick Customers, Sales › Operations › Orders › Actions › View, Catalog › Inventory › Products and Stores › Settings › All Stores; optionally Categories and Sources.
- Save, then press Activate and Allow, and copy the Access Token.
- In Stores › Configuration › Services › OAuth, set “Allow OAuth Access Tokens to be used as standalone Bearer tokens” to Yes.
2. Connect in Azimea
Section titled “2. Connect in Azimea”- Open Integrations › Magento › Connect your store.
- Paste your store’s address and the access token, then press Check and connect.
3. Install the module
Section titled “3. Install the module”-
Download it: azimea-magento.zip and unzip it in the Magento root; it lands in
app/code/Azimea/Connector. -
Run:
Terminal window bin/magento module:enable Azimea_Connectorbin/magento setup:upgradebin/magento setup:di:compile # production mode onlybin/magento setup:static-content:deploy # production mode onlybin/magento cache:flush -
In Azimea, on the Magento page, under Store plugin, press Generate keys and copy the store key and the secret (shown only once).
-
In the admin, open Stores › Configuration › Azimea, paste both and save. The Status line should say connected.
-
Add a product to the cart on your store: the plugin status in Azimea turns to Connected.
The key and the secret can stay out of the database: set AZIMEA_STORE_KEY and AZIMEA_SECRET in the PHP environment,
and the settings screen says they come from the server.
Statuses
Section titled “Statuses”The store and plugin statuses are explained in the overview; order statuses in carts and orders.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
stores.magento_token_format |
The token was not copied whole: it is 32 letters and digits. | Copy it again from the integration. |
stores.magento_token_rejected |
Magento refused the token: wrong token, or standalone Bearer tokens are not allowed. | Check the token, and set the OAuth option to Yes. |
stores.magento_permission_missing |
The integration cannot read one of the resources (named in the message). | Tick it in the integration’s API resources and save. |
stores.magento_api_not_found |
The REST API did not answer at this address. | Check the store’s address. |
| Orders sync but no carts arrive | The module is not installed, or its key and secret are missing. | Install it and paste the keys in Stores › Configuration › Azimea. |
| Plugin status “… deliveries refused” | The store key or secret in the module is not the current one. | Generate new keys in Azimea and paste them again. |
All codes: error codes.
Disconnect
Section titled “Disconnect”In Azimea, press Disconnect next to the store. In Magento, deactivate the Azimea integration and disable the
module.