Feature(s) impacted
Managing data
Observed behavior
TL;DR: So far, I have not been able to find a convenient way to switch from an “account” dataset to another. What is the best option?
In most SaaS, data is organized in several accounts (or tenants). In many of them the multi-tenancy is managed at application level. Meaning that data from different tenants will be shared in the same DB then scoped when a user query the DB.
This is the case of my application. I have even went further by de-normalizing the DB and adding a “tenant_id” in every table.
When a user perform an action, I need the result to be scoped by tenant (in order to ensure that support agent do not start to cross data from différent tenants).
The best way I have found to do it so far, is to hide all collection except the tenant collection and navigate from related data only.
This approach has 2 downsides:
- UI-wise, we are wasting the first column
- I cannot use segments and have to re-create them as smart relationships (see “documents to match” on the screenshot above)
Another option could be to use the “Scope” feature. However, switching from tenant would become tedious and would require admin rights (that we do not want to give to support agents).
Expected behavior
The perfect solution would be to use the scope feature with a variable that we can easily set from the UI.
I have even check your API to see if I could change a tag on a user from the API. This way, I would create a custom action that would change a “tenant_id” tag on the current user and I would reuse this tag in the global scope. (I do not know if you are still following me )
Let me know if you see any other option.
Cheers