# Contacts Book

### Overview

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/VwWyNgFWjKvdVXNQeZgL/image)

Contacts Book is a manual address book stored per bot. It is used to quickly pick a target when sending a message. This feature requires a dedicated license. If the Contacts Book button is not visible, access is not enabled for your account.

Contacts Book is different from the **Contacts** list in Conversations. The Conversations contacts list is auto-generated from real user chats. Contacts Book entries are curated and maintained manually.

#### Accessing the Contacts Book

Contacts Book is opened from the **Send Message** dialog inside **Conversations**. From there, the button next to **Target User** opens the Contacts Book dialog.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/4r8tBQeRgwnDB16Ga8C9/image)

{% hint style="info" %}
Contacts Book is not available from the Broadcast Widget page.
{% endhint %}

#### Search contacts

Search runs from the search box at the top of the dialog. Type a value and press **Enter** (or click the magnifier) to filter the list using matches across all contact fields. To reset the view, clear the search text and run the search again.

#### Add, view, and edit contacts

New entries are created with **Add contact**, using the fields defined in the template. Existing entries can be opened by double clicking a row, or by using **View** from the row menu. Edits are applied by switching to **Edit** mode and saving the changes.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/pyw9Y2cn71Vz3BklG8t5/image)

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/yIOdHAwLE0U7mluhT5gN/image)

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/UJ98LD5SLFywPyXrJyB1/image)

A conversation contact can be added also by clicking the Add Contact button that is shown next the contact picture corner. If the contact is already stored inside the contacts book, the button will not appear.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/iJdIhxk6Tlmt7ODX1Ap4/image)

Clicking the button will directly open the Add Contact dialog, with the fields pre-filled, based on the Contacts Book Template's associated fields. If the template does not have any associated fields set on the columns, the Add Contact dialog will be pre-filled with the basic contact info.

#### Delete contacts

Deleting a contact is permanent. After clicking delete, a confirmation is shown and a second step asks you to type the required text before the contact is removed.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/nXuGIzOQo3GYKEfwyOQc/image)

First the classic dialog will show up..

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/R611W9wOvfhUKsPwmXRH/image)

If pressing ok, then the final confirm dialog will show up.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/DDF32Aa7lTLtxWrxfH9o/image)

{% hint style="info" %}
Deleted contacts can’t be recovered. Recreate them manually or re-import the CSV.
{% endhint %}

#### Import contacts from CSV

Use **Import** to upload a CSV file and populate the Contacts Book. After selecting the file and confirming, the import runs in the background and progress is shown in the dialog footer. When the job completes, the contacts list refreshes automatically.

The CSV must match the current template fields, and column order follows the current template order.

{% hint style="warning" %}
Import **creates or updates** contacts. The decision is based on the template **Import key** field.
{% endhint %}

#### Export contacts to CSV

Use **Export** to generate a CSV from the current Contacts Book. When the export job completes, a download link appears in the dialog footer and can be used to download the file. Export also works with zero contacts, which makes it useful to download an empty CSV template.

{% hint style="info" %}
Export stays disabled until you download the file. It re-enables after download or after a failed job.
{% endhint %}

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/QSBC1bl0Mdk6a55JndA4/image)

#### Selecting a contact

Selecting a row enables **Select contact** and fills **Target User** using the default contact field. If multiple **Contact** fields exist, the dropdown can be used to choose a specific contact value.

All other fields on the selected contact are also passed to the broadcast execution and can be used like variables in the broadcast content.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/U4UBuBsYuIwKjrXmSevt/image)

You can also quickly select a contact by typing from the target user textbox. The search requires at least two characters and awaits around 2 seconds before to start the research, in order to allow more typing before searching.

Clicking on a contact entry, will fill the target user automatically with the previewed phone number or userid.

Multiple contact field selection is not available here; for that, you'll have always to open the contacts book and do it from there.

{% hint style="info" %}
This research is channel-based, meaning the contacts those won't have any contact field of the selected channel above, it will not be listed.
{% endhint %}

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/Sa3ttWxnuLDJtzFHDafZ/image)

#### Template editor

The template defines the contact schema for this bot. It also defines the CSV format.

{% hint style="danger" %}
Changing the template affects **Import** and **Export**. Be careful if you already have contacts.
{% endhint %}

{% hint style="danger" %}
Deleting a template field deletes that value from **all contacts**.
{% endhint %}

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/z399Ws4wfDLwWQv8tmiT/image)

Use **Add field** to create a new template field. Once the necessary fields are filled within the **Add Field** dialog, use **Confirm** to add the field to the template.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/Y306OgbmuvXOGeJkQgYI/image)

Use **Save** to persist all template changes for the bot. Saving applies field adds, edits, deletes, and order changes. It also updates the expected CSV columns for **Import** and **Export**.

Each template field has a type. **Text** stores a single line. **Textarea** stores multiple lines. **Contact** stores a target-able value, like a phone number or userId.

#### Template field settings

**Field name** is the label shown in the UI. **Order** defines the column order in the list.

**Associated variable** defines the variable name that will receive this contact field value when you select a contact and send the broadcast. \
You can then use it in messages with [dynamic parsing](https://docs.mylinkconnect.com/actions-and-operations/dynamic-parsing), like `{{company_name}}` or `{{user_name}}`. If you don’t associate a variable, the value is still passed as {{`contact_(template field name)}}` to the conversation.

As a practical example: If "Description" is associated with user\_name, the User Name will be updated with the Description content.

![](https://content.gitbook.com/content/tZEstFBYh3uMutlup6ku/blobs/31FhINpMWbM2UUQ49Gj1/image)

{% hint style="warning" %}
Association is unique, meaning the same variable can be only associated to one template field. Changing it, will remove the previous association from the other field, to the new one.
{% endhint %}

**Use as import key** defines the identifier used for import updates. **Mandatory** makes the field required on create and edit.

**Display in contact list** shows the field in the main list. **Default contact value** is used by **Select contact**.

**Group with default contact** nests a contact field under the default one.

#### Template validations and rules

One **Import key** field is required. One **Default contact value** field is required. Only one field can be the import key.

If **Use as import key** is enabled, **Mandatory** is enforced automatically. If **Default contact value** is enabled, mandatory and list display are enforced. If **Group with default contact** is enabled, list display is enforced.
