I am trying to create an automation workflow that checks if a particular product is in stock, and if it is to then proceed with the ticket. Does anyone know how I can query a service item asset type?
This is the field I am trying to reference and check if the asset_state=in stock.
Here is an example of the workflow:
I’m not sure if this is the best approach or I need to take a different approach. All help would be appreciated.
with this &filter="asset_state:%27IN%20STOCK%27%20AND%20asset_type_id:xxxxx you should get all that in stock.
Expression if(‘{{asset_id}}’ == ‘’, true.false) would give you if there are non left.
I guess you are doing something like that already. I don’t see any other way.
Thanks so much! I managed to get this working to some form of degree! haha.
Does anyone know how to reference product_name in the endpoint url? I can see it exists in the items.json but doesn’t exist in the web request for some reason…
Bellow is the .json which shows it’s available option:
But this does not show in the endpoint url output… Not sure if I am supposed to reference something else?
Not sure if you know or not… But let’s say I have 600 products and 400 results, and the API only allows 100 results per-page. Let’s say out of the 400 results I am looking for a product ‘HP ProBook 430 G8’ and it’s on page 2, but the more products I add that product I am after moves to page 3, page 5, page 6 over time. How am I supposed to dynamically look for something not dependent on the page number?
I can’t find this at all… it seems like the freshservice method is a static identification. (I am a few weeks new to this product, so apologies). Is API web-request the only way to do this? Or is there a more advanced method I should be using? I find it hard to believe that this product only ever limits 100 resasults in things when people may need more than that. So, it leads me to believe my approach my not be the correct way.
Don’t know why(I guess performance) the filter would give us just 100 but it’s how it’s built and I don’t see any other way. When they get loop function in the automation I hope we can use that to loop pages.
A workaround is to use Powershell to loop the assets but then you need a orchestrating server.