How to redirect to specific screen on Email Button Click
Question
Application Type
Reactive

Hi,

I have below scenarios

1- Once order created, we are sending a mail to customer and inside mail there is button/link to track the status of the order.

2-Now once clicks on the link/button, user should redirect to that particular screen (e.g.Tracking Screen), for that we have configured the URL to redirect on the screen.

3- Now the problem is the screen is not anonymous, so every time if user clicks on email button/link, the user is redirected to Login screen if User has not logged in.

4- So once user login again, user is redirecting to Home Screen rather than Tracking Screen.

So is there any way to store the variables or logic , if user coming from email  and redirecting to Login, post login into systems should redirect to Specific screen.

Please let us know some other way around to achieve this.


Tried to make screen as anonymous, then its working but its not recommended due to security concern.


Many thanks,

Dileep


mvp_badge
MVP
Solution

Hi Dileep,

I have tried the mentioned use case, and for me, the Client variable did the trick.

If you observe in the Common > OnException flow, the default logic uses the Client.LastURL client variable to hold the requested page URL. I did a small code change, i.e., if the GetUserId() === Nullidentifier() then store the last requested page URL and redirect the end user to the Login screen.

And in the Login Screen, the Login button action flow ends with an External Site end node which refers to the  Client.LastURL client variable value.


I hope this helps you!


Kind regards,

Benjith Sam

Hi Benjith, Many Thanks for the reply, will check this approach and will update you. 

Thanks Benjith appreciated your approach it helps.

mvp_badge
MVP

You're welcome, Dileep.

Glad to help you :)


Kind regards,

Benjith Sam

Hi Dileep,

so let's discuss all possible forms of storing data to verify in the login process:

  • Session Variable: I guess it always need a login, so it won't work
  • URL Parameter: The parameter should be lost after the redirect to login page. In any case, not the safest way, but a GUID can be used combined with a database entry
  • Database: Can use IP address, but may not be 100% accurate or selective
  • Cookies: Never tried this kind of solution but in theory could work

What do you think?

Regards

Thanks José, will check above solutions if its resolve the problem and let u know.

  

mvp_badge
MVP
Solution

Hi Dileep,

I have tried the mentioned use case, and for me, the Client variable did the trick.

If you observe in the Common > OnException flow, the default logic uses the Client.LastURL client variable to hold the requested page URL. I did a small code change, i.e., if the GetUserId() === Nullidentifier() then store the last requested page URL and redirect the end user to the Login screen.

And in the Login Screen, the Login button action flow ends with an External Site end node which refers to the  Client.LastURL client variable value.


I hope this helps you!


Kind regards,

Benjith Sam

Hi Benjith, Many Thanks for the reply, will check this approach and will update you. 

Thanks Benjith appreciated your approach it helps.

mvp_badge
MVP

You're welcome, Dileep.

Glad to help you :)


Kind regards,

Benjith Sam

mvp_badge
MVP

Hi Dileep,

You could also put a GUID in the link, that's connected to a specific user (preferably with some validity time). Redirect not to the Tracking Screen directly, but to an Anonymous screen, that handles validating the GUID and logging in the user, then redirects back to the Tracking Screen.

Hi Killian to be Frank I didn't try this solution. Because I am able to manage to solve using other solution. But this may also be a nice solution.

Thanks for your solution.

Dileep

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.