The rule
What your app keeps about a store (settings, tiers, points, rewards, reviews, bundles, a sync state) is saved in PlatformDTC. Your own database may be a cache, never the only copy. If your server disappeared tomorrow, the merchant would still have everything your app knew about their store. Apps that can change store data, or read customer data, are checked for this at review.How an app is built
- React. Subscribe to the webhooks you need, such as a new order or a renewal.
- Read. Fetch what you need through the Agent Gateway with your app’s access token. Ask only for the scopes you use.
- Save. Write your results back:
Only your app can write this data. The merchant and their assistant can read it, and other apps
cannot see it. See Share data with the assistant
for the exact calls.
Example: a loyalty app
- On
orders/paid, read the order, add points, and save$app:loyalty/pointsandtieras metafields on the customer. - Keep the reward catalog as
$app:rewardmetaobjects. - Declare an
award_pointsagent tool.
Uninstall and privacy
When a merchant uninstalls your app, your data stays for 48 hours. If they reinstall in that time, nothing is lost. After that, PlatformDTC deletes it and sendsshop/redact. You still delete any cached copy you hold.