|
1 | 1 | # Xperience by Kentico Contacts Importer |
2 | 2 |
|
3 | 3 | [](https://github.com/Kentico/.github/blob/main/SUPPORT.md#labs-limited-support) |
4 | | - |
5 | | -[](https://github.com/Kentico/xperience-by-kentico-contacts-importer/actions/workflows/ci.yml) |
6 | | - |
| 4 | +[](https://github.com/Kentico/xperience-by-kentico-contacts-importer/actions/workflows/ci.yml) |
7 | 5 | [](https://www.nuget.org/packages/Kentico.Xperience.Contacts.Importer) |
8 | 6 |
|
9 | | -## About The Project |
| 7 | +## Description |
10 | 8 |
|
11 | | -Enables bulk importing of Contacts into an Xperience by Kentico solution using a `.csv` file. |
| 9 | +Enables bulk import and deletion of contacts in an Xperience by Kentico solution using a `.csv` file. Imported contacts can be automatically assigned to a contact group during the import process. |
12 | 10 |
|
13 | | - |
| 11 | +## Requirements |
14 | 12 |
|
15 | | -## Getting Started |
| 13 | +### Library Version Matrix |
16 | 14 |
|
17 | | -### Prerequisites |
| 15 | +| Xperience Version | Library Version | |
| 16 | +| ----------------- | --------------- | |
| 17 | +| >= 30.5.1 | 1.0.0-prerelease-2 | |
18 | 18 |
|
19 | | -- Xperience by Kentico >= 30.5.1 |
| 19 | +### Dependencies |
20 | 20 |
|
21 | | - - <https://docs.kentico.com/documentation/changelog#hotfix-may-22-2025> |
| 21 | +- [ASP.NET Core 8.0](https://dotnet.microsoft.com/en-us/download) |
| 22 | +- [Xperience by Kentico](https://docs.kentico.com) |
22 | 23 |
|
23 | | -### Installation |
| 24 | +## Package Installation |
24 | 25 |
|
25 | 26 | Add the package to your application using the .NET CLI |
26 | 27 |
|
27 | 28 | ```powershell |
28 | | -dotnet add package Kentico.Xperience.Contacts.Importer |
| 29 | +dotnet add package --prerelease Kentico.Xperience.Contacts.Importer |
29 | 30 | ``` |
30 | 31 |
|
31 | | -### Add to your application dependencies |
| 32 | +## Quick Start |
32 | 33 |
|
33 | | -```csharp |
34 | | -builder.Services.AddKentico(); |
35 | | -// ... other registrations |
36 | | -services.AddContactsImport(); |
37 | | -``` |
38 | | - |
39 | | -### Add to your middleware pipeline |
| 34 | +Add `AddContactsImport()` and `UseContactsImport()` to your application startup code: |
40 | 35 |
|
41 | 36 | ```csharp |
| 37 | +builder.Services.AddContactsImport(); |
| 38 | +// ... other service registrations |
| 39 | +
|
42 | 40 | app.InitKentico(); |
43 | | -// ... other registrations |
| 41 | +// ... other middleware |
44 | 42 | app.UseContactsImport(); |
45 | 43 | ``` |
46 | 44 |
|
47 | | -## Usage |
48 | | - |
49 | | -1. open contact importer application <br> |
50 | | -  |
51 | | -1. select file |
52 | | -1. select mode |
53 | | - 1. Delete - this mode will delete contact by ContactGUID (CSV shall contain column with ContactGUID header) |
54 | | - 1. Insert (skip existing) - this mode will import contacts (CSV shall contain column with ContactGUID) |
55 | | -1. "Assign to contact group" - all contact (existing included) will be assigned to specified group |
56 | | -1. Delimiter - delimiter used for CSV (common are `;`, `,`, `\\t`, ..) |
57 | | -1. "Batch size" - size of batch used for database operation, for instances with limited resources this value should not exeed 5000, lower than 100 is not reccomended. |
58 | | -1. Click "Send file" button |
59 | | - |
60 | | -> Depends on resources available to application, but degraded application performance is expected during import. |
61 | | -
|
62 | | -Notes: |
63 | | - |
64 | | -- do not close window with progress, file is uploaded from that window. |
65 | | -- do not manipulate file during import, close all applications write access to file (or lock) |
66 | | - |
67 | | -### Supported CSV columns |
68 | | - |
69 | | -| Column | .NET Type | Required | |
70 | | -| ----------------- | --------- | -------- | |
71 | | -| ContactGUID | Guid | yes | |
72 | | -| ContactCreated | DateTime | yes | |
73 | | -| ContactFirstName | string | no | |
74 | | -| ContactLastName | string | no | |
75 | | -| ContactEmail | string | no | |
76 | | -| ContactAddress1 | string | no | |
77 | | -| ContactMiddleName | string | no | |
78 | | - |
79 | | -In the CSV file, define the first row as a header containing the names of the individual columns. |
80 | | -Header validation is performed during the file upload. See example file [Contact Sample](https://github.com/Kentico/xperience-by-kentico-contacts-importer/blob/main/data/contact_sample.csv). |
| 45 | +## Full Instructions |
81 | 46 |
|
82 | | -> [!IMPORTANT] |
83 | | -> For correct functionality, please make sure to add a newline at the end of the CSV file. |
| 47 | +View the [Usage Guide](./docs/Usage-Guide.md) for more detailed instructions. |
84 | 48 |
|
85 | 49 | ## Contributing |
86 | 50 |
|
|
0 commit comments