Skip to content

Connect External Systems

Connect Tracktile with your existing business systems to create a unified data flow across your organization.

System TypeUse CaseApproach
ERPSync products, orders, inventoryWebhooks + API
AccountingPush invoices, sync customersWebhooks
E-commerceImport orders, update stockWebhooks + API
WMSCoordinate warehouse opsReal-time API

Best for: Real-time data synchronization

┌───────────┐ Webhook ┌──────────────┐
│ Tracktile │ ─────────────→ │ Your System │
└───────────┘ └──────────────┘
// Your webhook handler
app.post("/webhooks/tracktile", async (req, res) => {
// Verify the webhook signature (see Webhook Security docs)
const event = verifyWebhook(req, process.env.WEBHOOK_SECRET);
// Acknowledge immediately
res.status(200).send("OK");
// Process asynchronously
switch (event.kind) {
case "order.status.changed":
await erp.createSalesOrder(mapToErpFormat(event));
break;
case "shipment.status.changed":
if (event.currentShipmentStatus === "in_transit") {
await erp.confirmShipment(event.shipmentId);
}
break;
}
});

Best for: Non-critical data, bulk updates

// Run every hour
cron.schedule("0 * * * *", async () => {
// Fetch changes since last sync
const response = await fetch(
`https://api.tracktile.io/products?modifiedSince=${lastSyncTime.toISOString()}`,
{
headers: {
Authorization: "Bearer api-YOUR_TOKEN_HERE",
"Content-Type": "application/json",
},
}
);
const products = await response.json();
for (const product of products) {
await erp.upsertProduct(mapToErpFormat(product));
}
lastSyncTime = new Date();
});

Best for: Master data management

// Tracktile → ERP (via webhooks)
app.post("/webhooks/tracktile", handleTracktileEvent);
// ERP → Tracktile (via API)
app.post("/webhooks/erp", async (req, res) => {
const erpEvent = req.body;
if (erpEvent.type === "customer.updated") {
await fetch(
`https://api.tracktile.io/customers/${erpEvent.data.tracktileId}`,
{
method: "PUT",
headers: {
Authorization: "Bearer api-YOUR_TOKEN_HERE",
"Content-Type": "application/json",
},
body: JSON.stringify(mapFromErpFormat(erpEvent.data)),
}
);
}
res.status(200).send("OK");
});

View API Reference →