Action to Start a Flow

Mark Brogna
Tera Contributor

I am creating a RITM from an employee center request requesting new software, not yet in the Software Product Model table. During my flow, there is a task asking if there is an existing piece of software from the Software Product Model table that may satisfy this requirement in lieu of buying licenses for the new software request. As such, I evaluate if a suggested has been added to the task. If yes, I want to close the existing ritm and generated new ritm. In generating a new ritm I want to start the flow for this new ritm. Has anyone created an action in flow designer to start a flow for a new ritm?

 

I have created the following action that tests correctly. However, in calling the Start RITM Flow action in the main flow it breaks returning the following error:

MarkBrogna_0-1747250391097.png

 

Here is my action:

MarkBrogna_1-1747250426872.png

 

3 REPLIES 3

Robert H
Mega Sage

Hello @Mark Brogna ,

 

There is no need to manually trigger the Flow of a Requested Item.

You just need to submit the request itself and its Flow will start automatically.

You can submit a request through a Script Action using the CartJS API. For example:

 

var cart = new sn_sc.CartJS();
var request =
{
  'sysparm_id': '0d08837237153000158bbfc8bcbe5d02', // sys_id of Catalog Item
  'sysparm_quantity': '1',
  'variables':{
    'carrier': 'at_and_t_mobility',
    'data_plan': '500MB',
    'duration': 'eighteen_months',
    'color': 'slate',
    'storage': 'sixtyfour'
  }
}
cart.orderNow(request);

 

Regards,

Robert 

I need to manually trigger from the flow as it will share the parent Request. I am happy with the architecture. Just need to figure out how generate the flow.

Mark Brogna
Tera Contributor

again, the action works when testing the action. It only has issues when routing through the flow.