> ## 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.

# Remove user from group (multiple groups)

In the edge case where the current Storefront Gateway User is the Primary of multiple Groups, and the target User to remove is in one or more of those same Groups, the Process prompts the end user to specify the Group from which to remove the target User.

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

## Initial Request

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

```
**POST https://\{your.url\}/process/start/userManagement.RemoveUser.v1.0**
<no body>
```

## Response: Specify User

Storefront Gateway responds with a prompt to specify the end user to remove from the current end user's Group:

```
**RESPONSE - body**
{
   "processId": "3bdd10d2-8f2e-499e-be8e-b6679855e131",
   "processName": "userManagement.RemoveUser.v1.0",
   "stepName": "SelectUserPrompt",
   "parameters": {
      "userId": "long"
   }
}
```

| `processId` | Unique identifier for the current instance of this Process. |
| - | - |
| `processName` | Full name of the Process, including the category and version number. |
| `stepName` | Name of the specific step that the Process is currently on. |
| `lastStep` | Boolean that indicates whether or not this was the last step in the Process. |
| `parameters` | Object that specifies the info this Process requires to continue its task. |
| `userId` | Storefront Gateway's unique internal identifier of the user to remove (i.e., the `id` property on that Storefront Gateway User entity) |

## Next Request: Specify User

Once the current end user specifies who to remove, the client passes the target User entity's `id` number through the [Process Step](c_processStep) API request:

```
**PUT https://\{your.url\}/process/step**
{
   "processId": "3bdd10d2-8f2e-499e-be8e-b6679855e131",
   "parameters": {
      "userId": "6014"
   }
}
```

| `processId` | Unique identifier for the current instance of this Process. |
| - | - |
| `parameters` | Data object that contains the data that was requested in the previous Process response. |
| `userId` | Storefront Gateway's unique internal identifier of the user to remove. |

## Response: Specify Group

Storefront Gateway returns a prompt to specify the target Group, and includes a list of applicable Storefront Gateway Groups wherein the current end user is the Primary User, and the target user is a Regular User.

```
**RESPONSE - body**
{
   "processId": "3bdd10d2-8f2e-499e-be8e-b6679855e131",
   "processName": "userManagement.RemoveUser.v1.0",
   "stepName": "SelectGroupPrompt",
   "lastStep": false,
   "displayMessage": "Please input required information",
   "output": {
      "1": "Group1",
      "2": "Group2"
   },
   "parameters": {
      "groupId": "String"
   }
}
```

| `processId` | Unique identifier for the current instance of this Process. |
| - | - |
| `processName` | Full name of the Process, including the category and version number. |
| `stepName` | Name of the specific step that the Process is currently on. |
| `lastStep` | Boolean that indicates whether or not this was the last step in the Process. |
| `displayMessage` | Optional message that the UI can display to the end user. |
| `parameters` | Object that specifies the info this Process requires to continue its task. |
| `groupId` | The selected group, identified by the Storefront Gateway Group entity's unique `id` number |
| `output` | Object that contains data that the client can consume, retain, and use for additional operations. In this case, each entry is a key-value pairing of an available Storefront Gateway Group's `id`s with it's display name, to assist the user in forming a selection. However, the client can leverage Storefront Gateway's **GET user/groups** API to retrieve a more exhaustive list of each Group, if need be. |

## Final Request: Specify Group

The client passes the end user's target Group from which to remove the target User:

```
**PUT https://\{your.url\}/process/step**
{
   "processId": "3bdd10d2-8f2e-499e-be8e-b6679855e131",
   "parameters": {
      "groupId": "1"
   }
}
```

| `processId` | Unique identifier for the current instance of this Process. |
| - | - |
| `parameters` | Data object that contains the data that was requested in the previous Process response. |
| `groupId` | The end user's selected group, identified by the Storefront Gateway Group entity's unique `id` number. |

## Process Complete

The Process removes the target User from the specified Storefront Gateway Group, and returns an `HTTP 200` status:

```
**RESPONSE - body**
{
    "processId": "3bdd10d2-8f2e-499e-be8e-b6679855e131",
    "processName": "userManagement.RemoveUser.v1.0",
    "lastStep": true,
}
```

| `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. |
| **Parent topic:**[Remove User from Group Process](c_removeUserFromGroup) | |


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