How to avoid consumables from merging while creating assets in stockroom

Asmita7
Tera Expert

Hello Friends,

 

I am onboarding consumables in bulk. I am facing an issue :

I am using a transform map to upload consumables to alm_asset table. This data includes PO number and PO Line Item number. The scenario is :

1. I have one PO : PO258

2. This PO has PO Line Item POL101  with "HP Backpack"

3. This PO has one more PO Line Item POL102  with "HP Backpack"

In both the PO Line Items, the consumable model is same.

When the record is created in alm_asset table, due to some OOTB functionality, it is creating only 1 consumable record with quantity 2.

My requirement is that it should create separate consumable record for each PO Line Item Number irrespective of model.

Please suggest.  

 

5 REPLIES 5

Community Alums
Not applicable

HI @Asmita7 ,

Consumables are assets that are not tracked individually, but as a group of the same model.

The group of consumables has one or more of the following traits.
  • Same location
  • Same state
  • Consumed by the same asset, typically as accessories or parts

Some common consumable assets include mouse devices, computer keyboards, and pencils. The base ServiceNow system includes the Consumable model category. The first step in working with models is to create a model within the model category for an individual consumable asset. Items such as monitors, keyboards, and mouse devices are often tracked as consumables. Consumables cannot be pre-allocated.

Consumable assets are stored in the Consumable [alm_consumable] table. Consumables follow a slightly different life cycle from other assets.

 

AJ-TechTrek
Giga Sage
Giga Sage

Hi @Asmita7 ,

 

Consumables are not tracked by serial number so when you add consumable assets to an stockroom where inventory already exists the quantity will increase.

 

This is OOB behaviour , we only able to increase the count of consumables

 

Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.

 

Thanks

AJ

Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/

ServiceNow Community Rising Star 2024

Ashok Sasidhara
Tera Sage
Tera Sage

Consumables are supposed to be tracked in bulk. If you have a need to track it individually, you should track it as an asset and not as a consumable. You should discuss this point with your asset management stakeholders and finalize a decision accordingly. 

Also the table to be used for consumables is alm_consumable. For any consumable which you are loading manually, use alm_consumable as the target table and use model category=consumable.

Deepak Shaerma
Kilo Sage

Hi @Asmita7 

To address your requirement of creating separate consumable records for each PO Line Item Number in ServiceNow, despite the consumables having the same model, you’ll have to customize the behavior of your transform map or the import process to ensure that each line item from your purchase order creates a unique record in the alm_asset table. The out-of-the-box (OOTB) behavior might aggregate these items based on matching models to streamline assets inventory, hence resulting in a single record with updated quantity.

Here are steps and suggestions to achieve the desired behavior:

### 1. Customize Transform Map
Unique Keys: Make sure your transform map is configured to treat each PO Line Item as a unique record. This involves adjusting the transform map’s field mappings and coalesce settings. Coalesce fields are used to determine uniqueness. Instead of coalescing solely on the consumable model, include the PO Line Item Number in your coalesce criteria.

For example, if you’re currently using just the model as a coalesce field, you can add the PO Line Number (assuming you have a field for it in your alm_asset table or a related table where this would make logical sense) as part of the coalesce keys. This way, each PO Line Item would be considered unique.

Scripting in Transform Map: If the default field mappings and settings are not enough to achieve your aim, utilize the onBefore or onAfter scripts within the transform map to enforce creation of separate records. You can write a script to check if an asset with the exact model and PO Line Item Number already exists. If it doesn’t, proceed with the creation; if it does, adjust your logic to ensure uniqueness (this might involve creating or modifying a field that can ensure uniqueness or changing how you’re coalescing records).

### 2. Review Data Model
- Assess if your data model supports your requirement. You might need to ensure there are enough fields in the alm_asset table to capture the uniqueness of each consumable item based on your criteria (e.g., PO Number, PO Line Item Number, and Model). If not, consider extending the table with custom fields.

### 3. Import Sets and Transform Maps
- When importing data, especially in bulk for items that are very similar but need to be distinct records, double-check your import set and transform map configurations. Adjusting these can often solve issues with data not being imported as expected.

Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help us a lot.
Thanks & Regards 
Deepak Sharma