In our previous blog post we set up the Omnichannel for Customer Service on Dynamics 365 Online instance. In this blog post we will configure a chat channel, so that a customer or an anonymous visitor can initiate a chat with your customer service agents. This helps them to quickly get their issues resolved or to get information about your products and services.

We will perform following tasks to demonstrate the set up of chat channel in an environment having fresh Omnichannel for Customer Service set up.

  • Set up agent accounts
  • Create queues
  • Create work stream
  • Create chat channel
  • Add pre-chat survey to the chat channel
  • Add routing rules to work stream
  • Embed chat widget to the Power Apps portal
  • Test it out

Set up agent accounts

Omnichannel agents must have a Dynamics 365 user account. For this demo add at least two agent accounts. Omnichannel Agent 1 and Omnichannel Agent 2.

  1. Add users to your Microsoft 365 subscription. How to: Add a user
  2. Assign licenses to Omnichannel users. How to: Assign licenses to users
    • Dynamics 365
    • Omnichannel for Customer Service
    • Power BI
    • Microsoft Teams
  3. Assign Common Data Service User and Omnichannel agent security roles to the users you added. How to: Assign security roles to users
In Microsoft 365 Admin Center, subscriptions assigned to an Omnichannel agent user

Create queues

A queue is a place to organize and store work items (such as activities and cases) that are waiting to be processed. In Omnichannel for Customer Service, queue is used for storing and routing incoming conversations.

