# How to Collect Contacts’ Emails and Phone Numbers

{% hint style="success" %}
In this use case article, you’ll discover how to collect customers’ or leads’ email addresses or phone numbers for identification when conversations open.
{% endhint %}

Contacts’ email addresses and phone numbers are valuable information that can be used to identify an existing customer or lead for more context. With a better understanding of a customer or lead, agents can provide better assistance.

#### Benefits of Collecting Contacts’ Emails and Phone Numbers <a href="#benefits_of_collecting_contacts_emails_and_phone_numbers" id="benefits_of_collecting_contacts_emails_and_phone_numbers"></a>

Use the email addresses or phone numbers collected to:

* [merge Contacts](https://docs.is-messenger.com/ismessenger/modules/contacts) when a Contact messages you from a different Channel.
* be able to [sync Contacts](https://docs.is-messenger.com/ismessenger/support-use-cases) and Contact properties with another CRM.

#### Methods for Collecting Contacts’ Emails and Phone Numbers <a href="#methods_for_collecting_contacts_emails_and_phone_numbers" id="methods_for_collecting_contacts_emails_and_phone_numbers"></a>

Here are four methods that you can use to collect Contacts’ emails and phone numbers:

1. Automatically obtained from Channel's Metadata.
2. Ask for email or phone number using Workflows.
3. Use Pre-Chat Form on Website Chat Widget.
4. Identify logged-in Contacts via Website Chat Widget.

**Automatically obtained from Channel's Metadata**

**Use this method** when you are using channels that pass metadata containing Contact's email or phone number to IS-Messenger platform.

IS-Messenger platform automatically receives Contacts’ emails or phone numbers for the following channels:

* [WhatsApp](https://docs.is-messenger.com/ismessenger/messaging-channels/whatsapp)
* [SMS](https://docs.is-messenger.com/ismessenger/messaging-channels/sms)
* [Email](https://docs.is-messenger.com/ismessenger/messaging-channels/email)

For channels that do not provide Contacts’ emails or phone numbers to IS-Messenger platform, use the other methods to collect the information.

**Ask for email or phone number using Workflows**

**Use this method** when you expect Contacts to message you via instant messaging.

**Method Objectives**

* Select a Workflow Template and customize steps if needed
* Continue the Workflow when the question is skipped

**Select Workflow Template and customize steps if needed**

In the **Workflows** module, click **+ Add Workflow** and choose your template:

* To collect emails, click **Welcome Message & Ask For Email** > Click **Use Template**.
* To collect phone numbers, click **Welcome Message & Ask For Phone Number** > Click **Use Template**.

<figure><img src="https://files.helpdocs.io/9e3syfbzn8/articles/6x6dimkhoc/1687340155208/ask-4-email-pn-2.png" alt="Workflow Templates"><figcaption></figcaption></figure>

Customize the steps based on your business needs.

**1.** [**Trigger**](https://docs.is-messenger.com/ismessenger/modules/workflow): The Workflow starts when a conversation is opened by a Contact.

**2. Welcome Message**: [Sends a message](https://docs.is-messenger.com/ismessenger/modules/workflow) to greet your Contact.

**3. Have Email** / **Phone # already?**: This is a [Branch](https://docs.is-messenger.com/ismessenger/modules/workflow) step to check if the Contact Field already contains the email address or phone number.

| **Condition**                                  | **Outcome**        |
| ---------------------------------------------- | ------------------ |
| Contact’s email or phone number does not exist | Asks the question  |
| Contact’s email or phone number exists         | Skips the question |

**4. Ask for Email** or **Ask for Phone Number**: This [Ask a Question](https://docs.is-messenger.com/ismessenger/modules/workflow) step lets you send a message to the Contact asking for email or phone number if the Contact Field does not contain the email or phone number.

Consider continuing your Workflow with [Routing](https://docs.is-messenger.com/ismessenger/sales-use-cases/how-to-route-leads) or [Assignment](https://docs.is-messenger.com/ismessenger/sales-use-cases/how-to-route-leads).Once you have completed the setup, click **Save** and **Publish** to activate the Workflow.

**Use Pre-Chat Form on Website Chat Widget**

**Use this method** when you expect Contacts to message you via Website Chat Widget.

When Contacts message from the Website Chat Widget, you’ll need to get their names in addition to the email addresses or phone numbers.

{% hint style="warning" %}
**Must-have:** Firstly, add and install the IS-Messenger[ Chat Widget](https://docs.is-messenger.com/ismessenger/messaging-channels/website-chat-widget).
{% endhint %}

{% hint style="info" %}
Learn more about [Pre-Chat Forms here](https://docs.is-messenger.com/ismessenger/messaging-channels/website-chat-widget).
{% endhint %}

Here’s how to set up the Contact information you want to collect from the Pre-Chat Form:

1. &#x20;Click **Settings** > Click **Channels** > Click **Website Chat Channel** > Click **Customize**.
2. Open the Pre-Chat toggle and enable Pre-Chat Form.
3. Add *First Name* and *Email Address* or *Phone Number* fields to the form, and then make the fields Mandatory for Contacts to fill them out.

**Identify logged-in Contacts via the Website Chat Widget**

**Use this method** when you expect Contacts to message you via Website Chat Widget from a logged-in area on website.

If Contacts are logged in, you can automatically get the names, email addresses, phone numbers and more.

Follow the instructions to add JavaScript code to your website [here](https://docs.is-messenger.com/ismessenger/messaging-channels/website-chat-widget).
