Can you have two catalog items created at different time link to the one parent request?

Moedeb
Tera Guru

As the title says what I want to do if possible, is have an initial request that is raised from a catalog item, have some work done in that, but then have a secondary catalog item that can be raised under certain circumstances that is raised and added as a new ritm under the original request ticket.

 

They would both be raised whilst the first request was still open however.

 

Is that possible? If so how would I go about it?

 

As I stated though, they would not be created at the same time, so an order guild or bundle wouldn't work.

1 ACCEPTED SOLUTION

Moedeb
Tera Guru

This has been achieved using a flow update record and delete record method.

Issues with Flow update and delete record actions

View solution in original post

7 REPLIES 7

You can do some POC first.

Create a simple catalog item with some field values. 

and create a script code for submitting this request.

 

Example : A simple catalog itemwith 3 variable ram,os and storage.

 

 

// Generate a unique ID for the cart
  var cartId = GlideGuid.generate(null);
  
  // Create a new cart instance
  var cart = new Cart(cartId);
  
  // Add an item to the cart (replace with your catalog item sys_id)
  var itemId = cart.addItem('060f3afa3731300054b6a3549dbe5d3e');
  
  // Set variables for the catalog item
  cart.setVariable(itemId, 'ram', '16');
  cart.setVariable(itemId, 'os', 'win10');
  cart.setVariable(itemId, 'storage', '1tb');
  
  // Place the order
  var request = cart.placeOrder();
  
  // Log the request number
  gs.info("Service request created: " + request.number);

 

 

first, create this simple one anc use the above code in backgroup script or fix script to submit request. after poc compplete use the same code in your workflow.

 

I created the same via Fix Script and RITM/REQ created.

 

AshishKM_0-1731557429224.png

 

-Thanks,

AshishKM

 

 

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

I don't see how this can be used multiple times? This is something I'll need to do every time the two catalog items are submitted, but they could be days apart.

I thought the best way would be using a flow in the end, however can't get that to work either, I've posted the question here:

Issues with Flow update and delete record actions

Moedeb
Tera Guru

This has been achieved using a flow update record and delete record method.

Issues with Flow update and delete record actions