# Manage accounts

Use **Manage accounts** to combine similar account records into one account record.

## Manage accounts

An account merge combines similar account records into one account record when more than one
record represents the same account.

The page title is **Manage accounts**, and its description is **Merge similar accounts into one
account**. The account-selection area below the description contains the merge operation.

![The Manage accounts title, description, account pickers, and Merge control](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/7ebf0160813e2ee42f61baf678d0659f.png)

| If you need to… | Go to |
|---|---|
| Check the account records before choosing a source or target | [Accounts](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/accounts) |
| Open the screen from the configuration entry point | [Configuration dashboard](https://pams-doc-test-fresh.atloria.app/p/pams-doc-test-fresh-N9B4TwWn3Q/user/configuration-home) |
| Check the conditions before merging | [Before you start](#before-you-start) |
| Find the screen and confirm its route | [Find Manage accounts](#find-manage-accounts) |
| Identify the two account selections and the available action | [Understand the merge screen](#understand-the-merge-screen) |
| Merge similar account records | [Select accounts and confirm a merge](#select-accounts-and-confirm-a-merge) |
| Resolve an invalid selection or processing problem | [Handle access, validation, and errors](#handle-access-validation-and-errors) |
| Check the result after the request | [Know what happens next](#know-what-happens-next) |

## Before you start

Identify the records that represent the same account and decide which record remains. Source
accounts are the records to combine; the target account is the record selected to receive the
merge.

| Before merging | What must be in place |
|---|---|
| Subscription | The subscription package includes the account data feature. When it is included, the page loads account data and requests authorization for the account-management area. |
| Access | The page requests authorization for the account-management area before you merge. |
| Records | Choose the source and target from the account choices shown in the two pickers. |

If the subscription does not include the feature, the page replaces the merge area with the
subscription-upgrade component. The account pickers and **Merge** control are not available in
that branch.

> **Note:** The account choices come from the current account lookup, so the names available in
> the two pickers depend on the account records returned for your account.

When these conditions are in place, find and open the screen.

## Find Manage accounts

Open **Manage accounts** from the **Configuration** area. The screen appears in the
**Configuration** breadcrumb context.

1. Open the Configuration dashboard.
2. Open **Merge similar accounts into one account** from the configuration area.
3. Confirm that the page title is **Manage accounts**.

Opening the screen only displays the merge screen. It does not change account data.

![The Configuration breadcrumb and Manage accounts page title](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/7ebf0160813e2ee42f61baf678d0659f.png)

**Result:** The **Manage accounts** screen is open. Its account-merge area is visible when the
subscription includes the feature. Continue by reading the two pickers and the available action.

## Understand the merge screen

The **Manage accounts** screen is an account-selection form with one or more source accounts, one
target account, and a **Merge** action.

| Screen element | What it does |
|---|---|
| **Select the accounts to be merged from** | A multi-select account picker for the source accounts. |
| **Select one account to be merged to** | A single-select account picker for the target account. |
| **Merge** | Starts the merge-confirmation flow when the selections satisfy the merge condition. |

The two pickers show the account choices available to you. Neither picker has a required marker.

The **Merge** control is available only when the merge condition is true. If the selections are
incomplete or invalid, selecting **Merge** returns without opening the confirmation prompt.

This screen presents the two pickers and the merge action. It has no grid or table, no validation
group, and no mounted **Save**, **Save and Close**, **Export**, **Import**, or **Delete** control.

Use the source picker for every account record that you want to combine into the target.

![The multi-select source-account picker](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/8dab6d4fc6399efec2f4dd8c0fa57d0e.png)

Use the target picker for the account that remains after the merge.

![The single-select target-account picker](https://atloriaassets.blob.core.windows.net/assets/a438221c-c1af-407c-b9e6-a56c986db846/8dab6d4fc6399efec2f4dd8c0fa57d0e.png)

## Select accounts and confirm a merge

### Prerequisites

- The **Manage accounts** screen is open.
- At least one source account and one different target account are available in the pickers.

### Steps

1. Select the source and target accounts.

   | Select | What to choose |
   |---|---|
   | **Select the accounts to be merged from** | One or more source accounts. Each selected source account adds its account ID to the source selection. |
   | **Select one account to be merged to** | One target account. Selecting it sets the target selection. |

   Check that the target account is different from every selected source account.

2. Select **Merge**.

   If the selections are incomplete or invalid, the action returns without opening the
   confirmation prompt.

3. Read the confirmation prompt `You are about to merge these accounts, Are you sure?`.

4. Select **OK** in the confirmation popup to confirm the request.

To remove a source selection, remove that account from **Select the accounts to be merged from**.
To remove the target selection, remove the account from **Select one account to be merged to**.

**Result:** The request reaches the confirmation point with the selected source accounts and the
different target account still identified. Continue to [Know what happens next](#know-what-happens-next)
to check the result after confirmation.

## Handle access, validation, and errors

The merge screen has three branches: the same account cannot fill both roles, a subscription that
excludes the feature shows an upgrade surface, and a processing failure uses the common error
message.

| What you see or select | What it means | What to do |
|---|---|---|
| The target account is also a selected source account | The selection is invalid. | Remove the target from the source selection or choose a different target account. |
| `The target account cannot be one of the selected source accounts. Please choose a different account.` | The source and target are the same account. | Choose a different target account. |
| A different target account is selected | The source and target now differ. | Select **Merge** again. |
| The subscription-upgrade component replaces the merge area | The subscription excludes the account-merge feature. | Use the subscription-upgrade branch. **Back** belongs to that branch. |
| `An error occurred while processing your request` | Processing returned an error. | Do not treat the merge as confirmed. Follow your access or support process. |

Access depends on the authorization response for the current account. The page requests
authorization for the account-management area before the merge.

When the selection or access issue is resolved, return to the merge procedure. After a successful
request, check the selections and account choices.

## Know what happens next

A successful merge clears the source and target selections and refreshes the account choices. The
page uses `Your request was completed successfully` as its success message.
