Part 2: Setting up rules for offline data distribution
The SAP Hybris Cloud for Customer extended edition apps allow you to successfully run your business anywhere and anytime always providing you the relevant insights – even if you are offline!
With every release, we continue expanding the offline capabilities of our product. User feedback has always been our most important source of input to take the product forward. We heard our key-users asking us for finer control on the offline data that is downloaded to an end-user’s device.
We recently introduced improved flexibility to control what data gets synced offline to your end-users devices.
For our key-users, the new features provides the advanced control they have been asking for – they can now ensure that the correct dataset is always available for the end users, even without connectivity.
The feature is available under Administrator > General Settings > Offline Settings.
The first section (Data Download Rules) allows you to control which primary datasets are available to users offline.
The concepts around this is detailed in my previous blog Setting up rules for offline data distribution
Hint: Use the Group By Business Role feature in the table to easily browse through defined roles.
The new section (Related Data Download) helps the key-user define what data (in relation to the primary data set defined under Data Download Rules) are downloaded.
The default setting determines the default behavior for related data download.
A quick overview of the terms used:
- Primary data: Data downloaded since there is a rule for it under Data Download Rules
- Secondary data/related data: Data downloaded since it is linked/related to a primary data
The options are as follows:
- None – No related data is downloaded for any object that is selected for offline download
- Only first level – Related data is downloaded for the objects that are selected for offline download only via the Data Download Rules. So, you get related data only for your primary data set
- All – Related data is downloaded for the all entries that are selected for offline download. The difference with the previous setting is that, related data is downloaded even for data is not part of your primary data set (that is, related data is downloaded for secondary data as well).
For the technically inclined, this is the concept of recursion!
Note, that this setting leads to the most amount of data being downloaded offline.
The dataset is more complete using this setting, but as you can expect (the sync timings are corresponding longer).
Let’s take a business scenario:
Imagine that for a business role (Marketing Rep), the Data Download Rules has only one rule defined – My Opportunities.
Now, under Related Data Download, the behavior of the settings could be one of the following:
- None – The linked account of the opportunity is not downloaded
- Only first level – Since opportunities are downloaded as a primary data set (based on the rule configured above), its related data (secondary data), would be downloaded. So the account of the opportunity would be downloaded automatically even if there is no rule for accounts defined under Data Download Rules
- All – Related data (secondary data set) for even the account of the opportunity would be downloaded.
So the account’s owner (for example) – will be automatically downloaded as well
A couple of points to note:
- We make some exceptions to the above settings – i.e. we deem that in certain cases related data should always be downloaded even if the key-user chooses a setting of None, e.g. the snapshot of the related account of an opportunity is ALWAYS downloaded.
Technically, the snapshot (address snapshot) is different from the account itself (it’s a smaller ‘snapshot’ of the account, hence the name).
- We download the related relationships of an account ONLY when the account is being downloaded as a primary.
For ever finer control (yes, you have all the flexibility you need!), once you made the default setting, you can configure specific exceptions to it (on a per object basis).
Lets take the case that you setup the Default option as None in the previous step.
- You can add an exception and say, that for Opportunities you always want its related Account information to be downloaded (the Sales Rep obviously wants to know details about the Account).
For this, add a new exception using the Source: Opportunities, Target: Account/Contact/Individual Customer/Employee, Setting: All
Here the option All ensures that even if the Opportunity itself was downloaded as a secondary, we will still see the details of its related account.
- You can add another exception, say, for Opportunities which are downloaded as only as primaries, you want to download the products it contains. However if the Opportunities themselves are downloaded as a secondary (maybe as they were linked to a Sales Order), you don’t want this.
For this, add an exception using Source: Opportunities, Target: Products, Setting: Only first level
You will notice that we predefine some exceptions based on existing business logic used in the application.
These exceptions cannot be altered or removed.
There will be situations where you did not end up downloading all the related data of an object to the device.
We handle such situations gracefully – the screenshot below shows what happens with the settings above.
Here the account of the opportunity was downloaded due to the above settings.
However, since the related data of the account itself is not downloaded, navigating to the account team section of the account itself shows some entries as ‘Not downloaded’.
Of course, the entire feature is optional for our customers. Key-users can keep the settings simple by just using a default selection of ‘Only first level’. This is the optimal setting for most business scenarios. It keeps both data on the end-users device to a minimum and also requires less settings to be maintained.
Stay tuned for more awesome offline and mobile features we delivered with our 1608 release.
Smartphone optimizations and Offline extensibility were other core areas we invested in based on your feedback.