Data Synchronization Workflows
Every Karrio project comes with powerful data synchronization capabilities, enabling seamless integration with Order Management Systems (OMS), Enterprise Resource Planning (ERP) platforms, and e-commerce solutions like Shopify, WooCommerce, Salesforce, Odoo, Magento, BigCommerce, and CommerceTools for automated logistics operations.
Features
Platform Data Synchronization
You don’t have to manually sync shipping data across platforms. Our workflow system automatically synchronizes orders, shipments, tracking information, and inventory updates between Karrio and your existing business systems.
Automation Dashboard

Logistics-Focused Automation
Designed specifically for shipping and logistics operations, not general-purpose automation. Focus on order fulfillment, inventory updates, tracking synchronization, and shipping cost allocation.
Real-Time Data Orchestration
Synchronize data in real-time between multiple systems while maintaining data consistency and handling API rate limits intelligently.
Business Logic Integration
Apply complex logistics rules, carrier selection logic, and compliance requirements across all connected platforms.
Error Handling & Retry
Robust error handling with automatic retry mechanisms, dead letter queues, and comprehensive logging for troubleshooting integration issues.
Additional features
- Karrio extends workflows with field mapping, data transformation, and conditional routing.
- Every workflow includes automatic batching, rate limiting, and API optimization.
- Karrio manages state synchronization and conflict resolution across platforms.
- Support for custom business rules and logistics-specific compliance requirements.
Data Flow
Multi-Platform Synchronization Flow
Platform Integrations
Shopify Integration
Order Synchronization
Webhook from Shopify when order is created1curl -X POST "https://your-karrio-instance.com/workflows/shopify/orders" \ 2 -H "Content-Type: application/json" \ 3 -H "X-Shopify-Webhook-Id: webhook_id" \ 4 -d '{ 5 "id": 450789469, 6 "order_number": "#1001", 7 "email": "customer@example.com", 8 "created_at": "2024-01-15T10:30:00Z", 9 "total_price": "59.98", 10 "currency": "USD", 11 "shipping_address": { 12 "first_name": "John", 13 "last_name": "Doe", 14 "address1": "123 Customer St", 15 "city": "New York", 16 "province": "NY", 17 "zip": "10001", 18 "country": "United States" 19 }, 20 "line_items": [ 21 { 22 "id": 866550311766439020, 23 "variant_id": 39072856, 24 "title": "IPod Nano - 8gb", 25 "quantity": 1, 26 "sku": "IPOD2008PINK", 27 "price": "59.98", 28 "grams": 500, 29 "product_id": 632910392 30 } 31 ] 32 }'
Fulfillment Update to Shopify
Update Shopify with fulfillment information1curl -X POST "https://your-store.myshopify.com/admin/api/2024-01/orders/450789469/fulfillments.json" \ 2 -H "X-Shopify-Access-Token: YOUR_ACCESS_TOKEN" \ 3 -H "Content-Type: application/json" \ 4 -d '{ 5 "fulfillment": { 6 "location_id": 24826418, 7 "tracking_number": "1Z12345E0205271688", 8 "tracking_company": "UPS", 9 "tracking_urls": [ 10 "https://wwwapps.ups.com/tracking/tracking.cgi?tracknum=1Z12345E0205271688" 11 ], 12 "line_items": [ 13 { 14 "id": 866550311766439020, 15 "quantity": 1 16 } 17 ] 18 } 19 }'
Salesforce Integration
Order Processing from Salesforce
Salesforce Order to Karrio Shipment1curl -X POST "https://api.karrio.io/v1/shipments" \ 2 -H "Authorization: Token YOUR_API_KEY" \ 3 -H "Content-Type: application/json" \ 4 -d '{ 5 "recipient": { 6 "person_name": "John Doe", 7 "company_name": "Acme Corp", 8 "address_line1": "123 Customer St", 9 "city": "New York", 10 "state_code": "NY", 11 "postal_code": "10001", 12 "country_code": "US", 13 "email": "customer@example.com" 14 }, 15 "shipper": { 16 "company_name": "Your Warehouse", 17 "address_line1": "456 Warehouse Ave", 18 "city": "Chicago", 19 "state_code": "IL", 20 "postal_code": "60601", 21 "country_code": "US" 22 }, 23 "parcels": [ 24 { 25 "weight": 1.1, 26 "weight_unit": "LB", 27 "dimension_unit": "IN", 28 "length": 10, 29 "width": 8, 30 "height": 6, 31 "items": [ 32 { 33 "description": "Product from Salesforce", 34 "quantity": 1, 35 "weight": 1.1, 36 "weight_unit": "LB", 37 "sku": "SF-PROD-001", 38 "value_amount": 59.98, 39 "value_currency": "USD" 40 } 41 ] 42 } 43 ], 44 "service": "ups_ground", 45 "label_type": "PDF", 46 "metadata": { 47 "salesforce_order_id": "0014100000ABC123", 48 "salesforce_account_id": "0014100000DEF456", 49 "platform": "salesforce" 50 } 51 }'
Update Salesforce with Shipping Data
Update Salesforce Order with shipping information1curl -X PATCH "https://your-instance.salesforce.com/services/data/v59.0/sobjects/Order/0014100000ABC123" \ 2 -H "Authorization: Bearer YOUR_SALESFORCE_TOKEN" \ 3 -H "Content-Type: application/json" \ 4 -d '{ 5 "Status": "Shipped", 6 "TrackingNumber": "1Z12345E0205271688", 7 "ShippingCarrier": "UPS", 8 "ShippedDate": "2024-01-15T10:30:00.000+0000", 9 "ShippingCost": 15.25 10 }'
Odoo ERP Integration
Order Export from Odoo
Odoo XML-RPC integration example1import xmlrpc.client 2 3# Connect to Odoo 4url = 'https://your-odoo-instance.com' 5db = 'your_database' 6username = 'your_username' 7password = 'your_api_key' 8 9common = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/common') 10uid = common.authenticate(db, username, password, {}) 11 12models = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/object') 13 14# Get orders ready for shipping 15orders = models.execute_kw(db, uid, password, 16 'sale.order', 'search_read', 17 [[['state', '=', 'sale'], ['karrio_sync_status', '!=', 'synced']]], 18 {'fields': ['name', 'partner_id', 'partner_shipping_id', 'order_line', 'amount_total']} 19) 20 21# Process each order with Karrio 22for order in orders: 23 # Transform Odoo order to Karrio format 24 karrio_shipment = transform_odoo_order_to_karrio(order) 25 26 # Create shipment in Karrio 27 response = create_karrio_shipment(karrio_shipment) 28 29 # Update Odoo with tracking information 30 if response.get('tracking_number'): 31 models.execute_kw(db, uid, password, 32 'sale.order', 'write', 33 [[order['id']], { 34 'karrio_tracking_number': response['tracking_number'], 35 'karrio_carrier': response['carrier_name'], 36 'karrio_sync_status': 'synced' 37 }] 38 )
WooCommerce Integration
WooCommerce Order Processing
1<?php 2// WooCommerce webhook handler 3add_action('woocommerce_order_status_processing', 'sync_order_to_karrio'); 4 5function sync_order_to_karrio($order_id) { 6 $order = wc_get_order($order_id); 7 8 // Prepare shipment data 9 $shipment_data = array( 10 'recipient' => array( 11 'person_name' => $order->get_shipping_first_name() . ' ' . $order->get_shipping_last_name(), 12 'address_line1' => $order->get_shipping_address_1(), 13 'address_line2' => $order->get_shipping_address_2(), 14 'city' => $order->get_shipping_city(), 15 'state_code' => $order->get_shipping_state(), 16 'postal_code' => $order->get_shipping_postcode(), 17 'country_code' => $order->get_shipping_country(), 18 'email' => $order->get_billing_email() 19 ), 20 'parcels' => array(), 21 'metadata' => array( 22 'woo_order_id' => $order_id, 23 'platform' => 'woocommerce' 24 ) 25 ); 26 27 // Add line items 28 foreach ($order->get_items() as $item) { 29 $product = $item->get_product(); 30 $shipment_data['parcels'][0]['items'][] = array( 31 'description' => $item->get_name(), 32 'quantity' => $item->get_quantity(), 33 'weight' => $product->get_weight() ?: 1, 34 'weight_unit' => 'LB', 35 'sku' => $product->get_sku(), 36 'value_amount' => $item->get_total(), 37 'value_currency' => $order->get_currency() 38 ); 39 } 40 41 // Send to Karrio 42 $response = wp_remote_post('https://api.karrio.io/v1/shipments', array( 43 'headers' => array( 44 'Authorization' => 'Token ' . get_option('karrio_api_key'), 45 'Content-Type' => 'application/json' 46 ), 47 'body' => json_encode($shipment_data) 48 )); 49 50 if (!is_wp_error($response)) { 51 $shipment = json_decode(wp_remote_retrieve_body($response), true); 52 53 // Update order with tracking 54 $order->update_meta_data('_karrio_tracking_number', $shipment['tracking_number']); 55 $order->update_meta_data('_karrio_carrier', $shipment['carrier_name']); 56 $order->save(); 57 } 58} 59?>
Workflow Patterns
Bi-Directional Sync Pattern
Maintain data consistency between Karrio and external platforms:
1class BiDirectionalSync { 2 constructor(config) { 3 this.platforms = config.platforms; 4 this.conflictResolution = config.conflictResolution || "karrio_wins"; 5 } 6 7 async syncOrderStatus(orderId, newStatus, source) { 8 try { 9 // Update in Karrio first 10 await this.updateKarrioOrder(orderId, newStatus); 11 12 // Sync to all connected platforms except source 13 const platforms = this.platforms.filter((p) => p.name !== source); 14 15 await Promise.all( 16 platforms.map((platform) => 17 this.syncToPlatform(platform, orderId, newStatus), 18 ), 19 ); 20 } catch (error) { 21 await this.handleSyncError(orderId, error, source); 22 } 23 } 24 25 async syncToPlatform(platform, orderId, status) { 26 switch (platform.type) { 27 case "shopify": 28 return this.syncToShopify(platform, orderId, status); 29 case "salesforce": 30 return this.syncToSalesforce(platform, orderId, status); 31 case "odoo": 32 return this.syncToOdoo(platform, orderId, status); 33 case "woocommerce": 34 return this.syncToWooCommerce(platform, orderId, status); 35 default: 36 throw new Error(`Unsupported platform: ${platform.type}`); 37 } 38 } 39 40 async handleConflict(orderId, conflictData) { 41 switch (this.conflictResolution) { 42 case "karrio_wins": 43 return this.forceKarrioState(orderId); 44 case "platform_wins": 45 return this.forcePlatformState(orderId, conflictData); 46 case "manual_review": 47 return this.queueForManualReview(orderId, conflictData); 48 case "timestamp_wins": 49 return this.resolveByTimestamp(orderId, conflictData); 50 } 51 } 52}
Batch Processing Pattern
Efficiently sync large volumes of data:
1class BatchProcessor { 2 constructor(config) { 3 this.batchSize = config.batchSize || 100; 4 this.concurrency = config.concurrency || 5; 5 this.retryAttempts = config.retryAttempts || 3; 6 } 7 8 async processPlatformOrders(platform, orders) { 9 const batches = this.createBatches(orders, this.batchSize); 10 11 // Process batches with controlled concurrency 12 const semaphore = new Semaphore(this.concurrency); 13 14 const results = await Promise.allSettled( 15 batches.map((batch) => 16 semaphore.acquire().then(async (release) => { 17 try { 18 return await this.processBatch(platform, batch); 19 } finally { 20 release(); 21 } 22 }), 23 ), 24 ); 25 26 return this.consolidateResults(results); 27 } 28 29 async processBatch(platform, orders) { 30 const shipmentRequests = await Promise.all( 31 orders.map((order) => this.transformOrderToShipment(platform, order)), 32 ); 33 34 // Create batch shipment in Karrio 35 const batch = await karrio.batches.createShipments({ 36 batchShipmentData: { 37 shipments: shipmentRequests, 38 }, 39 }); 40 41 // Monitor batch progress 42 const completedBatch = await this.monitorBatch(batch.id); 43 44 // Update platforms with results 45 await this.updatePlatformsWithResults(platform, completedBatch, orders); 46 47 return completedBatch; 48 } 49 50 async transformOrderToShipment(platform, order) { 51 switch (platform.type) { 52 case "shopify": 53 return this.transformShopifyOrder(order); 54 case "bigcommerce": 55 return this.transformBigCommerceOrder(order); 56 case "magento": 57 return this.transformMagentoOrder(order); 58 case "commercetools": 59 return this.transformCommerceToolsOrder(order); 60 default: 61 return this.transformGenericOrder(order); 62 } 63 } 64}
Real-Time Webhook Processing
Handle platform webhooks with proper error handling:
1class WebhookProcessor { 2 constructor() { 3 this.processors = new Map(); 4 this.setupProcessors(); 5 } 6 7 setupProcessors() { 8 this.processors.set("shopify", new ShopifyProcessor()); 9 this.processors.set("salesforce", new SalesforceProcessor()); 10 this.processors.set("odoo", new OdooProcessor()); 11 this.processors.set("woocommerce", new WooCommerceProcessor()); 12 this.processors.set("bigcommerce", new BigCommerceProcessor()); 13 this.processors.set("magento", new MagentoProcessor()); 14 this.processors.set("commercetools", new CommerceToolsProcessor()); 15 } 16 17 async processWebhook(platform, event, data, headers) { 18 try { 19 // Verify webhook authenticity 20 await this.verifyWebhook(platform, data, headers); 21 22 // Get platform processor 23 const processor = this.processors.get(platform); 24 if (!processor) { 25 throw new Error(`No processor found for platform: ${platform}`); 26 } 27 28 // Process the webhook 29 const result = await processor.process(event, data); 30 31 // Log successful processing 32 await this.logWebhookEvent(platform, event, "success", result); 33 34 return result; 35 } catch (error) { 36 // Log error and handle retry logic 37 await this.logWebhookEvent(platform, event, "error", error); 38 39 if (this.isRetryableError(error)) { 40 await this.queueForRetry(platform, event, data, headers); 41 } 42 43 throw error; 44 } 45 } 46 47 async verifyWebhook(platform, data, headers) { 48 switch (platform) { 49 case "shopify": 50 return this.verifyShopifyWebhook(data, headers); 51 case "salesforce": 52 return this.verifySalesforceWebhook(data, headers); 53 default: 54 // Generic verification or skip for platforms without verification 55 return true; 56 } 57 } 58} 59 60class ShopifyProcessor { 61 async process(event, data) { 62 switch (event) { 63 case "orders/create": 64 return this.handleOrderCreate(data); 65 case "orders/updated": 66 return this.handleOrderUpdate(data); 67 case "orders/cancelled": 68 return this.handleOrderCancel(data); 69 default: 70 console.log(`Unhandled Shopify event: ${event}`); 71 } 72 } 73 74 async handleOrderCreate(order) { 75 // Transform Shopify order to Karrio format 76 const shipmentData = { 77 recipient: { 78 person_name: `${order.shipping_address.first_name} ${order.shipping_address.last_name}`, 79 address_line1: order.shipping_address.address1, 80 address_line2: order.shipping_address.address2, 81 city: order.shipping_address.city, 82 state_code: order.shipping_address.province_code, 83 postal_code: order.shipping_address.zip, 84 country_code: order.shipping_address.country_code, 85 phone_number: order.shipping_address.phone, 86 email: order.email, 87 }, 88 shipper: await this.getWarehouseAddress(), 89 parcels: await this.transformLineItemsToParcels(order.line_items), 90 metadata: { 91 shopify_order_id: order.id, 92 shopify_order_number: order.order_number, 93 platform: "shopify", 94 }, 95 }; 96 97 // Apply business rules for carrier selection 98 const selectedCarrier = await this.selectCarrier(shipmentData, order); 99 if (selectedCarrier) { 100 shipmentData.carrier_ids = [selectedCarrier]; 101 } 102 103 // Create shipment in Karrio 104 const shipment = await karrio.shipments.create({ 105 shipmentData: shipmentData, 106 }); 107 108 // Update Shopify with fulfillment 109 await this.createShopifyFulfillment(order.id, shipment); 110 111 return shipment; 112 } 113}
Platform-Specific Features
E-commerce Platform Integrations
Shopify Advanced Features
- Multi-location fulfillment: Route orders to appropriate warehouses
- Shopify Flow integration: Trigger Shopify Flow actions based on shipping events
- App bridge integration: Embedded shipping interface in Shopify admin
- Metafield synchronization: Store shipping data in Shopify metafields
BigCommerce Features
- Webhook management: Automatic webhook setup and management
- Custom fields mapping: Map BigCommerce custom fields to shipping metadata
- Multi-storefront support: Handle multiple storefronts from single Karrio instance
- Tax integration: Sync shipping costs with BigCommerce tax calculations
ERP System Integrations
Odoo Features
- Stock movement integration: Sync inventory movements with shipping
- Accounting integration: Post shipping costs to appropriate accounts
- Multi-company support: Handle Odoo multi-company setups
- Custom module integration: Work with custom Odoo modules
Salesforce Features
- Lightning component: Native Karrio shipping component for Salesforce
- Apex trigger integration: Automatically process orders via Apex triggers
- Custom objects: Store detailed shipping data in custom Salesforce objects
- Process Builder integration: Include shipping in Salesforce automation
Use Cases
Multi-Channel E-commerce
Perfect for businesses selling across multiple platforms:
- Unified Shipping: Consistent shipping experience across all channels
- Centralized Fulfillment: Process orders from all platforms in one place
- Inventory Synchronization: Keep stock levels updated across platforms
- Cost Allocation: Distribute shipping costs back to source platforms
Enterprise Logistics
Designed for large organizations with complex systems:
- System of Record: Use Karrio as central shipping system of record
- Legacy Integration: Connect older ERP systems with modern shipping APIs
- Compliance Management: Ensure shipping compliance across all platforms
- Performance Analytics: Unified shipping analytics across all systems
3PL/Fulfillment Centers
Built for logistics service providers:
- Client Platform Integration: Connect to each client’s e-commerce platform
- White-label Solutions: Provide shipping services under client branding
- Multi-tenant Architecture: Isolate data between different clients
- Billing Integration: Track shipping costs per client for billing
Getting Started
Ready to sync your platforms with Karrio? Follow these steps:
- Identify your platforms and their API capabilities
- Set up authentication for each platform integration
- Configure data mapping between platforms and Karrio
- Test synchronization with a small subset of data
- Monitor and optimize sync performance and reliability
Next Steps
- Learn about webhooks for real-time synchronization
- Explore batch processing for high-volume data sync
- Set up orders for order management integration
- Configure API logs for monitoring sync operations
Need help with platform integration? Join our community Discord or check our integration guides for specific platforms.