Skip to main content

Groupon Goods Marketplace

Integration scope for menzzo.fr:

  • import open Groupon Goods orders from Commerce Interface API v4;
  • create Logidav Sale rows with source Groupon;
  • 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_countries are imported; MVP is FR;
  • idempotency is based on Sale.saleId + source;
  • if the sale already exists, the command skips creation and still tries to mark_exported the 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 quantity and are never assumed to be 1;
  • Groupon timestamps are stored as received and parsed as UTC-compatible strings.

SKU resolution order:

  1. channel_sku or channel_sku_provided
  2. vendor_sku
  3. bom_sku
  4. sku

The resolved SKU is matched against:

  • ProductInfo.mpn for store 3;
  • 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:

  1. lineitem_tracking_notification with fulfillment_lineitem_id;
  2. fallback to tracking_notification with ci_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.