email otp

Hi,

I have a doubt. I need to send a otp once the user clicks on the action "create record". While creating they have  a field OTP, where they enters the value that is received via email.

I have used the rand function to generate the random number, I added this logic in a script task and then had the send email node. My question here is:

1. I am receiving the mail for otp after clicking on submit or cancel, but in my PM i have the email node right after the start node. I wanted to receive the otp once after opening the form itself

2. I store the value for the otp in the Process variable in PM. How can we do the comparison if the user enters the code in the form?

Can someone please help here

Thanks in advance.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I would do it this way. All steps happen in one dynamic UI.

    1. Normal record action with a start form

    2. A button "Send OTP" triggers a process in the background that creates the OTP and send it. Store the result from the process to a local.

    3. Display the OTP input field and add a validation that compares the entered value to the stored OTP.

    4. If the OTP is valid, allow the user to proceed.

Reply
  • 0
    Certified Lead Developer

    I would do it this way. All steps happen in one dynamic UI.

    1. Normal record action with a start form

    2. A button "Send OTP" triggers a process in the background that creates the OTP and send it. Store the result from the process to a local.

    3. Display the OTP input field and add a validation that compares the entered value to the stored OTP.

    4. If the OTP is valid, allow the user to proceed.

Children
No Data