OOB Controls for Order Guide on Cart?

kristenankeny
Tera Guru

We have two scenarios for approvals in our catalog:

Request level

Requested item level

Request level will only be used for certain order guides. To control this, we have created a custom field "workflow" on the order guide. Then on the forms, we have a hidden field called "workflow". If we find that the user is using an order guide (determined by looking up their cart in sc_cart and checking the order guide field), then we look to that order guide to determine if approvals should be done at the request level and, if so, which approvals. I use this value in the workflow to detemine which path I follow. We are running into an issue however. Firstly, we've seen some people with multiple carts in the sc_cart table. Second, I've seen a scenario where I used an order guide to request an item, then opened a regular catalog item, it still showed I was using the order guide (my cart entry in sc_cart still showed the order guide even though it had been submitted). What is the best way to resolve this?

1 ACCEPTED SOLUTION

kristenankeny
Tera Guru

I was able to fix this issue. ServiceNow was able to provide me with more details about the cart functionality in Helsinki:



  • A unique cart is created when a user uses a two step order guide, so only the requested items related to the order guide are triggered upon submission.
  • The order guide is not cleared from the default cart.
  • They suggest clearing out the carts on a regular basis (we have not solved for this and will tackle in a later development phase).


I also had run across something online mentioning that there is a new "Order Guide" field on requested items now. In order to get my requests to follow the right approval process:



  • The order guide has a custom "workflow" field that I set with our typical approval flows (manager, onboarding, manager and hr, etc) and then "Requested item" to capture when we are using the order guide as an easy way to selected catalog forms but where the approvals will all happen on the requested item level.
  • Upon submission, my REQUEST workflow checks the "Order Guide" field on the Requested Item. If a value is found, I look to check the "workflow" field on the order guide.
  • If the order guide "workflow" is set to requested item OR no order guide is found, then I mark the request as approved and move to the requested item workflows.
  • If the order guide "workflow" is set to approvals at the request level, I follow the appropriate approval path in the request.
  • Once approved, the request is marked approved and the requested item workflows start.
  • For some requested items included in some order guides, there is an additional approval needed for that requested item (for example, the order guide only goes through manager approval, but one requested item also needs a group approval). I updated the requested item workflows to check the order guide field, then look to the order guide's workflow field to determine if I should skip any or all approvals at the requested item level.


Hopefully this is helpful to someone else. We are trying to avoid hard coding our workflows as much as possible and to put controls at the data level so when process changes, it is a simpler change. This is why we created the "workflow" field on Order Guides. We also created some controls for requested item workflows on the catalog items, such as tracking the group to which approval should be assigned and flags for exeptions to certain approval rules. So far the flexibility has made setting up workflows for the 175 forms in our catalog rather quick in most cases.


View solution in original post

1 REPLY 1

kristenankeny
Tera Guru

I was able to fix this issue. ServiceNow was able to provide me with more details about the cart functionality in Helsinki:



  • A unique cart is created when a user uses a two step order guide, so only the requested items related to the order guide are triggered upon submission.
  • The order guide is not cleared from the default cart.
  • They suggest clearing out the carts on a regular basis (we have not solved for this and will tackle in a later development phase).


I also had run across something online mentioning that there is a new "Order Guide" field on requested items now. In order to get my requests to follow the right approval process:



  • The order guide has a custom "workflow" field that I set with our typical approval flows (manager, onboarding, manager and hr, etc) and then "Requested item" to capture when we are using the order guide as an easy way to selected catalog forms but where the approvals will all happen on the requested item level.
  • Upon submission, my REQUEST workflow checks the "Order Guide" field on the Requested Item. If a value is found, I look to check the "workflow" field on the order guide.
  • If the order guide "workflow" is set to requested item OR no order guide is found, then I mark the request as approved and move to the requested item workflows.
  • If the order guide "workflow" is set to approvals at the request level, I follow the appropriate approval path in the request.
  • Once approved, the request is marked approved and the requested item workflows start.
  • For some requested items included in some order guides, there is an additional approval needed for that requested item (for example, the order guide only goes through manager approval, but one requested item also needs a group approval). I updated the requested item workflows to check the order guide field, then look to the order guide's workflow field to determine if I should skip any or all approvals at the requested item level.


Hopefully this is helpful to someone else. We are trying to avoid hard coding our workflows as much as possible and to put controls at the data level so when process changes, it is a simpler change. This is why we created the "workflow" field on Order Guides. We also created some controls for requested item workflows on the catalog items, such as tracking the group to which approval should be assigned and flags for exeptions to certain approval rules. So far the flexibility has made setting up workflows for the 175 forms in our catalog rather quick in most cases.