Using cartJS API to order item is not working as expectedIssue <!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Symptoms Try to Order an item from custom cart orders but all items from default cart is being ordered Release London and below Cause This is a bug in the platform and it has been addressed in PRB1297366 Resolution The OOB order_now API (api/sn_sc/servicecatalog/items/{sys_id}/order_now) is designed for ordering only a single item For ordering multiple items, checkout(/api/sn_sc/servicecatalog/cart/checkout) or submit order (/api/sn_sc/servicecatalog/cart/submit_order) should be used. But currently, there is a bug in the platform which orders all the items from the portal cart instead of the custom cart, if we order multiple items using checkout or submit order and a PRB1297366 was created for this issue and the Problem is in testing state. So as a workaround, a custom web service can be created and can be used that in the apps outside of SN. WORKAROUND: 1. Please change the current application scope to "Service Catalog REST API" (the same scope where the OOB order_now scripted API is present) 2. Type "Scripted REST APIs" in the filter navigator and select the "Scripted REST APIs" under the "System Web Services" 3. Open the record with the name "Service Catalog API" 4. Under the "Resources" section (at the bottom), Open the record with the name "Buy Item" in a separate tab for reference. 5. Go back to the "Resources" section and click "new" 6. Give the following values for the fields: Name : <your desired name> (e.g) Custom Order now API Version: v1 HTTP Method: POST Relative path: /items/{sys_id}/<your desired name> (e.g) /items/{sys_id}/custom_order_now 7. Under the script section, paste the following code: (function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) { // implement resource here var request_body = request.body.nextEntry(); var quantity = '' + request_body.sysparm_quantity; var noValidation = (request_body.sysparm_no_validation == 'true'); var cartName = request_body.sysparm_cart_name; if (!/^\+?([0-9]*)$/.test(quantity)) throw new sn_ws_err.BadRequestError("Invalid Quantity value"); else request_body.sysparm_quantity = quantity; var itemId = '' + request.pathParams.sys_id; request_body.sysparm_id = itemId; var catItem = new sn_sc.CatItem(itemId); if (!catItem.canView()) throw new sn_ws_err.BadRequestError("Security constraints prevent ordering of Item"); if(!noValidation) { var catUtil = new RestCatalogUtil(); if (!catUtil.checkMandatoryVariables(itemId, request_body.variables)) throw new sn_ws_err.BadRequestError('Mandatory Variables are required'); } var cart; //If cartName is undefined then it will be falsy if(cartName){ cart = new sn_sc.CartJS(cartName); }else{ cart = new sn_sc.CartJS("cart_" +itemId); request_body.sysparm_cart_name = "cart_" +itemId; } try { return cart.orderNow(request_body); }catch(e) { gs.debug(e); throw new sn_ws_err.NotFoundError("Invalid Request"); } })(request, response); 8. Save the record. Now the custom scripted api can be found in the API list in the REST Explorer and it would order all the items from the custom cart. Please make sure that this object {"sysparm_quantity":"1","get_portal_messages":"true","sysparm_cart_name":"JJ1234"} be included in the Request body.