3 - Send work order updates to Azure IoT Central
When working with the sample data package, you'll see that work orders are automatically created in Connected Field Service when an IoT device triggers an alert in Azure IoT Central. In Connected Field Service, you'll see that work order associated with the IoT alert. But how do you get this information back into IoT Central?
Make Connected Field Service send service information to Azure IoT Central when work orders are automatically generated.
In Connected Field Service, navigate to the IoT Alerts list page. You can find this in the main navigation menu.
Select an IoT alert, and then navigate to the "Related" dropdown and select "Work orders." You should see that a work order has been automatically generated for this alert.
Select "Create a flow" in the top menu bar.
- From the list of available templates, select "Sample Contoso- When a work order is created in Connected Field Service, update IoT Central"
Note: Alternatively, you can navigate directly to the Power Automate templates page and search "CFS" to find this template, as seen below.
- Sign into Power Automate with your Dynamics 365 organization, along with your associated IoT Central account.
The template will be mostly ready to run; you only need to make the following changes (see the screenshots below for reference):
a. In the field for "When a work order is created or updated," select your Dynamics 365 organization name.
b. In the field for "Get the alert," and then select your Dynamics 365 organization name.
c. Expand "Clean up the work order fields in the device," and then select your IoT Central application name and also the device template, "Refrigerated Vending Machine (1.0.0)."
d. Expand "Get the incident type from work order," and then select your Dynamics 365 organization name.
e. Expand "Update the work order details for the device that raised the alert," and then select your IoT Central application name and also the device template, "Refrigerated Vending Machine (1.0.0)."
f. Note: Running this flow will not add work order information retroactively---only devices going forward will be updated on the device page in Azure IoT Central.
- Save the Flow to make it run.
See the results
After you've saved the flow, head on back to your Azure IoT Central environment. Select the device that has triggered an alert and a work order in Connected Field Service. You should now see the work order information populated in the fields on the IoT Central device properties page.