Groupon Goods Marketplace
Integration scope for menzzo.fr:
- import open Groupon Goods orders from Commerce Interface API v4;
- create Logidav
Salerows with sourceGroupon; - mark Groupon line items as exported only after successful Logidav creation;
- create or update products in Groupon Goods before inventory updates;
- push stock to Groupon Goods API;
- push shipment tracking to Commerce Interface.
Configuration
Configuration lives in app/config/parameters.yml:
groupon:
commerce_interface:
api_url: 'https://commerceinterface.groupon.com'
supplier_id: ''
token: ''
goods_api:
api_url: 'https://partner-api.groupon.com'
client_id: ''
authorization: ''
products_endpoint: '/v1/products'
products_payload_root: 'products'
feature_countries:
- 'FR'
source: 'Groupon'
sandbox: false
Commerce Interface v4 uses supplier_id and token on every request. Groupon Goods API uses these headers: Authorization, X-Client-ID, X-Request-ID.
Commands
Import orders:
php bin/console menzzo:groupon:import-orders
Optional replay window, in UTC and limited by Groupon to a 24h range:
php bin/console menzzo:groupon:import-orders --start="05/28/2026 00:00" --end="05/28/2026 23:59"
Stock sync:
php bin/console menzzo:groupon:sync-products
php bin/console menzzo:groupon:sync-products --sku=ABC-123
php bin/console menzzo:groupon:sync-products --limit=100
php bin/console menzzo:groupon:sync-products --sku=ABC-123 --dry-run
php bin/console menzzo:groupon:sync-stock
php bin/console menzzo:groupon:sync-stock --sku=ABC-123
php bin/console menzzo:groupon:sync-stock --limit=100
Tracking push:
php bin/console menzzo:groupon:push-tracking
php bin/console menzzo:groupon:push-tracking --limit=100
Order Import
The import uses Commerce Interface GET /api/v4/get_orders, then POST /api/v4/mark_exported.
Important rules:
- only countries in
feature_countriesare imported; MVP isFR; - idempotency is based on
Sale.saleId + source; - if the sale already exists, the command skips creation and still tries to
mark_exportedthe returned line items; - if one Groupon line item cannot be mapped to a Logidav product, the whole order is left unexported so it can be replayed after the SKU is fixed;
- quantities come from Groupon
quantityand are never assumed to be1; - Groupon timestamps are stored as received and parsed as UTC-compatible strings.
SKU resolution order:
channel_skuorchannel_sku_providedvendor_skubom_skusku
The resolved SKU is matched against:
ProductInfo.mpnfor store3;Product.sku;Product.cotecosySku.
The raw Groupon payload and line item metadata are stored in Sale.orderInfo under:
groupon_order_info;groupon_line_items_by_sale_item_id;groupon_tracking_sent.
Product Sync
The product sync creates or updates the Groupon Goods catalogue records before inventory is pushed.
Command:
php bin/console menzzo:groupon:sync-products --limit=100
The payload is built from active Logidav products and ProductInfo store 3:
sku,vendor_sku,bom_sku,channel_sku;- title and descriptions;
- regular price and optional sale price;
- quantity;
- brand
Menzzo; - GTIN/EAN, MPN, weight;
- category or product type when available;
- product URL and image URLs.
The default endpoint is configurable because Groupon Goods product creation contracts may vary by account/onboarding:
groupon:
goods_api:
products_endpoint: '/v1/products'
products_payload_root: 'products'
Use --dry-run first in production to log the generated payloads without sending them.
Stock Sync
The stock flow reads active Logidav products with is_active = 1, source_id IS NOT NULL, and visibility IN (2, 4).
Groupon constraints:
- read inventory in batches of 50 SKUs;
- update inventory in batches of 10 SKUs.
Logidav sends the Logidav SKU as both vendor_sku and sku, with quantity set to 0 when the product is not En_Stock or has negative quantity.
Errors are logged per SKU and do not stop the next batch.
Tracking
The tracking flow inspects shipped Groupon sale products.
Priority:
lineitem_tracking_notificationwithfulfillment_lineitem_id;- fallback to
tracking_notificationwithci_lineitem_id.
Payload contains:
- carrier;
- tracking number;
- shipped quantity.
After a successful API call, sent tracking keys are stored in groupon_tracking_sent to avoid sending the same tracking again.
Logs
Logs are written under the Symfony log directory in Groupon/groupon-YYYY-MM-DD.log.
Expected support context includes:
- event name;
order_id;- SKU;
- carrier;
- tracking;
- Groupon line item ids;
- API error message.
Suggested Cron
*/15 * * * * php /path/to/logidav/bin/console menzzo:groupon:import-orders --env=prod
*/30 * * * * php /path/to/logidav/bin/console menzzo:groupon:push-tracking --env=prod --limit=100
30 1 * * * php /path/to/logidav/bin/console menzzo:groupon:sync-products --env=prod --limit=500
0 */2 * * * php /path/to/logidav/bin/console menzzo:groupon:sync-stock --env=prod --limit=500
Cron timezone is handled by the server crontab.