> For the complete documentation index, see [llms.txt](https://doc.digitalaudience.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.digitalaudience.io/product-docs/documentation/crm-onboarding/2.-format-your-data.md).

# 2. Format Your Data

This article describes the guidelines for formatting your data file in order to successfully onboard it via digitalAudience Portal.

Your data must be in a CSV file encoded in UTF-8.

For data matching, we use a combination of:&#x20;

* email address
* phone number (mobile or landline)
* postal address (a postal code, house number, house number extension)
* personal ID number (only for Sweden).

You can onboard your data unhashed, as it will be hashed by digitalAudience within your browser. Alternatively, you can choose to hash the data yourself beforehand, using the SHA256 algorithm. The SHA-256 (Secure Hash Algorithm 256-bit) produces a 256-bit hash value, which is represented as a 64-character hexadecimal string.

<details>

<summary>Email</summary>

Use “Email“ as a column header in your data file. Make sure there is only one email address in a row.

If you would like to hash emails yourself, first lowercase all characters and remove any extra spaces.

For example:

```
john.sam@mail.com > john.sam@mail.com > A7DF77A9DB89B44110C704B680A24978579A3069B419DB95CBDA84541094ADBA
John.Sam@MAIL.COM > john.sam@mail.com > A7DF77A9DB89B44110C704B680A24978579A3069B419DB95CBDA84541094ADBA
```

</details>

<details>

<summary>Phone Number</summary>

Use “Phone“ as a column header in your data file. Make sure there is only one phone number in a row.

digitalAudience Portal will format phone numbers, using E.164 standard. It will remove all special characters such as a plus(+), backslash(/), dash(-), brackets(()), and a space( ).

<mark style="color:orange;">Make sure that there is no (0) between a country code and a carrier code. An incorrect format will lead to a data matching error.</mark>

For example:

```
+31614123456 (an international mobile number)
+31201234567 (an international landline number)
0031201234567 (an international number)
0612345678 (Dutch phone mobile number)
```

If you want to hash phone numbers yourself, remove any special characters such as plus(+), backslash(/), dash(-), brackets(()), and a space( ) and reformat the number to conform to the 31XXYYYYYYY format. Here, XX is the carrier code and YYYYYYY is a seven-digit phone number.

For example:

```
+31 61 4123456 > 31614123456 > 5253828BF4B74309F76C1B1B3FC379584D9DC139874764D5D134E6C0FC7235AA
0-10-123 4567 > 31101234567 > 649C4E17CAB8316FA164573FCD76B945793FBAFC8FCF1AD89F9FBCA9B29F51EB
```

</details>

<details>

<summary>Dutch Postal Address</summary>

The postal address consists of 3 parts; postal code, house number and a house number extension. The street name should not be included in the address.&#x20;

First, remove the special characters like plus(+), backslash(/), dash(-), brackets(()), space( ). Then, lowercase and trim the parts. The house number and house number extension are padded with leading zeros to create a 5-character string. Finally, merge them in the following format, using '@' sign between the parts;

postcode\@000housenumber\@0000extension.&#x20;

For example, if the address is 1059 CD, Valschermkade 18 C, then the resulting string is 1059cd\@00018\@0000c. If there is no house number extension, then it becomes 1059cd\@00018\@00000.

Apply SHA256 hashing algorithm to the resulting string.

If hashing the postal address beforehand is not possible, due to complex formatting necessary for matching, it is also possible to use address parts as plain text.

Use “postal code“, "house number" and "extension" as a column headers in your data file.

Leave a cell empty if there is no extension.

Example of how your file should look like:

<div align="left"><figure><img src="https://3474124563-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FElkynAo06vXubRNF5sfC%2Fuploads%2FqBhApT4SIHJnTYuUUTU0%2Fimage.png?alt=media&amp;token=3eb159db-00e6-4996-95a3-a4ada6bffe70" alt="" width="295"><figcaption></figcaption></figure></div>

</details>

<details>

<summary>Swedish Postal Address </summary>

A typical Swedish address consists of a postal code, street, house number, house number extension, and apartment number.&#x20;

Every part of the address is trimmed of white spaces from the beginning and the end and then lowercased. House number, extension and apartment is padded with 7 zeros to the left, so that they are 7 characters long each. Finally, merge them in the following format, using '@' sign between the parts;

Postalcode@(0000000)HouseNumber@(0000000)Extension@(0000000)Apartment\@Street&#x20;

EX: 12345\@0000003\@000000a\@0000000\@banérgatan vag

Apply SHA256 hashing algorithm to the resulting string.

If hashing the postal address beforehand is not possible due to complex formatting necessary for matching, it is also possible to use address parts as plain text.

Use "postal code", "street", "house number", "extension" and "apartment" as a column headers in your data file. Put each address element in a separate column. Leave a cell empty if there is no house number, extension or apartment number.

Example of how your file should look like:

<img src="https://3474124563-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FElkynAo06vXubRNF5sfC%2Fuploads%2Fsv4j7bOkQDmSd9r5pjA2%2FScreenshot%202023-08-09%20171002.png?alt=media&amp;token=33712cba-6817-4164-80b7-a7d0e54f9605" alt="" data-size="original">

</details>

## Examples Of Matching Netherlands&#x20;

<details>

<summary>Example 1 - Not Matched</summary>

**Email**: <john.sam@mail.com>

**Huisnummer**: 18

**Toevoeging**:

**Postcode**: 1059CD

**Telefoonnummer**: 31 (0) 612345678

**Result**: <mark style="background-color:red;">NOT MATCHED</mark> - The phone number is not matched (no (0) between a country code and a carrier code)

</details>

<details>

<summary>Example 2 - Not Matched</summary>

**Email**: <john.sam@mail.com>

**Huisnummer**: Valschermkade 18

**Toevoeging**:&#x20;

**Postcode**: 1059CD

**Telefoonnummer**: 31206691001

**Result**: <mark style="background-color:red;">NOT MATCHED</mark> - The house number is not matched (do not use the street name in the file, only house number)

</details>

<details>

<summary>Example 3 - Matched</summary>

**Email**: <john.sam@mail.com>

**Huisnummer**: 18

**Toevoeging**: C

**Postcode**: 1059CD

**Telefoonnummer**: 31206691001

**Result**: <mark style="background-color:green;">MATCHED</mark>

</details>

## Examples Of Matching Sweden

<details>

<summary>Example 1 - Not Matched</summary>

**Email**: <john.sam@mail.com>

**Gatunamn**: gamla brogatan

**Adresstillägg**: d

**Lägenthetsnummer**:&#x20;

**Postnummer**: 11124&#x20;

**Telefon**: 46 (0) 612345678

**Result**: <mark style="background-color:red;">NOT MATCHED</mark> - The phone number is not matched (no (0) between a country code and a carrier code)

</details>

<details>

<summary>Example 2 - Matched</summary>

**Email**: <john.sam@mail.com>

**Gatunamn**: gamla brogatan

**Adresstillägg**: d

**Lägenthetsnummer**:&#x20;

**Postnummer**: 11124&#x20;

**Telefon**: 46612345678

**Result**: <mark style="background-color:green;">MATCHED</mark>&#x20;

</details>
