Set up One-Time Passcode (OTP)

Before you start

Make sure you have the following:

Access to the RiskOS™ Dashboard with the One-Time Passcode (OTP) enabled.

A basic understanding of RiskOS™ workflows and components.

How it works

Socure OTP is an enrichment available in RiskOS™. It generates a one-time passcode, delivers it via SMS, voice, or email, and validates the user’s input against the generated code. The module then returns a decision (ACCEPT, REJECT, or REVIEW) to drive workflow routing.

📘
Note:
ACCEPT, REVIEW, and REJECT are the default decision values. Customers can customize the response to added or to delete default values based on specific workflow needs.

Choose your configuration

Select a simple single-channel OTP setup or a more advanced configuration with multiple delivery options and fallback logic.

Single Channel Setup with SMS, Email, or Voice

Ideal for simple OTP delivery using one primary method. Choose a single channel and configure straightforward verification logic.

Best for:

Channels: SMS, Email, or Voice

Advanced setup with two channels

Enables fallback options across multiple delivery channels. Improves success rates by offering an alternative method when the primary channel fails.

Best for:

Channels: SMS + Email fallback

Channel setup

You can configure OTP delivery using a single channel to send the code through one primary method without any fallback logic.

The sample workflow below demonstrates how to support a single delivery channel.

Step 1 - Add OTP Verification enrichment step to a workflow

  1. In the RiskOS™ Dashboard, go to Workflows and create a new workflow or open an existing one.

  2. On the Workflow Canvas, click the plus (+) icon and add an OTP Verification step.

  3. In the Configuration panel on the right, set up the OTP Verification step:

📘
Note:

Step 2 - Add a Condition step

On the Workflow Canvas, click the plus (+) icon and add a Condition step. In the Configuration panel, create corresponding outcomes for both true and false cases.

Example status values used for One-Time Passcode condition logic

Status Description
Pending OTP sent but not yet verified (still within 10-minute expiration).
Approved OTP successfully verified.
Reject OTP exceeded 5 attempts or expired (after 10 minutes).

For more information on configuring conditions, see Create and Edit a Workflow.

Step 3 - Add Decision steps

On the Workflow Canvas, click the plus (+) icon and add a Decision steps to your True and False conditions to route the decision accordingly:

Decision Description
ACCEPT OTP was successfully verified. The consumer is authenticated and can continue.
REJECT OTP verification failed (expired, exceeded attempts, or invalid). The consumer cannot proceed.

Step 4 - Save and publish

Once your workflow is configured, publish it to go live.

To improve delivery success rates, you can configure fallback channels so the OTP is sent through another method if the initial attempt fails.

Step 1 - Add SMS OTP Verification enrichment step to a workflow

  1. In the RiskOS™ Dashboard, go to Workflows and create a new workflow or open an existing one.
  2. On the Workflow Canvas click the plus (+) icon and add an OTP Verification step.
  3. In the Configuration panel on the right, set up the OTP Verification step:

📘
Note:
Phone numbers must be in E.164 format.

Step 2 - Add Conditions to define channel logic

To support multiple delivery channels, you’ll create separate conditions that evaluate the outcome of each OTP attempt.

Example status values used for One-Time Passcode condition logic

For more information on configuring conditions, see Create and Edit a Workflow.

Condition 1: Approve when the SMS OTP is verified

If the SMS OTP is successfully validated, route the workflow to the approved path:

  1. On the Workflow Canvas, click the plus (+) icon and add a Condition step.
  2. In the Configuration panel, set the rules to check the OTP Verification result.

Condition 2: Provide a fallback channel

If the SMS OTP fails or remains pending, route the workflow to allow the user to resend the code or switch the delivery channel to email:

  1. On the Workflow Canvas, click the plus (+) icon and add a Condition step.
  2. In the Configuration panel, define rules that identify when the SMS OTP cannot be used.

Step 3 - Add validation logic for the Email fallback channel

When SMS OTP delivery or validation fails, route the workflow to a second OTP step configured to send the OTP via Email.

Set up the Email OTP step

  1. On the Workflow Canvas, click the plus (+) icon and add an OTP Verification step.
  2. In the configuration panel:
    • Select Email as the delivery channel.
    • Set the Status, Sub-status, and Queue for the waiting state.
    • Enter an output field name (for example, OTP_Email).

📘
Note:
Email addresses must be in RFC 5322 format.

Add validation logic for the Email OTP

After the Email OTP step, add a Condition to evaluate whether the user successfully verified the code.

  1. On the Workflow Canvas, click the plus (+) icon and add a Condition step after the Email OTP step.
  2. In the Configuration panel, route the true outcome to the Approve step and route the false outcome to Decline or any additional fallback logic.

Step 4 - Add Workflow Decision steps

On the Workflow Canvas, click the plus (+) icon and add Decision steps to your True and False conditions to route the decision accordingly:

Step 5 - Save and publish

Once your workflow is configured, publish it to go live.

Workflow testing checklist

Use this checklist to confirm accuracy, resilience, and completeness before going live.

Phone number:

Phone numbers are valid E.164 values

Email:

Email addresses follow RFC 5322 format and are deliverable

OTP logic:

Codes are generated in sub-second time

Retry limits are enforced

Expiration windows are enforced

Cooldown behavior is applied after failures

Escalation and fallback:

Alternate delivery channels are available

Manual review or secondary verification paths are defined