Based upon your business requirement, you can create new queues or enable existing queues for Omnichannel for Customer Service to provide automatic work distribution.

  1. Go to Dynamics 365 home (https://home.dynamics.com/)
  2. Login as Omnichannel Administrator or System Administrator
  3. Here you will find all the Dynamics 365 apps. Open Omnichannel Administration app.
  4. In the site map (left navigation), go to Queues & Users > Queues.
  5. Click on the New button on the command bar at the top
  6. On the summary tab, in the summary section, fill in the following information
    • Name: Dynamics 365 CRM Queue
    • Priority: 1
  7. Click on the Save button to save the new queue. The Users (Agents) section will be shown for the new queue.
  8. Click on Add Existing User to open agents’ Lookup Records page.
  9. Select Omnichannel Agent 1 to add that agent to the queue.
  10. Click Add button. The agent would get added to the queue.
  11. Repeat steps 5 to 10 to create another queue with following information
    • Name: Dynamics 365 Business Central Queue
    • Priority: 2
    • Agent: Omnichannel Agent 2
Queue set up in Omnichannel Administration app

Create work stream

Work streams define how conversations are routed to queues and distributed to agents. Essentially, routing rules and work distribution settings in the work stream forms the work distribution system.

  • Routing rules send the conversation to the right queue.
  • Work distribution settings defines how conversations are distributed to agents.

There are also skill attachment rules but we will not cover it in this blog post.

  1. In the Omnichannel Administration site map, go to the Work Distribution Management > Work Streams.
  2. On the command bar, click on the New button
  3. On the Work Distribution tab, fill in the following information
    • Name: Omni live chat workstream
    • Channel: Live Chat
    • Capacity: 30
    • Auto-close after inactivity: 5 minutes
    • Work distribution mode: Push
    • Allowed Presences: Available, Busy
    • Enable selecting from pushed based work streams: No
  4. Click Save button
Work stream setup in Omnichannel Administration app

Create chat channel

  1. In the Omnichannel Administration site map, go to the Channels > Chat.
  2. On the command bar, click on the New button
  3. On the Basic details tab, fill in the following information
    • Name: Omni Chat Widget
    • Language: English – United States
    • Agent display name: Full name
    • Work stream: Omni live chat workstream
  4. Click Save button
  5. Now copy the Widget snippet in the Code snippet section. You will need this code later.

If you want, you can make some modifications to the chat widget design by changing the settings in the Design tab.

Chat channel set up in Omnichannel Administration app

Add pre-chat survey to the chat channel

You may configure the chat widget to show customers (or visitors) a pre-chat survey before they start the conversation. A pre-chat survey can help

  • to route the conversation to the appropriate queue.
  • to provide customer and case details to the agent on the Customer summary page.

To add pre-chat survey to the chat channel

  1. Sing in to Omnichannel Administration app.
  2. Go to Channels > Chat.
  3. Open Omni Chat Widget entity record.
  4. Click on the Pre-chat survey tab.
  5. In the Pre-chat survey option, select Yes. The Pre-chat unauthenticated questions area would appear.
  6. Click on Add Question button
  7. Fill in the New Question quick create form with following information
    • Question name: TypeOfApp
    • Question text: Select application please
    • Question type: Option set
    • Option values: Microsoft Dynamics Business Central;Microsoft Dynamics CRM
  8. Click on Save and Close button. Question would be added to the Pre-chat unauthenticated questions area.
Pre-chat survey set up in Omnichannel Administration app

Add routing rules to work stream

As we mentioned earlier, routing rules send the conversation to the right queue.

  1. Sing in to Omnichannel Administration app.
  2. Go to Work Distribution Management > Work Streams.
  3. Open Omni live chat workstream entity record
  4. Click on the Routing Rules tab.
  5. Click on the Add button to add new rule time. A New Rule Item form will be displayed.
  6. On the General tab, in the General Information section, fill in the following information
    • Name: Dynamics CRM Routing Rule
    • Work Stream: <Company Name> Live chat workstream
    • Queue: Dynamics 365 CRM Queue
  7. On the General tab, in the Conditions section, fill in the following information
    • Entity: Context variable
    • Attribute: TypeOfApp
    • Operator: Equals
    • Enter the value: Microsoft Dynamics CRM
  8. Click on Save button
  9. Go back to <Company Name> Live chat workstream
  10. Repeat steps from 4 to 8 to add New Rule Item
    • On the General tab, in the General Information section fill in the following information
      • Name: Dynamics Business Central Routing Rule
      • Work Stream: <Company Name> Live chat workstream
      • Queue: Dynamics Business Central Queue
    • On the General tab, in the Conditions section fill in the following information
      • Entity: Context variable
      • Attribute: TypeOfApp
      • Operator: Equals
      • Enter the value: Microsoft Dynamics Business Central
Routing rules setup in Omnichannel Administration app

Embed chat widget to the portal

Now the only thing you need to do to complete the chat set up for Omnichannel for Customer Service is to embed the chat widget. You can embed the widget to the customer facing portal of your own choice. For the purpose of this set up we embed the widget to the Power Apps Portal.

For more information on provisioning Power Apps portals: Create a Common Data Service starter portal.

After the Power Apps portals is provisioned embed the chat widget using the Portal Management app.

  1. Go to Dynamics home (https://home.dynamics.com/)
  2. Sign in to Portal Management app.
  3. In the Portal Management sitemap, go to Content > Content Snippets
  4. Find the Chat Widget Code content snippet entity record and click to open it.
  5. Open the Chat Widget Code content snippet entity record.
  6. On the General tab, in the Value (HTML) section, select the HTML view.
  7. Paste the chat widget code that you have copied earlier while creating chat widget configuration.
Embedding chat widget code in Portal Management app

Test it out

  1. Sign in as System Administrator
  2. Go to https://make.powerapps.com
  3. Go to Apps from the left navigation pane
  4. Locate an app type of Portal
  5. Click on the More commands (…) button
  6. Click Browse. This will open the Power Apps portal in the new tab. Embedded chat widget would show up after the home page loads.
Embedded Chat widget is displayed at the bottom right of the Power Apps portal’s home page

If the chat widget doesn’t show up, that is most probably due to the updated data from Common Data Service is not immediately reflected on the portal. In that case, try clearing the server side cache for the portal. How to: Clear the server-side cache for a portal

Now to test the chat channel we just configured

  1. Open Chrome browser window
  2. Go to Dynamics home (https://home.dynamics.com/)
  3. Sign in as Omnichannel Agent 1
  4. Open Omnichannel for Customer Service app. Agent’s home page would be opened.
  5. Confirm the presence indicator at the top right side of the page. It should be green (means agent is available)
Agent’s presence indicator is shown in Omnichannel for Customer Service app
  1. Now go to the portal that you have already opened in step number 6. (https://(portalname).powerappsportals.com)
  2. Click on the chat widget to expand the widget.
  3. Select Microsoft Dynamics CRM
  4. Click Submit
Portal visitor initiated the chat using the embedded chat widget
  1. Go to the Omnichannel Agent 1 browser page. An incoming chat notification would appear for the agent in few seconds.
Incoming chat notification appeared for agent in Omnichannel for Customer Service app
  1. Click Accept. A conversation panel and a customer and case details would appear in a new session.

You may now send a message using the conversation panel to the customer or a portal visitor who initiated the chat.

Agent session showing a conversation panel

Short video

And here is a short video about how to set up chat channel in Omnichannel for Customer Service published by Microsoft Dynamics 365 team on YouTube.

Next

In our next blog post we will show you how to set up SMS channel in Omnichannel for Customer Service.

How TechAir Group can help you

TechAir Group can help your organization in set up, implementing, training, customizing and extending your Microsoft Dynamics 365 Business Applications. To reach us, please fill our contact us form.