Restrict users from selecting past date (Date Validation)

Let’s learn how to restrict user form selecting past date. We can do this through JavaScript.

Below we have a Lead form, where we have a Target Date field. The need is to restrict user from saving the lead form having passed data on Target date field.

Lead Form

Below is the code which can we used:

(function () { }(window.BankNotes = window.BankNotes || {}));
(function (BankNotesFilter) {
/* Function ValidateTargetDate: This would trigger on OnChange event of Target Date field. Which would restrict user from selecting past date under Target Date field.*/
BankNotesFilter.ValidateTargetDate = function (executionContext) {
var formContext = executionContext.getFormContext();
var dateFieldVal = formContext.getAttribute("blog_targetdate").getValue(); // TargetDate Field
var today = new Date();
var todaydate = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0);

if (dateFieldVal < todaydate) {
formContext.getAttribute("blog_targetdate").setValue(null);
formContext.getControl("blog_targetdate").setNotification("Selected date should be greater or equal to today","101");
}
else {
formContext.getControl("blog_targetdate").clearNotification("101");
// alert("Selected Target date greater than today");
}
};
}(window.BankNotes.BankNotesFilter = window.BankNotes.BankNotesFilter || {}));

The code restrict user from selecting past date on Target Date field.
If, user select past date under Target Date field then the field value will be cleared out showing notification(“Selected date should be greater or equal to today”) on the field.

Just, we need to call the above code on OnChange event of Target Date field:

Call the Function: BankNotes.BankNotesFilter.ValidateTargetDate

The value will be cleared out, on selection of past date

When a user select today’s or any future date, system will allow user to select the date.

User able to select any future/current date.

Hope this helps!

Microsoft Power Virtual Agent(AI chatbot)

Working on Omnichannel for Customer Service, I came across Microsoft Power Virtual Agent which is an AI chatbot.

Power Virtual Agent helps us to create a bot with the no-code interface. Where it minimizes the effort required to deploy and maintain custom solutions. Also, Power Virtual Agent can answer many major issues using the bot service.

Advantages:

  • Allow a person to build a bot without any coding or AI experience
  • Common inquiries can be answered by the bot with any user intervention. This reduces the human agent’s effort and time.
  • Customers can self-help themselves 24/7 using a power virtual agent. This improves customer satisfaction experience.

Now, let’s dive into Power Virtual Agent, click here.

Sign In and follow the below steps:

There are multiple topic already present we can use system and sample topics.

User Topics and System Topics
Hit new topic for creating a new topic
For updating the topic flow click on Go to authoring canvas.

I tried with creating a sample bot for me.

Click here to check the video.

I hope this gives you and idea about Power Virtual Agent.

Omnichannel for Customer Service – Part 2

Continuing to Omnichannel for Customer Service. We will learn the process to setup a Live chat widget inside Dynamics CRM using the Omnichannel Administration app.

To know about, how to setup Omnichannel for Customer Service, Click here.

Select Queues from the site map and click +New button. A queue is required for routing the question from users to a particular department based on the business process.

  • Provide the Queue name and set the priority of the queue.
  • Add the users to the queue who would be taking the incoming chat request which comes under this queue.

Once the queue has been defined we need to create a record under Work Streams. 
Here we need to select the desired channel for our Work Stream. There are multiple channels like Live Chat, SMS, Facebook, WhatsApp, Twitter, Microsoft Teams, etc. Name the Channel and select the capacity. We are setting up Live Chat.
We can also identify the incoming chat preference based on the agent status. Let’s select the Allowed Presences value too Available, Busy. This means that the agent would get the live chat pop-up on their screen when they have the capacity and their status is either Available or Busy.

Create Work Stream for Live Chat

Now, we will create a Chat Widget. For that, we need to navigate to Chat from the site map.
Provide a name to the chat widget record, select the language, and the work stream which we create a minute before.

Under Agent display name, we have the option to select agent First Name, Last Name, Nick Name or Full Name.

Create Chat Widget record

Once the record is saved, we will get a code snippet.

