Show dashboard data based on which user is logged in

Hello!
As of right now, my Losant application allows a user to create an account and a new device. I have one dashboard set up that needs to display this data from the newly created device. I want this dashboard to be able to update for whatever user is logged in, and present the data coming from their specific device. Is it possible for one dashboard to work for multiple users, or will I have to create a separate dashboard for each user?

If I have to create a separate dashboard for each user, is there a way for me to implement this into a workflow?

Thanks!

By “user” do you mean “experience user”? If so, you can pass the experience user as a context variable into the dashboard and reference that context variable in your dashboard blocks to display that user’s device data.

One warning: The experience user context variable resolves in much the same way as device tags do when utilized in dashboard blocks. So, for example, if you used the experience user variable in a device list block, what you would get back is a list of all devices associated with the user. Similarly, if you used the variable in a segment in a time series graph, what would be graphed is the aggregate attribute value across all the user’s associated devices in a single line.

Now, if your user <-> device association is always 1 to 1, this won’t be a problem for you. But if a user could be associated with multiple devices, what you’d probably want to do instead is:

We cover this topic quite a bit in our Building Application Experiences Deeper Dive. I recommend checking that out.