> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Single step user onboarding

The flow is similar to the standard email and mobile onboarding use cases, except all the user's information is provided in the initial [Process Start](c_processStart) request.

The Process consumes the user's mobile number and password, creates a new unique Storefront Gateway User entity, and then registers the submitted mobile as an attribute and authentication identifier (authN ID) on that entity. Both the Storefront Gateway User and the authN ID attribute are created with an `activating` status, pending verification.

<img src="https://mintcdn.com/amdocs-spbu/0TZ9XF1Mst_2ATcV/marketONE/sgProcessGuide/images/sfgw_umlOnboardSingleStep.png?fit=max&auto=format&n=0TZ9XF1Mst_2ATcV&q=85&s=800f4b7202e6ccf9c529c59534958a99" alt="" width="896" height="546" data-path="marketONE/sgProcessGuide/images/sfgw_umlOnboardSingleStep.png" />

## Initial Request

Your client application calls the [Process Start](c_processStart) API to initialize the Process:

```
**REQUEST - POST https://\{your.url\}/process/start/onboard.OnboardUserWithEmailMobile.v1.0**
{
   "parameters": {
      "email": "jane202102041318@mailinator.com",
      "credential": "LetMeIn1!",
      "displayName": "Jane Smith"
    }
} 
```

The client provides all the requisite data upfront, *before* an instance of the Process has been started. Therefore, it does not provide any `processId`.

| `parameters` | Object that contains the info this Process requires to create the new User entity. |
| - | - |
| `email` | (**Conditional**) The user's email address. **Mandatory** if `phone` is not provided. |
| `phone` | (**Conditional**) The user's mobile phone number. **Mandatory** if `email` is not provided. |
| `credential` | (**Mandatory**) The user's desired password. |
| `firstName` | (**Optional**) The user's first name. |
| `lastName` | (**Optional**) The user's last name. |
| `displayName` | (**Optional**) A display name for the user. This could be just a combination of the user's first and last name or a nickname. |
| `lang` | (**Optional**) The user's preferred language. |

## Process Complete

If the email (or mobile) and password pass validation, the Process starts, completes its task, and returns a `HTTP 200` status. The Process also sends an [action token](c_actionTokens) out to the user's email (or SMS) in the form of a clickable verification link (or OTP).

```
**RESPONSE - body**
{ 
   "processId": "8bca30ca-dd44-4050-aece-53b0dbed1922", 
   "processName": "onboard.OnboardUserWithEmailMobile.v1.0", 
   "output": { 
      "pkat": "sdfsd-gfsdfgsd-sdgsdg-sfddsf-dsfsdf", 
   }, 
   "lastStep": true 
}
```

**OTP Verification & Resend Verification**

Any Process step that sends a Storefront Gateway action token to a user also returns a corresponding [PKAT](c_actionTokens) to the client application. In order to enable OTP verification on the UI, the client **must** retain the PKAT returned by the final Process step. The PKAT, along with the user-supplied OTP, is required for the `[GET /session/token?customToken=\{OTP\}&amp;pkat=\{pkat\}](c_sessionToken)` API to invoke the subsequent **Activate User** Process to complete the user onboarding.

In cases where the user is anonymous, the PKAT is required if the application wants to provide a quick token resend option on the UI, using the `[PUT /session/token?pkat=\{pkat\}](c_putSessionToken)` API. This method applies to cases where the user is anonymous (i.e., they are not authenticated in Storefront Gateway). However, if the user is currently authenticated in Storefront Gateway, the client application can instead invoke the **Resend Verification** Process for this purpose.

| `processId` | Unique identifier for the current instance of this Process. | |
| - | - | - |
| `processName` | Full name of the Process, including the category and version number. | |
| `lastStep` | Boolean that indicates whether or not this was the last step in the Process. | |
| `output` | Object that contains data that the client can consume, retain, and use for additional operations. | |
| | `pkat` | Unique [Proof Key for Action Token](c_actionTokens#proof-key-for-action-tokens-pkats) that corresponds to an existing action token. |
| The user has successfully onboarded with their email or mobile. The User entity is stored with an `activating` status. The email address (or mobile number) is stored on the User entity as an attribute, and it also has an `activating` status. The user will need to verify their email/mobile and fully **Activate** their User identity before they can authenticate. | | |

**Parent topic:**[Onboard User with Email and Mobile Process](c_onboardUserEmailMobile)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.