[ST Schema] Unknown which device is deleted when interactionType is 'integrationDeleted'

According to this link (Interaction Types | SmartThings Developers), it is difficult to process the data on our server because we do not know which device is deleted in the request part during the operation.

Is there a way to know which devices were deleted from Smartthings?

Thank you.

Not something I have worked with, but doesn’t integrationDeleted mean the entire linked service has been removed?

Welcome back to the SmartThings Community, @notdef14!

I asked the team about this.
The “integration-deleted” is triggered when all the related devices are deleted or when we remove the Connector from “Linked services”.
However, if the user deletes a device on the ST side, it will be added back thanks to the periodic discovery process (every 24 hrs). After discovery, the “stateRefresh” interaction type is executed and the ST platform expects to get a response for all devices that it requested status for.

So, if the user wants to delete a device from ST, he/she needs to delete it from your native app and your connector should send a deviceState callback with the error “DEVICE-DELETED”. After that, it will be removed from the ST side.
I provided a sample here: Do SmartThings Schema Interaction Types have updating and deleting device function? - #4 by nayelyz

Please, let me know if you have any questions.