How do I limit the data that is synchronized to app users' devices?

My DB has some master data, and also some transactional data that isn't relevant to all mobile users. Is there a way to limit the data that gets synchronized between users, so that only the most relevant data is being synched?

Data can be synced to users based on roles/ownership as well as the type of data. Here's a quick example of how you might sync master data for all users (master_product, warehouse, but only sync job objects based on ownership (job belongs_to user) and condition (job is open)

<?xml version="1.0" encoding="UTF-8"?>
<sync version="2">
    <global-bucket>
        <model name="master_product" />
        <model name="warehouse" />
    </global-bucket>

    <bucket via="self">
        <has-many name="jobs" condition="status == 'open'" />
    </bucket>
</sync>
2 Likes

More info: https://docs.journeyapps.com/reference/container/introduction-to-sync-rules/sync-rules-v2