Trigger activities on login
You can trigger one or more activities each time a user logs in to your application. For example, you might want to generate an optional or mandatory task each time a user logs in, or you might want to send a notification to a customer's account manager to notify them each time their client has accessed the system.
To trigger one or more activities when a user logs in:
- Add a login event activity to the
User
casetype. - Use the activity designer to add triggers to the
When done
stage of the login event to perform (or cancel) other activities each time a user logs in.
Unlike other types of timed activity, login events should not be triggered by another activity.
By default, a login event activity will be performed each time a user logs in to your application. This includes:
- Accessing an app via single-sign-on (such as Google, Facebook or Microsoft), even if the user is already logged in to the third-party identity provider.
- Logging in to a different environment of the same application (such as Acceptance or Production).
- Logging in to a different Grexx Platform application.
- Logging in again when a session has timed out through inactivity. You can configure the maximum session duration for each environment from My Grexx.
You can apply conditions to the When done
stage of the login event. For example, you can use a condition to trigger activities on log in only if the user belongs to a particular team or customer group.
If you only want to trigger an activity if the user has not logged in for several days, add an activity that stores the current date and time in an attribute on the User
case and then reference that value in a condition. Ensure the activity that stores the current date and time is performed after the condition and associated triggers.