# Bulk user management

The Bulk User Management service provides a batch interface that third-party applications and other processes can use to manage Digital River-hosted user information in bulk. This service can be used to add, modify, or remove multiple users.

## Bulk user management service details

Third-party applications and other processes can use a batch interface for the Bulk User Management service to manage Digital River-hosted user information in bulk.

A few points to remember:

* BulkUserManagement performs a secure operation. Each operation requires a `loginID` and password before file processing begins.
* A Bulk User Management file should not exceed 10,000 records per file for optimal performance.
* You must configure Bulk User Management per site.

Supported Bulk User Management tasks include:

* **Activate users**—Activate the existing users.
* **Inactivate users**—Inactivate the existing active users.
* **Reset user password**—Resets a user's password.
* **Get user information**—Get information about the Digital River-hosted shoppers.
* **Add or update users**—Add new users to or update existing users in the Digital River system. See [Add users](/commerce-api/shopper-apis/shoppers/managing-shoppers/bulk-user-management-service.md#add-users) and [Update users](/commerce-api/shopper-apis/shoppers/managing-shoppers/bulk-user-management-service.md#update-users) for more information.
* **Cancel subscriptions**—Deactivate subscriptions for requisitions received in a request.
* **Activate subscriptions**—Activate subscriptions for requisitions received in a request.
* **Modify the renewal date of subscriptions**—The subscriptions will expire on the renewal date requested by the client. The renewal reminder notification will be sent to the shopper "n" (n=3, 4, or 5) days before the subscription expiration date. This "n" days prior to renewal reminder will be a product-level attribute.

{% hint style="info" %}
**Note**: You can send this call at any time. It has no restrictions other than the restriction that you cannot set the renewal date earlier than the current date and make a call for a canceled or returned line item.
{% endhint %}

* **Modify renewal mechanism for a subscription (manual or auto)**—Modify the subscription renewal process. The valid values are as follows:
  * **Auto**—Converts a subscription to auto-renewal.
  * **Manual**—Converts a subscription to manual renewal.
  * **Inactive**—Converts a subscription to inactive.
* **Cancel users' orders**—Cancel the users' orders for the requisition or line item received in the request.

{% hint style="info" %}
**Note**: You must supply the `shopperKey` for all Bulk User Management tasks.
{% endhint %}

## Add users

Adding users to the system involves providing specific information to create a new user profile. This section outlines the minimum required fields and the structure needed to add users successfully. The information is categorized under parent elements with their respective child and grand-child elements, ensuring that all necessary details are captured accurately for each user.

The following table displays the minimum required fields when adding users.

| Parent Element                    | Child and Grand-Child Elements                                                                                                                                                                                                                                                                               |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `shopperKey`                      | <p></p><ul><li><code>companyId</code></li><li><code>loginId</code></li><li><code>siteId</code></li></ul>                                                                                                                                                                                                     |
| `billingOptionToBeAddedOrUpdated` | <p></p><ul><li><code>nickName</code></li><li><code>isDefault</code></li><li><code>billingOptionType</code></li></ul>                                                                                                                                                                                         |
| `billingOptionToBeAddedOrUpdated` | <p></p><ul><li><code>nickName</code></li><li><code>isDefault</code></li><li><p><code>address</code></p><ul><li><code>city</code></li><li><code>countryA2</code></li><li><code>country</code></li><li><code>countryName</code></li><li><code>line1</code></li><li><code>postalCode</code></li></ul></li></ul> |

{% hint style="info" %}
**Note**: The `addressId` is not required. The system generates the `addressId` for the new shopper.
{% endhint %}

## Update users

When updating users, it's essential to provide specific key elements to ensure the system can accurately identify and modify the targeted user data. The following table outlines the minimum required fields for updating user details, including shopper keys and billing information. This structured approach allows for efficient and precise user management within the system.

The following table displays the minimum required fields when updating users.

| Parent Element                         | Child and Grand-Child Elements                                                                                                                                                                                                   |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `shopperKey`                           | <p><code>userId</code> OR </p><p>(<code>externalReferenceId</code> AND <code>siteId</code>) OR </p><p>(<code>externalReferenceId</code> AND <code>companyId</code>) OR </p><p>(<code>loginId</code> AND <code>siteId</code>)</p> |
| `billingOptionToBeAddedOrUpdated`      | <p><code>key</code></p><ul><li><code>billingOptionId</code></li></ul><p><code>nickName</code></p><p><code>isDefault</code></p><p><code>billingOptionType</code></p>                                                              |
| `billingOptionToBeDeleted`             | `billingOptionID`                                                                                                                                                                                                                |
| `addressBookEntiresToBeAddedOrUpdated` | <p><code>key</code></p><ul><li><code>addressBookEntryID</code></li></ul><p><code>nickName</code><br><code>isDefaullt</code><br><code>address</code></p>                                                                          |
| `addressBookEntriesToBeDeleted`        | `addressBookEntryID`                                                                                                                                                                                                             |

## Bulk user management service schemas

The Bulk User Management Service Schemas provide a comprehensive framework for efficiently managing large volumes of user data. These schemas are designed to handle bulk operations such as adding, updating, and deleting user details across various service versions. The following table outlines the available versions and links to their respective schema components, raw schemas, and sample XML files for easy integration and implementation.

| Version     | Schema Components Table                                                                    | Raw Schema                                                                     | Sample XML                                                                             |
| ----------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| 7 (Current) | [View](https://drhadmin.digitalriver.com/integration/isg/schematable/BulkUserManagement/7) | [View](https://drhadmin.digitalriver.com/integration/xsd/BulkUserManagement/7) | [View](https://drhadmin.digitalriver.com/integration/isg/example/BulkUserManagement/7) |
| 6           | [View](https://drhadmin.digitalriver.com/integration/isg/schematable/BulkUserManagement/6) | [View](https://drhadmin.digitalriver.com/integration/xsd/BulkUserManagement/6) | [View](https://drhadmin.digitalriver.com/integration/isg/example/BulkUserManagement/6) |
| 5           | [View](https://drhadmin.digitalriver.com/integration/isg/schematable/BulkUserManagement/5) | [View](https://drhadmin.digitalriver.com/integration/xsd/BulkUserManagement/5) | [View](https://drhadmin.digitalriver.com/integration/isg/example/BulkUserManagement/5) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/shopper-apis/shoppers/managing-shoppers/bulk-user-management-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
