Skip to content

[WIP] Add bidirectional order sync for WooCommerce and StormCom#54

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/implement-bidirectional-order-sync
Draft

[WIP] Add bidirectional order sync for WooCommerce and StormCom#54
Copilot wants to merge 2 commits intomainfrom
copilot/implement-bidirectional-order-sync

Conversation

Copy link
Contributor

Copilot AI commented Nov 25, 2025

  • Analyze requirements from issue [Phase 2] External Integration API v1 #40 (WordPress Order Sync Bidirectional)
  • Understand existing codebase structure (order service, inventory service, integrations)
  • Create database schema migration for WebsiteIntegration, ProductMapping, and SyncLog models
  • Implement WordPress integration service with order sync functionality
  • Create API endpoints for external order operations:
    • POST /api/v1/external/orders - Create order from WooCommerce
    • PUT /api/v1/external/orders/[id]/status - Update order status bidirectionally
    • GET /api/v1/external/orders - Get orders for sync to WooCommerce
  • Create webhook handler for WooCommerce order events
  • Implement duplicate detection using external_id
  • Implement bidirectional order status sync
  • Implement inventory sync on both systems
  • Add order notes sync between systems
  • Validate with linting and type-checking
  • Run code review
Original prompt

This section details on the original issue you should resolve

<issue_title>[Phase 2] WordPress Order Sync (Bidirectional)</issue_title>
<issue_description>## Priority: P1
Phase: 2 - External Website Integration
Epic: WordPress Plugin Development
Estimate: 5 days
Type: Story

Description

Implement bidirectional order sync between WooCommerce and StormCom, ensuring orders from all channels appear in both systems without duplication.

Features:

  • WooCommerce order → StormCom (when created)
  • StormCom order → WooCommerce (from Facebook/Instagram)
  • Order status sync (bidirectional)
  • Duplicate order detection
  • Inventory sync on both systems

Acceptance Criteria

  • WooCommerce order appears in StormCom dashboard immediately
  • Facebook/Instagram order creates WooCommerce order automatically
  • Order status syncs bidirectionally (fulfilled, canceled, refunded)
  • Duplicate detection prevents double-entry (using external_id)
  • Inventory updated on both systems atomically
  • Order notes sync between systems

Dependencies

References

Technical Notes

Sync Flow:

  1. WooCommerce order → Webhook → StormCom API
  2. StormCom order → Background job → WooCommerce API
  3. Use external_id field for duplicate detection
  4. Lock mechanism to prevent race conditions</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
stormcomui Ready Ready Preview Comment Nov 25, 2025 2:13am

Co-authored-by: syed-reza98 <71028588+syed-reza98@users.noreply.github.com>
@github-actions
Copy link

Automated review (GitHub Models):

The pull request is still in progress and has not resolved the bidirectional WooCommerce-StormCom order sync issue. Several critical features remain unchecked and there's no indication of merged or implemented code for these functionalities.

Confidence: 0.9

Evidence:

@syed-reza98 syed-reza98 mentioned this pull request Feb 28, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Phase 2] WordPress Order Sync (Bidirectional)

2 participants