0

I want to be able to guide users that switch from classic to lightning with a tutorial. I know how to create a modal to guide the user, I just want the modal to show whenever the user switches from classic to lightning or when they login.

The key question, how can I control the amount of times they see this tutorial offer modal?

I want them to see it once a day but have an option to see it later or to completely dismiss it permanently. What is best method to do this?

2

I think there are few options in how you can achieve this. Here is how I would do it:

I just want the modal to show whenever the user switches from classic to lightning or when they log in.

To solve this I would build your tutorial as a lightning component and add it to the home app page using the app builder. Every time a user switches from classic to lightning, they get redirected to the home tab (from memory). In this way, you can ensure that they have access to your tutorial modal.

The key question, how can I control the amount of times they see this tutorial offer modal?

If using a lightning component, you can add an underlying apex class that has access to the UserInfo class which allows you to get the user id. Lastly, I would create a custom setting that stores the user specific settings. So stores the user id, a boolean if it is permanently dismissed and a date field that stores the date the user last saw the modal.

With this setting in place you can build your apex logic to check if the user has permanently dismissed the tutorial and feed this back to the lightning component.

Hope this helps.

1
  • thanks, this exactly what I did. I have a few modals that I want to track showing. So I used this process for them. Feb 2 '18 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.