How to check inventory from catalog request.

MayurGavhane
Tera Contributor

Hi all, After a catalogue request is made for a specific item of hardware, how do we determine whether it is in stock? The task should be generated appropriately: if there is no stock, a procurement task should be generated; if there is stock, a fulfilment stock task should be generated. 

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

If you're using a Workflow for this Catalog Item, use an If activity with a script that results in Yes or No, then the next activity on each path will be the appropriate Catalog Task.  Depending on how you have CIs and/or Assets designated as 'in stock', the script would do a GlideRecord on the alm_hardware table, using the model or whatever identifier you've collected in a variable (use the syntax current.variables.variable_name) searching for a record with the stockroom field populated, or with the install_status of 6 (in stock)...