Webflow API - are IDs unique?

Hi there,

I’m working on an app for the Webflow App store. For the ecommerce webhooks, there are several IDs that can be returned from the API. Are these globally unique, or unique per site?

  • OrderId
  • ProductId
  • VariantId
  • downloadFiles.id

Additionally, are there supported methods for identifying these elements on a page in a site? For example on a given product page, extracting the relevant ProductId. I’ve had a look and some of the elements are available as data attributes in tags, but I’m wondering what the recommended approach is.

Thanks,
Hernan

Globally unique- however, they’re also instance-unique. If a customer does a backup restore, every CMS item is assigned a new ID. I have not tested, but I’d assume that the same is true for Product and Variant ID’s and likely Order ID’s. Possibly Download File IDs as well, although at least part of that identification relates to the storage of the physical file ( on Amazon S3, I think ).

As far as how those ID’s are or are not emitted into the site, you’re totally up to your own devices there. Webflow does not have any published client-side API for interacting with the generated pages.

1 Like

Thanks for the info @memetican

You can rely upon those ID’s being unique for each of those fields listed, they should never clash / overlap with any others across the Webflow platform (actually, I’m only guessing with the download files id, but assuming the same).

Nothing natively with Webflow, and Webflow will cause you harm if you do lean on them and then restore your CMS:

But the catch-22 is you need to rely upon them to extend functionality in Webflow.

Definitely don’t do that if you can avoid it.

A couple of better ways…

1. Copy / Paste

Just tap the preview button when restoring. You’ll go to an older version, then just copy / paste what you want back into your most revecent version.

2. Long Term Automation

The common solution is to use the “lookup tables” approach:

Automatically backup your CMS to Airtable, or Google Sheets, then use something like PowerImporter (a long-time community members application @JudoHacker) to restore your CMS.

It’s a tad bit of hoop-jumping, but it gives you power you just can’t get with Webflow alone. I’ve based a lot of successful solutions on setups similar to this.

Hope that helps!

1 Like