Demo - Connected Field Service
Scenario
Worldwide Industries (WWI) provides IT and networking services to their customers. Their services range from phone system and network installations to telephoning systems and security system installations. They are going to be leveraging Dynamics 365 for Field Service for installation and servicing of these systems for their customers. You are the system implementor that has been tasked with configuring the application to support the rollout of the application.
In this Module 6 demo, you deploy Connected Field Service with Azure IoT Hub and then show how devices are connected.
[!NOTE] You require an Azure subscription to perform this demo. If you do not have an Azure subscription a recording of this demo is available to use instead.
Exercise 1 - Prepare Azure services
In this exercise you will create the Azure services to speed up the deployment of Connected Field Service. You should perform these step these resources prior to the course.
Atr the beginning of the demo to the class show these resources to the class and explain that you have created them to speed up the deployment of connected field service components.
Task 1 – Create Resource group
-
Access https://portal.azure.com and log in with your Azure credentials.
-
Click on Resource Groups.
-
Click + Create.
-
Select your Azure subscription.
-
Enter ConnectedFieldService for Resource group.
-
Select East US for Region.
-
Click Review + Create.
-
Click Create.
-
Click on Home.
Task 2 – Azure IoT Hub
-
Click + Create a resource.
-
Enter and then select IoT Hub in Search services and marketplace.
-
Click Create.
-
Select your Azure subscription.
-
Select ConnectedFieldService for Resource group.
-
Enter d365cfs followed by MMDD for the month and year and your initials for IoT hub name. The IoT hub name must be unique globally.
-
Select East US for Region.
-
Select the Management tab.
-
Select S1: Standard tier for Pricing and scale tier
-
Click Review + Create.
-
Click Create.
-
Click on Home.
Task 3 – Azure storage account
-
Click + Create a resource.
-
Enter and then select Storage account in Search services and marketplace.
-
Click Create.
-
Click here for If you need to create a legacy storage account type.
-
Select your Azure subscription.
-
Select ConnectedFieldService for Resource group.
-
Enter d365cfssa followed by MMDD for the month and year and your initials for name. The storage account name must be unique globally.
-
Select East US for Location.
-
Select Standard for Performance.
-
Select StorageV1 (general purpose v1) for Account kind.
-
Select Read-access geo-redundant storage (RA-GRS) for Redundancy.
-
Click Review + Create.
-
Click Create.
-
Click on Home.
Task 4 – Azure Service bus
-
Click + Create a resource.
-
Enter and then select service bus in Search services and marketplace.
-
Click Create.
-
Select your Azure subscription.
-
Select ConnectedFieldService for Resource group.
-
Enter d365cfssb followed by MMDD for the month and year and your initials for name. The storage account name must be unique globally.
-
Select East US for Location.
-
Select Standard for Pricing tier.
-
Click Review + Create.
-
Click Create.
-
Click on Home.
Exercise 2 - Configure Connected Field Service
In this exercise you will configure Connected Field Service to use the Azure services you created. You should perform these steps as a demo to the class.
Task 1 – Start the configuration process for Connected Field Service with Azure IoT Hub deployment
-
Access https://admin.powerplatform.microsoft.com/environments.
-
Select the WWLLABnnn environment, where nnn is a number. This is the shared Dynamics 365 environment where you will be performing all labs and demos.
-
Click Open environment.
-
Click on the name of the app in the top left of the application next to Dynamics 365 and from the list of published apps, select the Connected Field Service app.
-
When opening the Connected Field Service app, a popup dialog should appear. Select the left icon for Azure IoT hub. If the popup dialog does not appear, open a new tab in your browser and navigate to https://iotdeployment.dynamics.com/.
-
If a permission requested dialog appears, click Consent on behalf of your organization and click Accept.
Task 2 – Select Dynamics 365 environment
-
Check the box for Terms of Service.
-
Check the box for Microsoft Privacy Statement.
-
Select the WWLLABnnn environment, where nnn is a number.
-
Click Next.
Task 3 – Select Azure subscription
-
Verify that you are signed into the correct Azure account. If not, click Sign in to a different account.
-
Select your Azure subscription.
-
Click Next.
Task 4 – Select Azure resource group
-
Enter cfsresources for Resource group name.
-
Select East US for Resource group location.
-
Click Next.
Task 5 – Azure resources
-
Check the box for Use existing Azure resources.
-
Select the IoT hub you created in Exercise 1 for IoT Hub.
-
Select the storage account you created in Exercise 1 for Storage account.
-
Select the Service bus you created in Exercise 1 for Service Bus.
-
Click Deploy.
-
Click Show details.
-
Wait for deployment to complete.
Task 6 – Authorize Azure app connection
-
Click Authorize Connector in Azure.
-
In the Azure portal commondataservice API connection, select Edit API connection.
-
Click Authorize.
-
Sign in with your Dynamics 365 tenant credentials.
-
Click Save.
Task 7 – Scale Azure tiers
-
In the IoT Deployment App, click Open Azure resource group containing all deployed resources.
-
Select ServicePlan.
-
Select **Scale up (App Service plan).
-
Click Dev/Test.
-
Select F1 and click Apply.
Task 8 – Get URL for Simulator
-
In the IoT Deployment App, click Open device simulator web application.
-
Verify that Connection Status is Connected. If it not connected, click on the Connection tab and enter the name and key of the IoT hub as explained in https://docs.microsoft.com/dynamics365/field-service/installation-setup-iothub#step-4-set-up-the-simulator-optional.
-
Save the URL to the simulator.
Exercise 3 - Configure simulator device
In this exercise you will add an asset and a device to Dynamics Field Service and then register the device in Azure IoT.
Task 1 – Create a device
-
In the Connected Field Service app, click the Settings area in the bottom-left of the sitemap, and in the Settings group select Device Categories.
-
Click + New.
-
Enter Thermostat Simulator for Name.
-
Click Save & Close.
-
In the Connected Field Service app, click the Connected Field Service area in the bottom-left of the sitemap, and in the Connected Devices group select Devices.
-
Click + New.
-
Enter SIM followed by your initials for Name.
-
Select any account.
-
Select the Thermostat Simulator device category you created for Category.
-
Enter SIM followed by your initials for Device ID.
-
Click Save.
-
In the Connected Field Service app, click the Connected Field Service area in the bottom-left of the sitemap, and in the Connected Devices group select Customer Assets.
-
Click + New.
-
Enter Simulator for Name.
-
Select the [your prefix] Printer asset category you created for Category.
-
Select the same account used when creating the device.
-
Click Save.
Task 2 – Register the device
-
In the Customer asset record, click Register Devices and click OK.
-
Once the device has registered, navigate to the Azure portal and view the IoT hub resource.
-
Select Devices and verify the device you created in Connected Field Service is listed.
Task 3 – Configure the Simulator
-
Navigate to the Simulator web application URL.
-
Click Refresh.
-
Select the device you created in Connected Field Service. After a short while messages will be sent.
Exercise 4 - Generate IoT alerts
In this exercise you will use the simulator to generate alerts for Dynamics 365 Field Service and send commands from Connected Field Service to the device.
Task 1 – Generate an IoT alert
-
Navigate to the Simulator web application URL.
-
Use the mouse to increase the temperature to 100 degrees and humidity to 60 percent.
-
In the Connected Field Service app, click the Connected Field Service area in the bottom-left of the sitemap, and in the Connected Devices group select Devices.
-
Open the simulated device. The temperature and humidity should be displayed in the tiles and an IoT alert should have been generated.
-
Select the Alerts tab.
-
Open the IoT Alert and review the data.
-
Return to the device record.
Task 2 – Send commands to device
-
Click Send Command.
-
Enter {“CommandName”:”Reset Thermostat”,”Parameters”:{}} for Message and click Send Command.
-
Navigate to the Simulator web application URL.
-
After a short while the simulator will reboot.
-
Use the mouse to increase the temperature to 120 degrees.
-
In the Connected Field Service app, another IoT alert should have been generated.
-
Click Send Command.
-
Enter {“CommandName”:”Notification”,”Parameters”:{“Message”:”Technician has been dispatched”}} for Message and click Send Command.
-
Navigate to the Simulator web application URL.
-
After a short while the message will be displayed.