Skip to main content
Use Trackstar webhooks to be notified when certain events occur. The timing of a webhook event related to a resource (e.g. Orders, Inventory, Products, etc.) will coincide with the sync frequency of that resource.
Resource webhooks (e.g. order.created, inventory.updated) are not sent during a connection’s initial sync. They are only sent for changes detected after the initial sync completes.However, the connection.historical-sync-completed webhook is sent when the initial sync finishes for each resource type. Use this to know when data is available for querying.For more information on how initial syncs work, see the Syncing Data guide.
Webhooks will point to a specific URL that you must set up. This URL must accept POST requests with the Content-Type set to application/json, and can be configured within the Trackstar Dashboard.

Webhook Message Schema

You can find each event’s full schema in the subsequent pages in this section.

Sample Webhook Message

Note: In the example above, status changed from “open” to “received” and the received_quantity of the second line item changed from 1 to 2. line_items.1.received_quantity is referring to data.line_items[1].received_quantity

Searching & Filtering Webhooks

In addition to filtering webhooks by Event Type, you can also filter by both Connection ID and Resource ID (e.g. the ID of an inventory item) within the “Tags” tab: Trackstar Webhooks Filter by Tags You also have the ability to filter by dates. For example, the below will return all webhooks that have been sent within the last week: Trackstar Webhooks Filter by Date Which can be combined with a before date filter to further narrow the results: Trackstar Webhooks Filter by Date Note: Filters are persistent when switching tabs in the filtering menu, meaning you have to manually clear or change them when jumping between tabs if you want different results.

Verifying Webhook Signatures

Trackstar uses SVIX as its webhook provider. Information on how to verify the webhook signature can be found in the SVIX documentation.

Webhook Transformations

Webhook transformations allow you to modify webhook properties in real-time using JavaScript before they are sent to your endpoint. You can change the target URL, modify the payload, or even cancel webhook delivery based on custom logic.

Separating Test and Production Environments

A common use case for transformations is routing webhooks to different endpoints based on the environment. Since Trackstar doesn’t currently have separate test and production webhook environments, you can use transformations to route webhooks to different URLs based on attributes in the webhook payload. For example, you might want to:
  • Send webhooks from test connections to a staging/test endpoint
  • Send webhooks from production connections to your production endpoint
You can accomplish this by writing a transformation that checks the connection_id and routes webhooks accordingly.

Example: Routing by Connection ID

Here’s a practical example that routes webhooks to different URLs based on whether the connection is a test or production connection:

Example: Routing by Customer ID

If you don’t want to keep track of a list of static connection IDs, you can also prefix the customer ID on your test connections with something like uat and filter based on that field:

Example: Routing by Integration Name

You can also route based on the integration name if you want to handle certain integrations differently:

Setting Up Transformations

To configure webhook transformations:
  1. Navigate to the Trackstar Dashboard
  2. Click on your webhook endpoint to view its settings
  3. Go to the “Advanced” tab
  4. Locate the “Transformations” card
  5. Enable transformations and paste your custom JavaScript code
  6. Save your changes
For more information on webhook transformations, including additional examples and advanced usage, see the Svix Transformations documentation.