---
schema_version: "1"
id: 3267f1884e52e117aa6c30908be075d78a0bb5377014288d812d4411bedc39eb
title: Work with Migration Exchange
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-slack-sdk/apex-slack-sdk/guides/apex_ref/apex_ref_migrationexc.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/guide/apex_ref_migrationexc.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bd1402ab872c740845c637c5c405e56354b73207ebf2b450b90180691a1da06e
products:
  - Apex SDK for Slack (Beta)
---
# Work with Migration Exchange

The following are Apex classes for the Slack `migration.exchange` [API method](https://api.slack.com/methods/migration.exchange).

## MigrationExchangeRequest Class

For Enterprise Grid workspaces, sends a request to map local user IDs to global user IDs.

### MigrationExchangeRequest Methods

The following are methods for `MigrationExchangeRequest`.

#### builder()

Builds a request object that's used when executing the API call.

**Signature**

```java
public static Slack.MigrationExchangeRequest.Builder builder()
```

**Return Value**

Type: Slack.MigrationExchangeRequest.Builder

---

## MigrationExchangeRequest.Builder Class

Contains methods to build an instance of the `Slack.MigrationExchangeRequest` class.

A Builder object is obtained by invoking one of the `MigrationExchangeRequest.Builder` methods defined by the `MigrationExchangeRequest class`.

### MigrationExchangeRequest.Builder Methods

The following are methods for `MigrationExchangeRequest.Builder`. These methods are optional unless specified otherwise.

#### build()

Required. Returns an instance of `Slack.MigrationExchangeRequest`.

**Signature**

```java
public Slack.MigrationExchangeRequest build()
```

**Return Value**

Type: Slack.MigrationExchangeRequest

#### teamId(teamId)

**Signature**

```java
public Slack.MigrationExchangeRequest.Builder teamId(String teamId)
```

**Parameters**

_teamId_

Type: String

**Return Value**

Type: Slack.MigrationExchangeRequest.Builder

#### toOld(toOld)

**Signature**

```java
public Slack.MigrationExchangeRequest.Builder toOld(Boolean toOld)
```

**Parameters**

_toOld_

Type: Boolean

**Return Value**

Type: Slack.MigrationExchangeRequest.Builder

#### users(users)

Required. A comma-separated list of user IDs, up to 400 per request.

**Signature**

```java
public Slack.MigrationExchangeRequest.Builder users(List<String> users)
```

**Parameters**

_users_

Type: List&lt;String&gt;

---

## MigrationExchangeResponse Class

For Enterprise Grid workspaces, map local user IDs to global user IDs.

### MigrationExchangeResponse Methods

This class contains [standard response methods](https://developer.salesforce.com/docs/platform/salesforce-slack-sdk/guide/apex_ref_response.md).

The following are methods for `MigrationExchangeResponse`.

#### getEnterpriseId()

**Signature**

```java
public String getEnterpriseId()
```

**Return Value**

Type: String

#### getInvalidUserIds()

**Signature**

```java
public List<String> getInvalidUserIds()
```

**Return Value**

Type: List&lt;String&gt;

#### getTeamId()

**Signature**

```java
public String getTeamId()
```

**Return Value**

Type: String
