> For the complete documentation index, see [llms.txt](https://dyns.ntd.asia/power-dynamics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dyns.ntd.asia/power-dynamics/d365-ce/customer-experience/contact-center-omnichannel/internal-live-chat-in-mda.md).

# Internal Live Chat in MDA

\#Omnichannel, #LiveChat, #Internal, #MDA, #ModelDrivenApp, #D365CS, #D365CE

Hi, my Friends,

Today, I'll discuss repurposing the **Live Chat** in **Omnichannel**, typically used for external clients on websites/portals, for internal support like IT Helpdesk. Let's explore how to adapt this channel for internal teams efficiently.

You can imagine that: <mark style="color:blue;">If a Sales user encounters issues while using the Sales Hub, they can quickly seek assistance by using the Live Chat widget. This feature enables them to open a chat box directly within the system and communicate with the IT support team or another agent for immediate help.</mark>

## Using Teams Chat within the Sales Hub

At this point, May you think we use the **Teams chats inside D365CE?** It's a great solution.\
In this way, you can link the current record to the chat. However, you must select a specific user that will help you.&#x20;

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2F0nWu9hcelxzVWj44R0H5%2FTeamChat_Inside_Lead_SalesHub.gif?alt=media&amp;token=949b48a6-ecf9-4b40-9161-1c79717267eb" alt=""><figcaption><p>Team Chats - inside app</p></figcaption></figure>

So, let's think with me about using the Routing feature for our internal users.\
Picture this: the user hits up the Live Chat widget with a question, and the system will send it to the right person who's best suited to answer. That's why, I think this case might be useful to leverage **Omnichannel's Live Chat.**

## Using Live Chat in Sales Hub App

I will scribe some simple steps to add the Live Chat widget to the **Sales Hub** app.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FXTXux9VbjTJPFMOyxlEX%2FCleanShot%202024-04-02%20at%2014.24.17%402x.png?alt=media&amp;token=049785bb-9696-4fed-9be1-045025477bb2" alt=""><figcaption><p>Involve steps for configuration</p></figcaption></figure>

**Configure Work Stream and Live Chat channel**

Begin adding the Live Chat widget to the Model Driven app (**Sales Hub app**), we must configure 2 essential components - **Work Stream** and **Live Chat channel**

### Create Work Stream

In this article, I do not explain in detail about the Work Stream and how to use the Routing Rules. I just input this step for the necessary configuration.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FrC9rS1sja6ssrIV3KIHK%2FCleanShot%202024-04-02%20at%2011.58.08%402x.png?alt=media&amp;token=27c325af-d0f4-4b99-b830-cf8b6759794f" alt=""><figcaption><p>Work stream - Live chat channel</p></figcaption></figure>

### Create a Live Chat Channel

In this article, I do not explain in detail the Live Chat configuration. And see you in another session for discussion later.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FCBQ7v0cUpbb9noPE3mk0%2FCleanShot%202024-04-02%20at%2011.38.12%402x.png?alt=media&amp;token=f090de77-c456-4b9e-8597-9de05ed85bc9" alt=""><figcaption><p>Live Chat channel</p></figcaption></figure>

After completing the configurations, I can now integrate the **Live Chat widget** into the Sales Hub app using the provided **Live Chat channel** code snippet.

### Add Live Chat widget to Sales Hub app

Step to add the Live Chat widget in the Sales Hub.

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2F6PYwJKD5yu1CXKQKjFY1%2FCleanShot%202024-04-02%20at%2015.02.50%402x.png?alt=media&amp;token=5ad6830a-ba8b-4433-8943-fa9f5e138622" alt=""><figcaption><p>02 steps for the configurations</p></figcaption></figure>

{% tabs %}
{% tab title="Step 1" %}
Create the **Web resource** with the type **HTML.**

First of all, we must create the HTML file based on the **Code snippet** of the **Live Chat channel.**&#x20;

<mark style="color:red;">**Note**</mark>: *Using the code snippet of the Live Chat channel, you should input the addition tag \<html> for this code.*

{% code title="My sample HTML" overflow="wrap" lineNumbers="true" %}

```html
<html>
 <script 
  id="Microsoft_Omnichannel_LCWidget" 
  src="https://oc-cdn-public-apj.azureedge.net/livechatwidget/scripts/LiveChatBootstrapper.js" 
  data-app-id="1794611e-c5fa-4814-8573-36f4539d31ce" 
  data-lcw-version="prod" 
  data-org-id="8d84ab65-62a4-ee11-be33-002248586499" 
  data-org-url="https://unq8d84ab6562a4ee11be33002248586-crm5.omnichannelengagementhub.com">
 </script>
</html>
```

{% endcode %}

Create the HTML web resource component - **"Live Chat Widget".**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FZBhgcmim1vhTIp6wMNkR%2FCleanShot%202024-04-02%20at%2014.41.00%402x.png?alt=media&amp;token=a24dbbe4-649b-402f-9937-c399f4c9e479" alt=""><figcaption><p>Create html web resource</p></figcaption></figure>
{% endtab %}

{% tab title="Step 2" %}
Once the Web resource for the live chat widget is completed, then you edit the **Sales Hub** **app** and add **\[+New Page]** >> select **Web Resource.**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2F8FGSdh8Qng5PNlHZgVnS%2FCleanShot%202024-04-02%20at%2014.50.37%402x.png?alt=media&amp;token=df4346dc-af1b-4fcf-88fc-7cae55a052f1" alt=""><figcaption><p>Add New Page >> select Web Resource</p></figcaption></figure>

... after that, check the Sales Hub app designer mode:

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FmxwDZ6XeUia15I00DPxh%2FCleanShot%202024-04-02%20at%2014.58.44%402x.png?alt=media&amp;token=f405c435-870e-4899-a4cd-1daebe32e4a5" alt=""><figcaption><p>Sales Hub app Designer mode</p></figcaption></figure>

Okay... I finished the configuration. :tada: I will check on the Sales Hub app now. :relaxed:
{% endtab %}
{% endtabs %}

## Checking now

I will run testing now. In my testing, I have login two apps with two users.

* **Omnichannel for customer service:** login by my user "Dũng Nguyễn Trung" - I'm an **Agent** and received the live chat conversation from internal users.
* **Sales Hub:** login by internal user **"Tester 1" - who will submit the live chat.**

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2Fx4YdWbX68wRtVF8vEDiE%2FTest_Internal_live_Chat.gif?alt=media&amp;token=d58d3e56-8b6e-4282-8ec4-da56752b0caf" alt=""><figcaption><p>Internal Live Chat Testing</p></figcaption></figure>

... Omnichannel Ongoing Conversation analytics

<figure><img src="https://4233060750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjhtQupP7ACZVtv3cCNCr%2Fuploads%2FjSHUJiS3CRyd3wsImimy%2FOmnichannelOngoinConversation.png?alt=media&amp;token=252db2d3-8502-4f26-9256-4d6272c8a29a" alt=""><figcaption><p>Omnichannel Ongoign Conversation</p></figcaption></figure>

Bingo. :tada:

Thank you for your reading & Hoping well.\
**\[NTD]yns.asia**\
...[invite me a cup.](https://ko-fi.com/ntdyns/?ref=qr\&amp;v=2) :coffee: <mark style="color:blue;">Thank you</mark> :heart\_hands:
