Is `device.getDeviceId()` stable?

Hi folks,

we are building a POS UI Extension where we heavily rely on the shopify.device.getDeviceId() API to uniquely identify a POS device.

Today I was experiencing that the ID returned from that function suddenly changed. So we are wondering if its save to rely on the getDeviceId() to identify POS devices?

Many thanks

Christof

Heya Christof! :waving_hand:t2:

Thanks for reaching out and flagging this.
While Shopify POS makes a best-effort attempt to maintain a stable identifier, the identifier returned by getDeviceId() is not guaranteed to be permanent. Certain events can cause it to be regenerated (e.g.- device factory reset).

We will update the documentation to be more explicit about this.

Thanks for the clarification. Follow-up question: are there any plans to expose the Drawer ID (highlighted in the screenshot) as a property in the device API?

Hi, yes, there are plans to expose that via API. It will be related to Cash Management.

@h-shopify Thanks, that is fantastic news. Do you already have an ETA? Many thanks.