# Migrating existing vendors to Unipaas

If you have previously used a different platform, you may want to import your existing users/sub-merchants(vendors) to Unipaas to allow a smooth onboarding.

# Data import

To migrate the users to the Unipaas platform, you need to provide us with a CSV file containing the user data. We will then import this file and provide an output file containing the migration results.

### Input file format

1. Create a file in CSV (Comma Separated Values) format including the following fields:

| alias                                            | Onboarding type      | Is Required | Data type                 | Description                                                                                                                                                                                  |
| ------------------------------------------------ | -------------------- | ----------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `representative.firstName``individual.firstName` | CompanyIndividual    | Yes         | String                    | Company representative's personal or Individual's first name.                                                                                                                                |
| `representative.lastName``individual.lastName`   | CompanyIndividual    | Yes         | String                    | Company representative's personal or Individual's last name.                                                                                                                                 |
| `company.email``individual.email`                | CompanyIndividual    | Yes         | String                    | Company representative's or Individual's business email address.                                                                                                                             |
| `representative.birthDate``individual.birthDate` | CompanyIndividual    | Yes         | String Format: YYYY-MM-DD | Company representative's personal or Individual's birth date.                                                                                                                                |
| `company.name`                                   | Company              | Yes         | String                    | Legal company name                                                                                                                                                                           |
| `company.phone``individual.phone`                | CompanyIndividual    | Yes         | String                    | Company representative's or Individual's phone number.                                                                                                                                       |
| `company.address``individual.address`            | CompanyIndividual    | Yes         | Address                   | Company corporate or Individual's address`country`: string, ISO 3166-1 alpha-2 code `city`: string `street`: string `houseNumber`: string `flatNumber`: string (optional) `postCode`: string |
| `company.operationalAddress`                     | Company              | Yes         | Address                   |                                                                                                                                                                                              |
| `business.url`                                   | Company / Individual | Yes         | String                    | For companies - Business Website URLFor individuals - Profile URL (website, blog, social network profile)                                                                                    |
| `business.serviceDescription`                    | individual           | Yes         | String                    | A description of the services provided by the individual.                                                                                                                                    |
| `business.category`                              | Company / Individual | Yes         | String                    | [MCC codes](/docs/mcc-codes/) for the offered goods/services                                                                                                                                 |
| `business.bankAccount`                           | Company / Individual | Yes         | String                    | Number of the business bank account                                                                                                                                                          |
| `business.sortCode`                              | Company / Individual | Yes         | String                    | Sort code of the business bank account                                                                                                                                                       |
| `business.agreement`                             | Company / Individual | Yes         | Agreement                 | Digital signature on the MSA`accepted`: Boolean, `ipAddress`: ip                                                                                                                             |
| `vendorReference`                                | Company / Individual | Yes         | String                    | Unique user identifier in your system                                                                                                                                                        |

2. Save the file in UTF-8 format.
3. Send the file to Unipaas.

The following is an example of an input file:

* Code

  ```plaintext
  representative.firstName,individual.firstName,representative.lastName,individual.lastName,company.email,individual.email,representative.birthDate,individual.birthDate,company.name,company.phone,individual.phone,company.address.country,company.address.city,company.address.street,company.address.houseNumber,company.address.postCode,individual.address.country,individual.address.city,individual.address.street,individual.address.houseNumber,individual.address.postCode,company.operationalAddress,business.url,business.serviceDescription,business.category,business.bankAccount,business.sortCode,business.agreement,vendorReference
  William,,Smith,,william.smith@company.com,,1980-10-21,,Design Company,442098098923,,GB,London,Moorfields,21,EC2Y 9DB,,,,,,,https://www.designcompany.com,,,30947509,300300,,M002
  ,Jane,,Doe,,jane.doe@janecrafts.com,,1976-11-28,,,447698092361,,,,,,GB,London,Buckingham Palace Road,123,SW1W 9SR,,https://www.janecrafts.com,Craft Shop,ARTIST_SUPPLY,34790876,40040,,J137
  ```

### Output file

When we have imported your CSV file, we will send you an output file with the migration results.

The output file has the following fields:

| alias           | Data Type | Description                                           |
| :-------------- | :-------- | :---------------------------------------------------- |
| vendorReference | String    | Unique user identifier in your system                 |
| vendorId        | String    | Unique user (vendor) identifier in the Unipaas system |
| onboardingLink  | String    | Unique user (vendor) onboarding link                  |

The following is an example of the output file:

* Code

  ```plaintext
  vendorReference,vendorId,onboardingLink
  M002,66d87dccdd0d3236ae43c4fd,https://onboarding.unipaas.com/link/abc123
  V134,66d58bd06098898a5de10bde,https://onboarding.unipaas.com/link/a25h3j
  B776,66d9d3bd56de78294662de5f,https://onboarding.unipaas.com/link/p2p458
  J137,66e1700156de78067462dedd,https://onboarding.unipaas.com/link/fhjsm3
  ```

Start using `vendorId` for your users in the Unipaas integration.

# Access to your current integration

If data is not readily available and cannot be provided, Unipaas can still support the migration from your current provider. Please contact your Unipaas contact and provide us with:

1. Current provider name
2. Authentication details like API credentials for current provider

Once the data has been imported by Unipaas, we will provide you with an output file with migration results.

The output file has the following fields:

| alias           | Data Type | Description                                           |
| :-------------- | :-------- | :---------------------------------------------------- |
| vendorReference | String    | Unique user identifier in your system                 |
| vendorId        | String    | Unique user (vendor) identifier in the Unipaas system |
| onboardingLink  | String    | Unique user (vendor) onboarding link                  |

The following is an example of the output file:

* Code

  ```plaintext
  vendorReference,vendorId,onboardingLink
  M002,66d87dccdd0d3236ae43c4fd,https://onboarding.unipaas.com/link/abc123
  V134,66d58bd06098898a5de10bde,https://onboarding.unipaas.com/link/a25h3j
  B776,66d9d3bd56de78294662de5f,https://onboarding.unipaas.com/link/p2p458
  J137,66e1700156de78067462dedd,https://onboarding.unipaas.com/link/fhjsm3
  ```

Start using `vendorId` for your users in the Unipaas integration.

# Webhooks

Unipaas sends webhook notifications to inform your system about the vendors created in the system. By subscribing to the [`onboarding/update` webhook](/docs/onboardingupdate-webhook/), you will get notification about your vendor's `vendorReference`and the associated `vendorId`.

Go Next[Send Onboarding Emails to Vendors](/docs/send-onboarding-emails-to-vendors/)
