Read more about the manual import of contact data in this guide.
You’ll need to check your contacts data before importing it to Engage, to avoid problems later on. Read about the preparation process for a CSV import of contacts on this page.
If a contacts CSV file has more than 50 000 records, you should split it into several files before importing them into Engage.One way to do this is using a python script like this one:
import csvimport osdef create_batches(input_file, output_folder, batch_size): # Create output folder if it doesn't exist if not os.path.exists(output_folder): os.makedirs(output_folder) with open(input_file, 'r', newline='') as csvfile: reader = csv.reader(csvfile) header = next(reader) batch_number = 1 batch_count = 0 output_csv = None for i, row in enumerate(reader): if i % batch_size == 0: if output_csv: output_csv.close() output_file = os.path.join(output_folder, f'batch_{batch_number}.csv') output_csv = open(output_file, 'w', newline='') writer = csv.writer(output_csv) writer.writerow(header) batch_number += 1 batch_count = 0 writer.writerow(row) batch_count += 1 if output_csv: output_csv.close()if __name__ == "__main__": input_file = 'sample_data.csv' # Here enter your CSV's file name output_folder = 'output_batches' # Here write the output folder batch_size = 50000 # Here enter the number of rows per batch create_batches(input_file, output_folder, batch_size)
To use this script, do the following:
Make sure that Python 3 is installed on your computer.
Create a folder containing an empty text file called “script.py”.
Copy the code above and paste it into that file.
Place the CSV you want to split into the same folder.
Open Command Prompt on PC (terminal in Mac) and navigate to this folder.
Run the script using the command “python script.py”.
Now a folder should be created containing your files.