Sync Inventory Data
Keep your systems in sync with real-time inventory updates
Keep your external systems synchronized with Tracktile's inventory data using webhooks for real-time updates.
Real-time via Webhooks
Webhooks push inventory changes to your system the moment they happen. Perfect for:
- Keeping your ERP in sync
- Triggering downstream workflows
- Real-time dashboards
Quick Start
- Register a webhook endpoint in your Tracktile dashboard
- Save your webhook secret (shown only once on creation)
- Subscribe to inventory events:
inventory.received,inventory.modified,inventory.moved,inventory.destroyed - Verify signatures and process events (see Webhook Security)
// Example: Handling an inventory webhook
app.post("/webhooks/inventory", (req, res) => {
// Verify the webhook signature
const event = verifyWebhook(req, process.env.WEBHOOK_SECRET);
// Acknowledge receipt immediately
res.status(200).send("OK");
// Process asynchronously
switch (event.kind) {
case "inventory.received":
syncNewItem(event.entity);
break;
case "inventory.modified":
updateItem(event.entityId, event.changes);
break;
case "inventory.moved":
updateItemLocation(event.entity, event.to);
break;
case "inventory.destroyed":
removeItem(event.entityId);
break;
}
});