Code snippet gets populated under Chat Widget. This will be required later.

After this, we need to go back to our work stream record and create a routing rule for Live Chat channel.

For creating of routing rule, we need to link it with the queue which we created and Work Stream created by us. Hit the Save button.
Once the record is saved, we need to add a condition to the routing rule as shown in the above image.

Assuming Portal is installed on the instance where the Omnichannel has been setup.
If not below are the step of Portal Configuration.

Under Instances tab, select Dynamics 365 Portals- Customer Self-Service Portal and Click Install.

Once we have the Customer Self-Service Portal installed on our instance.

Now, let’s go to Portal Management app –> under Content Snippets we need to paste the code snippet which we received from Chat Widget record.

Next, enable Portal Add-On as shown below:

We can see a Chat icon appearing on the Portal bottom right.

Now, open CRM using Test User credential which is has been part of our Live Chat channel. We can see a yellow box on the top right of the screenshot, the green icon denotes the status of our agent is available when the agent is busy it turns to be red.

Steps we need to perform for testing the Live Chat channel configuration.

Once the conversation is completed agent can close the chat session by clicking in the End button.

The comments provided by Agent after ending the chat session would stay within CRM only. For internal team references.

Here is the end of Omnichannel for Customer Service.

I hope this helps!!!

Omnichannel for Customer Service

Microsoft came up with an app called Omnichannel for Customer Service.

The app is a part of Customer Service which helps the organizations to immediately connect and engage with their customers on a digital platform, like Chat, SMS, Social Media(Facebook, Twitter, WhatsApp, Microsoft Teams, and many more).

We can test this on the trials instance. Click here to create a new instance.

Select Customer Service while creating a trial instance. If we select any other option, Omnichannel for Customer Service application will not get enabled in your tenant.

Figure 1: Select Customer Service for Trial Instance

Once the instance is setup. Check whether the Customer Service Hub is available or not.

Figure 2: Installed Customer Service Hub

Now, let’s go to the admin center to configure a few settings. Click on Billing -> Purchase services -> Add-ons

Figure 3: Steps to set up subscription

Here for trial purpose, if needed we can get Power BI (free) subscription. Also, there are multiple add-ons that we can have access to like Dynamics 365 Customer Service Digital Messaging add-on trial.

Once the add-ons are configured go to users and assign license accordingly.

Figure 5: Assign license to user

For Provisioning Omnichannel for Customer Service, we will have a provide the data access consent. For that we need to go to the Data access consent URL which would navigate us to the below page where we need to check the consent box and hit the Accept button.

Figure 7: The page appears once the Accept button is clicked.

Next, when we have the data access granted successfully. We need to go back to the admin center and start configuring Omnichannel for our instance.

Figure 8: Admin Center – Power Apps
Figure 9: Select Instance
Figure 10: Click Dynamics 365 Administration Center link
Figure 11: Go to Application tab, Select Omnichannel for Customer Service and hit Manage button

Go to the Application tab, select Omnichannel for Customer Service, and hit the Manage button. The manage button option allows us to configure and remove the channels which are use or no use.

Figure 12: Provide the Consent by clicking on the Check box and hit Accept
Figure 13: Add Environment on which Omnichannel needs to be configured.
Figure 14: Select the instance from the drop down.

For, practice let’s configure all the options which we have on trials instance. This can be turned off when needed.

Figure 15: Enable Chat Feature
Figure 16: Enable SMS feature
Figure 17: Enable Social Media
Figure 18: Enable Microsoft Team
Figure 19: Click on Finish button

By clicking on the Finish button, we confirm the options we opted for Chat, SMS, Social, and Teams. This would take some time to install all the option which we opted for Omnichannel.

Once the installation is completed under the selected instance (MRC), we would the below screen.

Figure 20: Omnichannel setup under MRC Instance

Navigate to My Apps, here we can see Omnichannel has been successfully installed.

Figure 21: Omnichannel successfully installed.

I hope this helps!!!

Design a site like this with WordPress.com
Get started