Jump to content

LifeOfJonny

Hornbill Users
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by LifeOfJonny

  1. Afternoon,

    I'm currently writing a powershell script to sync data from our asset database (Custom MSSQL DB) in to Hornbill. I can create the devices fine but I get the following error trying to update, even if you updating it with the same data. Its talking about acqMethod but not sure where its getting that for or what field where its not getting a integer, as I compared it to the API xmlmc and any field types that are integer are integers in the object.

    The version number does get incremented when trying to update. As I get the device from the API up the number and set it in the object.

     

    Error and code below

    FlowCode Exception (com.hornbill.servicemanager/entities/AssetsComputer/fc_ops/updateAssetComputer): nodeName: Invoke Flowcode: Update Asset; nodeId: b3817dd0-4812-4a98-9815-8b04e08bffd2; At 162/1: "Uncaught EspMethodCall::invoke: Operation[apps/com.hornbill.servicemanager/Asset::updateAsset] FlowCode Exception (com.hornbill.servicemanager/entities/Asset/fc_ops/updateAsset): Input parameter validation error: Non-digit characters found in the element <acqMethod>, the expected data type is 'integer'. The value was [undefined] at location '/methodCall/params/acqMethod'"
            throw(e);

     

    Data object for updating

    serialNumber : 0123123123
    type         : 18
    version      : 2
    os           : Windows
    osVersion    : 10.0.18363.900
    ownerName    : LifeOfJonny
    ownerId      : LifeOfJonny@LifeOfJonny.uk
    name         : WCC-XqaVwFt0Keh - 0123123123
    model        : Surface Pro 6
    manufacturer : Microsoft Corporation
    assetId      : 8

     

    Create code

    Function CreateComputer {
        param ([Parameter(Mandatory=$true)]$deviceObject)
        $deviceCreated = $false
        # Build XMLMC API call    
        # params have to be in the expected order.
        Clear-Params
        Add-Param       "name" $deviceObject.name
        if ($deviceObject.ownerId -ne "")
        {
            Add-Param   "ownedById" $deviceObject.ownerId
            Add-Param   "ownedByName" $deviceObject.ownerName
            Add-Param   "ownedByType" "0"
        }
        
        Add-Param       "type" $deviceObject.type
        Add-Param       "version" $deviceObject.version
        Add-Param       "manufacturer" $deviceObject.manufacturer
        Add-Param       "model" $deviceObject.model
        Add-Param       "osType" $deviceObject.os
        Add-Param       "osVersion" $deviceObject.osVersion
        Add-Param       "serialNumber" $deviceObject.serialNumber
    
        # Invoke XMLMC call, output returned as PSObject
        $xmlmcOutput = Invoke-XMLMC "apps/com.hornbill.servicemanager/AssetsComputer" "addAssetComputer"
    
        # Read output status
        if($xmlmcOutput.status -eq "ok") {
            # Data return is correct
            $deviceCreated = $true
        } else {
            # API call status not OK - return status and error to console
            "API Call Status : " + $xmlmcOutput.status
            "Error Returned  : " + $xmlmcOutput.error
        }
        return $deviceCreated
    }

     

    Update Code

    Function UpdateComputer {
        param ([Parameter(Mandatory=$true)]$deviceObject)
        $deviceUpdated = $false
        $deviceObject
        # Build XMLMC API call    
        # params have to be in the expected order.
        Clear-Params
        Add-Param       "assetId" $deviceObject.assetId
        Add-Param       "name" $deviceObject.name
        if ($deviceObject.ownerId -ne "")
        {
            Add-Param   "ownedById" $deviceObject.ownerId
            Add-Param   "ownedByName" $deviceObject.ownerName
            Add-Param   "ownedByType" "0"
        }
        
        Add-Param       "type" $deviceObject.type
        Add-Param       "version" $deviceObject.version
        Add-Param       "manufacturer" $deviceObject.manufacturer
        Add-Param       "model" $deviceObject.model
        Add-Param       "osType" $deviceObject.os
        Add-Param       "osVersion" $deviceObject.osVersion
        Add-Param       "serialNumber" $deviceObject.serialNumber
    
        # Invoke XMLMC call, output returned as PSObject
        $xmlmcOutput = Invoke-XMLMC "apps/com.hornbill.servicemanager/AssetsComputer" "updateAssetComputer"
    
        # Read output status
        if($xmlmcOutput.status -eq "ok") {
            # Data return is correct
            $deviceUpdated = $true
        } else {
            # API call status not OK - return status and error to console
            "API Call Status : " + $xmlmcOutput.status
            "Error Returned  : " + $xmlmcOutput.error
        }
        return $deviceUpdated
    }

     

    Many Help would be most appreciated.

  2. Afternoon,

    I was using the database direct. I can't save or load Saved Queries (Manage Query's). Looking at the networking tab of Chrome I can see the web requests are getting 404. I have taken a screenshot the two requested URLs and the status code.

    Trying to save a simple select query
    image.png.6324a00dc1030f0eba65c6d9e1934606.png


    Trying to open the list of queries
    image.png.06e1fcd677f3954a51668eb8c133ad3a.png

     

    Many Thanks
    Jonny

  3. Hi @Yodit,

    The idea was to populate it and then when Hornbill allows it to be shown in different parts of the application it would already be populated for use. We wasn't going to use it in any BPM processes. The only thing we might use it for is a SQL query to check if the user has already got a hornbill user count by checking the employee ID.

    User Import will be taking place next week or week after.

    Jonny

  4. 4 minutes ago, Yodit said:

    Hi @LifeOfJonny, the EmployeeID is a new field that has been introduced recently by the Development Team. It is not available in the Admin tool yet, as the Team need to ensure all relevant API's have been extended, but we will provide confirmation once this has been updated. 

    Thanks for the update,

    As its available to me in the API currently, and I'll soon be doing a big user import, should I populate while I'm at it or not bother?

  5. Hi @Victor,

    We set these 3 settings regarding the mailbox, notifications started working nicely,  expect the mailbox prefix didn't work and it used the default address of the mailbox. I have added extra address of hornbillnotification to the selected mailbox then used that as the prefix but no dice.

    We have different departments sharing the hornbill instance. So we would like to use generic from name like "companyshortname Hornbill". Do we need to have a generic mailbox setup for this sort of thing?

    Jonny

  6. 1 minute ago, Victor said:

    Yes.

    Expanding on this a bit, there isn't any setting for this display name when using emailprefix@emailDomain method. The display name will be whatever the recipient decides to have it as...

    Let me discuss changing these settings with my company and I'll report back if that fixes our problem :-) 

    • Like 1
  7. 2 minutes ago, Victor said:

    Yes, it needs to be set to a mailbox which exists. This is specified on the wiki:

    It is necessary to specify the ID of the Hornbill Shared Mailbox (e.g. helpdesk) from which the notifications will originate.

    Notifications for customer updates via portal are using emailDomain and emailPrefix settings. This is also specified in the note in the same section on the wiki:

    Email notifications for users on customer/service portal updates and approval emails are sent using a direct method, they do not use any mailbox. The originating email address for these emails is guest.app.requests.notification.emailPrefix@guest.app.requests.notification.emailDomain meaning the resulting email address must be correct and valid.

    It is also mentioned in this note that: All other notifications are sent via the mailbox using the one configured on guest.app.requests.notification.emailMailbox which refers to the first point above.

    Ah that makes sense, I think I miss understood abit of that wiki page.

    When setting guest.app.requests.notification.emailPrefix, is there a way to change the display name of the email that you get? Or will it just who what ever the Mailbox name is? As we have different departments using Hornbill, so would be nice to use a generic Display name in the email, as currently all our mailboxes are department specific names. Oh course I can add noreply to one of them but displayname would say the mailbox name right?

    Thanks for such a fast responce
    Jonny

    • Like 1
  8. Hi Victor,

    guest.app.requests.notification.emailMailbox is set to helpdesk, which doesn't exist. So this needs setting to a mailbox which exists? I wasn't sure this was a requirement or not due to the fact emails for customer request updates via portal and email are coming through to my personal email.

    Email Template does exist, first thing I checked.

    image.png.382308dbf7487ee3b9355a05a736ffde.png

  9. Hi Hornbill,

    I've turned on "Assignment (Owner Notification)" and "Assignment (Team Notification)" for both Hornbill and Email notification in my user profile settings, yet when another analyst assigns me a request either to the team or directly, I don't get an email about this. The system notification works but not email.
    I also turned on "Portal Update" and those emails do come through when a customer updates a ticket via the portal.

    Am I missing something here?

    I've checked the Wiki page but looks like everything is ok https://wiki.hornbill.com/index.php/Service_Manager_Notification_Settings
    We do have "guest.app.requests.notification.allowUserDefinedNotificationType" turned on, to allow analysts to set the notification type they want.

    Many Thanks
    Jonny

  10. Hi Hornbill,

    Is there a reason the EmployeeId field is hidden expect when you using the SOAP API? Would be good field to show in the admin portal instead of using a custom attribute to store HR Employee Id. This would save having to use a custom attribute.

    Thoughts?

    Jonny

    • Like 1
  11. Hey,

    If we could exchange the userid in brackets to email address that would do the trick for us. B) or even show firstname and lastname like Jon said.

    Glad to hear you can turn off the uniqueness of the Handle, as that's now half way to solving our problem, just need to solve the searching for co-worker issue, so if they change the handle, we can still easily findout which Jeffery they are so to speak.

    Jonny

  12. Hi James,

    We're trying to automate the creation of our users in Hornbill, so I'm trying to make sure all the unique fields don't come across duplicates. We're going to use Prefix'd randomly generated ID for the userid which will help us when user's change their surname, or have their domain changed.
    If making the handle long will cause UI issues, then we'll have to stick too just putting the email address in there. The idea of the example format is it shows up nicely when you search for a co worker when creating a request. Otherwise it just shows up as "JDoe@MyLongDomain.co.uk (RANDOMIDHERE).... Job title". Would be nice if it showed thier firstname and last name as well you see.

    We won't have 2 people with the same email address but we may have say two John Smith's so automating the creation of a second John Smith where "Firstname Lastname" format is used for handle would cause the creation to fail. We'll have to keep the handle as just the email then.

    If we could change how the co-worker details are shown on the user selection popup when searching a co-worker that would be just as good. As showing the userid isn't going to much use for us when its a random ID it shows.

    Note: We're creating our own Powershell scripts to automate the creation/update process.

     

    Jonny

  13. Hi Hornbill,

    Would it be possible to extend the handle field length to say 255 characters from the 64 character limit. We'd like to use the following format as our default handle if possible currently 64 characters is too short, to proceed with doing this. This way it will contain all the information we need, when we search for a co-worker. I noticed the Job Title can be very long so why not the handle.

    Example: John Doe - JDoe@MyLongDomain.co.uk

    Note: Our UserID isn't an email address it's a unique generated value.

    Many Thanks
    Jonny

×
×
  • Create New...