Skip to main content
This guide assumes you have API access and the necessary permissions. Loop Anywhere integrations require coordination with Loop’s team during onboarding. Contact your Loop point of contact, Merchant Success Manager, or [email protected] to get started.

🧭 Overview

Loop Anywhere is a set of API-driven capabilities that allow you to push commerce data into Loop from any source. Whether your data lives in a commerce platform, ERP, OMS, or custom system, Loop Anywhere provides the APIs to bring it all together and power your returns experience.
When is Loop Anywhere the right fit?Use Loop Anywhere when you need to control how commerce data flows into Loop. Whether you’re integrating a single platform, consolidating data from multiple sources, or building a custom data pipeline, Loop Anywhere lets you bring that data into Loop and execute return outcomes back in your systems.

Why It Matters

Loop needs commerce data—orders, products, customers—to power the returns experience. With Loop Anywhere, you control how that data gets into Loop, giving you flexibility over the source, transformation, and timing of your commerce data sync.

How It Works

Loop Anywhere integrations handle two directions of data flow between your systems and Loop:
DirectionDescription
Inbound (to Loop)Extract commerce data from your platform (the Source of Truth), normalize it, and push it into Loop
Outbound (from Loop)Listen for return events from Loop via webhooks, then execute outcomes (refunds, exchanges, restocks) back in your platform
How you build this integration is flexible—it could be a custom service, an integration platform, direct API calls from your existing systems, or any approach that can make HTTP requests and receive webhooks.

🏗️ Integration Architecture

Loop Anywhere integrations are organized into four functional “buckets.” Each bucket represents a distinct phase of the integration, and together they form a complete returns operation.
BucketPurposeData Flow
I. Push Commerce DataPopulate Loop with products, orders, and related dataPlatform → Loop
II. Get Return DataReceive notifications when returns are created or updatedLoop → Your Systems
III. In-Flight ManagementManage active returns (process, flag, annotate)Your Systems → Loop
IV. Outcome ExecutionExecute refunds, exchanges, and restocksLoop → Platform
Build in order. These buckets are designed to be implemented sequentially. Bucket I is a prerequisite for everything else—Loop can’t create returns without order data. Buckets II-IV can be built in parallel once data is flowing.

📦 Bucket I: Push Commerce Data to Loop

The first step is populating Loop with the commerce data it needs to power the returns experience. Your platform acts as the Source of Truth, and Loop uses this data to enable returns.
For complete API documentation on all Commerce Data endpoints, see the Commerce Data guide.

Data Types and Sync Order

Not all data types are required for every integration. The table below shows what’s needed based on the return outcomes you want to support.
DataRequired ForNotes
Products & VariantsAll returnsMust be synced before orders. Store the returned id for mapping.
OrdersAll returnsReference Loop Product IDs in line items. Sync at least your return policy window back.
CustomersAll returnsCan be created automatically when orders are pushed, or synced independently.
LocationsExchangesRequired if offering exchanges. Represents warehouses and fulfillment centers.
InventoriesExchangesStock levels per variant/location. Required to prevent overselling on exchanges.
CollectionsAdvanced rulesOptional. Useful for defining exchange eligibility rules by product grouping.
Products must be synced before Orders. Loop assigns internal IDs to products and variants. When syncing orders, line items must reference these Loop IDs—not your platform’s external IDs. You’ll need to maintain a mapping table.

ID Mapping Requirement

When you create a product in Loop, the API returns an id. Your integration must store this ID mapped to your platform’s external product ID. The same applies to variants. This mapping is used when:
  • Creating orders (line items reference Loop Product IDs)
  • Syncing inventory (keyed by Loop Variant ID + Location ID)
  • Processing exchanges (matching items across systems)
Your PlatformLoop
platform_product_idid (from Loop product)
platform_variant_idid (from Loop variant)

Initial Sync vs. Ongoing Sync

Initial Sync (Historical Backfill) Before launching, you need to backfill historical data so customers can return recent orders. At minimum, sync orders going back to match your return policy window (e.g., 30, 60, or 90 days).
1

Sync Products & Variants

Push your product catalog. Store the returned Loop IDs in your mapping table.
2

Sync Orders

Push historical orders, referencing Loop Product IDs in line items.
3

Sync Locations (if offering exchanges)

Create location records for warehouses and fulfillment centers.
4

Sync Inventory (if offering exchanges)

Push stock levels for each variant at each location.
5

Sync Collections (optional)

Create collections and attach products for advanced exchange rules.
Ongoing Sync (Real-Time) Once the initial data is in Loop, you need to keep it current. New orders, product updates, and inventory changes should flow to Loop as they happen.
Event in Your PlatformAction
New order placedPush order to Loop
Product created/updatedSync product to Loop
Order shipped (fulfillment)Update order fulfillments in Loop
Inventory changedUpdate inventory in Loop
Order refunded (outside Loop)Update order refunds in Loop
Recommended approach: Subscribe to webhooks from your commerce platform that fire when data changes. Transform and push that data to Loop in real time. A daily reconciliation job can catch anything webhooks miss.

