Skip to content

Creating Class Extensions for Azure Integrations

Adam edited this page Apr 26, 2019 · 2 revisions

This walkthrough is currently in development

Supporting integration into Azure Cognitive Services and/or Machine Learning unlocks a whole new wave of automation opportunities. But it would be unfair if the connector just kept this information to itself in its own processing loops.

That's why if you're using this functionality, the connector also supports writing those returned scores into custom class extensions featured on your Incident and Service Request classes. In doing so, you gain access to further internal automation opportunties.

Extending Classes with the SCSM Authoring Tool
Once we get the authoring tool open, we need hit refresh on the Class Browser to load all of the classes up. Let's...

  1. Start with Incidents by searching for Incident, right-click and 'View'
  2. Right-click on the Incident class as seen in the Management Pack Explorer and choose "Extend"
  3. Then we'll choose New to create a new custom management pack. For this example, I'm going to call it "Azure.AI.Incident.Extensions.xml"
  4. Choose "Create property..."
  5. For this example, I'm going to call this new property "ACSSentimentScore"
  6. Then we need to change the data type in the "Details" pane from "String" to "Decimal"
  7. Save your MP and close it in the Authoring tool (leave the Authoring tool open though)

At this point, you're almost ready to seal the MP with your own unique key and import. But! there is one thing the Authoring Tool doesn't support through its UI and that's how much precision do you want the decimal value to have. Fortunatley, it's a very easy change in any text editor. Open up the XML file, locate your new decimal property and on that very same line find it's Scale property.

Property ID="ACSSentimentScore" Type="decimal" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="38" MinLength="0" Required="false" Scale="0"

Want three decimal places? Change it to a 3. Five? Change it to a 5. Simple!

  1. Save this single change
  2. Re-open the MP in the Authoring tool then right click on your custom MP and choose Seal
  3. Repeat this process for the Service Request class in a completely different custom Management Pack.
  4. Import into SCSM
  5. Update the SMLets Exchange Connector configuration to reference your new property name.