# How to Identify Contacts by Email and Phone NumberI

Identifying an existing customer gives support agents more context on the customer. With a better understanding of a customer, agents can provide better assistance. On respond.io, Contact identifiers can be collected using Workflows and Website Chat Widget.

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

Use the email address or phone number collected to:

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

### Methods to Collect Contact Identification <a href="#methods_to_collect_contact_identification" id="methods_to_collect_contact_identification"></a>

Here are four methods that you can use to collect Contact identifiers:

1. Automatically obtained from Channel's Metadata.
2. Ask for a Phone Number or Email using Workflows.
3. 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 phone number or email to respond.io platform.

respond.io platform automatically receives Contact's phone number or email address 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 Contact's phone number or email to respond.io platform, use the other three methods to collect Contact identifiers.

### **Ask for a Phone Number or Email using Workflows**

{% hint style="info" %}
**Use this method** when you expect Contacts to message you via instant messaging.
{% endhint %}

**Method Objectives**

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

**Workflow Setup**

There are Workflow templates set up by our team that you can use immediately. These templates can be edited to fit your business needs.

{% hint style="info" %}
Learn more about [Workflow Templates here](https://docs.is-messenger.com/ismessenger/modules/workflow).
{% endhint %}

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

On the respond.io platform, click **Workflows** > **+ Add Workflow** and choose your template.

To collect emails, click **Welcome Message & Ask For Email** > **Use Template**.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2F1tXQ2wX2srprTXklLN0d%2Fworkflow-templates.png?alt=media&#x26;token=86f6ebdc-75d1-4929-affc-a8ebcf1df8af" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FJKLVou8fYQLpqwTdykF6%2Fphone-number-template.png?alt=media&#x26;token=f03c66ea-b2b6-429f-9ab1-991b1614df04" alt=""><figcaption></figcaption></figure>

Then, customize the [Welcome Message](https://docs.is-messenger.com/ismessenger/getting-started/quick-start) & [Ask a Question](https://docs.is-messenger.com/ismessenger/workspace-setting) Step as desired.

### Ask a Question step  configuration for Email

Click the **Ask for Email** step to edit the **Question Text**. The **Question Type** should remain as Email. Finally, click **Save** and **Publish** to activate the Workflow.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FZHl0AeMDrR5m9A8G73qF%2Fask-for-email.png?alt=media&#x26;token=d49f8d35-1dc4-415b-8d43-16db783c1604" alt=""><figcaption></figcaption></figure>

### Ask a Question step  configuration for Phone Number

Click the **Ask for Phone Number** step to edit the **Question Text**. The **Question Type** should remain as Phone. Finally, click **Save** and **Publish** to activate the Workflow.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FanxcK0TFOgEJ26aHJfJN%2Fask-for-phone-number.png?alt=media&#x26;token=148be8c5-ec5c-437b-9999-bcafd8c93c15" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Additionally, you can configure the Save Response As to [save the answer as a variable](https://docs.is-messenger.com/ismessenger/contact-and-messages/untitled) to reference it at a later step of the Workflow.
{% endhint %}

### **Continue the Workflow when the Question is Skipped**

These Workflow templates are set up with a Branch Step to check if the Contact Field already contains the email address or phone number.

| Condition                         | Outcome           |
| --------------------------------- | ----------------- |
| Contact identifier does not exist | Ask the question  |
| Contact identifier exists         | Skip the question |

Add a Jump Step to define the next step in the Workflow when the question is skipped. Often, you will choose the Step after the Ask a Question Step.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FrIsSXXBhEdN18iJxao8Y%2F1-workflow-setup-main-2-1.png?alt=media&#x26;token=a2a9bfc6-9d6a-43c8-865b-0e4c80647ec4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Learn how to configure the [Jump Step here](https://docs.is-messenger.com/ismessenger/modules/workflow).
{% endhint %}

{% hint style="info" %}
Consider continuing your Workflow with [Contact Enrichment](https://docs.is-messenger.com/ismessenger/support-use-cases/how-to-identify-contacts-by-email-and-phone-numberi), [Routing](https://docs.is-messenger.com/ismessenger/support-use-cases), or [Assignment](https://docs.is-messenger.com/ismessenger/support-use-cases).
{% endhint %}

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

{% hint style="success" %}
**Use this method** when you expect Contacts to message you via Website Chat Widget.
{% endhint %}

Unlike instant messaging channels which will provide the name of the Contact, when Contacts message from the Website Chat Widget, you’ll also need to get their name in addition to the phone number or email address.

**Method Objective**

* To ask for Contact’s Name, Phone Number or Email Address using the Pre-Chat Form.

**Feature Setup**

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

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

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FYg8c2PN8doY0ujWqIJP1%2FScreenshot%202023-07-13%20113008.png?alt=media&#x26;token=378da5a1-7a3c-45ef-b994-f6268015e7f1" alt=""><figcaption></figcaption></figure>

Navigate to **Settings** module > **Channels** > **Website Chat Channel** > **Customize**.

### Pre-Chat Form Configuration for Name \&amp ; Email

1. Open the Pre-Chat toggle and enable Pre-Chat Form.
2. Add First Name and Email Address field to the form.
3. Make the fields Mandatory so Contacts must fill them out.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FP2wyq2hBkvoavZq2drmV%2F2-b-webchat-email-name.png?alt=media&#x26;token=d23a81eb-ffb8-499f-9090-2551d3f4665a" alt=""><figcaption></figcaption></figure>

### Pre-Chat Form Configuration for Name \&amp ; Phone Number

1. Open the Pre-Chat toggle and enable Pre-Chat Form.
2. Add First Name and Phone Number field to the form.
3. Make the fields Mandatory so Contacts must fill them out.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FfEBJpMsWmBPlJeqKfpQK%2F2-a-webchat-phone-name.png?alt=media&#x26;token=ee27cbb6-5610-4aec-8996-cf083b04193d" alt=""><figcaption></figcaption></figure>

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

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

If Contacts are logged in, you can get the name, email, phone number and more automatically.

**Method Objective**

* To have the Website Chat Widget identify logged-in Contacts on your website.

**Feature Setup**

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