Magento Einrichtungsanleitung
Fügen Sie einen Chat-Assistenten zu Ihrem Magento Shop mit automatischer Produktsynchronisierung hinzu.
Sie befinden sich im Entwickler-Einrichtungsanleitung. Suchen Sie nach einem Überblick darüber, was Emporiqa für Ihren Magento Shop tut? Zur Integrations-Seite.
Schnellstart
Für Shop-Besitzer. Modul installieren, auf Verbinden klicken, Katalog senden. Mit Screenshots zu jedem Schritt.
StartenEntwicklerdokumentation
Für Entwickler. Architektur, Webhook-Payload, Anpassungsmuster und CLI-Befehle.
LesenSchnellstart
Modul installieren, auf Mit Emporiqa verbinden klicken, Katalog senden. Das Modul berührt weder Ihr Theme noch Ihren Checkout. Sie können das Modul vom selben Screen aus deaktivieren, falls es nicht passt. Das Widget geht auf jeder aktivierten Shop-Ansicht live.
Was Sie brauchen
- Admin-Zugriff auf Ihren Magento 2-Shop (Open Source 2.4.4+ oder Adobe Commerce)
-
Composer-Zugriff und SSH- (oder Terminal-)Zugriff zum Ausführen von
bin/magento - Ein Emporiqa-Konto, oder erstellen Sie eines in Schritt 1 (kostenlos, 25 $ Startguthaben, ohne Kreditkarte)
First, install the module. The Emporiqa module is live on 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 go to 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.
Verbinden
Öffnen Sie in der Admin-Seitenleiste Emporiqa → Sync Dashboard. Die Karte Willkommen bei Emporiqa fragt nach zwei Dingen: welche Shop-Ansichten synchronisiert werden sollen (das Chat-Widget erscheint auf den ausgewählten Ansichten, in der Sprache jeder Ansicht) und welches Produktattribut die Marke enthält (genutzt für Anfragen wie „eine Bosch-Spülmaschine"; lassen Sie es auf Keine, wenn Ihr Katalog keine Marken kennt). Klicken Sie dann auf Mit Emporiqa verbinden. Sie werden zu emporiqa.com weitergeleitet, melden sich an (oder registrieren sich kostenlos), wählen den Emporiqa-Shop, der verknüpft werden soll, und kehren mit bereits gespeicherter Shop-ID und Verbindungsgeheimnis zu Magento zurück.
Sie haben bereits Zugangsdaten?
Öffnen Sie Stores → Configuration → Emporiqa → Chat Assistant und klappen Sie den Bereich Manuelle Zugangsdaten (erweitert) auf. Fügen Sie Ihre Shop-ID und Ihr Verbindungsgeheimnis aus Ihrem Emporiqa-Dashboard ein, speichern Sie, und fertig. Nutzen Sie das, wenn die Ein-Klick-Verbindung nicht zustande kommt (Unternehmensproxy, keine ausgehenden HTTPS-Verbindungen vom Admin zu emporiqa.com, oder Sie stellen ein Backup wieder her).
Katalog senden
Zurück im Emporiqa → Sync Dashboard wechselt die Willkommenskarte zu Verbunden. Bereit, Ihren Katalog zu senden. Klicken Sie auf Meinen Katalog senden; Produkte und CMS-Seiten werden in Magentos MessageQueue publiziert und im Hintergrund an Emporiqa geliefert. Größere Kataloge dauern einige Minuten; das Dashboard zeigt den Fortschritt live. Für sehr große Kataloge starten Sie bin/magento emporiqa:sync:all in der CLI.
Chat-Widget überprüfen
Öffnen Sie Ihren Shop auf einer aktivierten Shop-Ansicht. Die Chat-Blase erscheint unten rechts. Klicken Sie darauf, stellen Sie eine Produktfrage („Haben Sie etwas wie X?"), und sehen Sie, wie der Verkäufer aus Ihrem synchronisierten Katalog antwortet.
Sie sind online
- Die Verbindung ist signiert und vom Modul aus erneuerbar. Keine Zugangsdaten im Klartext gespeichert.
- Neue Produkte und CMS-Seiten synchronisieren sich automatisch beim Speichern
- Käufer können nach Produkten, Richtlinien und ihren Bestellungen fragen
- In den Warenkorb im Chat; Käufer setzen mit Ihrem Magento-Checkout fort
Need to customize sync behavior, add custom fields, or wire up a third-party module?
See Developer DocsDeveloper 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. The observer publishes a message; emporiqa.webhook.consumer processes it asynchronously, so the product save completes without waiting for the webhook delivery.
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 Emporiqa account ($25 credit on signup) |
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 |
|---|---|
| Store ID | Your unique Emporiqa store identifier. Saved automatically by the one-click Connect button; pastable manually from the Emporiqa dashboard if needed. The module is active whenever Store ID and Connection Secret are both set. |
| 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_US → en-us). |
| Brand Attribute | Important. Pick the product attribute that holds the brand or manufacturer for your catalog. The chat assistant uses it for queries like "a Bosch dishwasher with steam". Leave empty only if your catalog has no brand concept. |
| Order Tracking URL | Read-only, auto-generated. Appears after you connect. 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. |
| 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 tracking —
sales_order_save_afterobserver 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},
"min_order_quantities": {"base": 1},
"max_order_quantities": {"base": null},
"available_for_order": true,
"condition": null,
"is_virtual": false,
"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, min_order_quantities, max_order_quantities, images |
| Flat | Direct value | identification_number, sku, channels, is_parent, parent_sku, available_for_order, condition, is_virtual |
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:
sync.start— opens a session (withsession_idandentity).- Batched events — product/page data tagged with
sync_session_id. 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
- Customer asks “Where is my order #12345?” in the chat.
- Emporiqa sends an HMAC-SHA256 signed POST to your store.
- The module looks up the order, verifies the customer's email matches the billing email, and returns the status.
- 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
The Test Connection button returns a one-line result: either ✓ Connected or Connection failed: HTTP <code>: <reason>. Match the reason to one of these:
- HTTP 401: Invalid connection secret — Store ID and Connection Secret don't match what's saved on the Emporiqa dashboard. Click Reconnect, or paste credentials manually.
- HTTP 404: Store not found — the Store ID points at a store that's been deleted on the Emporiqa side. Reconnect to pick a different store.
- HTTP 429: Throttled — rate-limited. Wait the duration in the response hint and retry.
- Network or HTTP 5xx — verify the server can make outbound HTTPS requests; check
var/log/system.logfor the full body.
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:productsto 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
The Sync Dashboard shows a yellow "Webhook consumer may not be running" banner when messages have been stuck in the queue for more than 5 minutes. When it appears:
- Check Magento cron is active:
bin/magento cron:status. - Start the consumer directly:
bin/magento queue:consumers:start emporiqa.webhook.consumer. - Confirm
cron_consumers_runnerisn't disabled inapp/etc/env.php. - Check
var/log/system.logfor the friendly reason on each failed delivery (HTTP 401, 429, etc.) — the consumer's exception now includes it. - As an immediate workaround, click Sync Products or Sync Pages from the dashboard; those run direct HTTP, bypassing the queue.
Cache or DI issues after configuration changes
- Run
bin/magento cache:flush. - For constructor or DI changes (after module updates):
rm -rf generated/code/*thenbin/magento cache:flush.
Related Articles
Multilingual Chat Support
Cross-language search, 65+ languages, how translations sync.
5 Questions Before You Pay
Evaluation checklist: data sync, handoff, pricing, languages, attribution.
Conversion Tracking
Prove chat ROI: session to cart to purchase attribution.
Webhook Setup Guide
Generic webhook reference: signing, payloads, sync sessions.