Whats the difference between `shop/redact` and `app/uninstalled`?

Whats the difference between shop/redact and app/uninstalled? Both are triggered when the app is uninstalled, just one is mandatory, so the app/uninstalled seems rather useless? Or are there some differences I am not aware of. It only seems that the shop/redact would probably fire after 48h while app/uninstalled seemingly instantly

For my apps, I use the app/uninstalled to cleanup my database and other content but still retain some user data just in case there was an accidental uninstall. The shop/redact is when I actually remove all shop related data, as required by Shopify and. GDPR standards and hold no user / PII data for that store after that.

It may seem a little redundant if your app isn’t sufficiently complicated but following this idea over the last decade has helped a lot in mitigating a lot of issues with accidental uninstalls from the merchant’s side.

*Hi @nikola_seo *
Shop/redact refers to a custom app built exclusively for your store. App/uninstalled is a tab in Shopify where you can view apps that have been removed from your store.

For more details, check this guide.

The docs should probably mention that then… https://shopify.dev/docs/apps/webhooks/configuration/mandatory-webhooks#shop-redact

What’s from your experience the best way to handle uninstalls then? Do I outright remove everything on app/uninstalled or should I just flag them and wait for the redact request to come in?

I usually only delete session tokens and related stuff when app/uninstalled comes in, all app data on shop/redact and others