Order Sync, Refund Control & Inventory Lifecycle Management
1. Overview
This document manages the end-to-end synchronization of Shopify transactions within XoroERP. It governs order import behavior, refund processing workflows, inventory adjustments, and financial document generation to ensure consistent data flow between Shopify and XoroERP.
2. Functional Workflow
2.1 Order Import Workflow
Shopify is configured as an active sales channel.
Orders created in Shopify are automatically fetched by XoroERP.
Orders enter a pending import state before being processed sequentially.
XoroERP validates order data and creates corresponding Sales Orders.
Inventory, customer, and financial mappings are applied.
Orders progress through the fulfillment lifecycle within XoroERP.
2.2 Synchronization Behavior
Synchronization runs automatically at regular intervals.
Orders are retrieved in batches but processed individually.
Updates made in Shopify trigger automatic synchronization updates in XoroERP.
2.3 Refund Workflow
Refunds are initiated in Shopify.
Shopify transmits refund details to XoroERP.
XoroERP evaluates:
refund type
restocking flag
current sales order status
The system generates inventory and/or financial documents accordingly.
3. Core Configuration Logic
3.1 Integration Date Configuration
The integration date determines the earliest Shopify orders eligible for import.
Orders prior to this date are excluded.
Incorrect configuration may result in missing historical data or unintended imports.
3.2 Sync Scheduling
Sync Frequency
Controls how often orders and updates are fetched
Processing Mode
Sequential validation ensures data integrity
System Load
Higher frequency increases processing demand
3.3 Order Identification Structure
XoroERP uses multiple identifiers to ensure traceability.
Source
Identifies originating Shopify store
Reference Number
Shopify-visible order number
Third-Party Reference Number
Backend transaction identifier for reconciliation
Order numbers are not guaranteed to be unique across multiple Shopify stores. Source-level identification must always be validated.
3.4 Source of Transactional Updates
Shopify is the point where ecommerce transactions such as orders, cancellations, and refunds are initiated.
XoroERP automatically reflects these updates to manage fulfillment, inventory, and accounting processes. To maintain synchronization accuracy, any changes to Shopify-originated transactions should be performed in Shopify.
4. Transaction-Level Behavior
4.1 Sales Order Lifecycle Statuses
System automation evaluates the current status before applying updates.
Released
Order allocated but not fulfilled
Refunds may create adjustments
Waived
Allocation removed
System may void and recreate waves
Shipped (Invoiced)
Order fulfilled and invoiced
Refunds generate financial documents
4.2 Refund Processing Logic
Refund behavior is determined by:
refund type
restocking selection
4.3 Refund Types
Quantity Only
Yes
No
Amount Only
No
Yes
Quantity + Amount
Yes
Yes
4.4 Restocking Behavior
Restocking directly affects Available-to-Sell (ATS) calculations.
Restock Enabled
Inventory returned to available stock
Restock Disabled
Inventory permanently removed via adjustment
4.5 Document Generation Rules
Inventory Credit Memo (ICM) reflects both inventory and financial implications.
Credit Memo reflects financial impact only.
Quantity-only refund
Zero-amount Inventory Credit Memo (ICM)
Amount-only refund
Credit Memo
Combined refund
ICM with financial impact
4.6 Inventory Calculations
Available-to-Sell (ATS) is calculated as:
5. Examples
Example 1: Quantity-Only Refund with Restocking
Scenario: Customer returns two units without monetary refund.
System Impact:
Inventory added back to available stock
Zero-amount ICM generated
No financial refund recorded
ATS recalculated
Example 2: Amount-Only Refund After Shipment
Scenario: Customer receives a partial monetary refund without returning goods.
System Impact:
Credit Memo generated
No inventory movement
Financial adjustment recorded
Inventory remains unchanged
Example 3: Combined Refund for Shipped Order
Scenario: Customer returns goods and receives payment refund.
System Impact:
ICM generated with quantity and value
Inventory returned to stock (if restocked)
Financial refund recorded
Order financials updated
6. Important Rules & Constraints
All refunds must originate in Shopify; XoroERP does not initiate refund transactions.
Sales order status determines how synchronization updates are processed.
Order numbers cannot be assumed unique; always validate source context.
Integration date strictly controls which historical orders are imported.
Manual edits to Shopify-originated orders in XoroERP are overwritten by sync.
Restocking selection dictates whether inventory is returned or adjusted out.
Large import volumes may take time to fully appear as synchronization completes.
7. Best Practices
Always validate integration using test orders before enabling production synchronization.
Educate users to perform all order edits directly in Shopify.
Use source-based filtering when troubleshooting duplicate order numbers.
Monitor refund types carefully to anticipate inventory and accounting impact.
Validate ATS recalculations after refund scenarios to ensure stock accuracy.
8. Common Mistakes / Pitfalls
Editing Shopify orders inside XoroERP
Changes overwritten during sync
Ignoring source while searching orders
Duplicate order confusion
Incorrect integration date
Missing or excessive historical imports
Selecting no-restocking unintentionally
Permanent inventory reduction
Misinterpreting refund type
Incorrect document generation
9. Frequently Asked Questions (FAQ)
Q: Where must refunds be processed? A: Refunds must always be initiated in Shopify. XoroERP reflects the outcome.
Q: Can quantities or pricing be edited in XoroERP for Shopify orders? A: No. Any manual changes will be overwritten by synchronization.
Q: What happens when restocking is enabled? A: Inventory is returned to available stock and ATS is recalculated.
Q: What happens when restocking is disabled? A: Inventory is removed through adjustment and not returned to sellable stock.
Q: Why are duplicate order numbers visible? A: Multiple Shopify sources can generate identical order numbers; source identification must be used.
Q: What document is created for shipped order refunds? A: An Inventory Credit Memo or Credit Memo is generated depending on refund type.
10. Conclusion
The Shopify Integration module establishes a reliable synchronization framework between Shopify and XoroERP by controlling order import behavior, refund processing, and inventory adjustments. Proper configuration of integration settings, refund workflows, and synchronization rules ensures accurate financial reconciliation, consistent inventory tracking, and seamless ecommerce operations.
By maintaining Shopify as the transaction source, validating integration parameters, and aligning restocking decisions with operational processes, organizations can prevent data inconsistencies, reduce manual intervention, and achieve scalable ecommerce fulfillment within XoroERP.
Last updated
Was this helpful?