# Create Customer and Record from Chat

When interacting with customers via WhatsApp in WhatsApp4Dynamics, it’s important to link each conversation to a customer record in Dynamics 365. This feature helps you quickly create and associate customers directly from the chat screen.

In the Chat UI, the system intelligently displays actions based on whether a customer is already linked to the conversation:

* If no customer is linked, you will see the Create Customer button
* Once a customer is created and linked, the button changes to Create Record

This ensures a smooth and guided workflow for users while handling conversations.

### When “Create Customer” Button Appears

The Create Customer button is visible when:

* A new chat is received
* No existing customer (e.g. Contact, Account) is associated with the chat
* The system is unable to automatically identify a matching customer

### How to Create a Customer from Chat

Follow these steps:

1. Open the chat conversation using Chat Hub in WhatsApp4Dynamics
2. Click on the Create Customer button and select entity

<figure><img src="/files/MdzfCdabuZZJIVVWODAe" alt=""><figcaption></figcaption></figure>

3. Enter the required customer details (such as Name, Phone Number, etc.)

<figure><img src="/files/06CaIuqsGyveTPL3Uify" alt=""><figcaption></figcaption></figure>

4. Save the record

Once saved, the customer will automatically be linked to the chat.

### What Happens After Customer Creation

* The chat is now associated with the created customer record
* The Create Customer button will no longer be visible

Instead, you will see the Create Record button.

<figure><img src="/files/s172m6zQjrF0q3lSTFRy" alt=""><figcaption></figcaption></figure>

### How to Create a Customer from Chat

After linking a customer, you can:

* Create related records such as:
* Lead
* Opportunity
* Case
* Custom entities (based on your configuration)

**Steps:**

1. Click on Create Record
2. Select the entity you want to create

<figure><img src="/files/dIxpiyiXNwnLTKkvSCGo" alt=""><figcaption></figcaption></figure>

3. Fill in the required details
4. Save the record

After creating a record, the newly created record is set as the Regarding of the chat.

### Map Regarding Behaviour

The Map Regarding Behaviour setting allows you to control how the ***Regarding*** record is handled when a new chat session is created.&#x20;

When an existing chat session is completed and a new chat session is created, the system evaluates this setting to determine whether the Regarding record from the previous session should be mapped to the new chat session.

Based on the selected option, the system can automatically map the existing Regarding record, restrict mapping, or allow agents to decide whether it should be associated with the new chat session.

### Available Options

**1. Do Not Map**\
\
The existing Regarding record will not be mapped to the newly created chat session.

**2. Ask Agent**\
\
A prompt notification is displayed to the agent whenever a new chat session is created. The agent can choose whether to map the Regarding record or not.

The prompt provides two options:

* **Yes** - The Regarding record will be mapped to the new chat session
* **No** - The Regarding record will not be mapped to the new chat session

<figure><img src="/files/iFelNJywsTn3Ke6H2BI3" alt=""><figcaption></figcaption></figure>

**3. Map Active Records Only**\
\
The Regarding record will be mapped only if it is in an *active* state.

Example:\
\
If a Lead is set as the Regarding record:

* If the Lead is Active → it will be mapped
* If the Lead is Inactive/Closed → it will not be mapped

**4. Auto Map**\
\
The system automatically maps the existing Regarding record to every newly created chat session.

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inogic.com/whatsapp4dynamics/features/create-customer-and-record-from-chat.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
