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

  1. Access https://portal.azure.com and log in with your Azure credentials.

  2. Click on Resource Groups.

  3. Click + Create.

  4. Select your Azure subscription.

  5. Enter ConnectedFieldService for Resource group.

  6. Select East US for Region.

  7. Click Review + Create.

  8. Click Create.

  9. Click on Home.

Task 2 – Azure IoT Hub

  1. Click + Create a resource.

  2. Enter and then select IoT Hub in Search services and marketplace.

  3. Click Create.

  4. Select your Azure subscription.

  5. Select ConnectedFieldService for Resource group.

  6. 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.

  7. Select East US for Region.

  8. Select the Management tab.

  9. Select S1: Standard tier for Pricing and scale tier

  10. Click Review + Create.

  11. Click Create.

  12. Click on Home.

Task 3 – Azure storage account

  1. Click + Create a resource.

  2. Enter and then select Storage account in Search services and marketplace.

  3. Click Create.

  4. Click here for If you need to create a legacy storage account type.

  5. Select your Azure subscription.

  6. Select ConnectedFieldService for Resource group.

  7. Enter d365cfssa followed by MMDD for the month and year and your initials for name. The storage account name must be unique globally.

  8. Select East US for Location.

  9. Select Standard for Performance.

  10. Select StorageV1 (general purpose v1) for Account kind.

  11. Select Read-access geo-redundant storage (RA-GRS) for Redundancy.

  12. Click Review + Create.

  13. Click Create.

  14. Click on Home.

Task 4 – Azure Service bus

  1. Click + Create a resource.

  2. Enter and then select service bus in Search services and marketplace.

  3. Click Create.

  4. Select your Azure subscription.

  5. Select ConnectedFieldService for Resource group.

  6. Enter d365cfssb followed by MMDD for the month and year and your initials for name. The storage account name must be unique globally.

  7. Select East US for Location.

  8. Select Standard for Pricing tier.

  9. Click Review + Create.

  10. Click Create.

  11. 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

  1. Access https://admin.powerplatform.microsoft.com/environments.

  2. 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.

  3. Click Open environment.

  4. 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.

  5. 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/.

  6. If a permission requested dialog appears, click Consent on behalf of your organization and click Accept.

Task 2 – Select Dynamics 365 environment

  1. Check the box for Terms of Service.

  2. Check the box for Microsoft Privacy Statement.

  3. Select the WWLLABnnn environment, where nnn is a number.

  4. Click Next.

Task 3 – Select Azure subscription

  1. Verify that you are signed into the correct Azure account. If not, click Sign in to a different account.

  2. Select your Azure subscription.

  3. Click Next.

Task 4 – Select Azure resource group

  1. Enter cfsresources for Resource group name.

  2. Select East US for Resource group location.

  3. Click Next.

Task 5 – Azure resources

  1. Check the box for Use existing Azure resources.

  2. Select the IoT hub you created in Exercise 1 for IoT Hub.

  3. Select the storage account you created in Exercise 1 for Storage account.

  4. Select the Service bus you created in Exercise 1 for Service Bus.

  5. Click Deploy.

  6. Click Show details.

  7. Wait for deployment to complete.

Task 6 – Authorize Azure app connection

  1. Click Authorize Connector in Azure.

  2. In the Azure portal commondataservice API connection, select Edit API connection.

  3. Click Authorize.

  4. Sign in with your Dynamics 365 tenant credentials.

  5. Click Save.

Task 7 – Scale Azure tiers

  1. In the IoT Deployment App, click Open Azure resource group containing all deployed resources.

  2. Select ServicePlan.

  3. Select **Scale up (App Service plan).

  4. Click Dev/Test.

  5. Select F1 and click Apply.

Task 8 – Get URL for Simulator

  1. In the IoT Deployment App, click Open device simulator web application.

  2. 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.

  3. 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

  1. 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.

  2. Click + New.

  3. Enter Thermostat Simulator for Name.

  4. Click Save & Close.

  5. 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.

  6. Click + New.

  7. Enter SIM followed by your initials for Name.

  8. Select any account.

  9. Select the Thermostat Simulator device category you created for Category.

  10. Enter SIM followed by your initials for Device ID.

  11. Click Save.

  12. 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.

  13. Click + New.

  14. Enter Simulator for Name.

  15. Select the [your prefix] Printer asset category you created for Category.

  16. Select the same account used when creating the device.

  17. Click Save.

Task 2 – Register the device

  1. In the Customer asset record, click Register Devices and click OK.

  2. Once the device has registered, navigate to the Azure portal and view the IoT hub resource.

  3. Select Devices and verify the device you created in Connected Field Service is listed.

Task 3 – Configure the Simulator

  1. Navigate to the Simulator web application URL.

  2. Click Refresh.

  3. 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

  1. Navigate to the Simulator web application URL.

  2. Use the mouse to increase the temperature to 100 degrees and humidity to 60 percent.

  3. 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.

  4. Open the simulated device. The temperature and humidity should be displayed in the tiles and an IoT alert should have been generated.

  5. Select the Alerts tab.

  6. Open the IoT Alert and review the data.

  7. Return to the device record.

Task 2 – Send commands to device

  1. Click Send Command.

  2. Enter {“CommandName”:”Reset Thermostat”,”Parameters”:{}} for Message and click Send Command.

  3. Navigate to the Simulator web application URL.

  4. After a short while the simulator will reboot.

  5. Use the mouse to increase the temperature to 120 degrees.

  6. In the Connected Field Service app, another IoT alert should have been generated.

  7. Click Send Command.

  8. Enter {“CommandName”:”Notification”,”Parameters”:{“Message”:”Technician has been dispatched”}} for Message and click Send Command.

  9. Navigate to the Simulator web application URL.

  10. After a short while the message will be displayed.