Asset Acknowledgement Confirmation Using a Custom Widget

Asset Acknowledgement Confirmation Using a Custom Widget

Requirement

To maintain an accurate asset inventory, the system must differentiate between:

  • assets assigned to a user in the database, and

  • assets that are physically in the user’s possession.

To achieve this, users must be provided with an interface where they can view their assigned hardware and digitally acknowledge ownership by confirming or rejecting possession.

Solution Overview

The implementation introduces a user acknowledgement workflow using a custom module, automated synchronization, and a dashboard widget.

Implementation Logic

1. Custom Data Repository

A Custom Module acts as the single source of truth, storing:

  • Asset Name

  • Serial Number

  • Service Tag

  • Model details

  • Associated user email

  • User acknowledgement status


2. Automated Synchronization

A scheduled background process:

  • identifies assets assigned to users

  • populates the custom module automatically

  • keeps asset data continuously updated


3. Contextual Visibility

An external HTML widget is embedded within the user dashboard. The widget:

  • detects the logged-in user

  • filters and displays only assets assigned to that user


4. Direct Validation

Users can respond directly through the widget by selecting:

  • Yes – Asset confirmed

  • No – Asset rejected

The response updates the custom module in real time, completing the validation cycle between system records and physical possession.


Custom Module Creation

Create a Custom Module with the required asset fields.


Field Configuration

Create the following fields with the response set as a picklist and the default value as “Yet to Respond.” The other available options should be “Yes” and “No.” All remaining fields should be single-line text fields.












Create the module as mentioned above and publish it, so that data can be populated in this module using a combination of Query and Custom Schedule functions.

Asset Identification Query

For Builds After 15200

Use the following query to retrieve assets assigned to users:

select MAX(AaaContactInfo.EMAILID) as "Email",
MAX(aaaUser.FIRST_NAME) as "Asset Owner",
MAX(workstation.WORKSTATIONNAME) as "Asset Name",
MAX(workstation.SERVICETAG) as "Service Tag",
MAX(resource.SERIALNO) as "Org Serial Number",
MAX(workstation.MODEL) as "Model",
MAX(productType.COMPONENTTYPENAME) as "Product Type"
from SystemInfo workstation
left join Resources resource on workstation.WORKSTATIONID = resource.RESOURCEID
left join ComponentDefinition product on resource.COMPONENTID = product.COMPONENTID
left join ComponentType productType on product.COMPONENTTYPEID = productType.COMPONENTTYPEID
left join ResourceOwner rOwner on resource.RESOURCEID = rOwner.RESOURCEID
left join ResourceAssociation rToAsset on rOwner.RESOURCEOWNERID = rToAsset.RESOURCEOWNERID
left join SDUser sdUser on rOwner.USERID = sdUser.USERID
left join AaaUser aaaUser on sdUser.USERID = aaaUser.USER_ID
left join AaaUserContactInfo on aaaUser.USER_ID = AaaUserContactInfo.USER_ID
left join AaaContactInfo on AaaUserContactInfo.CONTACTINFO_ID = AaaContactInfo.CONTACTINFO_ID
where aaaUser.USER_ID is not null
and (workstation.workstationname, aaauser.first_name)
not in (
select asset_name, user_name
from cmasset_acceptance
)
group by workstation.WORKSTATIONID;

Note: Modify field names according to your instance configuration.