📡 Bucket II: Get Return Data

Once returns are flowing through Loop, your systems need to know about them. This bucket is about listening—receiving notifications when customers initiate returns, when return status changes, and when returns are finalized.
For complete documentation on retrieving return data, see the Retrieving Return Data guide.

Option 1: Webhooks

Loop can push return events to your systems in real time via webhooks. Subscribe to the events you care about and take action accordingly.
WebhookWhen It FiresCommon Actions
return.createdCustomer initiates a returnCreate RMA in ERP, update order status, notify warehouse
return.updatedReturn state changesUpdate internal records, sync status to other systems
return.closedReturn finalized (processed or cancelled)Trigger outcome execution (Bucket IV)
label.createdShipping label generatedCapture tracking number, update ASN
restock.requestedRestock triggered in LoopIncrement inventory in WMS/ERP
Webhook Security: Always validate webhook signatures to ensure requests are genuinely from Loop. Loop includes a signature header with every webhook for verification.
You’ll need an endpoint to receive these webhooks—this could be a serverless function, an integration platform flow, or a dedicated endpoint in your service.

Option 2: API Polling

You can poll Loop’s APIs on a schedule to check for return activity. This approach gives you full control over when and how often you pull data.
APIUse Case
Detailed Returns ListList returns filtered by created_at, updated_at, or state
Get Return DetailsFetch full details for a specific return
Advanced Shipping NoticePull packages by tracking status or timeframe
Combining approaches: Some integrations use webhooks for real-time responsiveness and scheduled polling for reconciliation. Choose the approach that fits your architecture and reliability requirements.

🔧 Bucket III: In-Flight Management

Loop provides APIs to manage returns while they’re in progress. This is useful when another system—like your WMS, ERP, or a warehouse inspection workflow—needs to trigger actions on a return before it closes.
For complete documentation on return actions, see the Actioning on Returns guide.

Common Use Cases

ScenarioAPI ActionDescription
Warehouse confirms receiptProcess ReturnFinalize the return and trigger outcomes
Item fails inspectionFlag ReturnPause automated processing for manual review
Customer requests cancellationCancel ReturnCancel the return; items become returnable again
Internal note neededCreate Return NoteAdd audit trail or context from external systems
Item not receivedRemove Line ItemsRemove items and process remaining return
Inspection workflows: For high-value items that require physical inspection before approval, your warehouse or ERP can call the Process Return API only after inspection passes. This keeps Loop in sync with your internal approval flow.

Processing Triggers

Returns can be processed (finalized) in several ways:
  • Automatically: Based on Loop’s configured processing events (e.g., label scanned, package delivered)
  • Via API: Your integration calls the Process Return API after external confirmation
  • Manually: A team member processes the return in Loop’s admin
Once processed, Loop fires the return.closed webhook, which kicks off outcome execution (Bucket IV).

💰 Bucket IV: Outcome Execution

When a return is processed and closed, Loop provides all the information needed to execute the outcome—what type of resolution, how much, and for which items. Your systems handle the actual execution. This is where the integration comes full circle: Loop tells you what and when; your platform handles how.

Delivering Outcomes

OutcomeWhat Loop ProvidesWhat You Do
RefundRefund amount, line items, destination (original payment or store credit)Refund to original payment method via payment gateway, or issue store credit/gift card
ExchangeNew items selected, shipping addressCreate new order in your commerce platform for fulfillment
RestockItems to restock, quantitiesIncrement inventory in WMS or ERP
Exchanges require additional data in Loop. To support exchanges, you’ll need to sync Locations and Inventories (see Bucket I) so Loop knows what’s available.

Reconciliation: Closing the Loop

After executing an outcome in your external system, the data in Loop may become stale. Reconciliation ensures Loop’s records stay accurate—this matters if a customer returns additional items from the same order later.
This reconciliation happens through the same Commerce Data APIs used in Bucket I. Your ongoing sync should catch these updates automatically if it’s listening for changes in your platform.
After This HappensSync This Back to Loop
Refund executedUpdate the order’s refunds
Exchange order createdPush the new order to Loop (so it can be returned later)
Inventory restockedUpdate inventory levels
Order fully resolvedUpdate order status to archived

⚠️ Technical Considerations

When building your integration, keep these implementation details in mind.
ConsiderationRequirement
Monetary ValuesAll prices must be in minor units (cents). $10.001000
Date FormattingUse RFC 3339 / ATOM format without milliseconds: YYYY-MM-DDTHH:mm:ss+00:00
Order Status MappingMap your platform’s statuses to Loop’s allowed values: active, archived, cancelled, unknown
Sync OrderAlways sync Products before Orders

✅ Conclusion

Loop Anywhere gives you full control over how commerce data flows into Loop and how return outcomes flow back to your systems. By working through the four buckets—pushing commerce data, getting return data, managing in-flight returns, and executing outcomes—you can build a complete returns integration tailored to your platform and business needs.