# Manage accounts

## Manage accounts

 Account merging combines one or more existing accounts into one account that you select as
the target. Use **Manage accounts** when duplicate account records need to be brought together
from the configuration area.

| If you need to… | Go to |
|---|---|
| Open the configuration screen | [Find Manage accounts](#find-manage-accounts) |
| Review the two account-selection controls and the action available | [Understand the merge screen](#understand-the-merge-screen) |
| Combine source accounts into one target account | [Select accounts and confirm a merge](#select-accounts-and-confirm-a-merge) |
| Resolve access, selection, or request problems | [Handle access, validation, and errors](#handle-access-validation-and-errors) |
| Continue account maintenance | [Know what happens next](#know-what-happens-next) |
| Review or create an account before merging | [Accounts](doc:accounts) or [Create an account](doc:create-account) |

With the purpose clear, continue to [Before you start](#before-you-start).

## Before you start

Before you begin, identify the source accounts you want to combine and the target account you want
to keep. A source account is one you combine; the target account is the one you keep. The screen
loads the account list through the account lookup for the selected branches;
the account names therefore come from that list rather than from a fixed set of choices.
 .

Prerequisites

- The configuration subscription that provides the account-merge feature is available. When it is
  not available, the screen takes the subscription-upgrade path instead of showing the merge area.
 .
- The account records needed for the merge already exist in the account lookup.
 .
- You can identify which accounts are the sources and which account is the target.
 .
- The target is different from every selected source account. If the target is also a source, the
  merge is stopped before confirmation. .
- Neither account-selection control has a required marker in the page definition. The merge action still
  requires at least one source selection and one target selection. .

When these prerequisites are ready, continue to [Find Manage accounts](#find-manage-accounts).

## Find Manage accounts

 Open **Manage accounts** from the configuration menu.

Steps

1. Open the configuration menu.
2. Select **Manage accounts**.
3. Confirm that the **Manage accounts** heading is displayed.

![Confirm the Manage accounts heading, the two account-selection controls, and the Merge action.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/30838d7798c7ce540683c0f0f86518b0.png)

**Result:** The **Manage accounts** screen is open with the account-merge area available.

Continue to [Understand the merge screen](#understand-the-merge-screen).

## Understand the merge screen

 An account-selection control is a picker for choosing one or more account records. The merge area has two account-selection controls and one merge action. **Select the accounts to be merged from** accepts multiple
source accounts; **Select one account to be merged to** accepts one target account. Both account-selection controls receive account records
loaded for the selected branches, and the account names are not fixed labels on the page.
 .

| What you need to do | Control | How it works |
|---|---|---|
| Choose accounts to combine | **Select the accounts to be merged from** | Multi-selection picker; adding and removing an item updates the source selection. The list contains account records for the selected branches with account type `0`; each record is identified by its account ID and displays its account name. |
| Choose the account to keep | **Select one account to be merged to** | Single-selection picker; adding or removing an item updates the target selection. The list contains account records for the selected branches with account type `0`; each record is identified by its account ID and displays its account name. |
| Start the merge | **Merge** | Available when at least one source and one target are selected. |

 .

 The page displays the two picker labels and **Merge**, with no required marker.

> **Note:** The account list is loaded for the selected branches, so use the account names shown
> in the account-selection controls when choosing the source and target.
>

 The merge area focuses on the two account-selection controls and **Merge**; use the import dialog for file uploads.

With the controls identified, continue to [Select accounts and confirm a merge](#select-accounts-and-confirm-a-merge).

## Select accounts and confirm a merge

Before you start, identify the account records to combine and the account to keep.

Prerequisites

- The merge area is visible.
- At least one source account and one different target account are available in the account-selection controls.

Steps

1. In **Select the accounts to be merged from**, select each account that you want to combine. The
   list contains account records for the selected branches with account type `0`; each record is
   identified by its account ID and displays its account name.

![Review **Select the accounts to be merged from** while choosing source accounts.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/343037d6c5b91d8ee08bda8de18aa977.png)

2. In **Select one account to be merged to**, select the account that you want to keep. The list
   contains account records for the selected branches with account type `0`; each record is
   identified by its account ID and displays its account name.

![Review **Select one account to be merged to** while choosing the account to keep.](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/343037d6c5b91d8ee08bda8de18aa977.png)

3. Select **Merge**.
4. If the confirmation dialog opens, read `You are about to merge these accounts, Are you sure?`.
 .
5. At the confirmation choice, select one of the following:
 .

| If you need to… | Select |
|---|---|
| Send the selected merge request | **Yes** |
| Keep the selected accounts unchanged | **No** |

**Result:** After step 3, the valid-selection path opens the merge confirmation choice.

If a message or alternate access path appears, continue to [Handle access, validation, and errors](#handle-access-validation-and-errors).

## Handle access, validation, and errors

 The screen has separate paths for feature access, an invalid source-target combination, and a
request failure. Use the path that matches what is on screen.

| What you see | What it means | What to do |
|---|---|---|
| The subscription-upgrade area appears instead of the merge area | The account-merge feature is not available on this configuration path. | Use the available subscription process, or contact the administrator who manages your configuration. |
| `The target account cannot be one of the selected source accounts. Please choose a different account.` | The target is also selected as a source. | Return to **Select one account to be merged to** and choose an account that is not in the source selection. |
| `An error occurred while processing your request` while account data loads | The account lookup request failed. | Reload the screen and try again. If the error persists, contact your administrator. |
| `An error occurred while processing your request` after the merge request | The merge request failed. | Reload the screen and try again. If the error persists, contact your administrator. |

 The shared popup also supplies **Cancel** for its supported popup modes.

Steps

1. Compare the message on screen with the table above.
2. If the message says `The target account cannot be one of the selected source accounts. Please choose a different account.`, return to **Select one account to be merged to**.
3. If the message appears while account data loads, reload the screen and try again. If it appears after you select **Merge**, reload the screen and try again. If the message persists, contact your administrator.
4. Choose the action that matches the open prompt:

   | If… | Select |
   |---|---|
   | The merge confirmation is open and you want to stop | **No** |
   | A supported shared popup is open and you want to close it | **Cancel** |

**Result:** You have either corrected the selection, stopped the confirmation, or identified the
request error shown by the screen.

When the request succeeds, continue to [Know what happens next](#know-what-happens-next).

## Know what happens next

 After a confirmed merge, the component clears the source and target selections, reloads the account
lookup, shows `Your request was completed successfully`, and refreshes log history when the reader
stays on the page.

 The merge request sends the selected source accounts and target account to the accounts merge
endpoint.

Steps

1. Select **Yes** in the confirmation dialog.
2. Confirm that the source and target selections clear.
3. Confirm that the account list reloads.
4. Confirm that the screen shows `Your request was completed successfully`.

**Result:** The selected merge request is complete when the selections clear, the account list reloads, and the success message appears.

 Continue with [Accounts](doc:accounts) for account maintenance or [Create an account](doc:create-account)
when another account record is needed.
