Configuring HAM audit in the Agent mobile app (Scan versus Multi scan V2 function instances)

Claire Ashdown2
Tera Guru

It appears that audits in the Agent mobile app sometimes use the Scan function instance, which has a label on the Input form screen of just "Asset Tag", and sometimes use the Multi scan V2 function instance, which as a label on the Input form screen of "Asset tag/ Serial number/ Model barcode". I can see the script include (AssetAuditUtil) that the Scan function instance's Action item uses to perform the look up by asset tag, but I cannot tell how the inputs for the Multi scan V2 are being used to validate that serial number will truly be used successfully for lookup if provided. Also, it is unclear to me from digging in Mobile App Builder and through the product documentation (Single scan inventory audit • Australia IT Asset Management • Docs | ServiceNow and Multi scan inventory audit • Australia IT Asset Management • Docs | ServiceNow) what causes one form of scan to be used versus another. We like the idea of being able to scan by serial number, I just don't know how to predictably make it take serial number by displaying the Multi scan V2 function instance or how to validate that it works. Any tips or guidance would be greatly appreciated.

pr8172510
Kilo Sage

Hi @Claire Ashdown2,


 the difference is typically determined by the
Action Item configured in the mobile experience.


Scan

  • Uses the Scan function instance.
  • Primarily performs lookup using Asset Tag.
  • Calls methods in AssetAuditUtil for asset validation.

 

Multi Scan V2

  • Uses the Multi Scan V2 function instance.
  • Supports scanning multiple identifiers such as:
    • Asset Tag
    • Serial Number
    • Model Barcode
  • The lookup logic is handled by the mobile action configuration and associated scripts rather than only the label shown on the screen.

 

How to Verify What Is Being Used

Navigate to Mobile App Builder > Agent

 

Review the audit action items and check:

  • Function Instance
  • Action Assignment
  • Input Parameters
  • Script Includes referenced by the action

 

Validate Serial Number Lookup

The easiest method is:

  1. Select an asset with a known serial number.
  2. Start an audit from Agent Mobile.
  3. Use the action configured with Multi Scan V2.
  4. Scan or enter the serial number.
  5. Confirm that the correct asset record is returned.

Why One Audit Uses Scan and Another Uses Multi Scan V2

 

This is usually driven by the mobile configuration delivered by the HAM application version installed in your instance. Different audit actions may reference different function instances.

 

Recommendation

Check the Action Item records associated with:

  • Single Scan Inventory Audit
  • Multi Scan Inventory Audit

and compare their function instance configuration. This will show exactly which function instance is being invoked and what lookup behavior is configured.

Hello, and thanks for the reply! I got some help from mobile expert on my team, and it turns out you were close but not quite there. The condition is actually on the Function record, not the Action item record. Multi scan V2 doesn't have an Action item record. The Multi scan V2 function instance record has a condition on it that includes "Scan method is Single scan". And the Asset Scan function instance has a condition on it that includes "Scan method is Multi scan". So the multi scan function instance is only used when you create an audit with a scan method of single scan (and this is the function instance that handle serial number), and the asset scan function instance is only used when you create an audit with a scan method of multi scan (and this is the function instance that only takes asset tag).

 

The naming makes me wonder if these got connected backwards, but it's out-of-box, so I'll run with it.

View solution in original post