Magento Integration (With or Without the Extension)

E-Commerce

Magento Integration

Connect your Magento 2 (Open Source / Adobe Commerce) store to Conviro so your chatbot can track orders, handle cancellations and returns, and answer product questions inside the chat.

There are two ways to connect, and they unlock the same flow capabilities:

  1. With the official Conviro extension -- a one-click, automated setup. Recommended for most merchants.
  2. Without any extension -- a manual setup using Magento's native REST API plus a small widget snippet. Use this if you can't (or don't want to) install third-party modules.

> Key point: The extension is a convenience layer, not a requirement. Order tracking, cancellation, returns, and product search all run through Magento's native REST API on the Conviro backend -- so they work either way. The extension simply automates the setup, the widget injection, and event webhooks.

Requirements

  • Pro plan or above
  • Magento 2.4+ (Open Source / Community or Adobe Commerce)
  • Admin access to your Magento store
  • Your Conviro API Key (generate one at Dashboard -> Settings -> API Keys)

Method A -- With the Official Extension (Recommended)

The fastest path. One field, one click, and everything is wired up for you.

Install

  1. Install the module via Composer:
composer require conviro/module-aichat
php bin/magento module:enable Conviro_AiChat
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

(Or upload the extension ZIP from the Conviro dashboard if you don't use Composer.)

  1. In Magento Admin, go to Stores -> Configuration -> Conviro -> AI Chat.
  2. Paste your Conviro API Key and click Save Config.

What happens automatically

When you save the API key, the extension:

  • Creates a Magento Integration named "Conviro AI Chat" with least-privilege REST permissions (Sales orders, Catalog products, Customers, Carts) and generates an access token.
  • Registers your store with Conviro (store URL + token) so flows can read your data.
  • Auto-injects the chat widget on every storefront page -- no theme editing.
  • Sends event webhooks (order placed, order status changed, product saved, customer registered) so data stays fresh in near real time.
  • Stores a signed webhook secret so incoming/outgoing events are verified.

That's it -- your flows are live.


Method B -- Without the Extension (Manual Setup)

No module installation needed. You'll do in ~5 minutes what the extension does automatically: create an API token and paste the widget snippet.

Step 1 -- Create a Magento Integration (for the flows)

  1. In Magento Admin, go to System -> Extensions -> Integrations.
  2. Click Add New Integration.
  3. Name it (e.g. "Conviro") and enter your admin password.
  4. Open the API tab and grant access to these resources:
  • Sales -> Operations -> Orders (order lookup, status, cancel)
  • Catalog -> Inventory -> Products (product search)
  • Customers -> Customer (customer/order ownership lookup)
  • (optional) Sales -> Operations -> Returns if you use the returns flow
  1. Click Save, then Activate the integration.
  2. Copy the Access Token shown after activation.

Step 2 -- Connect it in Conviro

  1. Go to Dashboard -> Settings -> Integrations -> Magento.
  2. Enter your store URL (e.g. https://your-store.com) and paste the Access Token.
  3. Click Connect. Conviro verifies the token and enables the e-commerce flows.

Step 3 -- Add the chat widget

Since there's no extension to auto-inject the widget, add the snippet yourself. Paste it just before the closing body tag of your theme, or load it via Google Tag Manager:

<script src="https://cdn.conviro.io/widget/widget.iife.js"></script>
<script>
  cw('init', { publicKey: 'pk_YOUR_PUBLIC_KEY' });
</script>

In Magento, the cleanest place is Content -> Design -> Configuration -> [your theme] -> HTML Head / Footer, or a Miscellaneous HTML block. GTM also works and survives theme upgrades.


What Each Method Gives You

CapabilityWith ExtensionWithout Extension (Manual)
Order tracking flowYesYes
Order cancellation flowYesYes
Returns / exchange flowYesYes
Product search in chatYesYes
Order ownership / email verificationYesYes
One-click token + store setupAutomaticManual (Step 1-2)
Widget auto-injected on all pagesAutomaticPaste snippet once
Real-time event webhooks (order/product sync)YesFalls back to scheduled API pull

Bottom line: every customer-facing flow works in both modes. Without the extension you only give up the one-click setup, automatic widget injection, and real-time webhook syncing -- all of which have simple manual equivalents.


Security: Order Ownership Verification

Both methods include the same protection against order-number guessing. Before revealing any order details, the flow asks the customer for the email on the order:

  1. Customer provides an order number.
  2. The bot asks for the email used at checkout.
  3. Conviro only reveals order details if the email matches the order.
  4. If it doesn't match, the bot responds exactly as if the order wasn't found -- so an attacker can't tell whether an order number is real.

This is enforced in the Conviro backend, independent of the extension, via the order flow's email-verification step. The pre-built e-commerce flow templates already collect the email before any lookup.


E-Commerce Flows

Use the pre-built templates under Dashboard -> Flows -> New Flow -> Use Template -> E-Commerce:

  • Order Status -- look up status, fulfillment, and tracking by order number + email.
  • Cancel & Refund -- verify ownership, then cancel an eligible order.
  • Returns & Exchanges -- verify ownership, capture the reason, and start an RMA.
  • Product Search -- find products by name/SKU and share details in chat.

All of these call Magento's native REST API using the token from Method A or Method B -- no custom endpoints required.

Tips

  • Use the extension if you can -- it removes every manual step and keeps data fresh via webhooks.
  • Use manual mode on locked-down stores, marketplaces, or when a security policy forbids new modules.
  • Grant the integration the minimum resources you actually use -- you can always add Returns later.
  • Start with the Order Status flow; it handles the #1 e-commerce question and proves the connection works.
  • After connecting, test by asking the bot about a real order (with the matching email) and a real product/SKU.
magentomagento2adobe-commerceecommerceextensionrest-apiorder-trackingreturnswidget

Was this article helpful?