Scripted API - RITM creation

biasto
Tera Contributor

Hello, 

 

I have a working scripted rest api that will allow to create a RITM and just after add MRVS to that RITM. 
Everything works... BUT only if the user has admin role, I've tried multiple permissions without success (contract_manager, catalog_*)

without admin role, it fails with the confusing error message: {"result":{"status":"error","message":"Your cart has item(s) no longer available. Please remove New Company from cart to continue with the checkout."}}

But I verified and cleaned the cart (sc_cart) each time before doing the call.

Anybody has an idea how to solve that issue?

BR
Tobias

1 ACCEPTED SOLUTION

Tanushree Maiti
Tera Patron

Hi @biasto 

 

1. Ensure your non-admin user profile belongs to the correct department or fulfills the User Criteria required to access/order the catalog item.

 

2. In the user criteria, there is companies,  ensure your non-admin user fulfill that criteria

 

Sample screen shot

TanushreeMaiti_0-1780306888509.png

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

View solution in original post

3 REPLIES 3

Tanushree Maiti
Tera Patron

Hi @biasto 

 

1. Ensure your non-admin user profile belongs to the correct department or fulfills the User Criteria required to access/order the catalog item.

 

2. In the user criteria, there is companies,  ensure your non-admin user fulfill that criteria

 

Sample screen shot

TanushreeMaiti_0-1780306888509.png

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

OMG, that was so simple. Thanks a lot for your help, that was it: I read about user criteria, but didn't find it until I read about the 'available for' related lists. Adding the needed User criteria solved my issue !
Thanks again!

Ankur Bawiskar
Tera Patron

@biasto 

Does your catalog item have any user criteria associated to it?

If yes then check "Available For" related list

Does your API user satisfy that user criteria?

Share screenshots of your catalog item?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader