In previous blog I have explained how to set up and configure CFS for dynamics 365. In this blog we will go through various componets installed on azure and deep dive into Simulator and IOT Alerts.
Simulator
This is a test web app to emulate the device that is sending commands or receiving commands from the IoT hub.
Set up the sample simulator
To find the simulator URL , sign in to your Azure subscription, and then click the App Service resource type under the newly created resource group. You’ll see the URL is in the top right corner.
Copy the URL and complete the following steps:
- Paste the URL into your browser’s address bar to load the page.
- When the simulator page opens, click Configuration.
- Enter the IoT hub host name and key. The host is simply the name of the IoT Hub resource in Azure portal.
The key can be accessed by clicking on the IoT Hub resource and going to the shared access policies, then copying the primary key for iothubowner as seen in the following screenshot.
- Select the IoT hub in the Resource Group.
- On the left under General, click Shared access policies to get the host name and primary key.
- Make sure Connection status is marked as Connected and then close the dialog box.
Now you can send a test command by using the sample simulator. For example, click the temperature and increase it to above 70 degrees.
Register IOT Device in Dynamics 365
Step – 1 Open Field Service App and Click on Asset menu. Create New Asset record with basic info
Step – 2 Next click on Register Device ribbon button to register this device with IOT Hub. This is a background process and you will see the status in Registration Status field. Once done navigate to Azure portal and copy Device ID.
Step – 3 Now navigate to Simulator URL and select your registered device in Device ID dropddown.
Step – 4 Now to test the IOT Alert increase the Temperature to 70 and you will new IOT Alert created in Dynamics 365
Azure components and services that are involved with Connected Field Service functionality are detailed in the following sections.
Note: For more information about additional Azure service offerings, see the Microsoft Azure Trust Center.
This provides a queue for both inbound and outbound messages (commands) flowing between Dynamics 365 for Customer Engagement and Azure. When an IoT alert is sent to Dynamics 365 for Customer Engagement, or a command is sent from Dynamics 365 for Customer Engagement to the IoT hub, it will be queued here.
This provides an orchestration service that uses a Dynamics 365 for Customer Engagement connector and a Queue connector. Dynamics 365 for Customer Engagement connectors are used to construct entities that are specific to Dynamics 365 for Customer Engagementand Queue connectors are used for polling the queue.
This provides a fully managed, real-time event processing engine that helps to unlock deep insights from data. Stream Analytics makes it easy to set up real-time analytic computations on data streaming from devices, sensors, web sites, social media, applications, infrastructure systems, and more. It is functioning as a funnel to send selective IoT alerts to Dynamics 365 for Customer Engagement.
Connected Field Services uses the IoT Hub to manage the state of registered devices and assets. In addition, the IoT Hub sends commands and notifications to connected devices—and tracks message delivery with acknowledgement receipts. Device messages are sent in a durable way to accommodate intermittently connected devices.
Simulator
This is a test web app to emulate the device that is sending commands or receiving commands from the IoT hub.
Connected Field Service uses SQL Azure to store device heartbeat messages for later use by PowerBI to show the status of devices in Dynamics 365 for Customer Engagement.
Queries that Stream Analytics will use are stored to Azure Blob storage.
Azure Time Series Insight (Preview)
Connected Field Service Device Readings (Preview) uses Azure Time Series Insight to store, process, and query IoT devices measurements from IoT Hub.
Microsoft Docs – https://docs.microsoft.com/en-us/dynamics365/field-service/installation-setup-iothub
Power Platform my friend!
One thought on “Configure And Setup Connected Field Service For Dynamics 365 – Part 2”