Home General Discussion

Where to start...

Cary_MyersCary_Myers Customer IT Monkey ✭
I have a requirement to include an the details of an hardware assert attached to a SR notification email.

For example when a custom requests an assert from the service catalog, once the assert has been delivered tot he customer ideally an email with some of the assert information would be sent to the requester.  Some of the fields that shoud be included would be serial number, Service Tag and last logged on user.

Best Answers

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Answer ✓
    I would suggest runbooking this (SCO/SMA) as an activity that happens near the end or at the end of that Service Request. Since a user is picking the Asset, you could map this to the RB or somewhere else and then within the runbook go fetch it from either some other activity or the parent work item. Said runbook would simply close with a "Send Email" activity about the parent SR, associated asset, etc.

    Then the automation is only invoked on-demand/per request.
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Answer ✓
    If you are not using the built-in e-mail notification functionality and/or do not like writing custom management packs, then I would take @Adam_Dzyacky's good advice and stop reading right now.

    However, if you use the built-in e-mail notifications, you can pick the asset's properties and add them to your email template right from the UI (or in the management pack, if your rules are too complex for the UI to show).  From the template properties:
    1. click Insert
    2. About Configuration Item (or "Is Related to Configuration Item" if that is where you added it in your RO)
    3. then Serial Number
    (repeat for Asset Tag)

    If you are still with me, this might be where you jump off.  To show the last logged on user, that is yet another relationship that is not part of the default type projection, so you would have to use a custom type projection to display it here.  That involves creating a type projection, replacing the default type projection in your email template (inside the management pack) and then either manually adding the variable to the body of your email or opening your template again in the UI after re-importing your modified management pack. 

    If that explanation did not deter you, then I can elaborate when I have some more time.  In the meantime, Cireson has a KB article that will get you more than halfway there: https://support.cireson.com/KnowledgeBase/View/1174#/

  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Answer ✓
    You want to use the properties named "Hardware Asset," not Deployed Computer.  You should then see the properties.

    Your powershell command is for the "Is Related to Configuration Item" relationship.  If you are using the UI, just choose the Hardware Asset class after selecting this relationship, and choose your property.

    If you are adding the relationship to a type projection, remember to cast the target of the relationship as a Hardware Asset.  This adds a dependency to the Cireson Asset Management MP in your MP, of course.

    For example, in your MP:
    <Component Path="$Context/Path[Relationship='WorkItem!System.WorkItemRelatesToConfigItem']$" TargetType="$MPElement[Name='REPLACETHISWITHYOURALIASTOASSTMGTMP!Cireson.AssetManagement.HardwareAsset']$" Alias="RelatedHwAssetCi" />
    You can use similar syntax in your notification body to address the property, but I do not think that will work if it isn't part of your type projection.
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Answer ✓
    Do you have a config item filter set in the portal?  You may have set this during install, but it can also be accessed from the Admin Settings.  ConfigItemClases is the name of the setting.  If the value is blank, then you have no filter set, and all Config Items can be seen in the portal.  If there is a filter present, then you will want to make sure that the HW asset class and all classes it inherits from, all the way up to ConfigItem are present in the filter.

    Otherwise, I would wonder if you have Asset Management properly licensed in the portal, etc., which someone from Cireson would have to weigh in on.

Answers

  • Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭
    Answer ✓
    I would suggest runbooking this (SCO/SMA) as an activity that happens near the end or at the end of that Service Request. Since a user is picking the Asset, you could map this to the RB or somewhere else and then within the runbook go fetch it from either some other activity or the parent work item. Said runbook would simply close with a "Send Email" activity about the parent SR, associated asset, etc.

    Then the automation is only invoked on-demand/per request.
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Answer ✓
    If you are not using the built-in e-mail notification functionality and/or do not like writing custom management packs, then I would take @Adam_Dzyacky's good advice and stop reading right now.

    However, if you use the built-in e-mail notifications, you can pick the asset's properties and add them to your email template right from the UI (or in the management pack, if your rules are too complex for the UI to show).  From the template properties:
    1. click Insert
    2. About Configuration Item (or "Is Related to Configuration Item" if that is where you added it in your RO)
    3. then Serial Number
    (repeat for Asset Tag)

    If you are still with me, this might be where you jump off.  To show the last logged on user, that is yet another relationship that is not part of the default type projection, so you would have to use a custom type projection to display it here.  That involves creating a type projection, replacing the default type projection in your email template (inside the management pack) and then either manually adding the variable to the body of your email or opening your template again in the UI after re-importing your modified management pack. 

    If that explanation did not deter you, then I can elaborate when I have some more time.  In the meantime, Cireson has a KB article that will get you more than halfway there: https://support.cireson.com/KnowledgeBase/View/1174#/

  • Cary_MyersCary_Myers Customer IT Monkey ✭
    I've created the email template and attached an object to both the Affected Configuration Items.  Confirmed the Serial # field is populated.  I can't figure out what class it's looking for to display the serial # in the email Template.

    I've selected the serial property under "About Configuration Item / Is related to Configuration Item and  used the properties named "Computer (Deployed) Serial Number", "Hardware Asset Serial Number".  Both are blank results.

    To ensure I was attaching the item I used smlets and displayed saw the configuration item listed under "Target Object" when i used the command {$_.relationshipid -eq 'd96c8b59-8554-6e77-0aa7-f51448868b43'} after bringing the SR number in as variable.

    What else can I do to troubleshoot why the fields are not showing up?  I've added a the object display name and it populated when I used the test template command.  

    Appreciate the assistance!
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Answer ✓
    You want to use the properties named "Hardware Asset," not Deployed Computer.  You should then see the properties.

    Your powershell command is for the "Is Related to Configuration Item" relationship.  If you are using the UI, just choose the Hardware Asset class after selecting this relationship, and choose your property.

    If you are adding the relationship to a type projection, remember to cast the target of the relationship as a Hardware Asset.  This adds a dependency to the Cireson Asset Management MP in your MP, of course.

    For example, in your MP:
    <Component Path="$Context/Path[Relationship='WorkItem!System.WorkItemRelatesToConfigItem']$" TargetType="$MPElement[Name='REPLACETHISWITHYOURALIASTOASSTMGTMP!Cireson.AssetManagement.HardwareAsset']$" Alias="RelatedHwAssetCi" />
    You can use similar syntax in your notification body to address the property, but I do not think that will work if it isn't part of your type projection.
  • Cary_MyersCary_Myers Customer IT Monkey ✭
    I used the the ps command to ensure the relationship existed. If there is a better was I appreciate any input.

    Added the class recommended and it worked, thanks for the assistance.  Once more question.  Hardware Assett is not listed under Related Items/Configuration Items in the Portal.  It it available in the SCSM MMC.  Analysts use both and the expectation is any customization or process is available from either interface.

    How can I expose the class in the portal? Thanks!
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    Answer ✓
    Do you have a config item filter set in the portal?  You may have set this during install, but it can also be accessed from the Admin Settings.  ConfigItemClases is the name of the setting.  If the value is blank, then you have no filter set, and all Config Items can be seen in the portal.  If there is a filter present, then you will want to make sure that the HW asset class and all classes it inherits from, all the way up to ConfigItem are present in the filter.

    Otherwise, I would wonder if you have Asset Management properly licensed in the portal, etc., which someone from Cireson would have to weigh in on.

  • Cary_MyersCary_Myers Customer IT Monkey ✭
    Figured it out so far.  Next will be custom projections.  Thank You to all who answered my questions!
Sign In or Register to comment.