# 18. How to auto-generate referral codes while importing affiliates?

When you want to import bulk affiliates using Afflr, you can either choose to manually provide their referral code or let our app effortlessly automate codes for all your affiliates.&#x20;

To auto-generate referral codes for all your affiliates while importing in bulk, follow the steps

1. Navigate to the Afflr admin dashboard, select Affiliates, and click the Import button<br>

<figure><img src="https://lh7-us.googleusercontent.com/G5mqlIeo0LbqvxbabAXRKnlhSBKL1mvPk9hiQF6jRHqxmmcOIdPYdWgaU5-Vo-5QDDNkde83r-sHwMCAEReajrrgkA3dGc1plWUNTeKi0aznXO5hQPXMs1_Xvt1gO5KDcme1iG4zv_E6TbN68MH9380" alt=""><figcaption><p>Import Affiliate List</p></figcaption></figure>

2. Click Add File and upload your CSV file.&#x20;

\[Note: Upload file in mentioned format. To auto-generate the referral code, leave the fields under the referral code header empty, but don't delete the header itself.]

Consider the following sample for reference.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/vo345-zF74tO4iLZS9Ko8Xqzlg_2tZMDdmL6SyH1bRBh1wCK3lQe81Y0HBYBt-CIue4i_9GierX2xwyNiQsaJT_LoukVU7QID0gQp6gcF4Gs_3TGXqVTNRI1yAWlEFwFzZ3AZWmbswSG50LVEH224OM" alt=""><figcaption><p>Sample For Import</p></figcaption></figure>

3. Select the program to be assigned and click Add

<figure><img src="https://lh7-us.googleusercontent.com/oTuGcNaf5MeuBNOy-0MqsZvV4QrjIQ9z-t9vJhu7umxRRVFeTGQTm4_dB5RiIuTNYBJ3tyem2hlnxr-PWkKOiJZZ4y8PXdQ9c0FMsGeF_o-29aq8VWxTuF8oYaK9mELJhNYVs-JcrnyLH9WGiF3r9hY" alt=""><figcaption><p>Select Program</p></figcaption></figure>

4. Review the details in the next dialog box and click Confirm

A referral code will be generated for the imported affiliates automatically.&#x20;

<figure><img src="https://lh7-us.googleusercontent.com/EF3CFl_HKHeLkzZq0t7w9Y6MnS3JhSkAIT62eyt4hhF4GOb1_qu6jnFk9WU--3EmWYBg6cQfvGGIFlSzFLRI9xzj-q7YN4q0XxJHUDEr8kwoh87AlSyizP3BlAcWa0Z4_MWhEaiqyjKNa_5ZJalHN2g" alt=""><figcaption><p>Auto-Generated Referral Code</p></figcaption></figure>

<br>