Builds Before 15200 – Column Mapping Identification

  1. Generate Column Alias Report:
    1. Run the following query to retrieve the column alias details:
    2. select * from columnaliases;
    3. This report will help identify the table name and column names created for the custom module fields.
  2. Locate Asset and User Columns
    1. From the columnaliases report, identify the columns corresponding to:
      1. Asset Name
      2. User Name
  1. Example:
    1. The table name appears as cm_asset_acceptance.
    2. The column mapped to Asset Name may appear as udf_char1.
    3. The column mapped to User Name may appear as udf_char2 or udf_char3.
    4. Note: The exact column names may vary between environments.  Always confirm the values from the generated report.
  1. Update the Asset Acknowledgement Query

    1. select MAX(AaaContactInfo.EMAILID) as "Email",
      MAX(aaaUser.FIRST_NAME) as "Asset Owner",
      MAX(workstation.WORKSTATIONNAME) as "Asset Name",
      MAX(workstation.SERVICETAG) as "Service Tag",
      MAX(resource.SERIALNO) as "Org Serial Number",
      MAX(workstation.MODEL) as "Model",
      MAX(productType.COMPONENTTYPENAME) as "Product Type"
      from SystemInfo workstation
      left join Resources resource on workstation.WORKSTATIONID = resource.RESOURCEID
      left join ComponentDefinition product on resource.COMPONENTID = product.COMPONENTID
      left join ComponentType productType on product.COMPONENTTYPEID = productType.COMPONENTTYPEID
      left join ResourceOwner rOwner on resource.RESOURCEID = rOwner.RESOURCEID
      left join ResourceAssociation rToAsset on rOwner.RESOURCEOWNERID = rToAsset.RESOURCEOWNERID
      left join SDUser sdUser on rOwner.USERID = sdUser.USERID
      left join AaaUser aaaUser on sdUser.USERID = aaaUser.USER_ID
      left join AaaUserContactInfo on aaaUser.USER_ID = AaaUserContactInfo.USER_ID
      left join AaaContactInfo on AaaUserContactInfo.CONTACTINFO_ID = AaaContactInfo.CONTACTINFO_ID
      where aaaUser.USER_ID is not null
      and (workstation.workstationname, aaauser.first_name)
      not in (
      select udf_char2, udf_char3
      from cm_asset_acceptance
      )
      group by workstation.WORKSTATIONID;
  2. Modify Query Parameters
    1. Before execution, update the following values based on the columnaliases report:
    2. Replace cm_asset_acceptance with the table name identified in the report.
    3. Replace udf_char2 with the column mapped to Asset Name.
    4. Replace udf_char3 with the column mapped to User Name.

Configure Custom Schedule Function

  1. Navigate to: Admin → Custom Schedule Functions → New

  1. Copy content from: addAssetAcceptanceEntry_CSF.txt

  2. Update the report name inside the script.

  1. Save the function.

  2. Create a schedule to run daily.

  3. Pass the Query Report as a parameter.


Configure Callback Custom Function

  1. Navigate to: Admin → Callback Custom Functions → New

  1. Paste content from: CBF_fetchAssets.txt


  1. Publish the function.

  2. Copy the generated Callback URL.

This URL will be used inside the dashboard widget.


Dashboard Widget Configuration

  1. Open Asset_Acknowledgement.html.

  2. Update the following variable: callbackURL

  1. Paste the copied Callback Custom Function URL.

  2. Configure this HTML file as an External Dashboard Widget.



Result

Once configured:

  • Users see only their assigned assets list in the widget.

  • Users confirm or reject asset possession.

  • Responses update the Custom Module instantly.

  • IT inventory reflects real-world asset ownership accurately.


                  New to ADSelfService Plus?

                    • Related Articles

                    • LanSweeper Custom Widget

                      Overview The Lansweeper custom widget integrates Lansweeper asset discovery directly into the request details page of ServiceDesk Plus. This enables technicians to search, view, and associate assets from Lansweeper with a specific request, while ...
                    • Asset Module Custom Functions

                      Sample Scripts for custom schedule. Steps to configure: 1. Copy the respective query and save the query report with a name. 2. Update the query report name in the custom schedule function script. 3. Configure a custom schedule with the custom ...
                    • Script to add worklog using custom schedule

                      What is a Custom Schedule? Custom Schedules are actions scheduled on a specific date and time with or without repeat frequency. The actions are specified in a customized script file. Any data from ServiceDesk Plus can be sent to the script through ...
                    • How to update Request Additional fields during request create/update using Custom Triggers (V3)

                      This is a sample python script to update the Request Additional Field Values during request create/update based on certain criteria using Custom Trigger Execution Steps:  1. Download the attached zip 2. Move the files to ...
                    • Hide Asset

                      Use case If Technicians want to hide Asset field during template loading, then the same can be achieved using Execute Script option in Field and Form Rules. Solution Edit the incident/service template from which the asset needs to be hidden, choose ...