I’m working with Shopify webhooks and need to retrieve the numeric event ID to track who triggered specific events. When I receive webhook data, I can access various header information including a UUID-style event identifier, but the REST API requires a different format.
const webhookHeaders = {
'content-type': 'application/json',
'x-shopify-api-version': '2025-01',
'x-shopify-event-id': 'b7c8d9e0-1f2a-3b4c-5d6e-7f8g9h0i1j2k',
'x-shopify-hmac-sha256': 'signature_hash_here',
'x-shopify-shop-domain': 'mystore.myshopify.com',
'x-shopify-topic': 'products/create',
'x-shopify-webhook-id': 'a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6'
};
const eventId = webhookHeaders['x-shopify-event-id'];
console.log('Event ID from webhook:', eventId);
// This gives me a UUID but I need a numeric ID for the Events API
The UUID format doesn’t work when I try to query the Events endpoint. Is there a conversion method or alternative approach to get the proper event ID? My ultimate goal is identifying which user or process initiated the webhook event.
You can’t convert Shopify’s UUID webhook identifiers to numeric format - they’re completely different tracking systems. Webhook event IDs are just for deduplication and delivery tracking, while the Events API has its own sequential numbering. I’ve dealt with similar webhook setups before. Your best bet is grabbing the webhook payload timestamp and matching it with Events API entries based on timing and resource details. Just a heads up - this approach has issues since multiple events can fire at the same time. For better user tracking, I’d recommend building your own logging system that captures webhook data alongside user session info when people interact with your app.
Yeah, you can’t convert UUIDs to numeric - they’re completely different systems. But here’s how I handle this exact issue.
I skip the matching headache and set up real-time capture instead. When webhooks hit, I immediately log the full payload with timestamp, user context, and session data in a central database.
The key is correlating webhook data with your app’s user activity logs. I grab user sessions, admin actions, and API calls from right before each webhook fired. Usually you can nail down exactly who did what.
For automation, I use Latenode to handle webhook processing and correlation. It catches the webhook, pulls user context from your database, and stores everything searchable. Much cleaner than trying to reverse engineer Shopify’s messy tracking.
Shopify’s Events API is pretty weak for user attribution anyway. Your own tracking layer gives you way more control and better data.
totally get ur frustration! UUIDs r tricky. if u keep a log with timestamps of the events, that might help u figure out who triggered what later. not perfect, but it’s somethin!
You can’t convert webhook UUIDs to numeric IDs - Shopify uses completely different identifier systems. Hit this same wall last year and learned you’ve got to build your own correlation system instead of trying to match IDs. Here’s what actually works: set up a webhook processor that grabs the payload plus whatever context data you’ve got from your app. The key is logging user sessions and admin stuff with exact timestamps, then matching those against incoming webhooks based on timing and resource info. I built a buffer system that keeps recent user actions (last 30 seconds) and matches them to webhook events by comparing timestamps, resource IDs, and operation types. Gets the right user about 95% of the time. For those stubborn edge cases where timing isn’t enough, I added app-level event tracking that drops unique markers before doing anything that’ll trigger webhooks. Gives you total control over user attribution without depending on Shopify’s messy tracking.