Client Manager (.NET)

In Relativity, a client is a company or organization, which is associated with users, matters, groups, and workspaces. For general information, see Clients on the RelativityServer 2022 Documentation site.

The Client Manager API exposes methods that provide the following functionality:

  • CRUD operations on clients.
  • Helper methods for retrieving lists of available groups, matters, users, and statuses.
  • Methods for creating, submitting, and retrying client domain activation keys.

As a sample use case, you can programmatically create multiple clients by using the Client Manager API eliminating the need to manually add them through the Relativity UI.

You can also use the Client Manager API through REST. For more information, see Client Manager (REST).

The Relativity.Identity.SDK contains this API. For compatibility and package installation instructions, see Download the SDKs and NuGet packages.

Fundamentals for the Client Manager API

The Client Manager API contains the following methods and classes.

Guidelines for the Client Manager API

Review the following guidelines for working with the Client Manager API.

Create a client proxy

You need to create a client proxy to use the Client Manager service. After creating the proxy, instantiate a ClientManager object as illustrated in the code sample.

Retrieve values from Task objects

When you call a method on the Client Manager API, it returns a Task object. To obtain the data in the Task object, retrieve the awaiter for the object, and call the GetResult() method.

Use response data from read operations

You may want to update a client by using data obtained from a read operation. In the Client Manager API, the ReadAsync() method returns a ClientResponse object.

However, the UpdateAsync() method requires that you pass a ClientRequest object to it. You need to translate the data returned in a ClientResponse object from a read operation to the form required for a ClientRequest object as illustrated in the code sample.

Create a client

Use the CreateAsync() method to add a new client to Relativity. This method takes a ClientRequest object and returns a ClientResponse object.

Retrieve a client

Use the overloaded ReadAsync() method to retrieve basic or extended metadata for a client. Extended metadata includes operations that you have permissions to perform on the client, such as delete or update.

For basic client metadata, call the ReadAsync() method by passing the Artifact ID of a client. For extended metadata, pass Boolean values for both the includeMetadata and includeActions parameters on the overloaded method. This method returns a ClientResponse object.

Update a client

Use the UpdateAsync() method to modify the properties of a client. This method takes the Artifact ID of a client and returns a ClientResponse object.

This overloaded method also supports restricting the update of a client to the date that it was last modified. To restrict the update, you must pass a DateTime object to the method as well.

Note: The value for the DateTime object must match the LastModifiedOn date for the client stored in Relativity. Otherwise, you receive an error, indicating that the object has been modified.

Delete a client

Use the DeleteAsync() method to remove a client from Relativity. This method takes the Artifact ID of a client.

Note: Before deleting a client, consider checking for dependent clients using Object Manager API. See Object Manager (.NET).

Helper methods for CRUD operations

The following helper methods retrieve lists of available groups, matters, users, and statuses, which may be helpful when creating or updating clients. For general information, see Clients on the RelativityServer 2022 Documentation site.

Retrieve associated groups

Use the QueryGroupsAsync() method to retrieve information about groups associated with a client. This method takes a QueryRequest object, a start index, the number of groups to include in the results, and the Artifact ID of a client. It returns a QueryResultSlim object with a list of associated groups. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve associated matters

Use the QueryMattersAsync() method to retrieve information about the matters associated with a client. This method takes a QueryRequest object, a start index, the number of matters to include in the results, and the Artifact ID of a client. It returns a QueryResultSlim object with a list of associated matters. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve associated users

Use the QueryUsersAsync() method to retrieve information about the users associated with a client. This method takes a QueryRequest object, a start index, the number of users to include in the results, and the Artifact ID of a client. It returns a QueryResultSlim object with a list of associated users. For more information about QueryResultSlim objects, see Query for Relativity objects.

Retrieve available statuses

Use the GetEligibleStatusesAsync() method to retrieve a list of available statuses for a client. This method returns a list of DisplayableObjectIdentifier objects.

Methods for client domain activation keys

The following methods support creating, submitting, and retrying client domain activation keys. For general information, see Client domains on the Relativity Documentation site.

Create client domain activation key

Use the CreateClientDomainRequestKeyAsync() method to create and return the client domain activation key required to initiate the activation process. This method takes the Artifact ID of a client and returns a string, which is the key.

Submit a client domain activation key

Use the SubmitClientDomainActivationKeyAsync() method to submit a client domain activation key and initiate the activation process. This method takes the Artifact ID of a client and the activation key.

Retry activating a client domain

Use the ActivateClientDomainAsync() method to rerun a previously failed activation process. This method takes Artifact ID of a client.