Generate One-Time-Password Code Data Flow Template
Last updated
Last updated
This Data Flow template has three Data Operations that allow app builders to generate a code with a specific length to use as a one-time password by passing data through this Data Flow.
In Connection Builder, Data Flow templates can be found with pre-populated sample data. However, to meet the requirements of their Journey, app builders should perform the necessary adjustments, such as adding other Data Ops.
This Data Flow contains five main parts:
The Start pane keeps track of the inputs required by the Data Flow.
Transform Expression: Airscript expression to generate the max value based on the length of the input.
Output Format: Variable
Type: Number
Run Results: max output Variable of type Number that is automatically created to hold the results of this Operation
Transform Expression: Airscript expression to assort a number between 0 and the maximum value defined by the input.
Output Format: Variable
Type: Text
Run Results: random output Variable of type Text that is automatically created to hold the results of this Operation
Transform Expression: Airscript expression to make sure the assorted number has the length indicated in the first Data Op. If the number is lower, zeros will be added to the front.
Output Format: Variable
Type: Text
Run Results: code output Variable of type Text that is automatically created to hold the results of this Operation.
The End step is where variables from the Data Flow can be used as an output.
Sample Return Value: code of type Text
Allow app builders to generate a variable length code to use as OTP.