Scripted REST being consumed but data not populatedIssue The customer has created which will process the inbound API and use the Cart API to create a REQ along with corresponding RITM records. But for a few Requests, they have 2 RITMs created to them. In the 2 RITMs, one RITM has all the values and the other RITM do not have any details. CauseThe issue is coming due to code in a script include where the cart is getting created with a default Cart Name using the below code. The default Cart name is the Name of a defined cart for the user who is currently logged in. [code]<pre><code>var cart = new sn_sc.CartJS();<br/></code></pre>[/code]Due to the default cart name, in case of concurrent request execution, multiple items are getting added to the same cart and that's why they are observing two RITMs for one Request/Order.As two RITMs are getting generated, for one RITM, it will attach the document but for another RITM, it never runs the attachment write code.ResolutionTo resolve the issue, please assign a unique Cart Name to each cart which is getting created.Below is the sample code from OOTB: [code]<pre><code>var cartName = "cart_" + gs.generateGUID() + "_" + itemId;<br/>var cart = new sn_sc.CartJS(cartName);<br/>request_body.sysparm_cart_name = cartName;<br/></code></pre>[/code] Please test and validate the following solution on a sub-prod instance to ensure that everything is working as expected before making any changes to your production instance. The below community article also explains the same and the proposed solution is also similar. https://www.servicenow.com/community/itsm-articles/duplicate-ritms-are-created-while-creating-the-request-using/ta-p/2306267 Our Product Owners also suggested that users in other cases to not use cartNames starting with 'cart_' or ones containing itemId. Rather, something like gs.generateGUID() for cartName is advised.