Skip to main content

Notifications

Announcements

No record found.

Field Service forum

Agreements & IoT Alerts

Posted on by 35

Hi

As I understand it, agreements is great when we think of preventive maintenance. But if we are looking at predictive maintenance (IoT Alerts, etc.)

I cant see any direct connection between Agreements vs Customer Assets/Devices/IoT Alerts.

When we get IoT Alerts into FS, and creates Work Orders, we would really like to have the agreement direct connect to either the customer asset or the Work Order.

I know that I can just create custom relations, but is this the right way to use Agreements? 

  • Al Iggs Profile Picture
    Al Iggs on at
    RE: Agreements & IoT Alerts

    My guess is that "_msdyn_primaryincidenttype_value": "Some Incident Happened" causes the error, because the Primary Incident Type is a lookup, not a text.

    Which connector do you use to create the work order and can you share a screenshot of that step? And if you look at the Flow/Logic App run, do you get more details of the error?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Agreements & IoT Alerts

    HI Alexander,

    Thank you for your response. I tried out the approach # 1 you mentioned above where I tried to build additional logic in the logic app "IoT-to-CRM" which comes out of the box during the installation of connected field services solution with an IoT Hub architecture.

    After IoT alert is created in the Logic App, I used the IoT Alert ID to create a work order if the reading value is over threshold (indicating criticality).

    However, this gave a 400 error. Would you be able to advise what the issue might be ? The error was:

    {

     "status": 400,

     "message": "Bad Request - Error in query syntax.",

     "source": "orgxxxxxxx.crm.dynamics.com",

     "errors": [],

     "debugInfo": "clientRequestId: c8aaa60d-2dcb-42cb-9161-7bc88a6af5c0"

    }

    Here's the input to creating a new record in work orders using Common Data Service:

    {

       "method": "post",

       "path": "/v2/datasets/orgxxxxxxx.crm/tables/msdyn_workorders/items",

       "host": {

           "connection": {

               "name": "/subscriptions/XXXXXXX/resourceGroups/rg-XXXXX/providers/Microsoft.Web/connections/commondataservice"

           }

       },

       "body": {

           "_msdyn_billingaccount_value": "XXXXX",

           "_msdyn_customerasset_value": null,

           "_msdyn_iotalert_value": "9297aac7-ddb8-e911-a989-000d3a3acafd",

           "_msdyn_pricelist_value": "Office 365 USA (sample)",

           "_msdyn_primaryincidenttype_value": "Some Incident Happened",

           "_msdyn_priority_value": "Urgent",

           "_msdyn_serviceaccount_value": "XXXXXX",

           "_msdyn_serviceterritory_value": "United States",

           "_msdyn_workordertype_value": "IoT-predictive maintenance",

           "msdyn_ismobile": true,

           "msdyn_latitude": 39.742043,

           "msdyn_longitude": -104.991531,

           "msdyn_name": "27919",

           "msdyn_primaryincidentdescription": "Some Incident Happened",

           "msdyn_systemstatus": 690970000,

           "msdyn_taxable": false,

           "msdyn_worklocation": 690970000,

           "msdyn_workordersummary": "Some Incident Happened, creating automated work order"

       }

    }

    Thank you so much.

    Regards,

    Puneet

  • Al Iggs Profile Picture
    Al Iggs on at
    RE: Agreements & IoT Alerts

    Hi Puneet, the standard logic of Connected FS will create an IoT Alert in D365 based on logic in Azure. If you want to automate the WO generation, you can do that in 2 ways based on your scenario:

    #1: Build additional logic in Azure, e.g. in a logic app to determine when an IoT Alert is sufficient or if case/WO are required. An example would be that a highly critical issue leads to a WO directly.

    #2: Build additional logic in Dynamics using workflow or Flow. The benefit of this approach over #1 is that you can incorporate Dynamics data, like the asset hierarchy, the customer's SLAs and/or entitlements.

    Coming back to your question, using approach #2 it is not mandatory to create a case, however it might make sense if the equipment provides remote access. This way a CSR can try to fix the issue remotely, avoiding costly field service visits. If this was not successful, create a work order from the case. In cases where remote troubleshooting is not possible, your workflow/Flow could skip the case and create a work order directly.

    Again, technically you have all the flexibility, but your business process will suggest which route to take.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Agreements & IoT Alerts

    Hi Casper,

    I’m new to dynamics 365 and am trying to figure out how to process incoming IoT alerts and automatically create work orders for them. Would you be able to advise how this is done ? As I understand that out of the box, an IoT alert needs to be converted into a case before creating a work order. Hence, any documentation on automatic creation of work orders will help !

    Thank you.

    Regards,

    Puneet

  • Al Iggs Profile Picture
    Al Iggs on at
    RE: Agreements & IoT Alerts

    Thanks for the additional explanation, that helps! I was referring to the Agreement entity, while your question is about SLAs, service level agreements. We have just released documentation: docs.microsoft.com/.../sla-work-orders

    The SLA kicks in regardless of how the WO is created, i.e. it works for IoT alerts, but also for regular WOs.

  • Casper Schau Profile Picture
    Casper Schau 35 on at
    RE: Agreements & IoT Alerts

    When IoT alerts gets into our D365FS, they are automatically getting processed and a work order will be created. We would like to be able to control work orders and scale them, by looking at the SLA (Agreement) that the customer connected to the Customer Asset has.

    This means that If we have a couple of "Gold" SLA' Work Orders, we want to take them before the "Silver" ones. Does it make sense? Otherwise I will try to discribe it a bit more.

  • Al Iggs Profile Picture
    Al Iggs on at
    RE: Agreements & IoT Alerts

    The primary use case for agreements is preventative maintenance, i.e. the time-based creation of work orders and invoices. What is your use case - why do you want to link the IoT alert-based work orders to an agreement?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,888 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,247 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans