# Import Advocate Participants in Bulk

Advocate accepts imports submitted in `.csv` or `.jsonl` file formats. Please reference our [sample CSV import file](https://assets.ctfassets.net/s68ib1kj8k5n/7LOYwhDlsI22uuaIMaWImE/71cefe860edc71c0968c8065e1d6e953/sample-user-upload.csv) and [sample JSONL import file](https://assets.ctfassets.net/s68ib1kj8k5n/5rD1ZiKEjqStp54qjDB90N/48918dfa8b53a935c7c83ea5fbf3af77/userImportSample.jsonl) to view the required file structure for your import.

{% hint style="info" %}
**Note:** We recommend that each import does not exceed 500,000 entries.
{% endhint %}

#### Import participants in bulk

1. From the left navigation menu, select ![](https://impact-1.gitbook.io/docs/emvxfLrwrlacc4y3y02Y/~gitbook/image?url=https%3A%2F%2F4048883401-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwMLlMoFBtKJa8ptd3zaw%252Fuploads%252Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%252Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg%3Falt%3Dmedia\&width=300\&dpr=3\&quality=100\&sign=71dd50ef\&sv=2) **\[Engage] → Participants**.
2. Select **Import Users**.
3. Under *Import Type*, select **Users**.
4. Add your import file by selecting **Select File**.
5. **\[Optional]** To add or remove the imported participants from a specific user segment, select the segment from the dropdown list.

{% hint style="info" %}
**Note:** This selection applies to *all* participants included in this import file.
{% endhint %}

6. Select **Start Import**.

When the import completes, a confirmation email is sent. Imports may take up to 30 minutes, depending on queue and file size.

#### Fields

Bulk user imports support both Standard Fields and Custom fields in the upload file. **Fields are case-sensitive.**

{% tabs %}
{% tab title="Standard Fields" %}
Standard fields are parsed with the same validation as our [Open Endpoint User Upsert API call](https://integrations.impact.com/impact-brand/docs/api-open-endpoints):

| Field                     | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| accountId (Required)      | string  | The unique identifier of the account that this participant belongs to.                                                                                                                                                                                                                                                                                                                          |
| id (Required)             | string  | The unique identifier provided for this participant.                                                                                                                                                                                                                                                                                                                                            |
| firstName                 | string  | The participant’s first name.                                                                                                                                                                                                                                                                                                                                                                   |
| lastName                  | string  | The participant’s last name.                                                                                                                                                                                                                                                                                                                                                                    |
| email                     | string  | The email address for the participant.                                                                                                                                                                                                                                                                                                                                                          |
| referable                 | boolean | <p>Flag used by impact.com to determine whether a participant is able to be referred.</p><p><strong>Note:</strong> The flag must be spelled with only <em>one</em> <code>r</code> for status to be modified successfully.</p>                                                                                                                                                                   |
| locale                    | string  | The participant’s locale, used for [Internationalization](https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/advocate-program-settings/translate-and-localize-your-advocate-program). The locale must be of the format `language_COUNTRY` where the language code must be lowercase and the country code must be uppercase. The separator must be an underscore. |
| countryCode               | string  | The participant’s locale, used for [Internationalization](https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/advocate-program-settings/translate-and-localize-your-advocate-program). The user’s country code (e.g CA).                                                                                                                                          |
| referredBy.code           | string  | The referral code of the customer advocate who referred this participant.                                                                                                                                                                                                                                                                                                                       |
| referralCodes.{programId} | string  | The vanity referral code for this participant to share for the specified program (automatically generated if not included).                                                                                                                                                                                                                                                                     |
| sharelinks.{programId}    | string  | The vanity share link for this participant to share for the specified program (automatically generated if not included).                                                                                                                                                                                                                                                                        |
| dateCreated               | string  | The date this participant was created in your Advocate program.                                                                                                                                                                                                                                                                                                                                 |
| imageUrl                  | string  | Optionally used in widgets, emails, and themes. If you provide an absolute profile image URL the minimum image size is 80px x 80px.                                                                                                                                                                                                                                                             |
| dateUsTaxFormSubmitted    | integer | The date that a participant’s W-9 Tax Form was marked as collected. Used for W-9 Compliance on your tenant, if configured.                                                                                                                                                                                                                                                                      |
| customFields.{fieldName}  | string  | Use this structure to include a custom field of your choosing.                                                                                                                                                                                                                                                                                                                                  |
| {% endtab %}              |         |                                                                                                                                                                                                                                                                                                                                                                                                 |

{% tab title="Custom Fields" %}
[Custom user fields](https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/custom-fields-for-advocate-explained) allow for data unique to your participants. You can set your program goals to trigger based on the information in a custom user field.

{% hint style="info" %}
**Example**: Reward participants when they renew their subscription membership. First, include the custom field `customFields.subscriptionPaid` with the value of **yes**. Then, set the goal to convert when `customFields.subscriptionPaid` is equal to **yes**.
{% endhint %}

Add custom fields to the column header in this format: `customFields.yourCustomFieldName`.

{% hint style="info" %}
**Note:** Custom fields can’t accept array or object values.
{% endhint %}
{% endtab %}
{% endtabs %}

**Results**

We notify you by email when your import is complete. You can download import results from the ![](https://impact-1.gitbook.io/docs/emvxfLrwrlacc4y3y02Y/~gitbook/image?url=https%3A%2F%2F4048883401-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FwMLlMoFBtKJa8ptd3zaw%252Fuploads%252Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%252Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg%3Falt%3Dmedia\&width=300\&dpr=3\&quality=100\&sign=71dd50ef\&sv=2)  **\[Engage] → Reporting → Imports & Exports** page within your Advocate program.

{% hint style="warning" %}
**Warning:** Download links will expire after 30 days.
{% endhint %}

{% tabs %}
{% tab title="Successful Upload" %}
If the import completes successfully, a file with the participant information will be generated and emailed to you. The information that is included in these results is the same as is found in our [user details report](https://help.impact.com/brand/what-would-you-like-to-learn-about/advocate-program/advocate-reporting-and-analytics/advocate-program-reports-explained).
{% endtab %}

{% tab title="Errors" %}
If any errors are encountered during the import, then an additional file will be generated. This errors file includes entries for each error that occurred, including the row number of the record (from the initial import file) that failed, and any associated error messages.

| recordNumber | message                                    | apiErrorCode | statusCode |
| ------------ | ------------------------------------------ | ------------ | ---------- |
| 2            | This request requires a valid non-empty id | BAD\_REQUEST | 400        |

In the unlikely event that a system error occurs and the import is interrupted, then the import will appear as **aborted** and will not recover. Please reach out to our Support team if you need further assistance.
{% endtab %}
{% endtabs %}
