How to get the total levels of approval count for a particular catalog item?

RiteshSwarnakar
Giga Guru

Requirement:

In Service Portal, End users should be able to see how many levels of approval are still pending for the item to be fulfilled.

 

Scenario:

Suppose for a catalog item, there are total 3 levels of approval. Only after all the approval gets approved the SCTASK will be generated.

 

After the order is submitted, in Service Portal, End users should see

Pending Approval count: 3

 

After 1st level of approval is approved, End users should see

Pending Approval count: 2

 

After 2nd level of approval is approved, End users should see

Pending Approval count: 1

 

The counter should keep on decreasing. 

 

In below widget it should be visible:

RiteshSwarnakar_0-1671865266691.png

 

 

Any suggestions or alternate approach is greatly appreciated.

5 REPLIES 5

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
OOTB there is no such functionality but you need to develop such a function having some custom field on ritm table like approval count and calculate this using workflow.
to showcase this on portal, you can create a custom widget,

 

 

 


Thanks and Regards,

Saurabh Gupta

Hi Saurabh,

 

Thanks for your prompt response.

I have created custom field on ritm table (Approval count) but unable to create a function which can count total levels of approval from the workflow. 

Could you please suggest me which table to query from to get the total levels of approval?

 

Thanks in advance,

Ritesh

Hi,

 

Noamlly, Tlthese approvals are set from each workflows of catalog. You need to apply the logic in each workflow.

 

 


Thanks and Regards,

Saurabh Gupta

Hi,

 

The problem is there are more than 50 workflows and it is very difficult to modify each workflow to get this functionality. 

The required solution should be a generic one, which should fetch all approval level from each workflow.

 

Anyways thanks for your help..