# Migrating from Salesforce

> Move your Salesforce data to Solk — with an export file or a direct connection, a sample migration first, then the full migration, and undo if needed.

**Settings → Migrate from CRM** ("Ayarlar → CRM'den taşı", admins only) copies companies, people, opportunities and — if you choose — leads, tasks, events, notes, files, support cases and products from Salesforce to Solk. Data in Salesforce is not changed; it is only read.

Every migration follows the same path: **analysis → configuration → sample migration → full migration**. If something goes wrong, the migration can be **undone**.

## Two methods {#methods}

| | Export file (ZIP) | Connect to Salesforce (API) |
|---|---|---|
| Salesforce edition | All | Enterprise, Unlimited, Performance, Developer; Professional with the API add-on |
| Setup | None — Salesforce's own data export | An External Client App in Salesforce (5 minutes) |
| Freshness | The moment the export was taken | Live data on every run |
| Field names and picklists | Inferred from the data | Exactly as in Salesforce (label, type, options, formula fields) |
| Stage order | From probability and Salesforce's default order | Salesforce's own order |

### Export file {#zip}

:::steps
### Start the export

In Salesforce: **Setup → Quick Find → Data Export → Export Now** (or *Schedule Export*).

### Select the options

- **Export File Encoding:** `Unicode (UTF-8)` — for Turkish characters.
- **Include images, documents, and attachments** and **Include Salesforce Files and Salesforce CRM Content document versions** — to migrate files too.
- **Include all data** → **Start Export**.

### Download the parts

When it's ready, download **all ZIP parts** from the link in the email (links are valid for 48 hours). Large organizations get several parts.

### Upload to Solk

**Migrate from CRM → Salesforce → Upload an export file**: drag and drop the parts → **Upload and analyze**. Uploads are chunked and resume after a dropped connection; up to 2 GB per part.
:::

Salesforce allows an export every 7 days on Enterprise and above, every 29 days on Professional.

### Connect to Salesforce {#api}

:::steps
### Create an External Client App

In Salesforce: **Setup → Quick Find → External Client App Manager → New External Client App**. Name: e.g. `Solk migration`, **Distribution State:** `Local`.

### Enable OAuth

**API (Enable OAuth Settings) → Enable OAuth**.

- **Callback URL:** `https://<company>.solk.app/settings/migrate/salesforce/callback` (copyable on the page).
- **OAuth Scopes:** `Manage user data via APIs (api)` and `Perform requests at any time (refresh_token, offline_access)`.
- Keep **Require Proof Key for Code Exchange (PKCE)** on → **Create**.

### Copy the keys

**Settings → OAuth Settings → Consumer Key and Secret** — paste the values into the form in Solk. New settings can take a few minutes to take effect in Salesforce.

### Connect

Choose the environment (**Production**, **Sandbox** or your own My Domain) → **Connect to Salesforce** → sign in to Salesforce and approve. The connection is read-only; the access token is stored encrypted in your installation.
:::

When you're done, **Control panel → Remove connection** deletes the token (for a ZIP migration, **Delete files** removes the ZIP files from the server); you can also delete the app in Salesforce. After that the migration can't be run again; migrated records stay.

## What is migrated? {#objects}

| Salesforce | Solk | Notes |
|---|---|---|
| Account | Company | Always. Type "Customer" → active customer (AC), otherwise prospect; a company with a won opportunity becomes AC. Billing address, phone, website, industry. |
| Contact | Person | Always. People without a company are skipped (listed under errors). |
| Opportunity | Opportunity | Always. Stage, amount, close date, probability (open deals), forecast category, currency (enabled if needed). |
| User | Owner | Mapped to the Solk user with the same email; no new users (seats) are created. |
| Lead | Prospect company + person | Optional; unconverted leads only, with source and status. |
| Task | Task | Optional. *Call* → call, *Email* → email; priority and status are mapped. |
| Event | Calendar event | Optional. Times are converted to local time; online if it has a Teams / Zoom / Meet link. |
| Note, Notes | Note | Optional; Salesforce Notes (rich text) become plain text. |
| Attachment, Files | File | Optional; up to 25 MB per file, executables are skipped. |
| Case | Support ticket | Optional (with the Support Tickets module); status, priority, origin and type are mapped, no SLA notifications are sent. |
| Product2 + standard price book | Product | Optional; the opportunity's first product is linked, line items are written to the opportunity note. |
| Custom fields (`__c`) | [Custom fields](/concepts/custom-fields) | The ones you select; also standard fields such as *Salesforce ID*, employees, account type, lead status. |

Not migrated: email messages (they come through Solk's [email sync](/objects/emails)), campaigns, Salesforce quotes and contracts, custom objects, reports and dashboards, automations, field history.

## Configuration {#config}

After the analysis the **Configuration** tab shows the following; you can change each:

- **Objects** — companies, people and opportunities are always migrated; choose the rest. The number of source records is shown next to each.
- **Users** — Salesforce record owner → Solk owner. Unmatched owners go to the **default owner**.
- **Opportunity stages** — two options:
  - **Map to existing stages** — each Salesforce stage to a Solk stage; closed stages to Won / Lost.
  - **Use Salesforce stages** — your pipeline becomes the Salesforce one (names and probabilities). Existing opportunities in the workspace move to the nearest new stage by position.
- **Custom fields** — which Salesforce fields become custom fields; name and type can be changed. If you already have a custom field with the same name and a compatible type, no new field is created and the values go into that field (the row says so). Formula fields are not selected by default.
- **Options** — time window for completed tasks and past events (all / last 12 · 24 · 36 months), sample size (10 · 20 · 50 companies), total limit for files, **fill empty fields on matched records from Salesforce**.

## Sample and full migration {#run}

:::steps
### Sample migration

The 20 most recently updated companies (or the number you chose) with their people, opportunities, tasks, notes and files; a few leads. Open the migrated records from the **Results** tab.

### Not happy?

**Control panel → Undo**, adjust the configuration, run the sample again.

### Full migration

**Full migration** moves everything selected; records from the sample are not migrated twice. The Dashboard tab shows live progress — you can close the page.
:::

Running the full migration again only tries records not migrated yet — e.g. after adding a ZIP part (**Control panel → Add ZIP part**) or, with the API, records created in Salesforce since.

## Matching and duplicates {#matching}

- **Company:** website domain, otherwise name (case and Turkish characters ignored).
- **Person:** email, otherwise name within the same company.
- **Product:** name.

Matched records are **not overwritten**; with *fill empty fields* only empty fields are filled. Notes, tasks, events and opportunities are added to the matched company. Each Salesforce record is migrated once (tracked by its Salesforce ID).

Migrated records don't trigger workflows, notifications or app deliveries.

## Results, errors, undo {#results}

- **Results** — per object: in source, migrated, matched, skipped and failed; *Records* lists the migrated records with links to them.
- **Errors** — every record that couldn't be migrated, with the reason (e.g. person without company, empty company name, unsupported file type); downloadable as CSV. For API migrations each row links to the record in Salesforce.
- **Undo** — deletes everything this migration created plus anything added to those companies afterwards (files from disk too). Existing matched records stay. Created custom field definitions and a pipeline adopted from Salesforce stay (remove them in Settings).

If the server restarts during a migration the job shows **Interrupted**; start the full migration again and it continues where it left off.

## Excel / CSV {#excel}

For sources other than Salesforce, **Migrate from CRM → Excel / CSV** opens the existing import page. Product lists are imported in **Settings → Products → Import from Excel**.