Magento Setup Guide

Add a chat assistant to your Magento 2 or Adobe Commerce store with automatic product sync.

You're in the developer setup guide. Looking for an overview of what Emporiqa does for your Magento store? See the integration page.

See integration page

Fast Start

Install the module, paste two credentials, run one sync. Your chat widget goes live on every enabled store view.

What you'll need

  • Admin access to your Magento 2 store (Open Source 2.4.4+ or Adobe Commerce)
  • Composer access and SSH (or terminal) access to run bin/magento
  • An Emporiqa account — create a free sandbox if you don't have one yet

First, install the module. The Emporiqa module has been submitted to the Adobe Commerce Marketplace. Install it via Composer with your Marketplace access keys configured in auth.json:

composer require emporiqa/module-chat-assistant
bin/magento module:enable Emporiqa_ChatAssistant
bin/magento setup:upgrade
bin/magento cache:flush

Magento registers the module, runs schema patches, and clears the cache. Webhook events are processed by Magento's DB message queue (consumer: emporiqa.webhook.consumer) — production cron handles this automatically; in local dev, start it manually with bin/magento queue:consumers:start emporiqa.webhook.consumer.

1

Enter your credentials and pick store views

In the admin panel, go to Stores → Configuration → Emporiqa → Chat Assistant. Under General Settings, set Enabled to Yes, paste your Store ID and Connection Secret (from your Emporiqa dashboard under Store Settings → Integration), and pick which Enabled Store Views to sync. Each store view's language is derived from its Magento locale (for example en_USen-us).

If your catalog uses brands, also expand Advanced and set Brand Attribute to the product attribute that holds your brand (for example brand). Skip this if your products don't have a brand attribute.

Magento admin Stores > Configuration > Emporiqa > Chat Assistant > General Settings showing Enabled, Store ID, Connection Secret, and Enabled Store Views
Stores → Configuration → Emporiqa → Chat Assistant → General Settings
2

Run the initial sync

Go to Emporiqa → Sync Dashboard in the admin menu. Click Test Connection first to verify your credentials, then click Sync Products and Sync Pages. Larger catalogs take a few minutes — the dashboard shows progress.

Prefer the CLI? Run bin/magento emporiqa:sync:all.

Emporiqa Sync Dashboard in Magento admin showing Sync Overview with 110 products and 33 pages across four store views, Test Connection Dry Run, Sync Products, and Sync CMS Pages actions
Emporiqa → Sync Dashboard with Test Connection, Sync Products, and Sync CMS Pages actions
3

Verify the chat widget

Open your storefront on any enabled store view. The chat bubble appears in the bottom-right corner. Click it, ask a product question, and watch the salesperson answer from your catalog.

Shopper describes what they want, the online salesperson recommends the right product from your catalog
Chat widget on the Emporiqa demo store — the same widget runs on your Magento storefront.

You're live

  • New products and CMS pages sync automatically when you save them
  • Customers can ask about products, policies, and their orders
  • Add-to-cart in chat; customers proceed to your store checkout

Need to customize sync behavior, add custom fields, or wire up a third-party module?

See Developer Docs

Developer Documentation

Architecture, configuration reference, webhook payload schema, customization patterns, and CLI commands.

Architecture

The module observes Magento events (catalog_product_save_after, catalog_product_delete_before, cms_page_save_after, cms_page_delete_before, checkout_submit_all_after, and inventory events) and pushes webhook events to Emporiqa via Magento's DB message queue. Saving a product never blocks on the network — the observer publishes a message; emporiqa.webhook.consumer processes it asynchronously.

All translations and channels for a single product or page consolidate into one webhook event. Configurable products cascade up: editing a child variation triggers a parent re-sync so search always sees the full catalog state. Stock changes (orders, cancellations, credit memos, shipments) flow through a separate emporiqa.stock.sync.consumer queue.

Channels are derived automatically from the Magento website code, and salable quantity uses Multi-Source Inventory when available with automatic fallback to legacy stock.

Requirements

Magento Open Source 2.4.4+ or Adobe Commerce 2.4.4+
PHP 8.1 or higher
Message queue DB connection (default in Magento), cron or a running consumer
Emporiqa account Free sandbox or paid subscription

Configuration Reference

All settings live at Stores → Configuration → Emporiqa → Chat Assistant. The Sync Dashboard at Emporiqa → Sync Dashboard is for triggering full syncs and testing connection.

General Settings

Setting Description
Enabled Master toggle for the module.
Store ID Your unique Emporiqa store identifier.
Connection Secret HMAC-SHA256 signing key for outbound webhooks and inbound order tracking. Stored encrypted.
Enabled Store Views Store views to sync and display the widget on. Each store view's locale maps to a language code (for example en_USen-us).
Order Tracking URL Read-only, auto-generated. Copy this URL into your Emporiqa dashboard (Settings → Store Integration → Order Tracking) to enable order lookup from the chat.

Advanced

Most stores don't need to change these.

