> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withsotto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User export

> User profiles, custom data, and segment membership delivered to your SFTP.

Sotto can export your users — profile fields, custom data, and segment membership — to your SFTP server as CSV or JSON on a recurring schedule.

<Note>
  Sotto configures and runs this export internally on your behalf. To set one up, contact [support@withsotto.com](mailto:support@withsotto.com) with your destination SFTP details, desired file format (CSV or JSON), and schedule. The schema below describes the output you receive.
</Note>

## What's included

Each exported user record contains three categories of data: **profile fields**, **custom data fields**, and **segment membership**. The custom data and segment columns reflect your current configuration at export time.

## Profile fields

| Field               | Type     | Always present | Description                            |
| ------------------- | -------- | -------------- | -------------------------------------- |
| `id`                | Integer  | Yes            | Unique user identifier.                |
| `phone_number`      | String   | Yes            | E.164 phone number.                    |
| `first_name`        | String   | No             | First name.                            |
| `last_name`         | String   | No             | Last name.                             |
| `email_address`     | String   | No             | Email address.                         |
| `date_of_birth`     | Date     | No             | Date of birth.                         |
| `is_active`         | Boolean  | Yes            | Whether the account is active.         |
| `is_opted_in`       | Boolean  | Yes            | SMS opt-in status.                     |
| `total_spent`       | Float    | No             | Lifetime spend.                        |
| `third_party_id`    | String   | No             | Your external identifier for the user. |
| `date_created`      | DateTime | Yes            | User creation timestamp.               |
| `date_last_updated` | DateTime | Yes            | Last modification timestamp.           |

## Custom data fields

Each configured custom data field appears as its own column. Column names are derived from the field name by prepending `custom_`, lowercasing, trimming whitespace, and replacing spaces with underscores.

**Example:** "Favorite Hobby" becomes `custom_favorite_hobby`.

| Data type | Format                | Example   |      |         |
| --------- | --------------------- | --------- | ---- | ------- |
| Integer   | Numeric value         | `42`      |      |         |
| Float     | Decimal value         | `19.99`   |      |         |
| String    | Text value            | `surfing` |      |         |
| Boolean   | `true` / `false`      | `true`    |      |         |
| List      | Pipe-delimited values | \`red     | blue | green\` |

Custom fields default to `null` (blank) when no value is set.

## Segment membership

Each segment appears as a boolean column named `{segment_id}-{segment_name}`, where the name is lowercased, trimmed, and has spaces replaced with underscores.

**Example:** segment `123` named "California Residents" becomes `123-california_residents`. The value is `true` if the user is in the segment, otherwise `false`.

## Example

| id   | phone\_number | is\_opted\_in | custom\_favorite\_hobby | 123-california\_residents | 234-loyal\_customers |
| ---- | ------------- | ------------- | ----------------------- | ------------------------- | -------------------- |
| 1001 | +15551234567  | true          | surfing                 | true                      | false                |
| 1002 | +15559876543  | false         | null                    | false                     | true                 |
