Catalog Builder Review Flow - Get Draft Item Active State in Flow

brian_
Tera Guru

I am building a custom review flow for Catalog Builder. The OOTB flow "Catalog Builder - Item review base flow" will call whatever flow's sys_id is in the "glide.sc.builder.item_review_flow " system property. When it executes your custom flow, it passes a sys_id of your draft sc_cat_item record to the "catalog_item" input property.

 

The problem is, that draft item's Active flag is always set to false. This is even documented in the docs site (in the Note section explaining the Draft state).

 

That parent OOTB flow has 2 inputs: the Draft Catalog Item, and Properties - a JSON object. That JSON object also contains other information, such as the Published Item's ID (which can also be found on the draft item's sc_cat_item record, so not of concern) as well as the state of the active flag when published. But the Properties are not passed into the custom flow.

 

My business case needs to know if this item will be active or removed from the catalog, and the information should be presented to the approvers. The OOTB flow "Catalog Builder - Item review base flow" is protected and cannot be edited, otherwise I would just pass Properties over to my custom flow. And I cannot find a way, from my custom flow, to access any information from it's Calling Source (the parent flow executing it).

 

The only thing I can possibly think of is going a step higher in the chain of events, and modifying the Scripted REST API "Submit a Record Producer" that is called by Catalog Builder and kicks off that flow. It doesn't appear to be protected, which would allow for a modification, but I would prefer to not modify that if at all possible.

1 ACCEPTED SOLUTION

I did end up having to modify the scripted REST API "Submit a Record Producer". I created a new true/false field on the sc_cat_item to store the proposed active state. Then I used that field in my custom flow to determine what the state will be after publishing.

View solution in original post

3 REPLIES 3

Harihara Subram
Tera Contributor

Hi Brian,

 

Did you get an answer for this. I too have the same use case and unable to proceed further.

 

Thanks,

Hari

I did end up having to modify the scripted REST API "Submit a Record Producer". I created a new true/false field on the sc_cat_item to store the proposed active state. Then I used that field in my custom flow to determine what the state will be after publishing.

fauverism
Kilo Sage
Kilo Sage
If you are having trouble making a draft item active in ServiceNow, you can try the following steps:
  1. Go to Maintain Items > Catalog Item
  2. Click Cancel checkout on the catalog item
  3. Edit the catalog item in catalog builder
  4. Review and submit 
     
Once the item is submitted, the draft item's edits are merged with the published item, and the draft item is deleted. 
 
A record producer is a catalog item that is used to create a record in a table. To publish a catalog item in ServiceNow, you can:
  1. Go to All > Item Designer > Administration > All Items
  2. Open the item record
  3. Click Publish 
     
You need to republish an item every time you make changes to it
Robert Fauver
robert_fauver@cable.comcast.com or robertfauver@gmail.com