Passing values from Interaction to Service Catalog

menardJA
Tera Contributor

I am currently working with my Service Desk team to make their workflows more intuitive and document information such as phone number and location before they get to the Incident or Request form. I have added these as available fields on the Interaction form where they start all their calls from within Service Operations Workspace.

 

What I am struggling with is the UI Action for Create Request and how to include the phone number and location data from the interaction to the Service Catalog form similar to how the Name populated in Opened For already carries over.

 

Any insight would be appreciated.

8 REPLIES 8

Hi @Shivalika 

 

A few points that line you said doesn't make sense is included in the Incident UI action script. I tried to update the original script and unless I add the line as I show below to the end of the original script the UI action does not work, with the addition where I added it the UI action works but doesn't pull the value.

function onClick() {
	var result = g_form.submit('sysverb_ws_save');
	if (!result) { // failed form submission
		return;
	}
	result.then(function() {
		var params ={};
		params.sysparm_parent_table = "interaction";
		params.sysparm_parent_sys_id = g_form.getUniqueValue();
		g_service_catalog.openCatalogItem('sc_cat_item', '-1', params);
		phone_number = current.u_phone_number;
	});
}

Hello @menardJA 

 

You have just written phone number = .....

But how will the system recognize which phone number ? You should get the sys_id of the recently created record and then update it. Then it would work. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Hello @Shivalika,

The initial phone_number for that line is the what the variable is called on all of our catalog items and then I am saying to pull it from the current.u_phone_number which is the variable on the interaction. 

Shivalika
Mega Sage

Hello @menardJA 

 

Please confirm if you checked my answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for my efforts and also it can move from unsolved bucket to solved bucket. 

 

Regards, 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeE