How the shopify app send the user welcome email and app uninstall time sent feedback email

Hi all,
I have seen the many app they are send the welcome user email just app install. with sending the app on-boarding guide.
when app removed they sent the app uninstalling guide. and feedback like that what was the use flow.