Setting Default Description
Sync Products Yes Leave on unless you want to stop propagating product changes.
Sync CMS Pages Yes Leave on unless you want to stop propagating CMS page changes.
Brand Attribute (empty) Magento product attribute to use as brand. Leave empty if your catalog does not use brands.
Webhook URL https://emporiqa.com/webhooks/sync Only change for custom instances.
Batch Size 50 Items per webhook request during full sync (max 500).

Always-on capabilities

  • Order tracking — always active with HMAC signature verification and billing-email matching. Paste the Order Tracking URL into the Emporiqa dashboard to enable lookups from chat.
  • Cart operations — customers can add, update, and remove items from inside the chat via the /rest/V1/emporiqa/cart/* REST endpoints. When the customer is ready to check out, the widget redirects them to your Magento checkout page.
  • Conversion trackingsales_order_save_after observer links chat sessions to completed orders for revenue attribution.
  • Multi-channel — channel auto-derived from Magento website code.

Features

Real-time Webhooks

Products (simple, configurable, and variations) and CMS pages sync via observers on Magento save and delete events. Order completion fires conversion tracking.

Chat Widget

Embedded automatically on all enabled store views. Reads a signed user token from Magento's customer-data section, refreshed on login/logout.

Multilingual

Per-store-view language mapping (Magento locale → ISO code) consolidated into one webhook event per product with translations nested by channel and language.

Configurable Products

Parents synced with is_parent: true and variation attributes; children reference the parent SKU. Editing a child triggers parent re-sync.

Cart Operations

REST endpoints under /rest/V1/emporiqa/cart/* for add, update, remove, and clear items from inside the chat. When the customer is ready to check out, the widget redirects them to your Magento checkout page. Same-origin session cookies, no API tokens needed.

Admin Sync UI

Emporiqa → Sync Dashboard with Sync Products, Sync Pages, and Test Connection actions and live progress.

MSI Support

Salable quantity via Multi-Source Inventory with automatic fallback to legacy stock. Source-item save plugin keeps stock in sync with all warehouses.

Async Queue

DB-backed message queue (emporiqa.webhook.consumer and emporiqa.stock.sync.consumer) keeps webhook delivery off the request path.

Webhook Payload

Each product or CMS page is sent as a single webhook event containing all languages and channels. Translatable fields are nested by channel and language code.

Product Event

{
  "type": "product.updated",
  "data": {
    "identification_number": "product-123",
    "sku": "PROD-123",
    "channels": ["base"],
    "names":        {"base": {"en-us": "Summer Jacket", "de-de": "Sommerjacke"}},
    "descriptions": {"base": {"en-us": "Lightweight jacket...", "de-de": "Leichte Jacke..."}},
    "links":        {"base": {"en-us": "https://store.com/summer-jacket", "de-de": "https://store.com/de/sommerjacke"}},
    "attributes":   {"base": {"en-us": {"Material": "Cotton"}, "de-de": {"Material": "Baumwolle"}}},
    "categories":   {"base": {"en-us": ["Jackets", "Summer"], "de-de": ["Jacken", "Sommer"]}},
    "brands":       {"base": "TrailPeak"},
    "prices":       {"base": [{"currency": "EUR", "current_price": 79.99, "regular_price": 99.99}]},
    "availability_statuses": {"base": "available"},
    "stock_quantities":      {"base": 42},
    "images":       {"base": ["https://store.com/media/catalog/product/jacket.jpg"]},
    "is_parent": false,
    "parent_sku": null,
    "variation_attributes": {}
  }
}

For configurable products, the parent is synced with is_parent: true and variation_attributes: {"base": {"en-us": ["Color", "Size"], "de-de": ["Farbe", "Größe"]}}. Each child variation is synced with parent_sku referencing the parent's SKU.

CMS Page Event

{
  "type": "page.updated",
  "data": {
    "identification_number": "page-45",
    "channels": ["base"],
    "titles":   {"base": {"en-us": "Shipping Policy"}},
    "contents": {"base": {"en-us": "Free shipping on orders over..."}},
    "links":    {"base": {"en-us": "https://store.com/shipping-policy"}}
  }
}

Magento CMS pages don't have per-store-view attributes — translations are handled by creating separate page entities assigned to different store views. Each page is exported only for the store views it belongs to.

Field Structure

Type Pattern Fields
Translatable {channel: {lang: value}} names, descriptions, links, attributes, categories, variation_attributes, titles, contents
Shared {channel: value} brands, prices, availability_statuses, stock_quantities, images
Flat Direct value identification_number, sku, channels, is_parent, parent_sku

Customization

The module follows standard Magento 2 extensibility patterns. To customize sync behavior, the formatted payload, or the order tracking response, use plugins, preferences, or observers in your own module.

Pattern Use case
Plugin (around/after) on Emporiqa\ChatAssistant\Model\ProductFormatter Modify or extend the product payload before it's queued (add custom attributes, override prices, skip products).
Plugin on Emporiqa\ChatAssistant\Model\PageFormatter Customize the CMS page payload (rewrite content, inject metadata).
Plugin on Emporiqa\ChatAssistant\Model\OrderTracking Modify the order tracking response (add tracking numbers, custom statuses).
Preference (DI replacement) Swap any concrete model class wholesale — for example, replace CartManagement or WebhookClient.
Observer on standard Magento events React to the same events the module observes (catalog_product_save_after, checkout_submit_all_after, etc.) to trigger your own logic alongside Emporiqa's.

Example: skip a product from sync

// app/code/Vendor/Module/etc/di.xml
<type name="Emporiqa\ChatAssistant\Model\ProductFormatter">
    <plugin name="vendor_skip_internal_products"
            type="Vendor\Module\Plugin\SkipInternalProductsPlugin"
            sortOrder="10"/>
</type>

// app/code/Vendor/Module/Plugin/SkipInternalProductsPlugin.php
public function aroundFormat(
    \Emporiqa\ChatAssistant\Model\ProductFormatter $subject,
    callable $proceed,
    \Magento\Catalog\Api\Data\ProductInterface $product
) {
    if ($product->getData('is_internal')) {
        return null; // skip
    }
    return $proceed($product);
}

Example: enrich the product payload

public function afterFormat(
    \Emporiqa\ChatAssistant\Model\ProductFormatter $subject,
    ?array $result,
    \Magento\Catalog\Api\Data\ProductInterface $product
): ?array {
    if ($result === null) {
        return $result;
    }
    $result['data']['custom_field'] = $product->getData('my_custom_attribute');
    return $result;
}

After adding plugins or DI changes, run bin/magento setup:upgrade and bin/magento cache:flush. In production mode, also run bin/magento setup:di:compile.

CLI Commands

All commands run from the Magento root directory.

# Sync all products
bin/magento emporiqa:sync:products

# Sync all CMS pages
bin/magento emporiqa:sync:pages

# Sync products and pages in one command
bin/magento emporiqa:sync:all

# Test webhook connection
bin/magento emporiqa:test-connection

# Adjust batch size
bin/magento emporiqa:sync:products --batch-size=25

# Dry run (no webhooks sent)
bin/magento emporiqa:sync:products --dry-run

# Start the webhook consumer manually
bin/magento queue:consumers:start emporiqa.webhook.consumer

Sync Sessions

Each sync operation creates a session that tracks what was sent:

  1. sync.start — opens a session (with session_id and entity).
  2. Batched events — product/page data tagged with sync_session_id.
  3. sync.complete — closes the session. Items not seen during the session are marked deleted on the backend.

Sessions expire after 24 hours. For very large catalogs, lower --batch-size to fit completion within the window.

Order Tracking

Emporiqa can look up order status on behalf of customers during chat conversations. The module exposes a signed REST endpoint that Emporiqa calls when a customer asks about their order.

Flow

  1. Customer asks “Where is my order #12345?” in the chat.
  2. Emporiqa sends an HMAC-SHA256 signed POST to your store.
  3. The module looks up the order, verifies the customer's email matches the billing email, and returns the status.
  4. The salesperson presents the order information to the customer.

Endpoint

POST /rest/V1/emporiqa/order/tracking

Setup

The endpoint is always active once the module is installed. Email verification is always required — the customer's email must match the order's billing email before any data is returned. To enable order lookup from chat, set the Order Tracking API URL in your Emporiqa dashboard (Store Settings → Integration) to:

https://your-store.com/rest/V1/emporiqa/order/tracking

Requests are authenticated using the same HMAC-SHA256 connection secret. Requests older than 5 minutes are rejected. If the customer's email doesn't match the billing email, the endpoint returns 404 to avoid leaking order existence. See the Webhook Setup Guide for the full request/response schema.

Order tracking is optional. Without the dashboard URL configured, order questions route to the Customer Support agent instead.

Troubleshooting

Connection test fails

  • Verify your Store ID and Connection Secret match the Emporiqa dashboard.
  • Check that your server can make outbound HTTPS requests.
  • Review var/log/system.log for detailed error messages.

Products not syncing

  • Ensure Sync Products is enabled in settings.
  • Verify products are enabled and visible (not “Not Visible Individually”).
  • Run bin/magento emporiqa:sync:products to force a full sync.
  • Check CLI output for webhook errors.

Chat widget not appearing

  • Confirm the module is enabled and Store ID is configured.
  • Check that the current store view is in the Enabled Store Views list.
  • Look for JavaScript errors in the browser console.
  • Verify the scripts are in page source (View Source, search for emporiqaConfig).

Queue not processing

  • Check the consumer is running: bin/magento queue:consumers:start emporiqa.webhook.consumer.
  • Or ensure Magento cron is active: crontab -l | grep magento.
  • Check var/log/system.log for queue processing errors.

Cache or DI issues after configuration changes

  • Run bin/magento cache:flush.
  • For constructor or DI changes (after module updates): rm -rf generated/code/* then bin/magento cache:flush.

Related Articles

Need Help?

Having trouble with the integration? Our team is here to help.

Contact Support